instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I've recently discovered that it's possible to place .net assemblies on SQL Server >=2005 servers so that .net functions can be called in T/SQL statements.
I wondered what uses people found for these and how they perform?
| Using .NET assemblies in SQL Server, commonly referred to as SQL CLR (Common Language Runtime) integration, allows developers to write managed code (in languages like C# or VB.NET) that can be executed within the SQL Server environment. This capability was introduced in SQL Server 2005 and has several use cases, as wel... | 702 | [
{
"from": "human",
"value": "I've recently discovered that it's possible to place .net assemblies on SQL Server >=2005 servers so that .net functions can be called in T/SQL statements.\nI wondered what uses people found for these and how they perform?\n"
},
{
"from": "gpt",
"value": "Using .NET ... |
I want to get my databases under version control.
I'll always want to have at least some data in there (as alumb mentions: user types and administrators). I'll also often want a large collection of generated test data for performance measurements.
How would I apply version control to my database?
| Applying version control to your databases involves managing changes to database schema and data over time. Here's a structured approach to help you get started:
### 1. Choose a Version Control Strategy
#### a. **Schema Versioning**:
Use a database migration tool to track changes in the database schema. Common tools ... | 1,306 | [
{
"from": "human",
"value": "I want to get my databases under version control.\nI'll always want to have at least some data in there (as alumb mentions: user types and administrators). I'll also often want a large collection of generated test data for performance measurements.\nHow would I apply version con... |
I have a Delphi 7 application that has two views of a document (e.g. a WYSIWYG HTML edit might have a WYSIWYG view and a source view - not my real application). They can be opened in separate windows, or docked into tabs in the main window.
If I open a modal dialog from one of the separate forms, the main form is broug... | The issue you're encountering with modal dialogs in Delphi 7 is a common one, especially when dealing with multiple forms and windows. The problem arises because modal dialogs are generally designed to be associated with their owner forms, and if those forms aren't managed correctly, you can run into z-order issues.
I... | 1,506 | [
{
"from": "human",
"value": "I have a Delphi 7 application that has two views of a document (e.g. a WYSIWYG HTML edit might have a WYSIWYG view and a source view - not my real application). They can be opened in separate windows, or docked into tabs in the main window.\nIf I open a modal dialog from one of ... |
In a flow definition, I am trying to access a bean that has a dot in its ID
(example: <evaluate expression="bus.MyServiceFacade.someAction()" />
However, it does not work. SWF tries to find a bean "bus" instead.
Initially, I got over it by using a helper bean to load the required bean, but the solution is inelegant and... | In Spring Web Flow (SWF), the typical approach to accessing beans in expressions is to use the bean's ID directly, and as you noticed, using a dot (.) in the bean name can cause conflicts with how Spring parses expressions. This is because Spring treats the dot as a separator for navigating properties and methods in an... | 1,909 | [
{
"from": "human",
"value": "In a flow definition, I am trying to access a bean that has a dot in its ID\n(example: <evaluate expression=\"bus.MyServiceFacade.someAction()\" />\nHowever, it does not work. SWF tries to find a bean \"bus\" instead.\nInitially, I got over it by using a helper bean to load the ... |
I would like to use as and is as members of an enumeration. I know that this is possible in VB.NET to write it like this:
Public Enum Test
[as] = 1
[is] = 2
End Enum
How do I write the equivalent statement in C#?
The following code does not compile:
public enum Test
{
as = 1,
is = 2
}
| In C#, you can use reserved keywords as identifiers by enclosing them in `@` symbols. Therefore, to define an enum with `as` and `is` as members, you can write it like this:
```csharp
public enum Test
{
@as = 1,
@is = 2
}
```
This way, the compiler recognizes `@as` and `@is` as valid identifiers, allowing you... | 4,194 | [
{
"from": "human",
"value": "I would like to use as and is as members of an enumeration. I know that this is possible in VB.NET to write it like this:\nPublic Enum Test\n [as] = 1\n [is] = 2\nEnd Enum\n\nHow do I write the equivalent statement in C#?\nThe following code does not compile:\npublic enum ... |
The .NET IDisposable Pattern implies that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose.
This is logical, and is what I've always done in the rare situations where a finalizer is warranted.
However, what happens if I just do this:
class Foo : IDisposable
{
... | No, the .NET framework will not automatically call the `Dispose` method for you if you don't implement a finalizer and don't explicitly call `Dispose` in your own code.
When you implement the `IDisposable` interface in a class, it is the responsibility of the consumer of your class to call `Dispose` when they are don... | 1,004 | [
{
"from": "human",
"value": "The .NET IDisposable Pattern implies that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose.\nThis is logical, and is what I've always done in the rare situations where a finalizer is warranted.\nHowever, what happens if I ... |
We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I conditionally add where-clauses?
| In LINQ, you can conditionally add `where` clauses using a combination of method syntax and conditional expressions. The most common approach is to use the `IQueryable` interface, which allows you to build queries dynamically based on your filtering criteria.
Here’s a general example of how to conditionally add `where... | 1,457 | [
{
"from": "human",
"value": "We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I conditionally add where-clauses?\n"
},
{
"from": "gpt",
"value": "In LINQ, you can cond... |
I am currently using the following command to upload my site content:
scp -r web/* user@site.com:site.com/
This works great except that the .htaccess file is not sent. Presumably, this is because it's hidden.
I have tried adding a second line to send the file explicitely:
scp -r web/.htaccess user@site.com:site.com/.h... | When using `scp`, hidden files (those starting with a dot, like `.htaccess`) are not included in a wildcard match like `*`. To include the hidden files without prompting for your password multiple times, you have a couple of options:
### Option 1: Use `rsync`
`rsync` is a powerful tool that can be used for this purpo... | 1,562 | [
{
"from": "human",
"value": "I am currently using the following command to upload my site content:\nscp -r web/* user@site.com:site.com/\n\nThis works great except that the .htaccess file is not sent. Presumably, this is because it's hidden.\nI have tried adding a second line to send the file explicitely:\n... |
I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible with an iPhone app.
I've read this questio... | On a standard, unjailbroken iPhone, it is not possible to run an app with elevated privileges or as root. Apple's iOS is designed with strict security measures in place to ensure that apps run in a sandboxed environment. This means that each app operates with limited permissions, preventing it from accessing certain sy... | 2,998 | [
{
"from": "human",
"value": "I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible w... |
I was wondering if there are any alternatives to Microsoft's SQL Server Management Studio?
Not there's anything wrong with SSMS, but sometimes it just seem too big an application where all I want todo is browse/edit tables and run queries.
| Yes, there are several alternatives to Microsoft SQL Server Management Studio (SSMS) that can provide a lighter or more streamlined experience for browsing, editing tables, and running queries. Here are some popular options:
1. **Azure Data Studio**: This is a lightweight, cross-platform tool that offers a modern edit... | 2,307 | [
{
"from": "human",
"value": "I was wondering if there are any alternatives to Microsoft's SQL Server Management Studio?\nNot there's anything wrong with SSMS, but sometimes it just seem too big an application where all I want todo is browse/edit tables and run queries.\n"
},
{
"from": "gpt",
"va... |
On a recent Java project, we needed a free Java based real-time data plotting utility. After much searching, we found this tool called the Scientific Graphics Toolkit or SGT from NOAA. It seemed pretty robust, but we found out that it wasn't terribly configurable. Or at least not configurable enough to meet our need... | For real-time data plotting in Java, there are several libraries that can meet your requirements, especially if you found limitations with JFreeChart regarding live data. Here are some suggestions for Java-based libraries that support real-time plotting:
1. **XChart**:
- XChart is a simple and lightweight Java libr... | 1,156 | [
{
"from": "human",
"value": "On a recent Java project, we needed a free Java based real-time data plotting utility. After much searching, we found this tool called the Scientific Graphics Toolkit or SGT from NOAA. It seemed pretty robust, but we found out that it wasn't terribly configurable. Or at least... |
As a temporary stopgap until all the designers are in place we are currently hand-cranking a whole bunch of xml configuration files at work. One of the issues with this is file-versioning because people forget to update version numbers when updating the files (which is to be expected as humans generally suck at perfect... | To achieve your goal of pulling XML configuration files along with their version numbers from SharePoint, you can use the SharePoint REST API or the SharePoint Client Object Model with PowerShell or a scripting language like Python. Below are the steps to get the files and their version numbers using PowerShell, which ... | 207 | [
{
"from": "human",
"value": "As a temporary stopgap until all the designers are in place we are currently hand-cranking a whole bunch of xml configuration files at work. One of the issues with this is file-versioning because people forget to update version numbers when updating the files (which is to be exp... |
I was using Codeplex and tried connecting to their source control using Team Explorer, with no joy.
I also tried connecting with HTTPS or HTTP, using the server name and the project name. As I do not have a user account on Codeplex I could not login.
I am just trying to check out some code without changing it. My ques... | As of 2017, CodePlex has been officially shut down, which means that the source control services offered by CodePlex are no longer available. However, if you are trying to access legacy projects or repositories that were previously hosted there, you have a few options:
1. **Check Archived Projects**: Many projects hav... | 2,111 | [
{
"from": "human",
"value": "I was using Codeplex and tried connecting to their source control using Team Explorer, with no joy. \nI also tried connecting with HTTPS or HTTP, using the server name and the project name. As I do not have a user account on Codeplex I could not login.\nI am just trying to check... |
When writing a switch statement, there appears to be two limitations on what you can switch on in case statements.
For example (and yes, I know, if you're doing this sort of thing it probably means your object-oriented (OO) architecture is iffy - this is just a contrived example!),
Type t = typeof(int);
switch (t)... | The limitations you've encountered with switch statements in C# (and many other languages) stem from design decisions aimed at ensuring both performance and clarity of the language. Let's explore the reasons behind these restrictions:
1. **Performance**: The switch statement is optimized for performance, particularly ... | 524 | [
{
"from": "human",
"value": "When writing a switch statement, there appears to be two limitations on what you can switch on in case statements.\nFor example (and yes, I know, if you're doing this sort of thing it probably means your object-oriented (OO) architecture is iffy - this is just a contrived exampl... |
I'm getting a Connection Busy With Results From Another Command error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
| The "Connection Busy With Results From Another Command" error you are experiencing in SQL Server, particularly with the SQL Server Native Client when dealing with SQL Server 2000, typically occurs when there are multiple active result sets (MARS) or when a connection is being reused while still processing a previous co... | 1,415 | [
{
"from": "human",
"value": "I'm getting a Connection Busy With Results From Another Command error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?\n"
},
{
... |
When using 3rd party libraries/components in production projects, are you rigorous about using only released versions of said libraries?
When do you consider using a pre-release or beta version of a library (in dev? in production, under certain circumstances)?
If you come across a bug or shortcoming of the library an... | When it comes to using third-party libraries and components in production projects, the approach to versioning and bug handling can vary depending on several factors. Here are some best practices and considerations for managing third-party libraries:
### 1. Using Released Versions
- **Rigorous Approach**: Generally, i... | 933 | [
{
"from": "human",
"value": "When using 3rd party libraries/components in production projects, are you rigorous about using only released versions of said libraries?\nWhen do you consider using a pre-release or beta version of a library (in dev? in production, under certain circumstances)? \nIf you come ac... |
As a LAMP developer considering moving to a .Net IIS platform, one of my concerns is the loss of productivity due to lack of shell... Has anyone else had this experience? Is there possibly a Linux shell equivalent for Windows?
| Transitioning from a LAMP (Linux, Apache, MySQL, PHP) stack to a .NET (specifically on IIS) environment can indeed bring about concerns regarding productivity, especially if you're accustomed to the powerful command-line interface (CLI) available in Linux.
### Key Points to Consider:
1. **Windows Command Line and Pow... | 359 | [
{
"from": "human",
"value": "As a LAMP developer considering moving to a .Net IIS platform, one of my concerns is the loss of productivity due to lack of shell... Has anyone else had this experience? Is there possibly a Linux shell equivalent for Windows?\n"
},
{
"from": "gpt",
"value": "Transi... |
Using the same sort command with the same input produces different results on different machines. How do I fix that?
| If the `sort` command produces different results on different machines, there could be several reasons for this inconsistency. Here are some potential causes and their corresponding solutions:
1. **Locale Settings**:
Different machines may have different locale settings, which can affect the sorting order. You can ... | 2,248 | [
{
"from": "human",
"value": "Using the same sort command with the same input produces different results on different machines. How do I fix that?\n"
},
{
"from": "gpt",
"value": "If the `sort` command produces different results on different machines, there could be several reasons for this inco... |
Ok, I have a strange exception thrown from my code that's been bothering me for ages.
System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
at System.Net.Sockets.Socket.Accept()
at System.Net.Sockets.TcpListener.AcceptTcpClient()
MSDN isn't terribly helpful o... | The `SocketException` you're encountering, specifically with the message "A blocking operation was interrupted by a call to WSACancelBlockingCall", typically indicates that a blocking operation (in your case, `AcceptTcpClient()`) was interrupted by a call to `WSACancelBlockingCall`. This can occur in various scenarios,... | 859 | [
{
"from": "human",
"value": "Ok, I have a strange exception thrown from my code that's been bothering me for ages.\nSystem.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall\n at System.Net.Sockets.Socket.Accept()\n at System.Net.Sockets.TcpListener.Acce... |
I was using a CASE called MAGIC for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied.
In some way a felt uncomfortable, cause, there is no code and everything I w... | Your experience with the CASE tool MAGIC is not uncommon among developers who initially find such tools promising but later face challenges as the project evolves. Here are a few reasons why CASE tools like MAGIC may not be as popular as traditional programming languages and environments like Visual Studio .NET, Java E... | 683 | [
{
"from": "human",
"value": "I was using a CASE called MAGIC for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied.\nIn some way a felt uncomfortable, ... |
For certain types of sql queries, an auxiliary table of numbers can be very useful. It may be created as a table with as many rows as you need for a particular task or as a user defined function that returns the number of rows required in each query.
What is the optimal way to create such a function?
| Creating an auxiliary table of numbers can indeed be very useful for various SQL tasks, such as generating sequences, performing joins, or even simulating loops in SQL. There are multiple ways to create an auxiliary table of numbers, and the optimal method often depends on the specific use case, database system, and pe... | 761 | [
{
"from": "human",
"value": "For certain types of sql queries, an auxiliary table of numbers can be very useful. It may be created as a table with as many rows as you need for a particular task or as a user defined function that returns the number of rows required in each query.\nWhat is the optimal way to ... |
I am working on localization for a asp.net application that consists of several projects.
For this, there are some strings that are used in several of these projects. Naturally, I would prefer to have only one copy of the resource file in each project.
Since the resource files don't have an namespace (at least as far a... | Yes, you can reference resource files (resx) from one project in another project within the same solution in an ASP.NET application. While resource files don't have namespaces like regular classes, you can still access their strings if you manage the resource files correctly. Here’s how you can achieve that:
### Steps... | 37 | [
{
"from": "human",
"value": "I am working on localization for a asp.net application that consists of several projects.\nFor this, there are some strings that are used in several of these projects. Naturally, I would prefer to have only one copy of the resource file in each project.\nSince the resource files... |
Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3?
| For ActionScript 3 (AS3), there are a few libraries and techniques you can use to access web services without relying on Flex dependencies. Here are some options that you can consider:
1. **HTTPService Class**: Although it is a part of Flex, you can manually use the `URLLoader` class in AS3 to perform HTTP requests. T... | 1,633 | [
{
"from": "human",
"value": "Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3?\n"
},
{
"from": "gpt",
"value": "For ActionScript 3 (AS3), there are a few librar... |
I'm using .htaccess and mod_rewrite to point to files that reside behind the DocumentRoot. My folder structure looks like this:
home/
webroot/
other_files/
I have a .htaccess file in webroot with the following content:
RewriteEngine on
RewriteRule ^(.*)$ /home/other_files/$1
If I try to access http://example... | Yes, it is generally possible to serve files that are located outside of the `DocumentRoot`, but it requires a different approach than what you've used in your `.htaccess` configuration. By default, the web server is configured to restrict access to files outside of the `DocumentRoot` for security reasons.
If you want... | 2,172 | [
{
"from": "human",
"value": "I'm using .htaccess and mod_rewrite to point to files that reside behind the DocumentRoot. My folder structure looks like this:\nhome/\n webroot/\n other_files/\n\nI have a .htaccess file in webroot with the following content:\n\nRewriteEngine on\nRewriteRule ^(.*)$ /home/... |
I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here.
What can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite?
Are there any "short-cuts"? Can we transfer control in any way (so that a mapping may occur between page... | If you're using an MVC framework like Zend Framework but your hosting provider does not support `mod_rewrite`, you can still implement routing without it. Here are some potential solutions:
### 1. **Front Controller Script**:
You can handle requests through a single entry point in your application, usually an `index.p... | 914 | [
{
"from": "human",
"value": "I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here.\nWhat can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite?\nAre there any \"short-cuts\"? Can we transfer control in any ... |
I've got a JavaScript "object", built this way:
function foo()
{
this.length = 0;
}
foo.prototype.getLength = function()
{
return this.length;
}
...
I know how to emulate namespaces with singleton JavaScript objects, but what is the best way to "namepace" an object such as that above that will intanced?
I k... | You can achieve namespacing for instances of your JavaScript objects using a couple of different techniques. Since you're already using jQuery, you can take advantage of jQuery's `jQuery.namespace` functionality or create your own simple namespacing solution.
### Option 1: Using jQuery for Namespacing
jQuery allows y... | 1,793 | [
{
"from": "human",
"value": "I've got a JavaScript \"object\", built this way:\nfunction foo()\n{\n this.length = 0;\n}\n\nfoo.prototype.getLength = function()\n{\n return this.length;\n}\n\n...\n\nI know how to emulate namespaces with singleton JavaScript objects, but what is the best way to \"namepa... |
Apparantly when users right-click in our WPF application, and they use the Windows Classic theme, the default ContextMenu of the TextBox (which contains Copy, Cut and Paste) has a black background.
I know this works well:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://sch... | To disable or style the default `ContextMenu` for all `TextBox` controls in a WPF application, you can use a style that targets `TextBox`. However, there are some corrections needed in your attempt to create a style.
In your second example, you used `{x:Type TextBox}` as a key, which is not correct. The key for your s... | 2,443 | [
{
"from": "human",
"value": "Apparantly when users right-click in our WPF application, and they use the Windows Classic theme, the default ContextMenu of the TextBox (which contains Copy, Cut and Paste) has a black background.\nI know this works well:\n<Page xmlns=\"http://schemas.microsoft.com/winfx/2006/x... |
SVN externals allow you to make an SVN folder appear as if it's at another location. A good use for this is having a common folder shared across all of your projects in SVN.
I have a /trunk/common folder in SVN that I share via several different project.
Example:
Project1 : /trunk/project1/depends
Project2 : /trunk/p... | By default, Subversion (SVN) logs do not include external references (svn:externals) when you view the log for a parent directory or project. This is a known behavior, as externals are treated as separate entities in the SVN repository.
Unfortunately, as of my last knowledge update in October 2023, there is no direct ... | 1,918 | [
{
"from": "human",
"value": "SVN externals allow you to make an SVN folder appear as if it's at another location. A good use for this is having a common folder shared across all of your projects in SVN.\nI have a /trunk/common folder in SVN that I share via several different project.\nExample:\n\nProject1 ... |
I'm trying to write a RegEx for a code generator (in C#) to determine a proper class or package name of an AS3 class.
I know that class names
must start with a letter (capital or otherwise)
any other digit can be alphanumeric
cannot have spaces
Is there anything else?
| You're on the right track with your requirements for a proper class or package name in ActionScript 3 (AS3). Here's a summary of the rules for naming classes and packages in AS3, along with an appropriate Regular Expression (RegEx) pattern:
1. **Starts with a letter**: The name must begin with an alphabetical characte... | 1,425 | [
{
"from": "human",
"value": "I'm trying to write a RegEx for a code generator (in C#) to determine a proper class or package name of an AS3 class.\nI know that class names\n\nmust start with a letter (capital or otherwise)\nany other digit can be alphanumeric\ncannot have spaces\n\nIs there anything else?\n... |
Possible Duplicate:
What is a monad?
I think I understand what 'Maybe Monads' are, but I'm not sure about the other types.
| Monads are a concept from category theory that have been widely adopted in functional programming. They are used to handle side effects, manage state, or encapsulate computations in a way that allows for more abstract and composable code.
Here’s a brief overview of several common types of monads, in addition to the `M... | 2,183 | [
{
"from": "human",
"value": "\nPossible Duplicate:\nWhat is a monad? \n\nI think I understand what 'Maybe Monads' are, but I'm not sure about the other types.\n"
},
{
"from": "gpt",
"value": "Monads are a concept from category theory that have been widely adopted in functional programming. They ... |
I want to transform an XML document. The source XML looks like this:
<svc:ElementList>
<svc:Element>
<Year>2007</Year>
</svc:Element>
<svc:Element>
<Year>2006</Year>
</svc:Element>
<svc:Element>
<Year>2005</Year>
</svc:Element>
</svc:ElementList>
I want to turn that into... | Yes, it looks like you're facing a namespace issue along with some misuse of the XPath expression in your XSLT.
Since the `Element` tags are in the `svc` namespace, you need to declare the `svc` namespace in your XSLT and use it correctly in your XPath expressions. Here's how you can do this:
1. Declare the `svc` nam... | 1,374 | [
{
"from": "human",
"value": "I want to transform an XML document. The source XML looks like this:\n<svc:ElementList>\n <svc:Element>\n <Year>2007</Year>\n </svc:Element>\n <svc:Element>\n <Year>2006</Year>\n </svc:Element>\n <svc:Element>\n <Year>2005</Year>\n </svc:El... |
How do I perform an IF...THEN in an SQL SELECT statement?
For example:
SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product
| In SQL, you can perform conditional logic using the `CASE` statement in your `SELECT` query. The `IF` function you are trying to use is specific to certain databases, such as MySQL, but it can be adapted using `CASE` for better compatibility across different SQL dialects.
Here's how you can rewrite your query using th... | 2,518 | [
{
"from": "human",
"value": "How do I perform an IF...THEN in an SQL SELECT statement?\nFor example:\nSELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product\n\n"
},
{
"from": "gpt",
"value": "In SQL, you can perform conditional logic using the `CASE` statement in your `SE... |
Which C#/.NET Dependency Injection frameworks are worth looking into?
And what can you say about their complexity and speed.
| In the C#/.NET ecosystem, there are several popular dependency injection (DI) frameworks that you can consider. Each has its own strengths, complexities, and performance characteristics. Here’s a rundown of some of the noteworthy frameworks:
### 1. **Microsoft.Extensions.DependencyInjection**
- **Complexity**: Low
- *... | 655 | [
{
"from": "human",
"value": "Which C#/.NET Dependency Injection frameworks are worth looking into?\nAnd what can you say about their complexity and speed.\n"
},
{
"from": "gpt",
"value": "In the C#/.NET ecosystem, there are several popular dependency injection (DI) frameworks that you can consid... |
At what point does a MySQL database start to lose performance?
Does physical database size matter?
Do number of records matter?
Is any performance degradation linear or exponential?
I have what I believe to be a large database, with roughly 15M records which take up almost 2GB. Based on these numbers, is there any in... | Performance degradation in a MySQL database can depend on multiple factors, and it’s not always straightforward to pinpoint an exact threshold where performance starts to decline. Here are some key points to consider:
### Factors Affecting Performance
1. **Physical Database Size**:
- The size of the database can i... | 98 | [
{
"from": "human",
"value": "At what point does a MySQL database start to lose performance?\n\nDoes physical database size matter?\nDo number of records matter?\nIs any performance degradation linear or exponential?\n\nI have what I believe to be a large database, with roughly 15M records which take up almo... |
I build up an array of strings with
string[] parts = string.spilt(" ");
And get an array with X parts in it, I would like to get a copy of the array of strings starting at element
parts[x-2]
Other than the obvious brute force approach (make a new array and insert strings), is there a more elegant way to do this in C... | In C#, you can create a subarray from an existing array using the `Array.Copy` method or by using LINQ to create a more elegant solution. Here are a couple of approaches you can take:
### 1. Using `Array.Copy`
You can use `Array.Copy` to create a new array starting from a specific index. Here’s how you can do it:
``... | 3,082 | [
{
"from": "human",
"value": "I build up an array of strings with\nstring[] parts = string.spilt(\" \");\n\nAnd get an array with X parts in it, I would like to get a copy of the array of strings starting at element \nparts[x-2]\n\nOther than the obvious brute force approach (make a new array and insert stri... |
Using JDeveloper, I started developing a set of web pages for a project at work. Since I didn't know much about JDev at the time, I ran over to Oracle to follow some tutorials. The JDev tutorials recommended doing JSPX instead of JSP, but didn't really explain why. Are you developing JSPX pages? Why did you decide to d... | JSPX (JavaServer Pages XML) is a file format that allows developers to create web pages using XML syntax. This format is often recommended over traditional JSP (JavaServer Pages) for several reasons, especially in the context of developing applications with frameworks like ADF (Application Development Framework) in JDe... | 1,685 | [
{
"from": "human",
"value": "Using JDeveloper, I started developing a set of web pages for a project at work. Since I didn't know much about JDev at the time, I ran over to Oracle to follow some tutorials. The JDev tutorials recommended doing JSPX instead of JSP, but didn't really explain why. Are you devel... |
How do you pass $_POST values to a page using cURL?
| To pass `$_POST` values to a page using cURL in PHP, you can use the `curl_setopt()` function to set the necessary options for your cURL session. Below is a step-by-step guide on how to do this:
1. **Initialize cURL session**: Use `curl_init()` to start a new cURL session.
2. **Set the URL**: Use `curl_setopt()` to sp... | 1,748 | [
{
"from": "human",
"value": "How do you pass $_POST values to a page using cURL?\n"
},
{
"from": "gpt",
"value": "To pass `$_POST` values to a page using cURL in PHP, you can use the `curl_setopt()` function to set the necessary options for your cURL session. Below is a step-by-step guide on how... |
In Visual Studio 2005, whenever I would view a file in the main editor, the Solution Explorer would find and highlight that file. Some time ago, this stopped working and the Solution Explorer would do nothing.
This has become quite a pain since following a chain of "Go To Definition"s can lead you all over your soluti... | In Visual Studio 2005, the feature that automatically highlights the currently opened file in the Solution Explorer is controlled by a setting that may have been changed inadvertently. To enable this feature again, follow these steps:
1. Open **Visual Studio 2005**.
2. Go to the **Tools** menu and select **Options**.
... | 3,508 | [
{
"from": "human",
"value": "In Visual Studio 2005, whenever I would view a file in the main editor, the Solution Explorer would find and highlight that file. Some time ago, this stopped working and the Solution Explorer would do nothing.\nThis has become quite a pain since following a chain of \"Go To Def... |
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?
If so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with.
I currently have a Ruby rake file that has steps for doing building and running tests, and wanted ... | Yes, it is certainly possible to set up CruiseControl to build an OS X Cocoa/Objective-C project. Both CruiseControl and CruiseControl.rb can handle this task, but the choice between them often comes down to personal preference and your existing environment.
### Choosing CruiseControl or CruiseControl.rb
- **CruiseCo... | 1,535 | [
{
"from": "human",
"value": "Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?\nIf so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with. \nI currently have a Ruby rake file that has steps for do... |
I know that the following is true
int i = 17; //binary 10001
int j = i << 1; //decimal 34, binary 100010
But, if you shift too far, the bits fall off the end. Where this happens is a matter of the size of integer you are working with.
Is there a way to perform a shift so that the bits rotate around to the other side?... | Yes, you can perform a circular shift (or rotate) operation using a combination of bitwise operations. Specifically, for a left rotate on an integer, you can use the following approach:
Assuming you are working with a 32-bit integer, you can define a left rotate operation as follows:
```c
int rotate_left(int value, i... | 2,951 | [
{
"from": "human",
"value": "I know that the following is true\nint i = 17; //binary 10001\nint j = i << 1; //decimal 34, binary 100010\n\nBut, if you shift too far, the bits fall off the end. Where this happens is a matter of the size of integer you are working with.\nIs there a way to perform a shift so ... |
I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? :
<Border Name="TrackBackground"
Margin="0"
CornerRadius="2"
Grid.Row="1"
Grid.Column... | It looks like you're running into a couple of issues related to data binding in your XAML. Here’s a breakdown of the problems and solutions for your specific case.
### Issues
1. **ElementName Binding**: The `ElementName` binding is looking for a named element `Part_Track`, but you've defined your Canvas with the name ... | 354 | [
{
"from": "human",
"value": "I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? :\n<Border Name=\"TrackBackground\"\n Margin=\"0\"\n CornerRadius=\"2\" ... |
Been going over my predecessor's code and see usage of the "request" scope frequently. What is the appropriate usage of this scope?
| In web applications, particularly those built using frameworks like JavaServer Faces (JSF), the "request" scope is a common scope used to manage the lifecycle of data and components. The "request" scope refers to a scope where data is available for the duration of a single HTTP request. Here are some appropriate usages... | 1,123 | [
{
"from": "human",
"value": "Been going over my predecessor's code and see usage of the \"request\" scope frequently. What is the appropriate usage of this scope?\n"
},
{
"from": "gpt",
"value": "In web applications, particularly those built using frameworks like JavaServer Faces (JSF), the \"re... |
Currently I am setting up an application that can deploy other web apps to Tomcat 6 clusters. It is set up right now to have a one to one relationship between deployed web application and a cluster. My current reasoning for this is so that I can change the JVM args of the Tomcat server without disrupting other applic... | When considering the deployment of web applications in Tomcat clusters, the best practice largely depends on several factors, including the size of your applications, resource requirements, operational considerations, and your deployment architecture. Here are some key points to consider when deciding whether to deploy... | 672 | [
{
"from": "human",
"value": "Currently I am setting up an application that can deploy other web apps to Tomcat 6 clusters. It is set up right now to have a one to one relationship between deployed web application and a cluster. My current reasoning for this is so that I can change the JVM args of the Tomc... |
I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are... | When it comes to running a Java application as a daemon on Unix-like systems or as a Windows service, there are indeed several options beyond the Java Service Wrapper, Apache Commons 'jsvc', and 'procrun'. Here are some other open-source options that you might find helpful:
### 1. **Spring Boot with Spring Boot Daemon... | 438 | [
{
"from": "human",
"value": "I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service Wrapper looks like it's the best ... |
How do I delimit a Javascript data-bound string parameter in an anchor OnClick event?
I have an anchor tag in an ASP.NET Repeater control.
The OnClick event of the anchor contains a call to a Javascript function.
The Javascript function takes a string for its input parameter.
The string parameter is populated with a d... | To pass a string parameter from the `OnClick` event of an anchor tag in an ASP.NET Repeater to a JavaScript function, you can use HTML entity encoding to handle the quotes. Your goal is to ensure that the string value from your data source is properly enclosed in quotes that JavaScript can understand, while avoiding co... | 870 | [
{
"from": "human",
"value": "How do I delimit a Javascript data-bound string parameter in an anchor OnClick event?\n\nI have an anchor tag in an ASP.NET Repeater control.\nThe OnClick event of the anchor contains a call to a Javascript function.\nThe Javascript function takes a string for its input paramete... |
What would be the best version control system to learn as a beginner to source control?
| As a beginner to source control, the best version control system to learn is **Git**. Here are several reasons why Git is widely recommended:
1. **Widespread Use**: Git is the most popular version control system and is used by many companies and projects, making it a valuable skill for job seekers.
2. **Community and... | 3,111 | [
{
"from": "human",
"value": "What would be the best version control system to learn as a beginner to source control?\n"
},
{
"from": "gpt",
"value": "As a beginner to source control, the best version control system to learn is **Git**. Here are several reasons why Git is widely recommended:\n\n1... |
Is it possible in Word 2007 to create a revision history table automatically using track changes or some other method?
e.g.
Revision History
DateVersionDescriptionAuthor
16/09/20081.0CreatedJohn Smith
17/09/20081.1Fixed dumb spelling errorsColin Jones
| In Microsoft Word 2007, there is no built-in feature that automatically generates a revision history table from Track Changes. However, you can create a revision history manually or use some semi-automated methods to achieve a similar outcome.
### Manual Method
1. **Track Changes**: Ensure you have Track Changes enab... | 3,025 | [
{
"from": "human",
"value": "Is it possible in Word 2007 to create a revision history table automatically using track changes or some other method?\ne.g.\nRevision History\n\nDateVersionDescriptionAuthor\n16/09/20081.0CreatedJohn Smith\n17/09/20081.1Fixed dumb spelling errorsColin Jones\n\n"
},
{
"f... |
I know how to use tags in subversion. I create a tag every time I get to a release milestone.
What I don't quite understand is how they work.
Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says GO TO /trunk/project/ Revision 5 or whatev... | Tags in Subversion (SVN) are indeed a bit of a unique concept, and your understanding is on the right track. Let's break down your questions one by one:
1. **How do tags work?**
In Subversion, a tag is created using the `svn copy` command, which creates a new directory in the repository that points to a specific ... | 1,449 | [
{
"from": "human",
"value": "I know how to use tags in subversion. I create a tag every time I get to a release milestone.\nWhat I don't quite understand is how they work. \nIs a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says... |
What is the dependency inversion principle and why is it important?
| The Dependency Inversion Principle (DIP) is one of the five SOLID principles of object-oriented design, formulated by Robert C. Martin (Uncle Bob). The principle states:
1. High-level modules should not depend on low-level modules. Both should depend on abstractions.
2. Abstractions should not depend on details. Detai... | 1,787 | [
{
"from": "human",
"value": "What is the dependency inversion principle and why is it important?\n"
},
{
"from": "gpt",
"value": "The Dependency Inversion Principle (DIP) is one of the five SOLID principles of object-oriented design, formulated by Robert C. Martin (Uncle Bob). The principle stat... |
I am getting back into a bit more .NET after a few-years of not using it full-time and am wondering what the good unit testing packages are these days.
I'm familiar with NUnit (a few years ago) and have played briefly around with IronRuby, with the goal of getting something like RSpec going, but I don't know much beyon... | Welcome back to .NET! The ecosystem has evolved significantly over the past few years, and there are a number of robust unit testing frameworks and tools you can use. Here are some popular choices:
### 1. **NUnit**
NUnit is still one of the most widely used unit testing frameworks in the .NET ecosystem. It's feature-r... | 529 | [
{
"from": "human",
"value": "I am getting back into a bit more .NET after a few-years of not using it full-time and am wondering what the good unit testing packages are these days.\nI'm familiar with NUnit (a few years ago) and have played briefly around with IronRuby, with the goal of getting something lik... |
I'm new to development (an admin by trade) and I'm setting up my development environment and I would like to set up a CruiseControl.Net server on Server 2008. A quick Google did not turn up any instructions for getting it running on IIS 7.0, so I was wondering if anyone had experience getting this set up.
| Setting up CruiseControl.NET on Windows Server 2008 with IIS 7.0 involves a few steps. Below, I've outlined a general approach to get you started:
### Prerequisites
1. **Install .NET Framework**: Ensure you have the appropriate version of the .NET Framework installed (usually .NET Framework 4.0 for CruiseControl.NET)... | 229 | [
{
"from": "human",
"value": "I'm new to development (an admin by trade) and I'm setting up my development environment and I would like to set up a CruiseControl.Net server on Server 2008. A quick Google did not turn up any instructions for getting it running on IIS 7.0, so I was wondering if anyone had exp... |
I am trying to link two fields of a given table to the same field in another table.
I have done this before so I can't work out what is wrong this time.
Anyway:
Table1
- Id (Primary)
- FK-Table2a (Nullable, foreign key relationship in DB to Table2.Id)
- FK-Table2b (Nullable, foreign key relationship in DB to Table2.Id)... | It sounds like you're encountering an issue with your LINQ to SQL mapping in a .dbml file, particularly with setting up multiple foreign key relationships from one table to another. Here are some steps and considerations to troubleshoot the issue:
### 1. Verify the Database Schema
Ensure that your database schema is c... | 1,133 | [
{
"from": "human",
"value": "I am trying to link two fields of a given table to the same field in another table.\nI have done this before so I can't work out what is wrong this time.\nAnyway:\nTable1\n- Id (Primary)\n- FK-Table2a (Nullable, foreign key relationship in DB to Table2.Id)\n- FK-Table2b (Nullabl... |
I was trying to add a favicon to a website earlier and looked for a better way to implement this than to dump a favicon.ico file in the root of the website.
I found this nice little guide: How to Add a Favicon. However, the preferred method did not work in IE (7) and the second method is the old fashioned way (which I ... | Yes, there is a third method to add a favicon that should work across most popular browsers, including older versions like Internet Explorer 7. Here’s how you can implement it:
### Step 1: Create Your Favicon
Ensure you have your favicon file in various formats. The most common formats are:
- **ICO**: This is the tr... | 1,179 | [
{
"from": "human",
"value": "I was trying to add a favicon to a website earlier and looked for a better way to implement this than to dump a favicon.ico file in the root of the website.\nI found this nice little guide: How to Add a Favicon. However, the preferred method did not work in IE (7) and the second... |
Is it possible to create a trigger that will not be in a transaction?
I want to update data on a linked server with a trigger but due to firewall issues we can't create a distributed transaction between the two servers.
| In SQL Server, triggers are inherently part of the transaction that is fired when the trigger is executed. Therefore, when a trigger is executed, it cannot be executed outside of a transaction context. This behavior applies to both standard triggers (like `AFTER INSERT`, `AFTER UPDATE`, and `AFTER DELETE`) and instead-... | 1,523 | [
{
"from": "human",
"value": "Is it possible to create a trigger that will not be in a transaction? \nI want to update data on a linked server with a trigger but due to firewall issues we can't create a distributed transaction between the two servers.\n"
},
{
"from": "gpt",
"value": "In SQL Serve... |
Have you ever seen any of there error messages?
-- SQL Server 2000
Could not allocate ancillary table for view or function resolution.
The maximum number of tables in a query (256) was exceeded.
-- SQL Server 2005
Too many table names in the query. The maximum allowable is 256.
If yes, what have you done?
Given up? C... | It sounds like you're dealing with a particularly complex SQL query that has reached the limits of what SQL Server can handle in terms of table joins or view references. This is a common issue in environments where reports or applications have grown organically without careful consideration for architectural limits.
... | 2,224 | [
{
"from": "human",
"value": "Have you ever seen any of there error messages?\n\n-- SQL Server 2000\nCould not allocate ancillary table for view or function resolution.\nThe maximum number of tables in a query (256) was exceeded.\n-- SQL Server 2005\nToo many table names in the query. The maximum allowable i... |
What's the most useful hack you've discovered for Mozilla's new Ubiquity tool?
| Ubiquity was a tool developed by Mozilla that aimed to enhance web browsing by allowing users to interact with the web in a more intuitive way through natural language commands. While I can't provide updates on any new developments after October 2023, one of the most useful hacks I discovered for Ubiquity was the abili... | 3,509 | [
{
"from": "human",
"value": "What's the most useful hack you've discovered for Mozilla's new Ubiquity tool?\n\n"
},
{
"from": "gpt",
"value": "Ubiquity was a tool developed by Mozilla that aimed to enhance web browsi... |
Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed?
In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0.
How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?
| LINQ (Language Integrated Query) was introduced with .NET Framework 3.5, which means that to use LINQ features, your application must run on .NET 3.5 or later. While it's true that LINQ is often considered syntactic sugar over traditional collection manipulation, the actual implementation of LINQ methods like `Select`,... | 1,302 | [
{
"from": "human",
"value": "Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed?\nIn theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0.\nHow can I write LINQ without using the .NET 3.5 libraries? W... |
I'm an ASP.NET developer who has used Microsoft SQL Server for all my database needs (both at work and for personal projects).
I am considering trying out the LAMP stack for some of my personal projects.
What are some of the main differences between MySQL and SQL Server? Is using stored procedures a common practice i... | Making the transition from Microsoft SQL Server to MySQL can be a rewarding experience, especially if you're looking to explore the LAMP stack (Linux, Apache, MySQL, PHP/Python/Perl). Here are some key differences between MySQL and SQL Server, as well as some guidance on best practices and resources for your transition... | 503 | [
{
"from": "human",
"value": "I'm an ASP.NET developer who has used Microsoft SQL Server for all my database needs (both at work and for personal projects). \nI am considering trying out the LAMP stack for some of my personal projects. \nWhat are some of the main differences between MySQL and SQL Server? Is ... |
Are PHP variables passed by value or by reference?
| In PHP, variables are generally passed by value. This means that when you pass a variable to a function, a copy of the variable is created within the function. Any modifications to that variable inside the function do not affect the original variable outside the function.
However, PHP also supports passing variables b... | 3,094 | [
{
"from": "human",
"value": "Are PHP variables passed by value or by reference?\n"
},
{
"from": "gpt",
"value": "In PHP, variables are generally passed by value. This means that when you pass a variable to a function, a copy of the variable is created within the function. Any modifications to th... |
When I goto view the property page for my CSharp test application I get the following error.
"An error occurred trying to load the page. COM object that has been seperated from its underlying RCW cannot be used."
The only thing that seems to fix it is rebooting my PC!
| The error message "COM object that has been separated from its underlying RCW cannot be used" usually indicates an issue with a COM object that your C# application is trying to interact with. This can happen when the COM object is no longer valid, often due to it being released or finalized, or due to a threading issue... | 1,883 | [
{
"from": "human",
"value": "When I goto view the property page for my CSharp test application I get the following error.\n\"An error occurred trying to load the page. COM object that has been seperated from its underlying RCW cannot be used.\"\nThe only thing that seems to fix it is rebooting my PC!\n"
}... |
As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks!
| Yes, it is possible to run multiple instances of an Adobe AIR application, but it requires some modifications to your app's code or packaging. By default, Adobe AIR applications do not allow multiple instances to run simultaneously. However, you can implement a workaround by using the following methods:
### 1. Use the... | 1,593 | [
{
"from": "human",
"value": "As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks!\n"
},
{
"from": "gpt",
... |
I have a php server that is running my domain name. For testing purposes I am running an asp.net on a dotted quad IP. I am hoping to link them together via either PHP or some kind of DNS/.htaccess voodoo.
So if I go to www.mydomain.com/test it redirects (but keeps the url of (www.mydomain.com/test) in the browser's a... | To achieve the desired functionality, where navigating to `www.mydomain.com/test` serves content from your ASP.NET application hosted at a different IP address while keeping the URL in the browser's address bar unchanged, you can use a reverse proxy setup. This is often accomplished using a web server like Apache or Ng... | 89 | [
{
"from": "human",
"value": "I have a php server that is running my domain name. For testing purposes I am running an asp.net on a dotted quad IP. I am hoping to link them together via either PHP or some kind of DNS/.htaccess voodoo.\nSo if I go to www.mydomain.com/test it redirects (but keeps the url of ... |
Here's what I use:
SELECT CAST(FLOOR(CAST(getdate() as FLOAT)) as DATETIME)
I'm thinking there may be a better and more elegant way.
Requirements:
It has to be as fast as possible (the less casting, the better).
The final result has to be a datetime type, not a string.
| Your current SQL query effectively returns the current date at midnight (00:00:00) by converting the current date and time to a `FLOAT`, flooring it to remove the time portion, and then casting it back to `DATETIME`. While it works, there's indeed a simpler and more efficient way to achieve the same result without unne... | 2,487 | [
{
"from": "human",
"value": "Here's what I use:\nSELECT CAST(FLOOR(CAST(getdate() as FLOAT)) as DATETIME)\n\nI'm thinking there may be a better and more elegant way.\nRequirements:\n\nIt has to be as fast as possible (the less casting, the better).\nThe final result has to be a datetime type, not a string.\... |
While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:
public String appendWithDelimiter( String original, String... | In Java, a great way to handle building a dynamic list of elements that you want to join into a comma-separated string is to use a `List`. The `List` interface allows you to collect elements without worrying about the number of items in advance, and then you can easily convert that list to a comma-delimited string usin... | 2,385 | [
{
"from": "human",
"value": "While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:\npublic String ap... |
I've recently been working with a MySQL database, and using MySQL workbench to design the Database.
When I use the export to SQL function, so I can actually get the layout in to the Database, I get:
"Error 1005: Cannot create table"
This appears to be related to Foreign Keys in the create table statement.
Does anybod... | The "Error 1005: Cannot create table" typically indicates that there is an issue with the foreign key constraints when you're trying to create a table in MySQL. This error can be caused by a number of factors. Here are some steps you can take to troubleshoot and resolve the issue:
1. **Check Data Types**: Ensure that ... | 644 | [
{
"from": "human",
"value": "I've recently been working with a MySQL database, and using MySQL workbench to design the Database.\nWhen I use the export to SQL function, so I can actually get the layout in to the Database, I get:\n\n\"Error 1005: Cannot create table\"\n\nThis appears to be related to Foreign... |
I have a web-service that I will be deploying to dev, staging and production. Along with this will be an ASP.net application that will be deploying separately but also in those three stages.
What is the most pragmatic way to change the following line in the web-service to match the current environment?
[WebService(Nam... | To pragmatically change the namespace in your web service based on the current environment (dev, staging, and production), you can use a combination of configuration settings and a custom attribute or conditional compilation. Here are two approaches you can consider:
### Approach 1: Use Web.config Settings
1. **Defin... | 2 | [
{
"from": "human",
"value": "I have a web-service that I will be deploying to dev, staging and production. Along with this will be an ASP.net application that will be deploying separately but also in those three stages. \nWhat is the most pragmatic way to change the following line in the web-service to matc... |
I have a script that retrieves objects from a remote server through an Ajax call. The server returns objects in JSON notation.... | In Adobe AIR, if you want to handle JSON data without using `eval()`, you can take advantage of the built-in JSON support available in ActionScript 3. While the AIR environment does impose some restrictions on certain JavaScript methods, ActionScript has its own capabilities for working with JSON.
Here's a simple appr... | 1,346 | [
{
"from": "human",
"value": "I have a script that retrieves objects from a remote server through an Ajax call. The server returns objects in JSON notation.... |
Does anybody use the Class Designer much in Visual Studio?
I have downloaded the Modeling Power Toys for 2005 and have been impressed with what I've seen so far. The MSDN Class Designer Blog doesn't seem to have been updated for a while but it still looks quite useful.
Is the Class Designer a quick way to build the bas... | The Class Designer in Visual Studio can be a useful tool, especially for visualizing and organizing your classes and their relationships in a software project. It provides a graphical interface to design your class structures, which can help clarify your design and make it easier to communicate your ideas with team mem... | 2,455 | [
{
"from": "human",
"value": "Does anybody use the Class Designer much in Visual Studio?\nI have downloaded the Modeling Power Toys for 2005 and have been impressed with what I've seen so far. The MSDN Class Designer Blog doesn't seem to have been updated for a while but it still looks quite useful.\nIs the ... |
I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT.
Searching Google for terms like '80004027' is just about useless as it sends you to random discussion groups where 90% of the time, the question 'What does... | When dealing with COM errors represented by HRESULT codes like `80004027`, finding reliable and structured information can indeed be challenging. Here are some resources and strategies that can help you understand these errors better:
1. **Microsoft Documentation**:
- The official Microsoft documentation is one of... | 1,699 | [
{
"from": "human",
"value": "I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT.\nSearching Google for terms like '80004027' is just about useless as it sends you to random discussion groups wher... |
Is it possible to create "federated" Subversion servers?
As in one server at location A and another at location B that sync up their local versions of the repository automatically. That way when someone at either location interacts with the repository they are accessing their respective local server and therefore has ... | Creating "federated" Subversion (SVN) servers, where multiple servers at different locations can synchronize their repositories automatically, is not a built-in feature of Subversion itself. However, you can achieve a similar effect through a few different strategies. Here are some possible approaches:
### 1. **SVN Mi... | 708 | [
{
"from": "human",
"value": "Is it possible to create \"federated\" Subversion servers?\nAs in one server at location A and another at location B that sync up their local versions of the repository automatically. That way when someone at either location interacts with the repository they are accessing thei... |
If there are any language designers out there (or people simply in the know), I'm curious about the methodology behind creating standard libraries for interpreted languages. Specifically, what seems to be the best approach? Defining standard functions/methods in the interpreted language, or performing the processing of... | Creating a standard library for an interpreted language involves a set of design considerations that balance performance, maintainability, and usability. Here’s an overview of the methodologies involved:
### 1. **Core Principles of Language Design:**
- **Consistency**: Functions in the standard library should follo... | 813 | [
{
"from": "human",
"value": "If there are any language designers out there (or people simply in the know), I'm curious about the methodology behind creating standard libraries for interpreted languages. Specifically, what seems to be the best approach? Defining standard functions/methods in the interpreted ... |
To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome.
ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution which can be converted to an iterative solution relat... | To create a stack overflow, you need to use recursion that doesn't have tail-call optimization. Below are examples in different languages demonstrating a simple recursive function that will lead to a stack overflow.
### Python
```python
def recurse():
return recurse()
recurse()
```
### JavaScript
```javascript
f... | 3,455 | [
{
"from": "human",
"value": "To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome.\nETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call \"recursion\" is really iteration, and any solution which can... |
Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with "User: jstauffer" it could create a line with "@author jstauffer". The other lines that it creates (Date and Time) probably don't have javadoc syntax to use but why not use the javadoc syntax when availa... | The default Javadoc comment template generated by IntelliJ IDEA may use a non-standard format for a few reasons:
1. **Historical Context**: The template may have been designed based on older conventions or the preferences of the development team. Over time, templates can become somewhat entrenched, and changing them m... | 2,650 | [
{
"from": "human",
"value": "Why does the default IntelliJ default class javadoc comment use non-standard syntax? Instead of creating a line with \"User: jstauffer\" it could create a line with \"@author jstauffer\". The other lines that it creates (Date and Time) probably don't have javadoc syntax to use b... |
I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building:
The specified task executable location "bin\aspnet_merge.exe" is invalid.
Here is the source of the error (from the web deployment targets file):
<Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true... | The error you're encountering indicates that the `aspnet_merge.exe` executable is not found at the specified location. In Visual Studio 2008, `aspnet_merge.exe` is typically found in a different path compared to Visual Studio 2005. The `ExePath` is currently set to `$(FrameworkSDKDir)bin`, which might not be pointing t... | 1,487 | [
{
"from": "human",
"value": "I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building:\nThe specified task executable location \"bin\\aspnet_merge.exe\" is invalid.\n\nHere is the source of the error (from the web deployment targets file):\n<Target Name... |
I have an AppleScript program which creates XML tags and elements within an Adobe InDesign document. The data is in tables, and tagging each cell takes .5 seconds. The entire script takes several hours to complete.
I can post the inner loop code, but I'm not sure if SO is supposed to be generic or specific. I'll let th... | To optimize your AppleScript for creating XML tags and elements in Adobe InDesign, we need to address the main performance bottleneck, which is the repeated use of `select` and `make XML tag` commands in your inner loop. Each of these calls has overhead, and running them repeatedly can slow down your script significant... | 2,102 | [
{
"from": "human",
"value": "I have an AppleScript program which creates XML tags and elements within an Adobe InDesign document. The data is in tables, and tagging each cell takes .5 seconds. The entire script takes several hours to complete.\nI can post the inner loop code, but I'm not sure if SO is suppo... |
I wrote a Visual Basic macro for archiving attachments for Outlook 2007, but did not find a totally satisfactory way for showing a directory picker from the Outlook macro. Now, I don't know much about either Windows APIs or VB(A) programming, but the "standard" Windows file dialog I see most often in Microsoft applicat... | If you're looking for a way to create a directory picker in Outlook VBA that allows you to manually paste a file path and provides an overall better user experience, you might consider using the Windows API to invoke the Folder Browser Dialog.
Here's how you can do it using the Windows API:
1. **Declare the necessary... | 57 | [
{
"from": "human",
"value": "I wrote a Visual Basic macro for archiving attachments for Outlook 2007, but did not find a totally satisfactory way for showing a directory picker from the Outlook macro. Now, I don't know much about either Windows APIs or VB(A) programming, but the \"standard\" Windows file di... |
What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones?
I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly).
Sadly TinyMce ... | Integrating an image manager with TinyMCE can indeed be a bit challenging, especially if you want to avoid the commercial options provided by Moxiecode. Fortunately, there are several alternatives that can work well with TinyMCE in an ASP.NET MVC application. Here are some suggestions:
1. **CKFinder**: Although primar... | 1,206 | [
{
"from": "human",
"value": "What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones?\nI'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight... |
I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers.
We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a ... | Tracking whether visitors to your website have Silverlight enabled can be a bit tricky since Silverlight is largely deprecated and not widely used anymore. However, if you still want to capture this information and have it integrated into Google Analytics, you can use JavaScript to detect if Silverlight is installed an... | 1,479 | [
{
"from": "human",
"value": "I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers. \nWe currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stat... |
I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the object does not support this property or method. Despite finding various postings on various forums, no Google result I could find had a solution, so I ... | It sounds like you've encountered a common issue with JavaScript compatibility, particularly when dealing with older browsers like IE7. Your solution is quite resourceful and should serve as a helpful reference for others facing similar challenges with LightWindow and JavaScript. Here are a few insights and suggestions... | 488 | [
{
"from": "human",
"value": "I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the object does not support this property or method. Despite finding various postings on various forums, no Google ... |
I am developing a Reporting Services solution for a DOD website. Frequently I'll have a report and want to have as a parameter the Service (in addition to other similar mundane, but repetitive parameters like Fiscal Year, Data Effective Date, etc). Basically everything I've seen of SSRS 2005 says it can't be done... ... | In SQL Server Reporting Services (SSRS) 2005, sharing datasets across multiple reports in the manner you're describing is somewhat limited. However, there are approaches you can consider, and SSRS 2008 introduced some enhancements that could help you achieve your goal more effectively.
### Options for Sharing Datasets... | 553 | [
{
"from": "human",
"value": "I am developing a Reporting Services solution for a DOD website. Frequently I'll have a report and want to have as a parameter the Service (in addition to other similar mundane, but repetitive parameters like Fiscal Year, Data Effective Date, etc). Basically everything I've se... |
I'm using a GridView in C#.NET 3.5 and have just converted the underlying DataSource from Adapter model to an object which gets its data from LINQ to SQL - i.e. a Business object that returns a List<> for the GetData() function etc.
All was well in Denmark and the Update, and conditional Select statements work as expec... | The issue you're facing with the GridView and ObjectDataSource in your C#.NET 3.5 application might indeed be related to how the ObjectDataSource handles the old values of the data when performing delete operations.
In ASP.NET, when you use an `ObjectDataSource` to connect a `GridView`, the framework automatically att... | 314 | [
{
"from": "human",
"value": "I'm using a GridView in C#.NET 3.5 and have just converted the underlying DataSource from Adapter model to an object which gets its data from LINQ to SQL - i.e. a Business object that returns a List<> for the GetData() function etc.\nAll was well in Denmark and the Update, and c... |
I've used jdom in the past, and have looked briefly at XOM and DOM4j. Each seems to provide essentially the same thing, as they each provide a simplified wrapper over the (very obtuse) standard W3C DOM APIs.
I know that JDOM went through some effort to develop a JSR and standardization process at one point, but as fa... | When it comes to XML processing in Java, JDOM, XOM, and DOM4j are three popular libraries, each with its own strengths and weaknesses. The choice of which to use often depends on specific project requirements and developer preferences.
### JDOM
**Pros:**
- **Ease of Use**: JDOM is designed to be easy to use and unders... | 927 | [
{
"from": "human",
"value": "I've used jdom in the past, and have looked briefly at XOM and DOM4j. Each seems to provide essentially the same thing, as they each provide a simplified wrapper over the (very obtuse) standard W3C DOM APIs. \nI know that JDOM went through some effort to develop a JSR and stand... |
We created several custom web parts for SharePoint 2007. They work fine. However whenever they are loaded, we get an error in the event log saying:
error initializing safe control - Assembly: ...
The assembly actually loads fine. Additionally, it is correctly listed in the web.config and GAC.
Any ideas about how to s... | The "error initializing safe control" message you are encountering in the SharePoint 2007 event log typically indicates that there is a problem with how the custom web parts are defined in the `web.config` file, even if the assembly itself loads correctly. Here are some steps you can take to troubleshoot and possibly r... | 1,582 | [
{
"from": "human",
"value": "We created several custom web parts for SharePoint 2007. They work fine. However whenever they are loaded, we get an error in the event log saying:\n\nerror initializing safe control - Assembly: ...\n\nThe assembly actually loads fine. Additionally, it is correctly listed in the... |
In MS Access 2003 (I know, I know), I'm using the OLE Object data type to persist the sate of some objects that are marked as serializable (just using a IO.BinaryFormatter to serialize to a MemoryStream, and then saving that to the db as a Byte array). Does this work pretty much like a varbinary, or a blob? Are there... | Using the OLE Object data type in MS Access 2003 to store serialized objects is somewhat analogous to using `varbinary` in SQL Server or `BLOB` in other database systems, as it allows you to store binary data. However, there are some important considerations and potential gotchas you should be aware of:
### Key Consid... | 777 | [
{
"from": "human",
"value": "In MS Access 2003 (I know, I know), I'm using the OLE Object data type to persist the sate of some objects that are marked as serializable (just using a IO.BinaryFormatter to serialize to a MemoryStream, and then saving that to the db as a Byte array). Does this work pretty muc... |
I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like
<img src="example.jpg"
alt="example">
If worse comes to worst, I could possibly preprocess the page by removing all line breaks, then re-inse... | To properly handle HTML tags that span multiple lines in your PHP script, it's important to avoid relying on simple line-by-line processing, as HTML can be complex and multiline tags can appear in various forms. Instead, consider using a more robust solution. The best approach is to use a library specifically designed ... | 1,590 | [
{
"from": "human",
"value": "I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like \n<img src=\"example.jpg\"\nalt=\"example\">\n\nIf worse comes to worst, I could possibly preprocess t... |
XPO is the object relational mapper of choice at my company. Any thoughts on the pros and cons?
I was just looking for general feeling and anecdotes about the product. We are not switching to XPO. We are just getting rid of hard coded sql strings living in the app and moving completely to ORM for all data access.
| XPO (eXpress Persistent Objects) is an Object-Relational Mapping (ORM) tool provided by DevExpress. It enables developers to work with data in a more object-oriented way by mapping database tables to classes in the application. Here are some pros and cons to consider based on general observations and anecdotal experien... | 149 | [
{
"from": "human",
"value": "XPO is the object relational mapper of choice at my company. Any thoughts on the pros and cons?\n\nI was just looking for general feeling and anecdotes about the product. We are not switching to XPO. We are just getting rid of hard coded sql strings living in the app and moving ... |
Can somebody point me to a resource that explains how to go about having 2+ IIS web server clustered (or Webfarm not sure what its called) ?
All I need is something basic, an overview how and where to start.
Can't seem to find anything...
| Setting up a cluster of IIS web servers can be achieved through a couple of different approaches, primarily using a Web Farm or Load Balancing. Here’s a basic overview of both concepts and how to get started.
### Overview: IIS Web Farm vs. Load Balancing
1. **IIS Web Farm**: This is a group of web servers that work t... | 444 | [
{
"from": "human",
"value": "Can somebody point me to a resource that explains how to go about having 2+ IIS web server clustered (or Webfarm not sure what its called) ?\nAll I need is something basic, an overview how and where to start.\nCan't seem to find anything...\n"
},
{
"from": "gpt",
"va... |
I know the so-called textbook definition of unit tests and integration tests. What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible.
For example, if I have a Word class, I will write some unit tests for the Word class. Then, I begin writing my... | Your questions touch on a common area of confusion in the software testing realm, particularly concerning the distinction between unit tests and integration tests. Let's break this down to clarify.
### Unit Tests
- **Purpose**: Unit tests are designed to verify the functionality of a specific part of your code, usual... | 740 | [
{
"from": "human",
"value": "I know the so-called textbook definition of unit tests and integration tests. What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible.\nFor example, if I have a Word class, I will write some unit tests for... |
My initial tests have shown that Robot won't work without an active, visible desktop. For example, while a scheduled task (or executed command from the continuous integration server) may be able to start robot as a command-line process, Robot will actually fail to execute the recorded script.
Logging into the build mac... | Running Rational Robot scripts in a continuous integration (CI) environment without an active, visible desktop can be quite challenging because many GUI automation tools, including Rational Robot, often require a graphical user interface (GUI) to interact with the applications being tested. Here are some approaches you... | 2,050 | [
{
"from": "human",
"value": "My initial tests have shown that Robot won't work without an active, visible desktop. For example, while a scheduled task (or executed command from the continuous integration server) may be able to start robot as a command-line process, Robot will actually fail to execute the re... |
I'm writing an app that will need to make use of Timers, but potentially very many of them. How scalable is the System.Threading.Timer class? The documentation merely say it's "lightweight", but doesn't explain further. Do these timers get sucked into a single thread (or very small threadpool) that processes all the... | The `System.Threading.Timer` class in .NET is designed to be a lightweight and efficient way to handle timer-based operations. Here's an overview of how it works and its scalability characteristics:
### Implementation and Behavior
1. **Thread Pool Integration**: `System.Threading.Timer` does not create a dedicated th... | 173 | [
{
"from": "human",
"value": "I'm writing an app that will need to make use of Timers, but potentially very many of them. How scalable is the System.Threading.Timer class? The documentation merely say it's \"lightweight\", but doesn't explain further. Do these timers get sucked into a single thread (or ve... |
What is a good free library for editing MP3s/FLACs.
By editing I mean:
Cutting audio file into multiple parts
Joining multiple audio files together
Increase playback speed of file without affecting the pitch (eg. podcasts up to 1.3x)
Re-encoding audio file from Flac -> MP3 or vice versa
I don't mean software, I mean... | For audio processing tasks such as cutting, joining, and changing playback speed without affecting pitch, as well as re-encoding between formats like MP3 and FLAC, several libraries can be used across various programming languages. Here are some good free libraries that are relatively programming language-agnostic:
1.... | 429 | [
{
"from": "human",
"value": "What is a good free library for editing MP3s/FLACs. \nBy editing I mean:\n\nCutting audio file into multiple parts\nJoining multiple audio files together\nIncrease playback speed of file without affecting the pitch (eg. podcasts up to 1.3x)\nRe-encoding audio file from Flac -> M... |
I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for the replicating slave ignore-replicating-... | In MySQL replication, the behavior you're experiencing is due to the fact that when the slave encounters an error during the execution of an SQL statement, it stops processing the remaining events in the binary log. This is especially true for errors that are considered critical, like a duplicate key error (error code ... | 1,716 | [
{
"from": "human",
"value": "I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for ... |
I'm wondering how to make a release build that includes all necessary DLL files into the .exe so the program can be run on a non-development machine without having to install the Microsoft redistributable on the target machine.
Without doing this you get the error message that the application configuration is not corre... | To create a release build of your application that includes all necessary DLL files into the executable, you can use various approaches depending on the programming language and development environment you're using. Below are common methods for accomplishing this for a C# .NET application, which seems to be what you're... | 1,032 | [
{
"from": "human",
"value": "I'm wondering how to make a release build that includes all necessary DLL files into the .exe so the program can be run on a non-development machine without having to install the Microsoft redistributable on the target machine.\nWithout doing this you get the error message that ... |
I'm implementing a tagging system for a website. There are multiple tags per object and multiple objects per tag. This is accomplished by maintaining a table with two values per record, one for the ids of the object and the tag.
I'm looking to write a query to find the objects that match a given set of tags. Suppose I ... | To achieve the functionality you're looking for—finding objects that match all tags from a given set—you can utilize a SQL query that counts the number of matching tags for each object and then filters based on that count.
Assuming you have a table called `object_tags` with the following structure:
- `object_id` (ide... | 1,605 | [
{
"from": "human",
"value": "I'm implementing a tagging system for a website. There are multiple tags per object and multiple objects per tag. This is accomplished by maintaining a table with two values per record, one for the ids of the object and the tag.\nI'm looking to write a query to find the objects ... |
I am attempting to POST against a vendor's server using PHP 5.2 with cURL. I'm reading in an XML document to post against their server and then reading in a response:
$request = trim(file_get_contents('test.xml'));
$curlHandle = curl_init($servletURL);
curl_setopt($curlHandle, CURLOPT_POST, TRUE);
curl_setopt($curlHand... | The error message "Content not allowed in prolog" typically indicates that there is unwanted whitespace or some invalid characters before the start of the XML document. This can often be caused by the way the data is formatted or sent in the POST request.
Here are some steps to troubleshoot and resolve the issue:
1. ... | 293 | [
{
"from": "human",
"value": "I am attempting to POST against a vendor's server using PHP 5.2 with cURL. I'm reading in an XML document to post against their server and then reading in a response:\n$request = trim(file_get_contents('test.xml'));\n$curlHandle = curl_init($servletURL);\ncurl_setopt($curlHandle... |
From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista?
| Yes, there are several differences between developing applications for Windows XP and Windows Vista, both in terms of the underlying architecture and the user experience. Here are some key differences from a desktop application developer's perspective:
### 1. **User Interface Changes:**
- **Aero Glass**: Windows Vi... | 897 | [
{
"from": "human",
"value": "From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista?\n"
},
{
"from": "gpt",
"value": "Yes, there are several differences between developing applications for Windows XP and Wind... |
I've been using StructureMap recently and have enjoyed the experience thoroughly. However, I can see how one can easily get carried away with interfacing everything out and end up with classes that take in a boatload of interfaces into their constructors. Even though that really isn't a huge problem when you're using... | It's great to hear that you've been enjoying using StructureMap and exploring dependency injection! The decision of when to interface out a class versus simply using concrete classes (or adding properties) can be nuanced, and it's essential to strike a balance to maintain readability, maintainability, and usability of ... | 1,752 | [
{
"from": "human",
"value": "I've been using StructureMap recently and have enjoyed the experience thoroughly. However, I can see how one can easily get carried away with interfacing everything out and end up with classes that take in a boatload of interfaces into their constructors. Even though that real... |
I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine.
Obviously there is some setup step that I'm not performing on some filter in the graph that GraphBuilder is ... | Debugging DirectShow graphs can indeed be a bit challenging, especially when manual connections are involved. Here are several strategies to help you investigate the issues you’re facing:
### 1. Enable Debugging Output
You can enable DirectShow debugging output to help you see what the GraphBuilder is doing under the ... | 949 | [
{
"from": "human",
"value": "I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine. \nObviously there is some setup step that I'm not performing on some... |
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would lik... | Creating a completely self-contained executable that does not rely on any external DLLs (like the MSVC runtime libraries) using Microsoft Visual Studio 2005 Express can be a challenge, primarily because of the way Visual C++ manages linking and the runtime libraries. However, there are a few options you can consider:
... | 1,315 | [
{
"from": "human",
"value": "My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results... |
How can one determine, in code, how long the machine is locked?
Other ideas outside of C# are also welcome.
I like the windows service idea (and have accepted it) for simplicity and cleanliness, but unfortunately I don't think it will work for me in this particular case. I wanted to run this on my workstation at work ... | To determine how long a machine has been locked (specifically, when a user session is locked on Windows), you can consider several approaches. Since you've mentioned C# and the constraints of running on a locked-down workstation, let's explore a few options, including C# code and other ideas.
### Option 1: Using C# wi... | 725 | [
{
"from": "human",
"value": "How can one determine, in code, how long the machine is locked?\nOther ideas outside of C# are also welcome.\n\nI like the windows service idea (and have accepted it) for simplicity and cleanliness, but unfortunately I don't think it will work for me in this particular case. I w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.