instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have tried following guides like this one but it just didnt work for me. So my question is this: What is a good guide for deploying Django, and how do you deploy your Django. I keep hearing that capastrano is pretty nifty to use, but i have no idea as to how to work it or what it does (apart from automation of deploy...
Deploying a Django application can be a bit challenging, especially if you're doing it for the first time. Here’s a structured guide to help you deploy a Django application effectively. I’ll also touch on Capistrano and its relevance to Django deployment. ### Step-by-Step Guide to Deploying Django 1. **Prepare Your D...
9,028
[ { "from": "human", "value": "I have tried following guides like this one but it just didnt work for me.\nSo my question is this: What is a good guide for deploying Django, and how do you deploy your Django.\nI keep hearing that capastrano is pretty nifty to use, but i have no idea as to how to work it or wh...
I am creating a decoupled WMI provider in a class library. Everything I have read points towards including something along these lines: [System.ComponentModel.RunInstaller(true)] public class MyApplicationManagementInstaller : DefaultManagementInstaller { } I gather the purpose of this installation is because the Wind...
You're correct that the `RunInstaller` attribute, along with a derived class of `DefaultManagementInstaller`, is meant to facilitate the installation of a WMI provider so that the Windows Management Instrumentation (WMI) infrastructure is aware of its structure. However, the behavior of installers in .NET can sometimes...
15,927
[ { "from": "human", "value": "I am creating a decoupled WMI provider in a class library. Everything I have read points towards including something along these lines:\n[System.ComponentModel.RunInstaller(true)]\npublic class MyApplicationManagementInstaller : DefaultManagementInstaller { }\n\nI gather the pur...
I am trying to create an email two column flexible layout, which works in outlook 07, i have created a successful version in outlook 03, hotmail, gmail, yahoo and aol, in both IE and Mozilla Firefox, however when testing in outlook 07 it strips out my float left css. What I would like is a layout that has a photo on t...
Creating a two-column layout for emails that looks good across various clients, including Outlook 2007, can be quite challenging due to limited CSS support in email clients. Instead of using float-based layouts, which are not reliably supported in many email clients (especially older versions of Outlook), it's best to ...
13,583
[ { "from": "human", "value": "I am trying to create an email two column flexible layout, which works in outlook 07, i have created a successful version in outlook 03, hotmail, gmail, yahoo and aol, in both IE and Mozilla Firefox, however when testing in outlook 07 it strips out my float left css. \nWhat I wo...
I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. When I submit the form and try to view the contents of the textboxes (within each user control) on the server, they are empty. When the postback completes, the textboxes have...
The issue you're facing with accessing the values of the textboxes in your user controls after a postback is a common one when dealing with dynamically created controls in ASP.NET. When controls are added dynamically to a `PlaceHolder`, they need to be recreated on every postback to ensure that their state (including t...
10,581
[ { "from": "human", "value": "I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. \nWhen I submit the form and try to view the contents of the textboxes (within each user control) on the server, they are empty.\nWhen...
I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired! Is then enterpreted as 'Get Wired, You' being one object, the single quote being a second, and 're Hired!' as...
It looks like you encountered an issue with parsing XML data that includes special characters such as single quotes. Given the complexities of dealing with XML and special characters, it’s important to ensure that any content you want to parse is properly escaped. From your updates, it seems that you have arrived at a...
14,972
[ { "from": "human", "value": "I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired!\nIs then enterpreted as 'Get Wired, You' being one object, the singl...
I've got a customer trying to access one of my sites, and they keep getting this error > ssl_error_rx_record_too_long They're getting this error on all browsers, all platforms. I can't reproduce the problem at all. My server and myself are located in the USA, the customer is located in India. I googled on the problem, ...
The `ssl_error_rx_record_too_long` error typically indicates that the browser is expecting to communicate over HTTPS, but the server is responding over HTTP instead. Since you mentioned that you can't reproduce the issue and that the customer has a misconfigured local proxy, it’s likely that the issue is localized to t...
13,985
[ { "from": "human", "value": "I've got a customer trying to access one of my sites, and they keep getting this error > ssl_error_rx_record_too_long\nThey're getting this error on all browsers, all platforms. I can't reproduce the problem at all.\nMy server and myself are located in the USA, the customer is l...
I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through the list once and avoiding the list expansion (and keeping the split loop refactoring in...
When it comes to gathering statistics from an iterable while maintaining readability and efficiency, there are several alternatives to consider. Each option has its own merits, depending on your emphasis on readability, performance, or expressiveness. Let's take a look at your alternatives and then consider a possible ...
13,152
[ { "from": "human", "value": "I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three.\nMy first alternative, While only iterating through the list once and avoiding the list expansion ...
Do you use any of these technologies? Which ones are current and hence sensible to include in a site? Documentation on any seems to be relatively sparse, and usage of any of them limited, as search engines get better, are they even relevant any more?
It seems like you're asking about technologies used for web development and their relevance today. While I don't personally use technologies, I can certainly provide information on popular web technologies and their current status. Here’s an overview of some relevant technologies: 1. **JavaScript Frameworks (React, An...
13,456
[ { "from": "human", "value": "Do you use any of these technologies? Which ones are current and hence sensible to include in a site?\nDocumentation on any seems to be relatively sparse, and usage of any of them limited, as search engines get better, are they even relevant any more?\n" }, { "from": "gp...
When using SQLBulkCopy on a table with a GUID primary key and default newsequentialid() e.g CREATE TABLE [dbo].[MyTable]( [MyPrimaryKey] [uniqueidentifier] NOT NULL CONSTRAINT [MyConstraint] DEFAULT (newsequentialid()), [Status] [int] NULL, [Priority] [int] NULL, CONSTRAINT [PK_MyTable] PRIMARY KEY NONCLUSTERED ( [M...
The issue you are encountering is due to the fact that when using `SqlBulkCopy`, the source `DataTable` does not automatically generate new sequential IDs for the `MyPrimaryKey` column when they are missing. Since you have specified that `MyPrimaryKey` is defined with a default value of `newsequentialid()`, the SQL Ser...
11,704
[ { "from": "human", "value": "When using SQLBulkCopy on a table with a GUID primary key and default newsequentialid()\ne.g\nCREATE TABLE [dbo].[MyTable](\n[MyPrimaryKey] [uniqueidentifier] NOT NULL CONSTRAINT [MyConstraint] DEFAULT (newsequentialid()),\n[Status] [int] NULL,\n[Priority] [int] NULL,\n CONSTRA...
We have an existing classic ASP intranet consisting of hundreds of pages. Its directory structure looks like this... /root app_1 app_2 ... img js style Obviously app_1 and so on have better names in the actual directory structure. Even though the many applications have different behaviour, they...
Integrating ASP.NET applications into an existing classic ASP intranet while maintaining a unified directory structure and shared resources can indeed present challenges. Below are suggestions on how to structure your applications and share resources effectively: ### Directory Structure 1. **Maintain the Existing Dir...
13,115
[ { "from": "human", "value": "We have an existing classic ASP intranet consisting of hundreds of pages. Its directory structure looks like this...\n/root\n app_1\n app_2\n ...\n img\n js\n style\n\nObviously app_1 and so on have better names in the actual directory structure.\nEven though t...
I've just started writing unit tests for a legacy code module with large physical dependencies using the #include directive. I've been dealing with them a few ways that felt overly tedious (providing empty headers to break long #include dependency lists, and using #define to prevent classes from being compiled) and was...
Unit testing legacy code with large dependencies can indeed be challenging, especially if you're dealing with a tangled web of include files and tight coupling. Here are some strategies that might help improve your unit testing approach: ### 1. **Use Dependency Injection** Instead of creating mock versions of dependen...
12,078
[ { "from": "human", "value": "I've just started writing unit tests for a legacy code module with large physical dependencies using the #include directive. I've been dealing with them a few ways that felt overly tedious (providing empty headers to break long #include dependency lists, and using #define to pre...
Has anyone worked with the StarTeam COM API (Specifically, intergrating with C#). I need to write a helper function that returns a directory structure out of Starteam, but all I've been able to retrieve using this API has been a list of views. Has anyone else tried this?
Yes, integrating with the StarTeam COM API from C# can be somewhat challenging, especially when it comes to navigating the data structures like directories and files. While the StarTeam API allows you to work with views, projects, folders, and files, accessing the directory structure requires traversing these objects c...
13,272
[ { "from": "human", "value": "Has anyone worked with the StarTeam COM API (Specifically, intergrating with C#).\nI need to write a helper function that returns a directory structure out of Starteam, but all I've been able to retrieve using this API has been a list of views.\nHas anyone else tried this?\n" ...
A client has a number of disparate systems that they are planning to link together and have asked for a set of system interface specifications that would document the data and protocols used to interface the different parts. The interfaces are between processes not between users. Any recommendations for a template tha...
Creating a comprehensive system interface specification template is essential for clearly documenting the interfaces between disparate systems. Below is a recommended template structure you can use to document the system interfaces effectively: ### System Interface Specification Template --- #### 1. **Document Contr...
15,841
[ { "from": "human", "value": "A client has a number of disparate systems that they are planning to link together and have asked for a set of system interface specifications that would document the data and protocols used to interface the different parts.\nThe interfaces are between processes not between user...
How can I set the background color of a specific item in a System.Windows.Forms.ListBox? I would like to be able to set multiple ones if possible.
In a Windows Forms application, the `ListBox` control does not natively support custom item background colors. However, you can achieve this by handling the `DrawItem` event and setting the `DrawMode` property of the `ListBox` to `OwnerDrawFixed` or `OwnerDrawVariable`. This allows you to manually define how each item ...
12,874
[ { "from": "human", "value": "How can I set the background color of a specific item in a System.Windows.Forms.ListBox?\nI would like to be able to set multiple ones if possible.\n" }, { "from": "gpt", "value": "In a Windows Forms application, the `ListBox` control does not natively support custo...
Which is Best way to send data to aspx page, and why? using query string using session using cross page postback Something else Thanks. What are you trying to achieve? More info. please For example search form and advanced search form or multi step user registration.
When deciding how to send data to an ASPX page, it's essential to consider the context of the application and the nature of the data. Here are some common methods, including their pros and cons, which can guide you in choosing the best approach based on your specific needs. ### 1. Query String **Use Case:** Suitable f...
15,481
[ { "from": "human", "value": "Which is Best way to send data to aspx page, and why?\n\nusing query string\nusing session\nusing cross page postback \nSomething else\n\nThanks.\n\n\nWhat are you trying to achieve? More\n info. please\n\nFor example search form and advanced search form or multi step user regi...
I have a .NET 2.0 Windows Forms application. On this app there is a Form control with a Menu bar and a status bar. Also there's a ListView on this form. If I add a context menu to this form, the context menu will open when the user right clicks any part of the form, including the menu bar and the status bar. How can ...
To achieve the desired behavior of your context menu in a .NET 2.0 Windows Forms application, you can handle the `MouseDown` event of the form. By checking the coordinates of the mouse click, you can determine if the click occurred in the "gray area" of the form or above specific controls, like the menu bar or the stat...
10,708
[ { "from": "human", "value": "I have a .NET 2.0 Windows Forms application. On this app there is a Form control with a Menu bar and a status bar. Also there's a ListView on this form.\nIf I add a context menu to this form, the context menu will open when the user right clicks any part of the form, including t...
I would like to replay soap message against my server. I've recorded a few messages and i've tampered with Timestamps, soapbodies etc and now I would like to see that my SecurityAssertions lites up like xmastrees. The deployed server will use clientcertificates and servercertifivcates for authentisation, and the whole ...
To replay a SOAP message, especially after tampering with it, you have a few options. While there are various tools and libraries available for this purpose, the choice will depend on your specific needs and preferences. Here are some popular tools and methods to replay SOAP messages effectively: ### 1. **SOAP UI** - ...
14,186
[ { "from": "human", "value": "I would like to replay soap message against my server. I've recorded a few messages and i've tampered with Timestamps, soapbodies etc and now I would like to see that my SecurityAssertions lites up like xmastrees. The deployed server will use clientcertificates and servercertifi...
I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes a Channel. It doesn't appear to be possible to get a Channel from an InputStream or Outp...
You're correct that Java's standard InputStream and OutputStream do not natively support non-blocking I/O or the same kind of multiplexing that `select()` provides in C. However, there are indeed a few approaches to achieve similar functionality in Java without creating a separate thread for each stream. Here are some ...
10,854
[ { "from": "human", "value": "I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes a Channel. It doesn't appear to be possible to ...
I am working on a database application that runs on various independent servers. Each server runs an Instance of SQL Server 2005 with the same database. We would have a Master Server where that would be the definitive source of information and various "Client" Servers that would be distributed around (with no network ...
Building a system that can effectively synchronize databases between a master server and multiple client servers—especially with the constraints you've mentioned—can be quite challenging. Below are the steps and strategies to achieve your synchronization requirements using SQL Server 2005. ### High-Level Overview of t...
12,365
[ { "from": "human", "value": "I am working on a database application that runs on various independent servers. \nEach server runs an Instance of SQL Server 2005 with the same database. We would have a Master Server where that would be the definitive source of information and various \"Client\" Servers that w...
If I start a process via Java's ProcessBuilder class, I have full access to that process's standard in, standard out, and standard error streams as Java InputStreams and OutputStreams. However, I can't find a way to seamlessly connect those streams to System.in, System.out, and System.err. It's possible to use redirect...
In Java, connecting the standard input/output/error streams of a subprocess to the standard streams of the parent process can be a bit challenging due to the way Java handles streams. However, you can achieve this using `ProcessBuilder` along with threads to manage the input and output streams. Here's a basic example o...
11,262
[ { "from": "human", "value": "If I start a process via Java's ProcessBuilder class, I have full access to that process's standard in, standard out, and standard error streams as Java InputStreams and OutputStreams. However, I can't find a way to seamlessly connect those streams to System.in, System.out, and ...
I've never used CI tools before, but from what I've read, I'm not sure it would provide any benefit to a solo developer that isn't writing code every day. First - what benefits does CI provide to any project? Second - who should use CI? Does it benefit all developers?
Continuous Integration (CI) is a software development practice that involves automatically building and testing code changes frequently to identify issues early. Here are the benefits of CI for any project, as well as information on who can benefit from it: ### Benefits of CI 1. **Early Detection of Issues**: CI enco...
14,300
[ { "from": "human", "value": "I've never used CI tools before, but from what I've read, I'm not sure it would provide any benefit to a solo developer that isn't writing code every day.\nFirst - what benefits does CI provide to any project?\nSecond - who should use CI? Does it benefit all developers?\n" }, ...
You're building a web application. You need to store the state for a shopping cart like object during a user's session. Some notes: This is not exactly a shopping cart, but more like an itinerary that the user is building... but we'll use the word cart for now b/c ppl relate to it. You do not care about "abandoned" ca...
When deciding how to store the state of a shopping cart (or itinerary, in your case) for a web application, you should consider several factors, including security, scalability, and user experience. Here’s a breakdown of various storage options along with recommendations based on your ASP.NET MVC front-end: ### Client...
9,300
[ { "from": "human", "value": "You're building a web application. You need to store the state for a shopping cart like object during a user's session.\nSome notes:\n\nThis is not exactly a shopping cart, but more like an itinerary that the user is building... but we'll use the word cart for now b/c ppl relate...
I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions? I know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring the installation of OpenSSL in order to run ...
Creating a Certificate Authority (CA) utility in C# without requiring external dependencies like OpenSSL can certainly be done using .NET libraries. In particular, you can use the `System.Security.Cryptography` namespace to generate keys and create certificates. Below are some ideas and steps on how to implement a simp...
9,348
[ { "from": "human", "value": "I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions?\nI know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring th...
I am using cxxtest as the test framework for my C++ classes, and would like to figure out a way to simulate sending data to classes which would normally expect to receive it from standard input. I have several different files which I would like to send to the classes during different tests, so redirection from the com...
Yes, you can achieve this by using a combination of file redirection and file handles in C++. The idea is to create a memory-based input stream (e.g., using `std::stringstream`) or a temporary file, and then redirect `stdin` to read from this stream or file. This way, your tests can simulate standard input. Here is a ...
11,438
[ { "from": "human", "value": "I am using cxxtest as the test framework for my C++ classes, and would like to figure out a way to simulate sending data to classes which would normally expect to receive it from standard input. I have several different files which I would like to send to the classes during dif...
Using VC2005, I have 3 projects to build: libA (contains a typelib, results in libA.dll): IDL has a line library libA { ... libB (contains a typelib importing libA, results in libB.dll): IDL has a line importlib( "libA " ); libC (imports libB): one of the source files contains #import <libB.dll> the #import <libB.d...
The issue you're encountering with the `#import` directive and the `C4772` compiler error in VC2005 (Visual C++ 2005) is a common one, especially when dealing with interdependencies between multiple projects and using the debug DLLs. Here are some steps and suggestions that can help you resolve this problem: 1. **Ensu...
14,227
[ { "from": "human", "value": "Using VC2005, I have 3 projects to build:\n\nlibA (contains a typelib, results in libA.dll): IDL has a line library libA { ... \nlibB (contains a typelib importing libA, results in libB.dll): IDL has a line importlib( \"libA \" );\nlibC (imports libB): one of the source files c...
What is considered as best practice when it comes to assemblies and releases? I would like to be able to reference multiple versions of the same library - solution contains multiple projects that depend on different versions of a commonutils.dll library we build ourselves. As all dependencies are copied to the bin/debu...
Managing multiple versions of a library within the same application can indeed be challenging, but there are several best practices that can help. Here are some approaches you can consider when dealing with assemblies and releases, especially when you need to reference multiple versions of the same library: ### 1. **S...
10,521
[ { "from": "human", "value": "What is considered as best practice when it comes to assemblies and releases?\nI would like to be able to reference multiple versions of the same library - solution contains multiple projects that depend on different versions of a commonutils.dll library we build ourselves.\nAs ...
How can I add a HyperLink in a TRichEdit within VCL (using Delphi Programming Language). I need to have something like: "This is my text, click here to do something."
In Delphi's VCL, if you want to add a hyperlink to a `TRichEdit`, you can achieve this by using the `SelAttributes` to format the text to look like a hyperlink and then handle the mouse events to respond to clicks on that text. Here’s a step-by-step guide on how to accomplish this: 1. **Add a TRichEdit Component**: P...
10,578
[ { "from": "human", "value": "How can I add a HyperLink in a TRichEdit within VCL (using Delphi Programming Language).\nI need to have something like:\n\"This is my text, click here to do something.\"\n" }, { "from": "gpt", "value": "In Delphi's VCL, if you want to add a hyperlink to a `TRichEdit...
Whats the best design pattern to use for LINQ and type tables that exist in SQL. I have tables in SQL that constrain values to type values, and I want to be able to use this in my C# code as strongly typed values. My current approach for a 'PackageStatus' type is as follows: SQL Table PackageStatusType (int) desc (var...
Your approach for handling type-safe values in C# using LINQ to SQL is interesting, but there are definitely opportunities for improvement. Let's address each of your questions: ### a) How can I make this more efficient? 1. **Lazy Loading vs. Eager Loading**: Instead of loading all package statuses in a static constr...
11,630
[ { "from": "human", "value": "Whats the best design pattern to use for LINQ and type tables that exist in SQL.\nI have tables in SQL that constrain values to type values, and I want to be able to use this in my C# code as strongly typed values.\nMy current approach for a 'PackageStatus' type is as follows:\n...
I have an msi installer which was working fine. I added an external merge module. There were some directory merge errors during compilation. I removed the directories causing the error from the directory table of the merge module. I am getting the error: MSI error 2732 error :Directory Manager not initialized. Please...
The MSI error 2732 ("Directory Manager not initialized") typically indicates that there is a problem with the directory structure in your MSI installer, particularly when dealing with merge modules. This error often arises when the directory table is incomplete or misconfigured. Here are some steps you can take to trou...
13,073
[ { "from": "human", "value": "I have an msi installer which was working fine. I added an external merge module. There were some directory merge errors during compilation. I removed the directories causing the error from the directory table of the merge module.\nI am getting the error:\n\nMSI error 2732 error...
I would like to use Visual Studio 2008 to the greatest extent possible while effectively compiling/linking/building/etc code as if all these build processes were being done by the tools provided with MASM 6.11. The exact version of MASM does not matter, so long as it's within the 6.x range, as that is what my college i...
Using Visual Studio 2008 to compile and link 16-bit assembly code with MASM 6.11 can be a bit challenging due to the nature of the tools and the changes in development environments over the years. However, it is possible to set up a working environment by following the options you've outlined. Below, I'll expand on you...
9,784
[ { "from": "human", "value": "I would like to use Visual Studio 2008 to the greatest extent possible while effectively compiling/linking/building/etc code as if all these build processes were being done by the tools provided with MASM 6.11. The exact version of MASM does not matter, so long as it's within th...
In my ASP.NET application using InProc sessions, Session_End calls a static method in another object to do session-specific clean up. This clean up uses a shared database connection that I am storing in application state. The problem is that I cannot see how to access the application state without passing it (or rathe...
In ASP.NET, when you're working within the `Session_End` event in `Global.asax`, you're correct that you don't have access to the `HttpContext` and cannot directly access the application state without passing it as a parameter. However, you can architect your code in a way that keeps your classes more decoupled and avo...
14,877
[ { "from": "human", "value": "In my ASP.NET application using InProc sessions, Session_End calls a static method in another object to do session-specific clean up. This clean up uses a shared database connection that I am storing in application state.\nThe problem is that I cannot see how to access the appl...
Ever wanted to have an HTML drag and drop sortable table in which you could sort both rows and columns? I know it's something I'd die for. There's a lot of sortable lists going around but finding a sortable table seems to be impossible to find. I know that you can get pretty close with the tools that script.aculo.us p...
Creating an HTML drag-and-drop sortable table that allows both row and column sorting is a bit more complex than simple sortable lists, but it can certainly be done! Below, I'll provide a basic implementation using HTML, CSS, and JavaScript with the help of the `Sortable.js` library, which simplifies the process signif...
9,629
[ { "from": "human", "value": "Ever wanted to have an HTML drag and drop sortable table in which you could sort both rows and columns? I know it's something I'd die for. There's a lot of sortable lists going around but finding a sortable table seems to be impossible to find. \nI know that you can get pretty c...
What do you think the benefits of functional programming are? And how do they apply to programmers today? What are the greatest differences between functional programming and OOP?
Functional programming (FP) and object-oriented programming (OOP) are two prominent paradigms in software development, each with its own strengths and weaknesses. Here are some benefits of functional programming, how they apply to programmers today, and a comparison of the two paradigms. ### Benefits of Functional Pro...
11,218
[ { "from": "human", "value": "What do you think the benefits of functional programming are? And how do they apply to programmers today?\nWhat are the greatest differences between functional programming and OOP? \n" }, { "from": "gpt", "value": "Functional programming (FP) and object-oriented prog...
Are there any more generic tools that can "compile" or basically merge multiple PHP files into a single file based on includes and autoloading classes? I'm thinking of something similar to Doctrine's compiling functionality or the compiling that many of the major JS frameworks do for "production" sites to lighten the f...
While there are a few existing tools and methods that can help with merging PHP files, the effectiveness of these tools in terms of performance gains largely depends on the specific use case and server setup. Let's go over some relevant tools and concepts. ### Existing Tools and Methods 1. **Composer Autoloader**: Wh...
16,431
[ { "from": "human", "value": "Are there any more generic tools that can \"compile\" or basically merge multiple PHP files into a single file based on includes and autoloading classes? I'm thinking of something similar to Doctrine's compiling functionality or the compiling that many of the major JS frameworks...
Ok, if i've got a binary file encoded either in little endian or big endian under .NET, what is the best way to read / write to it? In the .NET framework i've only managed to found BinaryWritters / BinaryReaders which use little endian as default, so my approach was implement my own BinaryReader / BinaryWritter for rea...
In .NET, the `BinaryReader` and `BinaryWriter` classes indeed use little-endian encoding by default. If you need to work with big-endian data, you have a few different approaches you can consider. Below are some options, including both custom implementations and built-in utilities. ### Option 1: Custom BinaryReader/Bi...
12,394
[ { "from": "human", "value": "Ok, if i've got a binary file encoded either in little endian or big endian under .NET, what is the best way to read / write to it?\nIn the .NET framework i've only managed to found BinaryWritters / BinaryReaders which use little endian as default, so my approach was implement m...
I am working with a Visual Studio 2005 C++ solution that includes multiple projects (about 30). Based upon my experience, it often becomes annoying to maintain all the properties of the projects (i.e include path, lib path, linked libs, code generation options, ...), as you often have to click each and every project ...
Managing multiple projects in Visual Studio 2005 can indeed be cumbersome, especially when you have to make the same changes across numerous configurations and project settings. Here are some strategies that can help you manage project settings more effectively: ### 1. **Property Sheets** Visual Studio supports Prope...
13,475
[ { "from": "human", "value": "I am working with a Visual Studio 2005 C++ solution that includes multiple projects (about 30). \nBased upon my experience, it often becomes annoying to maintain all the properties of the projects (i.e include path, lib path, linked libs, code generation options, ...), as you o...
I am using Flex to connect to a Rest service. To access order #32, for instance, I can call the URL http://[service]/orders/32. The URL must be configured as a destination - since the client will connect to different instances of the service. All of this is using the Blaze Proxy, since it involves GET, PUT, DELETE and ...
The issue you are facing is quite common when working with HTTP services in Flex, especially when dynamic parameters are involved in the URL. Here are the options you outlined, along with some additional considerations for implementing them effectively: ### Option 1: Resolve the Destination to a URL This is usually th...
12,120
[ { "from": "human", "value": "I am using Flex to connect to a Rest service. To access order #32, for instance, I can call the URL http://[service]/orders/32.\nThe URL must be configured as a destination - since the client will connect to different instances of the service. All of this is using the Blaze Prox...
More specifically, when the exception contains custom objects which may or may not themselves be serializable. Take this example: public class MyException : Exception { private readonly string resourceName; private readonly IList<string> validationErrors; public MyException(string resourceName, IList<strin...
To properly implement serialization for your custom exception class, you need to follow a few key steps. In .NET, exceptions must implement the `ISerializable` interface to support custom serialization, and you also need to ensure that the base class `Exception` is properly handled. Here’s how you can modify your `MyE...
12,286
[ { "from": "human", "value": "More specifically, when the exception contains custom objects which may or may not themselves be serializable.\nTake this example:\npublic class MyException : Exception\n{\n private readonly string resourceName;\n private readonly IList<string> validationErrors;\n\n pub...
I am encountering very infrequent yet annoying SQL deadlocks on a .NET 2.0 webapp running on top of MS SQL Server 2005. In the past, we have been dealing with the SQL deadlocks in the very empirical way - basically tweaking the queries until it work. Yet, I found this approach very unsatisfactory: time consuming and un...
Dealing with SQL deadlocks can indeed be frustrating, but there are several strategies you can adopt to help prevent them in a structured manner. While it's hard to guarantee that you will never encounter a deadlock, following certain design principles and query patterns can significantly reduce the risk. Here are some...
14,134
[ { "from": "human", "value": "I am encountering very infrequent yet annoying SQL deadlocks on a .NET 2.0 webapp running on top of MS SQL Server 2005. In the past, we have been dealing with the SQL deadlocks in the very empirical way - basically tweaking the queries until it work.\nYet, I found this approach ...
I've committed changes in numerous files to a SVN repository from Eclipse. I then go to website directory on the linux box where I want to update these changes from the repository to the directory there. I want to say "svn update project100" which will update the directories under "project100" with all my added and cha...
When working with SVN, it's important to understand the distinction between local working copies and the repository. The `svn status` command shows the status of files in your local working copy compared to your last commit, but it doesn't reflect the changes that have been made in the repository that you haven’t yet u...
16,136
[ { "from": "human", "value": "I've committed changes in numerous files to a SVN repository from Eclipse.\nI then go to website directory on the linux box where I want to update these changes from the repository to the directory there.\nI want to say \"svn update project100\" which will update the directories...
I have a problem with the design of a VetoableChangeListener. I implement the VetoableChangeListener interface to listen changes of a property in a model class, so when the model fires vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException …I try to save the change in a DB, which could fail (by an SQLEx...
Your issue stems from the recursive nature of handling `PropertyVetoException` when using `VetoableChangeListener`. Indeed, as you've noted, when a `PropertyVetoException` is thrown, the change event is propagated back to all listeners, which could lead to an infinite loop or unnecessary attempts to save changes that h...
12,799
[ { "from": "human", "value": "I have a problem with the design of a VetoableChangeListener. I implement the VetoableChangeListener interface to listen changes of a property in a model class, so when the model fires \nvetoableChange(PropertyChangeEvent evt) throws PropertyVetoException\n\n…I try to save the c...
I'm in the process of learning Erlang. As an exercise I picked up the Sieve of Eratosthenes algorithm of generating prime numbers. Here is my code: -module(seed2). -export([get/1]). get(N) -> WorkList = lists:duplicate(N, empty), get(2, N, WorkList, []). get(thats_the_end, _N, _WorkList, ResultList) -> list...
Your implementation of the Sieve of Eratosthenes in Erlang is quite a good starting point, and it's great to see you experimenting with the language! However, there are definitely opportunities to improve both the performance and the "Erlangish" style of the code. Below are some suggestions to enhance your implementati...
12,195
[ { "from": "human", "value": "I'm in the process of learning Erlang. As an exercise I picked up the Sieve of Eratosthenes algorithm of generating prime numbers. Here is my code:\n-module(seed2).\n-export([get/1]).\n\nget(N) -> WorkList = lists:duplicate(N, empty),\n get(2, N, WorkList, []).\n\nget(t...
How to enumerate opened code windows (i.e. those windows where you edit documents) upon solution loading using macros? As you probably know, MSVS remembers opened documents, i.e. when you load solution, IDE will load previously opened files. What I want to do is to perform some actions with those windows upon solution ...
In Visual Studio, when you want to enumerate through opened documents after a solution is loaded, the `SolutionEvents.Opened` event might not have access to the document windows right away because the IDE may not have fully restored the document state at that moment. Instead, you can handle this situation by using a s...
12,464
[ { "from": "human", "value": "How to enumerate opened code windows (i.e. those windows where you edit documents) upon solution loading using macros?\nAs you probably know, MSVS remembers opened documents, i.e. when you load solution, IDE will load previously opened files. What I want to do is to perform some...
What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5 I know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted to only web requests coming through sprin...
Certainly! Building a flexible and reusable validation framework for a mid-enterprise-level application in Spring 2.5 requires careful consideration of your goals. You want a validation mechanism that can work both with Spring MVC controllers and with other service calls, such as web services, without being tightly cou...
7,177
[ { "from": "human", "value": "What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5\nI know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted...
I was trying to add the XML schema to an existing EJB project. JAXB is used to bind the XML-Schema to a Java class. As we are going to use the search engine to crawl through DTO when EJB is in session. I could not find any direct approach as to map entity class file to XML-Schema. The only way we could achieve so far ...
You have a complex setup, and integrating JAXB with EJB for XML serialization and deserialization can indeed be a challenge. Here’s a step-by-step guide on how you might achieve your goal of using JAXB to convert your existing DTOs (which are already being used by web services) to XML and incorporate that into your EJB...
8,760
[ { "from": "human", "value": "I was trying to add the XML schema to an existing EJB project. JAXB is used to bind the XML-Schema to a Java class. As we are going to use the search engine to crawl through DTO when EJB is in session.\nI could not find any direct approach as to map entity class file to XML-Sche...
In a tic-tac-toe implementation I guess that the challenging part is to determine the best move to be played by the machine. What are the algorithms that can pursued? I'm looking into implementations from simple to complex. How would I go about tackling this part of the problem?
Implementing an AI for tic-tac-toe can be a fun challenge. Below are various algorithms you can consider, starting from simpler to more complex solutions. ### 1. **Random Move** - **Description**: The AI makes a move by randomly selecting one of the available spots on the board. - **Implementation**: This is the simpl...
10,413
[ { "from": "human", "value": "In a tic-tac-toe implementation I guess that the challenging part is to determine the best move to be played by the machine.\nWhat are the algorithms that can pursued? I'm looking into implementations from simple to complex. How would I go about tackling this part of the problem...
Do anyone have good ideas of how to modify the toolbar for the WinForms version of the ReportViewer Toolbar? That is, I want to remove some buttons and varius, but it looks like the solution is to create a brand new toolbar instead of modifying the one that is there. Like, I had to remove export to excel, and did it th...
Modifying the toolbar of the WinForms version of the ReportViewer control can be tricky due to the limitations and behavior of the control. Since you’re looking to hide or modify specific buttons (like the Excel export), here are some approaches you could take: ### 1. Using Reflection to Modify Rendering Extensions As...
12,377
[ { "from": "human", "value": "Do anyone have good ideas of how to modify the toolbar for the WinForms version of the ReportViewer Toolbar?\nThat is, I want to remove some buttons and varius, but it looks like the solution is to create a brand new toolbar instead of modifying the one that is there.\nLike, I h...
Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy with only the branch sub-tree. Is it possible to make git relocate the ...
You're correct that Git and SVN have different philosophies when it comes to managing branches and repositories. In SVN, it's common to have a branching model where branches are created from sub-trees, which allows for more granular changes. In contrast, Git is designed to work with the whole repository, and each check...
15,028
[ { "from": "human", "value": "Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy with only the branch sub-tree....
It seems quite a few mainstream languages support function literals these days. They are also called anonymous functions, but I don't care if they have a name. The important thing is that a function literal is an expression which yields a function which hasn't already been defined elsewhere, so for example in C, &print...
Yes, several programming languages support recursive function literals or anonymous functions in a way that allows for recursion. Here are some additional examples beyond the ones you've mentioned: ### 1. Python In Python, you can achieve recursion with lambda functions using an additional parameter to refer to the fu...
12,742
[ { "from": "human", "value": "It seems quite a few mainstream languages support function literals these days. They are also called anonymous functions, but I don't care if they have a name. The important thing is that a function literal is an expression which yields a function which hasn't already been defin...
For ASP.Net application deployment what type of information (if any) are you storing in the machine.config? If you're not using it, how are you managing environment specific configuration settings that may change for each environment? I'm looking for some "best practices" and the benefits/pitfalls of each. We're about...
When deploying ASP.NET applications, managing configuration settings effectively is crucial for both development and production environments. Here are some best practices for managing environment-specific configuration settings, along with benefits and potential pitfalls for each approach. ### 1. **Using Web.config Tr...
9,716
[ { "from": "human", "value": "For ASP.Net application deployment what type of information (if any) are you storing in the machine.config? \nIf you're not using it, how are you managing environment specific configuration settings that may change for each environment?\nI'm looking for some \"best practices\" a...
I need to transfer a database from a SQL Server instance test server to a production environment that is clustered. But SQL Server doesn't allow you to use backup/restore to do it from single instance to cluster. I'm talking about a Microsoft CRM complex database here. Your help is greatly appreciated.
Transferring a database from a non-clustered SQL Server instance (like your test server) to a clustered SQL Server instance (like your production environment) can be tricky since the standard backup and restore methods don't work across these environments. Here are several methods you can use to achieve this, especiall...
11,295
[ { "from": "human", "value": "I need to transfer a database from a SQL Server instance test server to a production environment that is clustered. But SQL Server doesn't allow you to use backup/restore to do it from single instance to cluster. I'm talking about a Microsoft CRM complex database here.\nYour hel...
I need recommendations for good application servers for monitoring and debugging PHP and Mysql running on linux. It should have a GUI, query profiling (log slow queries etc.) and capture PHP errors with environment coniditions. I am aware only of the Zend Platform that provides those features and I'm looking for alter...
There are several alternatives to the Zend Platform that provide monitoring, debugging, and profiling capabilities for PHP and MySQL applications running on Linux. Here are some recommendations that meet your criteria: 1. **New Relic**: - **Overview**: New Relic is a powerful application performance monitoring tool...
12,470
[ { "from": "human", "value": "I need recommendations for good application servers for monitoring and debugging PHP and Mysql running on linux. It should have a GUI, query profiling (log slow queries etc.) and capture PHP errors with environment coniditions. \nI am aware only of the Zend Platform that provide...
I have an app that needs to open a new window (in the same domain) so the user can view a report, but on some browsers* the new window doesn't share the non-persistent cookie of the original window, which causes the user to have to sign in again. Is there anything I can do to stop the user having to sign in again in th...
The issue you're encountering with cookies and new windows can be tricky due to differences in how browsers handle cookie storage and session management. Here are some strategies to address this problem: 1. **Use Persistent Cookies**: If possible, make sure that the cookies used for session management are set as persi...
12,670
[ { "from": "human", "value": "I have an app that needs to open a new window (in the same domain) so the user can view a report, but on some browsers* the new window doesn't share the non-persistent cookie of the original window, which causes the user to have to sign in again. Is there anything I can do to st...
I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call "ends" (i.e., finishes transferring). What's the best way for me to do this? The best way I can figure out how to do this is to delete them when the session i...
In your use case, where you want to delete a temporary file after it has been used as an MTOM binary attachment in a SOAP response, you indeed cannot delete the file immediately after setting it in the response. This is because the file is still needed until the response has been fully sent back to the client. To achi...
13,993
[ { "from": "human", "value": "I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call \"ends\" (i.e., finishes transferring). What's the best way for me to do this? The best way I can figure out how to d...
As a contractor, out-sourcer and shareware author,I have about 5-10 projects going on at any one time. Each project has a todo list, requirements need to be communicated to other outsources and employees, status needs to be given to clients, and developer's questions need to be answered. Sometimes it is too much... but...
Managing multiple projects with various stakeholders can indeed be overwhelming, but with the right tools and processes, you can streamline your workflow. Here’s a structured approach to help you stay organized: ### 1. Centralized Project Management Tool Using a project management tool can help you keep track of task...
15,030
[ { "from": "human", "value": "As a contractor, out-sourcer and shareware author,I have about 5-10 projects going on at any one time. Each project has a todo list, requirements need to be communicated to other outsources and employees, status needs to be given to clients, and developer's questions need to be ...
MySQL specifies the row format of a table as either fixed or dynamic, depending on the column data types. If a table has a variable-length column data type, such as TEXT or VARCHAR, the row format is dynamic; otherwise, it's fixed. My question is, what's the difference between the two row formats? Is one more efficient...
In MySQL, the row format of a table can significantly affect how data is stored and retrieved, and it can influence performance and storage efficiency. Here are the main differences between fixed and dynamic row formats: ### Fixed Row Format 1. **Storage**: - In a fixed row format, all columns occupy a predefined ...
13,195
[ { "from": "human", "value": "MySQL specifies the row format of a table as either fixed or dynamic, depending on the column data types. If a table has a variable-length column data type, such as TEXT or VARCHAR, the row format is dynamic; otherwise, it's fixed.\nMy question is, what's the difference between ...
I recently read somewhere that writing a regexp to match an email address, taking into account all the variations and possibilities of the standard is extremely hard and is significantly more complicated than what one would initially assume. Why is that? Are there any known and proven regexps that actually do this full...
Writing a regular expression (regexp) to accurately match email addresses is indeed a challenging task due to several reasons: ### Complexity of Email Standards 1. **Email Address Format**: The email address format is defined in RFC 5321 and RFC 5322, which allows a wide range of characters, including letters, number...
12,769
[ { "from": "human", "value": "I recently read somewhere that writing a regexp to match an email address, taking into account all the variations and possibilities of the standard is extremely hard and is significantly more complicated than what one would initially assume.\nWhy is that?\nAre there any known an...
This is a rather old problem I've had with an OpenGL application. I have a rather complex model, some polygons in it are untextured and colored using a plain color with glColor() and others are textured. Some of the texture is the same color as the untextured polygons and there should be no visible seam between the two...
The issue you're encountering with the seam between the colored polygons and the textured polygons when ambient light is introduced is likely related to how OpenGL handles lighting and texturing, particularly with the GL_MODULATE texture environment mode. Here are some potential reasons and solutions to the problem: #...
11,293
[ { "from": "human", "value": "This is a rather old problem I've had with an OpenGL application.\nI have a rather complex model, some polygons in it are untextured and colored using a plain color with glColor() and others are textured. Some of the texture is the same color as the untextured polygons and there...
I'm trying to create a Zip file from .Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I always get an error when trying to uncompr...
To create a ZIP file in .NET that can be read by Java's `java.util.zip` package, you'll want to ensure that you are using compatible compression methods and file structures. `SharpZipLib` may produce ZIP files that have some compatibility issues with Java's implementation. However, a more standard approach is to use t...
13,335
[ { "from": "human", "value": "I'm trying to create a Zip file from .Net that can be read from Java code.\nI've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I ...
What would the differences be in implementing remote business logic? Currently we are planning on using ADF to develop front-end web applications (moving from Struts). What are the differences between the front end calling EJBs using TopLink vs ADF Business Components through RMI in terms of scalability as the migratio...
When considering the implementation of remote business logic for your application as you transition from Struts to ADF (Application Development Framework), there are several key differences and factors to consider, especially when comparing the use of EJBs (Enterprise JavaBeans) with TopLink versus ADF Business Compone...
9,913
[ { "from": "human", "value": "What would the differences be in implementing remote business logic?\nCurrently we are planning on using ADF to develop front-end web applications (moving from Struts). What are the differences between the front end calling EJBs using TopLink vs ADF Business Components through R...
I have created my own Tree implementation for various reasons and have come up with two classes, a 'base' class that is a generic tree node that is chock full of logic and another class that extends that one which is more specialised. In my base class certain methods involve instantiating new tree nodes (e.g. adding ch...
You’ve encountered a classic problem in object-oriented programming often referred to as the "factory method pattern." The essence of your issue is that you want to encapsulate object creation in a way that allows subclasses to specify the type of object they want to instantiate while also avoiding code duplication. He...
15,589
[ { "from": "human", "value": "I have created my own Tree implementation for various reasons and have come up with two classes, a 'base' class that is a generic tree node that is chock full of logic and another class that extends that one which is more specialised.\nIn my base class certain methods involve in...
I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML <form action="http://examp...
To achieve a browser redirect using a POST request in JavaScript, you can dynamically create a form, append it to the document, and then submit it. This simulates a form submission without needing to make an AJAX request. Here's how you can implement the `post_to_url` function: ```javascript function post_to_url(path,...
14,818
[ { "from": "human", "value": "I'm trying to direct a browser to a different page. If I wanted a GET request, I might say\ndocument.location.href = 'http://example.com/q=a';\n\nBut the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I m...
In C++0x I would like to write a function like this: template <typename... Types> void fun(typename std::tuple<Types...> my_tuple) { //Put things into the tuple } I first tried to use a for loop on int i and then do: get<i>(my_tuple); And then store some value in the result. However, get only works on constexpr. ...
In C++11 (also referred to as C++0x), the standard library includes facilities for working with tuples, including the ability to access their elements via `std::get`. However, as you mentioned, `std::get` requires a compile-time constant index, which means you cannot use a simple `for` loop with a runtime variable to a...
11,625
[ { "from": "human", "value": "In C++0x I would like to write a function like this:\ntemplate <typename... Types>\nvoid fun(typename std::tuple<Types...> my_tuple) {\n //Put things into the tuple\n}\n\nI first tried to use a for loop on int i and then do:\nget<i>(my_tuple);\n\nAnd then store some value in ...
What is the order of topics to explain to a .NET developer or user group to get them started and interested with alt.net tools and practices. ORM IoC TDD DDD DSL CI MVC - MVP Version Control (I think this is the one they get the fastest) Agile Etc, etc...
Introducing .NET developers or user groups to alt.NET tools and practices can be an exciting journey, as it encompasses various paradigms and methodologies that can enhance their development skills. The order in which you introduce these topics can significantly impact engagement and understanding. Here’s a suggested o...
11,492
[ { "from": "human", "value": "What is the order of topics to explain to a .NET developer or user group to get them started and interested with alt.net tools and practices.\n\nORM\nIoC\nTDD\nDDD\nDSL\nCI\nMVC - MVP\nVersion Control (I think this is the one they get the fastest)\nAgile\nEtc, etc...\n\n" }, ...
I want to write a real-time analysis tool for wireless traffic. Does anyone know how to read from a promiscuous (or sniffing) device in C? I know that you need to have root access to do it. I was wondering if anyone knows what functions are necessary to do this. Normal sockets don't seem to make sense here.
To create a real-time analysis tool for wireless traffic in C, you'll typically want to use a library designed for packet capture, the most popular of which is **libpcap**. This library provides a standard way to capture network packets and is commonly used in conjunction with tools like `tcpdump` and Wireshark. Here'...
12,619
[ { "from": "human", "value": "I want to write a real-time analysis tool for wireless traffic.\nDoes anyone know how to read from a promiscuous (or sniffing) device in C? \nI know that you need to have root access to do it. I was wondering if anyone knows what functions are necessary to do this. Normal socket...
Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling me I needed mingw. So I downloaded and installed mingw. Problem: I no...
It looks like you're facing an issue when trying to build `psycopg2` with MinGW on Windows, specifically related to the linking of the PostgreSQL library. The error message indicates that the linker cannot find the `-lpq` library, which is the PostgreSQL client library. Here are some steps you can take to resolve this...
10,955
[ { "from": "human", "value": "Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling me I needed mingw. So I down...
What is an effective algorithm for nesting 1 dimensional lengths into predefined stock lengths? For example, If you required steel bars in the following quantities and lengths, 5 x 2 metres 5 x 3 metres 5 x 4 metres and these can be cut from 10 metre bars. How could you calculate the pattern for cutting the 10m bars...
Thank you for sharing your detailed approach to solving the cutting stock problem! Your breakdown of the process into three main stages and the specific steps within each stage are very clear and provide a solid framework for others who might be tackling a similar problem. ### Summary of Your Algorithm: 1. **Identify...
15,536
[ { "from": "human", "value": "What is an effective algorithm for nesting 1 dimensional lengths into predefined stock lengths?\nFor example, If you required steel bars in the following quantities and lengths,\n\n5 x 2 metres \n5 x 3 metres\n5 x 4 metres\n\nand these can be cut from 10 metre bars.\nHow could y...
I have the following table relationship in my database: Parent / \ Child1 Child2 \ / GrandChild I am trying to create the FK relationships so that the deletion of the Parent table cascades to both child and the grandchild table. For any one particular granchild, ...
The "multiple cascade paths" error you are encountering is due to how SQL Server (and some other relational databases) handles cascading deletes when there are multiple potential paths for a row to be deleted. In your case, both `Child1` and `Child2` have relationships with `GrandChild`, and deleting a row from `Parent...
14,468
[ { "from": "human", "value": "I have the following table relationship in my database:\n Parent\n / \\\n Child1 Child2\n \\ /\n GrandChild\n\nI am trying to create the FK relationships so that the deletion of the Parent table cascades to both child and the gra...
I am trying to generate a Sandcastle help file for a website. In the properties window for project, there aren't any options for creating the XML Documentation File required for Sandcastle. The Build tab in the property pages only contains options for: Start Action, Build Solution Action, and Accessibility validation. ...
In Visual Studio 2005, web projects (also known as Web Sites) don't have a `.proj` file by default, which is why you're not seeing the options to generate the XML documentation file like you would in a traditional web application project. Here’s a step-by-step approach to enable XML documentation generation for your we...
12,991
[ { "from": "human", "value": "I am trying to generate a Sandcastle help file for a website. In the properties window for project, there aren't any options for creating the XML Documentation File required for Sandcastle.\nThe Build tab in the property pages only contains options for: Start Action, Build Solut...
I'm having problems refreshing .Net 2.0 with IIS 6. I have been able to successfully execute "aspnet_regiis.exe -i", but when I try to register the aspnet_isapi.dll: regsvr32 “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" I get the error C:\Windows..\aspnet_isapi.dll was loaded, but the DllRegisterS...
It seems you are dealing with a couple of issues related to the configuration of IIS 6 and ASP.NET 2.0. Based on the information you've provided, let's address the key issues step by step. ### Registering aspnet_isapi.dll 1. **Do Not Use regsvr32**: The `aspnet_isapi.dll` is not a COM DLL and therefore should not be ...
13,125
[ { "from": "human", "value": "I'm having problems refreshing .Net 2.0 with IIS 6.\nI have been able to successfully execute \"aspnet_regiis.exe -i\", but when I try to register the aspnet_isapi.dll:\nregsvr32 “C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_isapi.dll\"\n\nI get the error\n\nC:\\Win...
In general, what needs to be done to convert a 16 bit Windows program to Win32? I'm sure I'm not the only person to inherit a codebase and be stunned to find 16-bit code lurking in the corners. The code in question is C.
Converting a 16-bit Windows program to Win32 involves several steps, as the two architectures differ significantly in terms of memory management, data types, system calls, and application programming interfaces (APIs). Here are some key considerations and steps you can follow to make the conversion process smoother: #...
13,218
[ { "from": "human", "value": "In general, what needs to be done to convert a 16 bit Windows program to Win32? I'm sure I'm not the only person to inherit a codebase and be stunned to find 16-bit code lurking in the corners.\nThe code in question is C.\n" }, { "from": "gpt", "value": "Converting a...
I need to retrieve a record from a database, display it on a web page (I'm using ASP.NET) but store the ID (primary key) from that record somewhere so I can go back to the database later with that ID (perhaps to do an update). I know there are probably a few ways to do this, such as storing the ID in ViewState or a hid...
When working with ASP.NET and needing to store the ID of a record for later retrieval (such as for updates), there are several options you can consider, each with its pros and cons. Here are the most common methods along with the recommended approach: ### 1. ViewState **Pros:** - Automatically maintains state across p...
13,162
[ { "from": "human", "value": "I need to retrieve a record from a database, display it on a web page (I'm using ASP.NET) but store the ID (primary key) from that record somewhere so I can go back to the database later with that ID (perhaps to do an update).\nI know there are probably a few ways to do this, su...
A lot of the time I will have a Business object that has a property for a user index or a set of indexes for some data. When I display this object in a form or some other view I need the users full name or some of the other properties of the data. Usually I create another class myObjectView or something similar. What i...
What you're experiencing is a common challenge in software design, particularly in applications that need to represent business logic and data in a user-friendly way. The approach you've described—creating a separate view model class (like `MyObjectView`) to hold data specifically for presentation—is a pattern known as...
11,415
[ { "from": "human", "value": "A lot of the time I will have a Business object that has a property for a user index or a set of indexes for some data. When I display this object in a form or some other view I need the users full name or some of the other properties of the data. Usually I create another class ...
Is it possible to put the results from more than one query on more than one table into a TClientDataset? Just something like SELECT * from t1; SELECT * from t2; SELECT * from t3; I can't seem to figure out a way to get a data provider (SetProvider) to pull in results from more than one table at a time.
To populate a `TClientDataSet` with results from multiple queries or tables, you cannot directly execute multiple `SELECT` statements and combine their results in the `TClientDataSet` using a single `SetProvider`. However, you can achieve this by using one of the following approaches: ### Approach 1: Using a Union Que...
10,387
[ { "from": "human", "value": "Is it possible to put the results from more than one query on more than one table into a TClientDataset?\nJust something like\nSELECT * from t1;\nSELECT * from t2;\nSELECT * from t3;\n\nI can't seem to figure out a way to get a data provider (SetProvider) to pull in results from...
If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and calling the appropriate hand...
When designing a command-line interface (CLI) in a program, it's helpful to follow a pattern that organizes your argument parsing and handler functions clearly. This not only improves code readability but also makes it easier to maintain and expand the program in the future. Below, I will discuss a common approach usin...
10,320
[ { "from": "human", "value": "If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping thro...
I'm about to write a little GUI app that will sit in the system tray, doing a little FTP and ODBC. I'd like to develop in Linux, if possible. What would you recommend? Thanks a bunch!
Developing a GUI app that sits in the system tray on Linux can be a rewarding project. Here are some recommendations to help you get started: ### Language and Framework 1. **Python with PyQt/PySide**: - **PyQt** or **PySide** are excellent libraries for building desktop applications. They offer robust tools for cr...
13,670
[ { "from": "human", "value": "I'm about to write a little GUI app that will sit in the system tray, doing a little FTP and ODBC. \nI'd like to develop in Linux, if possible.\nWhat would you recommend?\nThanks a bunch!\n" }, { "from": "gpt", "value": "Developing a GUI app that sits in the system t...
I know that this is somewhat subjective, but I wonder if there is a generally accepted standard for naming assemblies which contain some "core" functions. Let's say you got a larger Projects, with Assemblies like Company.Product.WebControls.dll Company.Product.Net.dll Company.Product.UserPages.dll and you have a Bunc...
When naming assemblies, especially for core functionality in a larger project, it's essential to choose a name that clearly communicates its purpose and role within the overall architecture. While there may not be a universally accepted standard, there are some common practices and conventions that you can consider. #...
13,363
[ { "from": "human", "value": "I know that this is somewhat subjective, but I wonder if there is a generally accepted standard for naming assemblies which contain some \"core\" functions.\nLet's say you got a larger Projects, with Assemblies like\n\nCompany.Product.WebControls.dll\nCompany.Product.Net.dll\nCo...
When I first heard about StackOverflow, and heard that it was being built in ASP.Net MVC, I was a little confused. I thought ASP.Net was always an example of an MVC architecture. You have the .aspx page that provides the view, the .aspx.vb page that provides the controller, and you can create another class to be the ...
Your questions touch on some important distinctions between ASP.NET Web Forms and ASP.NET MVC. Let's break down the main differences and advantages that ASP.NET MVC offers over traditional ASP.NET Web Forms, as well as clarify the "MVC" naming convention. ### Key Differences and Advantages of ASP.NET MVC 1. **Separat...
7,745
[ { "from": "human", "value": "When I first heard about StackOverflow, and heard that it was being built in ASP.Net MVC, I was a little confused. I thought ASP.Net was always an example of an MVC architecture. You have the .aspx page that provides the view, the .aspx.vb page that provides the controller, an...
What are the pros and cons of using a hosting provider for a Subversion repository versus maintaining it in-house? I'm sure there are benefits in terms of ease of set up and use. And it would be nice to have somebody else make sure that our code is backed up properly. However, Visual SVN Server is dirt simple to se...
When considering whether to use a hosting provider for a Subversion (SVN) repository versus maintaining it in-house, it's important to weigh the pros and cons of both options. Below are some key points to consider: ### Pros of Using a Hosting Provider: 1. **Ease of Setup and Use**: - Hosted services often provide ...
14,323
[ { "from": "human", "value": "What are the pros and cons of using a hosting provider for a Subversion repository versus maintaining it in-house? I'm sure there are benefits in terms of ease of set up and use. And it would be nice to have somebody else make sure that our code is backed up properly. \nHowev...
When using tooltips to show a detailed description of a TreeNode, the tooltip is drawn on top of the node, as if it was completing the node's text. Also, if the text is long, the tooltip is positioned in a way that the text exceeds the screen. But what I need is the tooltip to show right below the mouse pointer and no...
To achieve the desired behavior of displaying tooltips in a way that they appear below the mouse pointer instead of on top of the TreeNode, you can customize the tooltip's position when you are rendering it. Here’s how you can implement this in a typical programming environment with tooltips, such as in a Windows For...
14,815
[ { "from": "human", "value": "When using tooltips to show a detailed description of a TreeNode, the tooltip is drawn on top of the node, as if it was completing the node's text. Also, if the text is long, the tooltip is positioned in a way that the text exceeds the screen. \nBut what I need is the tooltip to...
I have a really strange problem with an quite simple ASP.NET (.NET 3.5) Site and the IE6. It seems sometimes and on certain machines, the IE6 crashes while displaying the site. CSS was already eliminated as a reason for the crashes. After a while of research, I was not able to find a reason for the crashes and could no...
Troubleshooting issues with IE6 can be quite challenging due to its age and the various configurations of different machines. Here are some potential reasons for the crashes you're experiencing and steps you can take to investigate and potentially resolve the issue: 1. **Browser Add-ons/Extensions**: Some add-ons or b...
13,035
[ { "from": "human", "value": "I have a really strange problem with an quite simple ASP.NET (.NET 3.5) Site and the IE6.\nIt seems sometimes and on certain machines, the IE6 crashes while displaying the site. CSS was already eliminated as a reason for the crashes.\nAfter a while of research, I was not able to...
I use a custom Matrix class in my application, and I frequently add multiple matrices: Matrix result = a + b + c + d; // a, b, c and d are also Matrices However, this creates an intermediate matrix for each addition operation. Since this is simple addition, it is possible to avoid the intermediate objects and create t...
To achieve a more elegant way of adding multiple matrices without creating intermediate objects, you can define an overloaded operator for addition that takes a variadic number of matrices or use a helper method to accumulate the results. Below are two approaches to achieve this with a custom Matrix class. ### Approac...
13,030
[ { "from": "human", "value": "I use a custom Matrix class in my application, and I frequently add multiple matrices:\nMatrix result = a + b + c + d; // a, b, c and d are also Matrices\n\nHowever, this creates an intermediate matrix for each addition operation. Since this is simple addition, it is possible to...
[NOTE: This questions is similar to but not the same as this one.] Visual Studio defines several dozen "Macros" which are sort of simulated environment variables (completely unrelated to C++ macros) which contain information about the build in progress. Examples: ConfigurationName Release TargetPath ...
In Visual Studio, while built-in macros are indeed not directly exposed as environment variables in the context of Post-Build Events, there are a few workarounds you can use to achieve your goal of passing multiple macros to your Python script without hitting command line length limits. Here are some approaches you cou...
14,298
[ { "from": "human", "value": "[NOTE: This questions is similar to but not the same as this one.]\nVisual Studio defines several dozen \"Macros\" which are sort of simulated environment variables (completely unrelated to C++ macros) which contain information about the build in progress. Examples:\n\n Conf...
I need to create S/MIME messages using C# (as specified in RFC 2633, "S/MIME Version 3 message specification", and RFC 3335). The only S/MIME library I can find is a commercial library (http://www.example-code.com/csharp/smime.asp), which is no good for us. Are there any existing libraries to accomplish creating S/MIME...
Creating S/MIME messages in C# without using commercial libraries can indeed be challenging, but there are some open-source options and libraries that you can consider for handling S/MIME functionality. Below are a few libraries and suggestions for creating S/MIME messages, including .p7s files, using .NET: 1. **Bounc...
10,367
[ { "from": "human", "value": "I need to create S/MIME messages using C# (as specified in RFC 2633, \"S/MIME Version 3 message specification\", and RFC 3335).\nThe only S/MIME library I can find is a commercial library (http://www.example-code.com/csharp/smime.asp), which is no good for us.\nAre there any exi...
I'm currently building a small web application that includes a fair amount of JavaScript. When I was prototyping the initial idea, I just hacked together a few functions to demonstrate how the application would eventually behave intending to go forward re-writing the JavaScript in an object-oriented nature. Now that I'...
It's great that you're thinking critically about your design choices as you move from prototyping to implementation. The KISS (Keep It Simple, Stupid) principle is a valuable guideline, especially when deciding on the architecture of your application. Here are some considerations to help you decide whether to stick wit...
15,327
[ { "from": "human", "value": "I'm currently building a small web application that includes a fair amount of JavaScript. When I was prototyping the initial idea, I just hacked together a few functions to demonstrate how the application would eventually behave intending to go forward re-writing the JavaScript ...
I getting the following error: Deploying application in domain failed; Error loading deployment descriptors for jrules-teamserver-SUNAS82 -- Connection timed out ; requested operation cannot be completed Error loading deployment descriptors for jrules-teamserver-SUNAS82 -- Connection timed out When deploying a ear fi...
The "Connection timed out" error you are encountering when deploying an EAR (Enterprise Archive) file usually indicates a problem with network connectivity or server availability. Here are several potential causes for this issue and suggestions for how to resolve it: ### Possible Causes 1. **Server Unavailability**: ...
14,543
[ { "from": "human", "value": "I getting the following error:\nDeploying application in domain failed; Error loading deployment descriptors for jrules-teamserver-SUNAS82 -- Connection timed out ; requested operation cannot be completed Error loading deployment descriptors for jrules-teamserver-SUNAS82 -- Conn...
I have developed a couple of extensions for Firefox, and am annoyed that it is so hard to get the extension signed. When an extension isn't signed, it says "Author not verified" when it is installed, and to me that just looks wrong. I have a simple build script that builds my .xpi file from sources, and I have a licen...
To sign your Firefox extensions, you'll need to follow Mozilla's guidelines for extension signing and use their official services. Here’s a step-by-step guide on how to get your extensions signed without spending too much on a commercial certificate: ### Steps to Sign Your Firefox Extension 1. **Prepare Your Extensio...
12,631
[ { "from": "human", "value": "I have developed a couple of extensions for Firefox, and am annoyed that it is so hard to get the extension signed. When an extension isn't signed, it says \"Author not verified\" when it is installed, and to me that just looks wrong.\nI have a simple build script that builds m...
Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well. I already know that the commercial version of Qt has applications to this end. I also realize that I'll probably need to compile from source as the installer for the open source does not support Visu...
Setting up Qt4 with Visual Studio 2008 can be a bit complex, especially since you're working with an older version of both Qt and Visual Studio. Here are the steps you can follow to set up Qt4 in Visual Studio 2008, along with some resources that might be useful. ### Steps to Set Up Qt4 in Visual Studio 2008: 1. **Do...
13,647
[ { "from": "human", "value": "Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well.\nI already know that the commercial version of Qt has applications to this end. I also realize that I'll probably need to compile from source as the installer...
Anyone know if it is possible to write an app that uses the Java Sound API on a system that doesn't actually have a hardware sound device? I have some code I've written based on the API that manipulates some audio and plays the result but I am now trying to run this in a server environment, where the audio will be reco...
Yes, it is possible to write an application that uses the Java Sound API in a system without a hardware sound device, but you may need to make some modifications to how you handle audio input and output. In a server environment where there's no audio hardware, you will not be able to use the traditional sound playback...
12,186
[ { "from": "human", "value": "Anyone know if it is possible to write an app that uses the Java Sound API on a system that doesn't actually have a hardware sound device?\nI have some code I've written based on the API that manipulates some audio and plays the result but I am now trying to run this in a server...
I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen Ayende's blog posts and things, but I've never really gotten exactly why I would take my business logic away from the methods and situations I'm using in my provider. If you'v...
Certainly! Let’s break down Domain-Specific Languages (DSLs) in a straightforward way: ### What Exactly Building DSLs Means A **Domain-Specific Language** is a programming language or specification language dedicated to a particular problem domain, a particular solution technique, or a particular area of computation. ...
7,528
[ { "from": "human", "value": "I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen Ayende's blog posts and things, but I've never really gotten exactly why I would take my business logic away from the methods and situ...
I need to figure out how to get the data from D3D textures and surfaces back to system memory. What's the fastest way to do such things and how? Also if I only need one subrect, how can one read back only that portion without having to read back the entire thing to system memory? In short I'm looking for concise des...
To copy data from D3D textures and surfaces back to system memory in Direct3D 9 (and concepts for later versions, where applicable), here are concise descriptions of how to achieve that for the various scenarios you mentioned: ### General Steps to Copy Data to System Memory 1. **Create a System Memory Resource**: Crea...
12,794
[ { "from": "human", "value": "I need to figure out how to get the data from D3D textures and surfaces back to system memory. What's the fastest way to do such things and how? \nAlso if I only need one subrect, how can one read back only that portion without having to read back the entire thing to system me...
A typical stored procedure in our system accepts around 20 or so parameters. There's no chance of refactoring these stored procedures either. I've basically resorted to writing my own code generator that wraps these SP's into (database provider agnostic) "Command" objects, with their public properties corresponding t...
It sounds like you're facing a unique challenge with the older SQL Server 6.5 and the constraints of a .NET 2.0 application. Given your requirements and the unsuccessful attempts with the ORM tools you've tried, here are a few alternative approaches and libraries you could consider: 1. **Dapper**: - Although Dapper...
10,981
[ { "from": "human", "value": "A typical stored procedure in our system accepts around 20 or so parameters. There's no chance of refactoring these stored procedures either. I've basically resorted to writing my own code generator that wraps these SP's into (database provider agnostic) \"Command\" objects, w...
Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually? I've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class (marked as ONE in the code) and retrieving it much later in my program and ...
In your code snippet, when you assign a string literal to the pointer `s` in the `store` method, you're actually not creating any dynamic allocation that you need to worry about freeing. Let's break down what's happening in your code: 1. **String Literals**: When you write `s = "Storing a string";`, you're assigning `...
15,059
[ { "from": "human", "value": "Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually?\nI've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class (marked as ONE in the code) and r...
I'm interested in creating a game that uses fractal maps for more realistic geography. However, the only fractal map programs I have found are Windows-only, for example Fractal Mapper. Needless to say, they are also not open-sourced. Are there any open-sourced fractal map creators available, preferably in Python or C/C...
Creating fractal maps for game development is a fascinating idea! There are a few open-source libraries and projects you can consider that allow for generating fractal maps and can be integrated into your own programs: ### Python Libraries: 1. **Pygame + Perlin Noise**: - You can create fractal maps by combining P...
13,224
[ { "from": "human", "value": "I'm interested in creating a game that uses fractal maps for more realistic geography. However, the only fractal map programs I have found are Windows-only, for example Fractal Mapper. Needless to say, they are also not open-sourced.\nAre there any open-sourced fractal map creat...
I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop. I'd like to move to online documentation (don't have to ship it with the product, can update it easily, etc). What tools are recommended for this sort of thing...
Moving from CHM files to online documentation is a great way to improve the accessibility and maintainability of your help files. There are several tools and platforms that can meet your requirements. Below are some options along with their pros and cons. ### 1. **MkDocs** - **Overview**: MkDocs is a static site gener...
11,241
[ { "from": "human", "value": "I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop.\nI'd like to move to online documentation (don't have to ship it with the product, can update it easily, etc). What to...
Is there a better way of binding a list of base class to a UI other than downcasting e.g: static void Main(string[] args) { List<Animal> list = new List<Animal>(); Pig p = new Pig(5); Dog d = new Dog("/images/dog1.jpg"); list.Add(p); list.Add(d); foreach (Animal a in list) { ...
Instead of using downcasting to call specific methods for each derived class (`Pig` and `Dog` in this case), a more elegant and extensible approach is to use polymorphism. You can define a method in the base class (`Animal`) that each derived class overrides to provide its specific implementation. This way, you can inv...
12,966
[ { "from": "human", "value": "Is there a better way of binding a list of base class to a UI other than downcasting e.g:\nstatic void Main(string[] args) {\n List<Animal> list = new List<Animal>(); \n Pig p = new Pig(5); \n Dog d = new Dog(\"/images/dog1.jpg\"); \n list.Add(p); \n list.Add(...
For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects?
When considering the communication methods between a web client (typically a servlet or web service) and a business tier (implemented with technologies like Spring or EJB), several trade-offs emerge beyond the basic synchronous/asynchronous nature of the communication. Below, I'll outline some key considerations when c...
14,375
[ { "from": "human", "value": "For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects?\n" }, { "from": "gpt", "value"...
I have an iPhone app that hides the status bar. However, my main view doesn't get any touch events when I tap in the status bar area. Is there something I can do to fix this? Here are a few details of my app's setup (in case it matters): It's an OpenGL-based application. The app launches in landscape mode. However,...
It sounds like you've run into a known issue with the iOS Simulator, especially when dealing with touch events in areas that would normally be occupied by the status bar. The Simulator does not always mimic the touch behavior of actual devices perfectly. Here's some information and potential workarounds that might help...
11,608
[ { "from": "human", "value": "I have an iPhone app that hides the status bar. However, my main view doesn't get any touch events when I tap in the status bar area. Is there something I can do to fix this?\nHere are a few details of my app's setup (in case it matters):\n\nIt's an OpenGL-based application.\n...
I have an application that's a mix of Java and C++ on Solaris. The Java aspects of the code run the web UI and establish state on the devices that we're talking to, and the C++ code does the real-time crunching of data coming back from the devices. Shared memory is used to pass device state and context information from...
It sounds like you're facing a complex challenge with your current architecture, especially given the need for both performance and high availability. Here are some steps and considerations for re-architecting your application to scale out effectively: ### 1. **Decouple Components:** - **Microservices Architecture:...
9,623
[ { "from": "human", "value": "I have an application that's a mix of Java and C++ on Solaris. The Java aspects of the code run the web UI and establish state on the devices that we're talking to, and the C++ code does the real-time crunching of data coming back from the devices. Shared memory is used to pass ...
I need to show a camera capture dialog in a compact framework 3.7 application by pinvoking SHCameraCapture from the dll Aygshell.dll. I cannont use the managed object CameraCaptureDialog because of limitations with the technology I'm working with. Instead, I need to access it by Pinvoking it. See http://msdn.microsof...
To invoke the `SHCameraCapture` function from the `aygshell.dll` using P/Invoke in a Compact Framework 3.7 application, you'll need to define the structure that represents the parameters for the camera capture dialog, and use the `DllImport` attribute to call the function. Below is an example of how you might set this ...
13,732
[ { "from": "human", "value": "I need to show a camera capture dialog in a compact framework 3.7 application by pinvoking SHCameraCapture from the dll Aygshell.dll. I cannont use the managed object CameraCaptureDialog because of limitations with the technology I'm working with. Instead, I need to access it ...