instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I believe that we can allow Firefox to sent NTLM data to SharePoint sites to do automatic authentication, and I think that this is doable with IIS.
I'd like to do the same thing with an internal Rails site.
Does anyone know of way that I could authenticate NTLM type user information through a Apache/mongrel setup (prov... | To enable NTLM authentication for an internal Rails application running on Apache with Mongrel on a Windows server inside an Active Directory domain, you can follow these general steps:
### Step 1: Configure Apache for NTLM Authentication
1. **Install Required Modules**: Make sure you have the necessary Apache module... | 27,976 | [
{
"from": "human",
"value": "I believe that we can allow Firefox to sent NTLM data to SharePoint sites to do automatic authentication, and I think that this is doable with IIS.\nI'd like to do the same thing with an internal Rails site.\nDoes anyone know of way that I could authenticate NTLM type user infor... |
I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design.
For the Data Access Layer, what is the best way to handle creating Connection objects to call my SQL stored procedures and why? Bearing in mind I am writing a lot of the code by hand (I know I could be using H... | When designing a Data Access Layer (DAL) for your web application, managing your database connections is critical to ensure both performance and stability. Here’s how to approach creating `Connection` objects for calling SQL stored procedures:
### 1. Single Static Instance of Connection
Using a single static instance ... | 16,915 | [
{
"from": "human",
"value": "I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design.\nFor the Data Access Layer, what is the best way to handle creating Connection objects to call my SQL stored procedures and why? Bearing in mind I am writing a lot of t... |
Unfortunately on my project, we generate a lot of the HTML code in JavaScript like this:
var html = new StringBuffer();
html.append("<td class=\"gr-my-deals\"><a href=\"").append(deal.url).append("\" target=\"_blank\">").append(deal.description).append("</a></td>");
I have 2 specific complaints about this:
The use of... | Hi Don,
Your project certainly presents some interesting challenges when it comes to string manipulation in JavaScript. Let's tackle both of your questions:
### 1. Replacing `.append()` with `+`
You're already on the right track with your `find and replace`. However, if you want to ensure that you're only replacing ... | 29,757 | [
{
"from": "human",
"value": "Unfortunately on my project, we generate a lot of the HTML code in JavaScript like this:\nvar html = new StringBuffer();\nhtml.append(\"<td class=\\\"gr-my-deals\\\"><a href=\\\"\").append(deal.url).append(\"\\\" target=\\\"_blank\\\">\").append(deal.description).append(\"</a></... |
We are designing a web application using ASP.NET and AJAX and we want to host our WCF Service Layer on a different website and make JavaScript calls to the Service Layer from our client pages. We understand that the browser will not allow AJAX calls to a different port or domain. What is the best way to architect a s... | When designing a web application that includes a separate WCF service layer hosted on a different domain, you have several options to handle cross-domain AJAX calls. Here are some approaches to consider, including the one you mentioned about using a proxy layer:
### 1. **Proxy Layer Approach**
Using a proxy layer as y... | 27,683 | [
{
"from": "human",
"value": "We are designing a web application using ASP.NET and AJAX and we want to host our WCF Service Layer on a different website and make JavaScript calls to the Service Layer from our client pages. We understand that the browser will not allow AJAX calls to a different port or domai... |
I want to alert the user in a Swing application of certain events with an old fashioned PC Speaker beep (NOT the soundcard), since not on every PC there is a soundcard with an attached speaker, or volume might be turned to zero, or a headphone might be connected... How can I do this?
UPDATE:
java.awt.Toolkit.getDefault... | To produce a PC speaker beep from a Java Swing application when `Toolkit.getDefaultToolkit().beep()` does not meet your requirements, you can explore the following options:
### Option 1: Direct Access to PC Speaker through Java Native Interface (JNI)
You can use JNI to make direct calls to lower-level system functions... | 29,378 | [
{
"from": "human",
"value": "I want to alert the user in a Swing application of certain events with an old fashioned PC Speaker beep (NOT the soundcard), since not on every PC there is a soundcard with an attached speaker, or volume might be turned to zero, or a headphone might be connected... How can I do ... |
First off, I know next to nothing about language theory, and I barely know any other languages except Java, but I had an idea that I think would be cool, but I need you guys to tell me:
a: why it sucks
b: how language x has had that for years
c: how my mind sucks
d: all of the above
The idea would give composition the ... | Your idea touches on a few important concepts in software design and language theory, particularly regarding composition and delegation. Let's break it down point by point in line with your request:
### a: Why It Sucks
1. **Encapsulation Concerns**: Your proposal blurs the lines between the responsibilities of the cl... | 29,902 | [
{
"from": "human",
"value": "First off, I know next to nothing about language theory, and I barely know any other languages except Java, but I had an idea that I think would be cool, but I need you guys to tell me:\na: why it sucks\nb: how language x has had that for years\nc: how my mind sucks\nd: all of t... |
I'm producing a hex file to run on an ARM processor which I want to keep below 32K. It's currently a lot larger than that and I wondered if someone might have some advice on what's the best approach to slim it down?
Here's what I've done so far
So I've run 'size' on it to determine how big the hex file is.
Then 'size... | Reducing the size of a hex file for an ARM processor, especially when dealing with external libraries, can be challenging. Here are some strategies you can employ to help slim down your firmware or application:
### 1. **Use Compiler Optimization Flags:**
- Make sure to enable optimization flags in your GCC compilat... | 25,441 | [
{
"from": "human",
"value": "I'm producing a hex file to run on an ARM processor which I want to keep below 32K. It's currently a lot larger than that and I wondered if someone might have some advice on what's the best approach to slim it down?\nHere's what I've done so far\n\nSo I've run 'size' on it to de... |
I have ASP.Net code similar to the following (this is inside a FIELDSET):
<ol>
<li>
<label>Some label</label>
<one or more form controls, ASP.Net controls, labels, etc.>
</li>
<li>
<label>Another label</label>
<... more of the same...>
</li>
...
</ol>
I'm trying to k... | It looks like you're on the right track with your jQuery solution! The general approach you provided will indeed work to wrap all the elements following the first label in each list item in a `div`. Your corrected code should perform as expected, wrapping all sibling elements of the first label with a `div`.
Here’s a ... | 30,571 | [
{
"from": "human",
"value": "I have ASP.Net code similar to the following (this is inside a FIELDSET):\n<ol>\n <li>\n <label>Some label</label>\n <one or more form controls, ASP.Net controls, labels, etc.>\n </li>\n <li>\n <label>Another label</label>\n <... more of the ... |
Here's what MSDN has to say under When to Use Static Classes:
static class CompanyInfo
{
public static string GetCompanyName() { return "CompanyName"; }
public static string GetCompanyAddress() { return "CompanyAddress"; }
//...
}
Use a static class as a unit of
organization for methods not
associated... | You're correct that static classes in C# serve specific purposes, and their usage can extend beyond the examples provided in the MSDN documentation. Let's explore when to use static classes, the appropriate scenarios, and when you might want to avoid them.
### When to Use Static Classes
1. **Utility or Helper Functio... | 28,781 | [
{
"from": "human",
"value": "Here's what MSDN has to say under When to Use Static Classes:\n\nstatic class CompanyInfo\n{\n public static string GetCompanyName() { return \"CompanyName\"; }\n public static string GetCompanyAddress() { return \"CompanyAddress\"; }\n //...\n}\n\nUse a static class as... |
The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from the_base_class.
class the_base_class:
somedata = {}
somedata['was_false_in_base'] = False
class subclassthing(the_base_class):
def __init__(self):
print self.somedata
firs... | What you're observing is due to the way Python handles class attributes. In Python, class attributes are shared among all instances of that class. This means that if you modify a class attribute, it will affect all instances that reference that attribute.
In your example, `somedata` is defined as a class attribute of ... | 28,006 | [
{
"from": "human",
"value": "The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from the_base_class.\nclass the_base_class:\n somedata = {}\n somedata['was_false_in_base'] = False\n\n\nclass subclassthing(the_base_class):\n def __init... |
Our web client needs a way to browse the local network and select location for file storage. This will then be returned to the webpage as a UNC name.
On a native client this easily accomplished by using Shell32 functions.
I've looked at ASP FileUpload, but that returns the file vs. a specific directory.
EDIT: Another... | To allow a web client to browse a local network and select a location for file storage (returning a UNC name), you'll encounter some limitations, particularly due to web security standards. Browsers do not allow access to the local file system or network shares directly through JavaScript or HTML due to security concer... | 25,311 | [
{
"from": "human",
"value": "Our web client needs a way to browse the local network and select location for file storage. This will then be returned to the webpage as a UNC name.\nOn a native client this easily accomplished by using Shell32 functions.\nI've looked at ASP FileUpload, but that returns the fi... |
I'm trying to get data from a Sharepoint list and put it into some Flex graphs. I can call the list data just fine using a CAML query, but I want to use a GroupBy to consolidate the rows by Teams. So, for example Team 1 may have 20 records, Team 2 may have 8 records, and Team 3 might have 25 records... Instead of sho... | It looks like you're trying to achieve two goals with your CAML query: grouping records by team and sorting them based on cost. However, CAML queries can be somewhat tricky, especially when it comes to grouping and ordering.
First, let's clarify a few things regarding the CAML structure:
1. **Grouping**: The `<GroupB... | 29,268 | [
{
"from": "human",
"value": "I'm trying to get data from a Sharepoint list and put it into some Flex graphs. I can call the list data just fine using a CAML query, but I want to use a GroupBy to consolidate the rows by Teams. So, for example Team 1 may have 20 records, Team 2 may have 8 records, and Team ... |
I am told by someone that when calling Oracle from ADO.net, when calling multiple inserts in a loop, where each insert causes a trigger to fire that includes within it's PL-Sql a Commit statement, that it is impossible to stop that commit from actually commiting the transaction.
i.e., I want my ADO.Net code to begin a ... | Your source is correct regarding Oracle's behavior with regards to commits within triggers. In Oracle, if a trigger (specifically a `BEFORE` or `AFTER` trigger) contains a `COMMIT` statement, it will cause the entire transaction to be committed immediately. This behavior makes it challenging to handle transactions as y... | 29,331 | [
{
"from": "human",
"value": "I am told by someone that when calling Oracle from ADO.net, when calling multiple inserts in a loop, where each insert causes a trigger to fire that includes within it's PL-Sql a Commit statement, that it is impossible to stop that commit from actually commiting the transaction.... |
I am writing a tool to help students learn regular expressions. I will probably be writing it in Java.
The idea is this: the student types in a regular expression and the tool shows which parts of a text will get matched by the regex. Simple enough.
But I want to support several different regex "flavors" such as:
Basi... | To implement your tool for converting regular expressions between different flavors, you need to establish a systematic way to convert the Perl-style regex to Basic and Extended forms while maintaining the integrity of the regex semantics.
Here's how you could approach the problem:
### 1. Identify Meta-Characters for... | 24,013 | [
{
"from": "human",
"value": "I am writing a tool to help students learn regular expressions. I will probably be writing it in Java.\nThe idea is this: the student types in a regular expression and the tool shows which parts of a text will get matched by the regex. Simple enough.\nBut I want to support sever... |
When designing user table what would be the must have fields from the security/user authentication point of view for a Web based Application (.NET and SqlServer 2005)
I came with with the following fields:
userID
username -- preferably email
passwordHash
onceUsePassword -- to indicate that the password should be chang... | Your design for the user table has several essential fields for security and user authentication, and you've covered many important aspects. Below are some additional considerations, recommendations, and potential adjustments you might make to enhance the security and effectiveness of your user table design:
### Addit... | 27,165 | [
{
"from": "human",
"value": "When designing user table what would be the must have fields from the security/user authentication point of view for a Web based Application (.NET and SqlServer 2005)\nI came with with the following fields:\nuserID\nusername -- preferably email\npasswordHash \nonceUsePassword --... |
I'm passing small (2-10 KB)XML documents as input to a WCF service. now I've two option to read data values from incoming XML
Deserialize to a strongly typed object and use object properties to access values
use XPath to access values
which approach is faster? some statistics to support your answer would be great.
| The choice between deserializing an XML document into a strongly typed object and using XPath to access values often depends on various factors, including the size and complexity of the XML, the frequency of access, and the specific use case.
### 1. **Deserialization to a Strongly Typed Object**
**Pros:**
- **Type S... | 29,502 | [
{
"from": "human",
"value": "I'm passing small (2-10 KB)XML documents as input to a WCF service. now I've two option to read data values from incoming XML\n\nDeserialize to a strongly typed object and use object properties to access values\nuse XPath to access values\n\nwhich approach is faster? some statis... |
In python, under what circumstances is SWIG a better choice than ctypes for calling entry points in shared libraries? Let's assume you don't already have the SWIG interface file(s). What are the performance metrics of the two?
| When deciding between SWIG and `ctypes` for interfacing with shared libraries in Python, there are several factors to consider, especially when starting from scratch without existing interface files. Here's an overview of the circumstances under which SWIG may be a better choice than `ctypes`, along with a comparison o... | 27,204 | [
{
"from": "human",
"value": "In python, under what circumstances is SWIG a better choice than ctypes for calling entry points in shared libraries? Let's assume you don't already have the SWIG interface file(s). What are the performance metrics of the two?\n"
},
{
"from": "gpt",
"value": "When de... |
I dont know if I should use the httpcontext caching or the Enterprise Library Caching Application Block. Also, what is the best pattern for the caching Strategy when deleting or updating an entity that is part of a cached list?
Should I remove all of a list from the cache or only remove the item from the cached list?
I... | When considering caching strategies, especially in a .NET context, you have a couple of options: `HttpContext` caching and using something like the Enterprise Library Caching Application Block. Here are some points to consider when deciding which to use, as well as best practices for managing cached data when updating ... | 26,884 | [
{
"from": "human",
"value": "I dont know if I should use the httpcontext caching or the Enterprise Library Caching Application Block. Also, what is the best pattern for the caching Strategy when deleting or updating an entity that is part of a cached list?\nShould I remove all of a list from the cache or on... |
I'd like to pass parameters on the command line to my C++ program in the following manner:
./myprog --setting=value
Are there any libraries which will help me to do this easily?
| Yes, there are several libraries available in C++ that can help you easily parse command-line arguments in the format you specified (e.g., `--setting=value`). Here are a few popular options:
1. **Boost.ProgramOptions**:
- This library is part of the Boost libraries and is very powerful and flexible for handling com... | 27,526 | [
{
"from": "human",
"value": "I'd like to pass parameters on the command line to my C++ program in the following manner:\n./myprog --setting=value\n\nAre there any libraries which will help me to do this easily?\n"
},
{
"from": "gpt",
"value": "Yes, there are several libraries available in C++ th... |
While estimating straight row and table sizes are fairly simple math, we find it challenging to guess just how much space each index will occupy (for a given table size). What areas can we learn to calculate a better estimate and growth rate for indexes?
| Estimating the space occupied by indexes in a database can indeed be challenging due to various factors involved. However, by focusing on key areas and understanding the components of index structures, you can develop a better estimation strategy. Here are the areas to consider:
### 1. **Index Type**:
- Different i... | 25,917 | [
{
"from": "human",
"value": "While estimating straight row and table sizes are fairly simple math, we find it challenging to guess just how much space each index will occupy (for a given table size). What areas can we learn to calculate a better estimate and growth rate for indexes?\n"
},
{
"from": ... |
I have a DataSet consisting of XML data, I can easily output this to a file:
DataSet ds = new DataSet();
DataTable dt = new DataTable();
ds.Tables.Add(dt);
ds.Load(reader, LoadOption.PreserveChanges, ds.Tables[0]);
ds.WriteXml("C:\\test.xml");
However what I want to do is compress the XML into a ZIP or other type of c... | To achieve your goal of compressing XML data directly into a ZIP file while splitting it into 1MB chunks, you can use the `System.IO.Compression` namespace available in .NET, along with `System.IO` for file handling. However, the built-in .NET libraries do not directly support splitting zip files on-the-fly, so you'll ... | 23,534 | [
{
"from": "human",
"value": "I have a DataSet consisting of XML data, I can easily output this to a file:\nDataSet ds = new DataSet();\nDataTable dt = new DataTable();\nds.Tables.Add(dt);\nds.Load(reader, LoadOption.PreserveChanges, ds.Tables[0]);\nds.WriteXml(\"C:\\\\test.xml\");\n\nHowever what I want to ... |
I started off programming in Basic on the ZX81, then BASICA, GW-BASIC, and QBasic. I moved on to C (Ah, Turbo C 3.1, I hardly knew ye...)
When I got started in microcontrollers I regressed with the BASIC Stamp from Parallax. However, BASIC is/was awesome because it was so easy to understand and so hard to make a mist... | BASIC's enduring presence in programming, particularly in educational and embedded systems contexts, can be attributed to several factors that highlight its advantages over more modern languages, despite the rise of alternatives like Lua and Python. Here are some considerations regarding BASIC's advantages, reasons for... | 24,961 | [
{
"from": "human",
"value": "I started off programming in Basic on the ZX81, then BASICA, GW-BASIC, and QBasic. I moved on to C (Ah, Turbo C 3.1, I hardly knew ye...)\nWhen I got started in microcontrollers I regressed with the BASIC Stamp from Parallax. However, BASIC is/was awesome because it was so eas... |
I need to understand the differences between windows main/mdi/child/dialogs.... how win32 messages should be propagated... why some messages are present in one type and not other...
| Understanding the differences between various window types in the Win32 API, as well as how messages are propagated between them, is key to effectively programming with the Windows GUI. Below is an overview of main windows, MDI (Multiple Document Interface) windows, child windows, and dialog boxes, along with a discuss... | 24,444 | [
{
"from": "human",
"value": "I need to understand the differences between windows main/mdi/child/dialogs.... how win32 messages should be propagated... why some messages are present in one type and not other...\n"
},
{
"from": "gpt",
"value": "Understanding the differences between various window... |
I'm working on a fiddly web interface which is mostly built with JavaScript. Its basically one (very) large form with many sections. Each section is built based on options from other parts of the form. Whenever those options change the new values are noted in a "registry" type object and the other sections re-populate ... | Listening for changes on a JavaScript object directly (like your registry object) is not natively supported in JavaScript, especially for older browsers like IE6/7. However, there are a few patterns you can use to achieve something similar while ensuring compatibility with the browsers you're targeting.
### Approach 1... | 27,906 | [
{
"from": "human",
"value": "I'm working on a fiddly web interface which is mostly built with JavaScript. Its basically one (very) large form with many sections. Each section is built based on options from other parts of the form. Whenever those options change the new values are noted in a \"registry\" type... |
I was wondering if anyone had come across this one before. I have a customer who uses special characters in their product description field. Updating to a MySQL database works fine if we use their HTML equivalents but it fails if the character itself is used (copied from either character map or Word I would assume).
Ha... | Yes, this is a common issue when working with special characters in databases like MySQL. The "?" symbol often indicates that the character being used is not supported by the current character encoding settings of your database, connection, or application. Here are a few suggestions to troubleshoot and resolve the issu... | 29,022 | [
{
"from": "human",
"value": "I was wondering if anyone had come across this one before. I have a customer who uses special characters in their product description field. Updating to a MySQL database works fine if we use their HTML equivalents but it fails if the character itself is used (copied from either ... |
I'm looking for a simple file format to use for wireframe models. I am aware of VRML, u3D, etc, but these seem heavyweight for my needs. My criterea are:
Must have a clear spec. Either open or very well established/documented.
I only need (want) simple models - vertices and edges. I don't want to handle faces or objec... | Based on your criteria, you may want to consider using a simple text-based format for your wireframe models. Given that you only need vertices and edges, writing your own format with a straightforward syntax might indeed be the best approach. However, if you prefer to use an existing format, here are some options that ... | 28,686 | [
{
"from": "human",
"value": "I'm looking for a simple file format to use for wireframe models. I am aware of VRML, u3D, etc, but these seem heavyweight for my needs. My criterea are:\n\nMust have a clear spec. Either open or very well established/documented.\nI only need (want) simple models - vertices and ... |
I want to make an MVC route for a list of news, which can be served in several formats.
news -> (X)HTML
news.rss -> RSS
news.atom -> ATOM
Is it possible to do this (the more general "optional extension" situation crops up in several places in my planned design) with one route? Or do I need to make two routes like thi... | In ASP.NET MVC, you can achieve the functionality you described with a single route that handles optional extensions, but you need to set it up carefully. Unfortunately, the routing system does not support optional segments directly in the way you're proposing, but you can still achieve the desired outcome by leveragin... | 27,208 | [
{
"from": "human",
"value": "I want to make an MVC route for a list of news, which can be served in several formats.\n\nnews -> (X)HTML\nnews.rss -> RSS\nnews.atom -> ATOM\n\nIs it possible to do this (the more general \"optional extension\" situation crops up in several places in my planned design) with on... |
I am getting the following error when I try to call a stored procedure that contains a SELECT Statement:
The operation is not valid for the state of the transaction
Here is the structure of my calls:
public void MyAddUpdateMethod()
{
using (TransactionScope Scope = new TransactionScope(TransactionScopeOption.Req... | Yes, the issue you're experiencing is likely related to the way you are managing the database connections within a transaction scope. When you create a new instance of `SQLServer` (which presumably opens a new database connection) within the `SelectStatementCall` method, it may not be aware that it should participate i... | 27,436 | [
{
"from": "human",
"value": "I am getting the following error when I try to call a stored procedure that contains a SELECT Statement:\n\nThe operation is not valid for the state of the transaction\n\nHere is the structure of my calls:\npublic void MyAddUpdateMethod()\n{\n\n using (TransactionScope Scope ... |
Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario:
Customers (idCustomer int PK, Company varchar(50), etc)
CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc)
CustomerNotes (idCustomerNote int PK, idCustomer int F... | Merging two customers in a relational database while ensuring that all foreign key relationships are updated correctly can indeed be a challenge. While SQL databases support cascading updates and deletions, they do not directly support merging records, as this involves more than just updating foreign keys; it may invol... | 23,632 | [
{
"from": "human",
"value": "Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario:\nCustomers (idCustomer int PK, Company varchar(50), etc)\nCustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc)\nCustomerNo... |
I have an abstract base class which inherits from UserControl and which is then used to derive a number of classes.
The problem I have is how to elegantly ensure that the generated function InitializeComponent() is called for each layer of class.
So the (abstract) base class has a number of controls on it that will b... | In C#, when you have an abstract base class that derives from `UserControl`, and you want to ensure that `InitializeComponent()` is called from both the base and derived classes without repeating code, you can use the following approach.
You can define an abstract method in your base class for `InitializeComponent()` ... | 27,742 | [
{
"from": "human",
"value": "I have an abstract base class which inherits from UserControl and which is then used to derive a number of classes. \nThe problem I have is how to elegantly ensure that the generated function InitializeComponent() is called for each layer of class. \nSo the (abstract) base class... |
How do I get the type of a generic typed class within the class?
An example:
I build a generic typed collection implementing ICollection< T>. Within I have methods like
public void Add(T item){
...
}
public void Add(IEnumerable<T> enumItems){
...
}
How can I ask within the method for ... | In C#, when you create a generic class with a type parameter `T`, you can use the `typeof(T)` to obtain the type information for that type parameter within your class methods. This allows you to check the type of `T` at runtime.
If you want to determine if `T` is `object` and handle that scenario differently, you can ... | 28,884 | [
{
"from": "human",
"value": "How do I get the type of a generic typed class within the class?\nAn example:\nI build a generic typed collection implementing ICollection< T>. Within I have methods like \n public void Add(T item){\n ...\n }\n\n public void Add(IEnumerable<T> enumItems){\n ... |
I am trying to provide my own labelFunction for a CategoryAxis programatically but am completely stumped. The regular way is to do it in your MXML file, but I want to do it in my Actionscript file.
The regular way of doing it is:
<mx:Script>
<![CDATA[
private function categoryAxis_labelFunc(item:Object,
... | To set a custom `labelFunction` for a `CategoryAxis` in ActionScript, you need to ensure that you are assigning it as a function reference properly. When you're subclassing `CategoryAxis`, you will use a function reference that matches the expected signature for `labelFunction`.
Here's how you can achieve that in your... | 30,922 | [
{
"from": "human",
"value": "I am trying to provide my own labelFunction for a CategoryAxis programatically but am completely stumped. The regular way is to do it in your MXML file, but I want to do it in my Actionscript file.\nThe regular way of doing it is:\n<mx:Script>\n <![CDATA[\n private func... |
We have some SQL server reporting services reports. I didn't write then but I have to take care of them.
These reports fire when opened in the browser, and with the default parameters (search terms and restrictions are blank) they retrieve a lot of data, which is slow. The client would prefer that the report is not gen... | Yes, it's possible to prevent a SQL Server Reporting Services (SSRS) report from executing when it is loaded if it has no parameters. However, if a report has no parameters, it will always execute when opened, as there are no user inputs to prompt for. The best way to control report execution in this scenario is to imp... | 29,508 | [
{
"from": "human",
"value": "We have some SQL server reporting services reports. I didn't write then but I have to take care of them.\nThese reports fire when opened in the browser, and with the default parameters (search terms and restrictions are blank) they retrieve a lot of data, which is slow. The clie... |
What's the point in the standard pattern for event delegates in .net? I.e. the EventHandler predefined delegate? Why not just choose the most appropriate signature for the requirement?
Edit: And furthermore, is it necessary to slavishly follow Microsoft's example in all cases?
| The use of the standard pattern for event delegates in .NET, particularly with the `EventHandler` and `EventHandler<TEventArgs>` delegates, serves several important purposes:
### 1. **Consistency and Readability**
Using a standard delegate like `EventHandler` or `EventHandler<TEventArgs>` promotes consistency across d... | 29,561 | [
{
"from": "human",
"value": "What's the point in the standard pattern for event delegates in .net? I.e. the EventHandler predefined delegate? Why not just choose the most appropriate signature for the requirement?\nEdit: And furthermore, is it necessary to slavishly follow Microsoft's example in all cases... |
I'm exploring the XML -> XSLT -> HTML meme for producing web content. I have very little XSLT experience.
I'm curious what mechanisms are available in XSLT to handle abstractions or "refactoring".
For example, with generic HTML and a service side include, many pages can be templated and decomposed to where there are, s... | XSLT provides several mechanisms for creating reusable templates and managing content effectively, allowing you to implement similar abstractions to those found in other templating languages such as JSP, PHP, or ASP. Here are some of the key features and techniques you can use in XSLT for modularizing your code and cre... | 28,908 | [
{
"from": "human",
"value": "I'm exploring the XML -> XSLT -> HTML meme for producing web content. I have very little XSLT experience.\nI'm curious what mechanisms are available in XSLT to handle abstractions or \"refactoring\".\nFor example, with generic HTML and a service side include, many pages can be t... |
We (occasionally!) have to issue hot fixes for our product and do this by reissuing the affected files directly rather than with a new installer. The product has a large number of pieces, some managed code, some unmanaged.
Currently development flags which build artifacts (exes, dlls) need to be shipped in a hot fix. ... | To automate the identification of files that need to be included in a hotfix based on changes from a previous build, you can utilize a combination of file comparison and hashing techniques. Here are some approaches and tools that can assist in this process:
1. **File Hash Comparison**:
- Generate hashes (e.g., SHA2... | 28,793 | [
{
"from": "human",
"value": "We (occasionally!) have to issue hot fixes for our product and do this by reissuing the affected files directly rather than with a new installer. The product has a large number of pieces, some managed code, some unmanaged.\nCurrently development flags which build artifacts (exe... |
As I understand, the pimpl idiom is exists only because C++ forces you to place all the private class members in the header. If the header were to contain only the public interface, theoretically, any change in class implementation would not have necessitated a recompile for the rest of the program.
What I want to kno... | The Pimpl idiom (Pointer to Implementation) is indeed a design pattern in C++ that helps hide the implementation details of a class from its interface, providing better encapsulation and reducing compilation dependencies. However, your question about why C++ requires private members to be declared in the header and doe... | 29,002 | [
{
"from": "human",
"value": "As I understand, the pimpl idiom is exists only because C++ forces you to place all the private class members in the header. If the header were to contain only the public interface, theoretically, any change in class implementation would not have necessitated a recompile for the... |
Is there a JSP script I can run to point to a JPEG file on the local filesystem to be printed to the Windows default printer? Thanks.
Edit:
I have the file on my server already.
How would I load the file into a browser to run window.print()?
Thanks
| To print a JPEG file stored on your server using JavaServer Pages (JSP), you can create a simple JSP script to serve the image, and then use JavaScript to invoke the browser's print dialog. Below are the steps you can follow to achieve this:
1. **Create a JSP File to Serve the Image**: Create a JSP file that will disp... | 30,331 | [
{
"from": "human",
"value": "Is there a JSP script I can run to point to a JPEG file on the local filesystem to be printed to the Windows default printer? Thanks.\nEdit:\nI have the file on my server already.\nHow would I load the file into a browser to run window.print()?\nThanks\n"
},
{
"from": "... |
I believe that quantifying the productivity increase (extra working hours) is the most effective way to do this.
My case in point: I have a fast machine at home and a slow one at work. My estimate is that I would gain about 30 minutes a day of extra productivity at work if I had my home machine at work. This productivi... | Yes, there are several software utilities available that can help you monitor and quantify the time taken by tasks on a machine. Here are some options you can consider:
1. **Time Tracking Software**:
- **Toggl Track**: Toggl allows you to track time spent on various tasks and projects. You can create categories for... | 30,189 | [
{
"from": "human",
"value": "I believe that quantifying the productivity increase (extra working hours) is the most effective way to do this.\nMy case in point: I have a fast machine at home and a slow one at work. My estimate is that I would gain about 30 minutes a day of extra productivity at work if I ha... |
Am I able to embed the .net runtime so that .net is not required on the host operating system? I was looking at doing this with Mono by looking here: http://mono-project.com/Embedding_Mono but seems to allude to using external modules to accomplish this. My goal is to have one single executable with no installed .net ... | Yes, it is possible to bundle a .NET runtime with your application to create a single executable that does not require a separate installation of the .NET runtime on the host operating system. While Mono allows for embedding, .NET Core and .NET 5/6/7 also provide a way to publish self-contained applications.
### Optio... | 30,196 | [
{
"from": "human",
"value": "Am I able to embed the .net runtime so that .net is not required on the host operating system? I was looking at doing this with Mono by looking here: http://mono-project.com/Embedding_Mono but seems to allude to using external modules to accomplish this. My goal is to have one ... |
This is the constraint I have on the Customers table.
ALTER TABLE Customers
ADD CONSTRAINT CN_CustomerPhone
CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]')
Why does this fail?
INSERT INTO Customers
(CustomerName, Address, City, State, Zip, Phone)
VALUES
('Some Name','An Address', 'C... | The issue lies in the CHECK constraint defined for the `Phone` column in your `Customers` table. The syntax used in the constraint does not correctly implement the expected pattern for a phone number. Specifically, the use of `LIKE` with parentheses and square brackets in the way you have written it does not match SQL'... | 29,048 | [
{
"from": "human",
"value": "This is the constraint I have on the Customers table.\nALTER TABLE Customers\n ADD CONSTRAINT CN_CustomerPhone\n CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]')\n\nWhy does this fail?\nINSERT INTO Customers\n(CustomerName, Address, City, State, ... |
I was running my first Visual Studio 2008 Unit Test with a WCF Service and I received the following error:
Test method
UnitTest.ServiceUnitTest.TestMyService
threw exception:
System.ServiceModel.Security.MessageSecurityException:
The HTTP request is unauthorized with
client authentication scheme
'Anonymou... | The error you are encountering indicates that your WCF service is expecting authenticated requests using NTLM or Negotiate authentication, but your client (the unit test in this case) is not providing the necessary credentials. Here are a few steps and configurations you can consider to resolve the issue:
### 1. Confi... | 28,602 | [
{
"from": "human",
"value": "I was running my first Visual Studio 2008 Unit Test with a WCF Service and I received the following error:\n\nTest method\n UnitTest.ServiceUnitTest.TestMyService\n threw exception: \n System.ServiceModel.Security.MessageSecurityException:\n The HTTP request is unauthorized ... |
I've been playing around with Linq to Sql, but i've come accross a problem when defining associations between entities.
I have 2 tables, 1 is a table containing customer transactions and the other is a lookup table containing transaction types. For example, a transaction can be type 'CASH' and the value in the lookup t... | The error you're encountering, "Unable to cast object of type 'System.Int32' to type 'System.String'", typically indicates a problem with the association mappings between your entities. In your case, it seems related to how you are defining the associations between the `Transaction`, `TransactionType`, and `Customer` c... | 27,900 | [
{
"from": "human",
"value": "I've been playing around with Linq to Sql, but i've come accross a problem when defining associations between entities.\nI have 2 tables, 1 is a table containing customer transactions and the other is a lookup table containing transaction types. For example, a transaction can be... |
Running OS X Leopard an MacBook Pro from Jan. 2008.
I used to run mysql server from a package but then rails started putting a warning that I should install mysql from gem: gem install mysql
It did not work, I got the following error message:
Building native extensions. This could take a while...
ERROR: Error install... | It seems like you're encountering multiple issues with MySQL on your MacBook Pro running OS X Leopard. Let's address them one by one.
### Issue 1: Gem Installation Error
The error you encountered while trying to install the `mysql` gem suggests that the native extensions could not be built because the MySQL client li... | 23,426 | [
{
"from": "human",
"value": "Running OS X Leopard an MacBook Pro from Jan. 2008.\nI used to run mysql server from a package but then rails started putting a warning that I should install mysql from gem: gem install mysql\nIt did not work, I got the following error message:\nBuilding native extensions. This... |
I've got a little problem, I need to be able to have a reoccurring event (forever) that marks the day after the second Tuesday of each month.
Your probably thinking, why not just Wednesday of each month.
October 2008 is an example, it starts on a Wednesday. :(
Really I just need it in Outlook, probably (but not limited... | Creating a recurring event for the day after the second Tuesday of each month in Outlook can be a bit tricky since Outlook's built-in recurrence features don’t allow for advanced patterns like this directly. However, you can create a custom solution using VBA or simply add the event manually each month. Here's how to h... | 27,057 | [
{
"from": "human",
"value": "I've got a little problem, I need to be able to have a reoccurring event (forever) that marks the day after the second Tuesday of each month.\nYour probably thinking, why not just Wednesday of each month.\nOctober 2008 is an example, it starts on a Wednesday. :(\nReally I just n... |
I need to conduct a survey of 3 questions:
The first question will be Yes/No.
The second will have multiple answers, in which you can select multiple answers for just that question, as well as an "other" box that you can use to fill in an answer.
The last question will be a textarea in which the user can enter general... | There are several PHP/MySQL-based survey applications that can help you create a survey like the one you've described. Here are a few options you might consider:
1. **LimeSurvey**:
- **Description**: LimeSurvey is a powerful open-source survey application that allows you to create various types of surveys, includin... | 28,638 | [
{
"from": "human",
"value": "I need to conduct a survey of 3 questions:\n\nThe first question will be Yes/No.\nThe second will have multiple answers, in which you can select multiple answers for just that question, as well as an \"other\" box that you can use to fill in an answer.\nThe last question will be... |
A friend of mine asked me to implement a blue and a red pointer to represent the inputs of two separate mice to expedite a mixing desk scenario for real time audio mixing. I'd love to, but as much as I think it is a great idea, I don't have a clue as to where to start looking for a possible solution.
Where should I st... | Implementing dual mouse inputs for real-time audio mixing is an interesting and creative project! Here are some steps and areas to research to get you started:
### 1. **Understand the Basics of Input Handling**
- **Operating System Support**: Investigate how different operating systems handle multiple mouse inputs.... | 29,310 | [
{
"from": "human",
"value": "A friend of mine asked me to implement a blue and a red pointer to represent the inputs of two separate mice to expedite a mixing desk scenario for real time audio mixing. I'd love to, but as much as I think it is a great idea, I don't have a clue as to where to start looking f... |
I'm using a few (2 or 3) master pages in my ASP.NET MVC application and they must each display bits of information from the database. Such as a list of sponsors, current fundings status etc.
So my question was, where should I put these master-page database calling code?
Normally, these should goes into its own controll... | In ASP.NET MVC, the concept of master pages is typically handled using Layout pages. When you have common information to display across multiple views (like sponsors or funding status), it's a good practice to load that data in a way that keeps your controllers and views clean and maintainable.
### Strategies for Load... | 12,687 | [
{
"from": "human",
"value": "I'm using a few (2 or 3) master pages in my ASP.NET MVC application and they must each display bits of information from the database. Such as a list of sponsors, current fundings status etc.\nSo my question was, where should I put these master-page database calling code?\nNormal... |
I've got a large array of primitive types (double).
How do I sort the elements in descending order?
Unfortunately the Java API doesn't support sorting of primitive types with a Comparator.
The first approach that probably comes to mind is to convert it to a list of objects (boxing):
double[] array = new double[1048576]... | If you are looking to sort a large array of primitive doubles in descending order with optimal performance and minimal memory overhead, the best approach is to use a custom sorting method that allows you to sort in-place without boxing the primitives or reversing the array after sorting.
### Efficient In-Place Sorting... | 28,609 | [
{
"from": "human",
"value": "I've got a large array of primitive types (double).\nHow do I sort the elements in descending order?\nUnfortunately the Java API doesn't support sorting of primitive types with a Comparator.\nThe first approach that probably comes to mind is to convert it to a list of objects (b... |
Does anyone know if it is possible to reliably determine (programattically C/C++...) whether or not a firewall or IP filtering software is installed on a Windows PC? I need to detect whether a certain server IP is being blocked in my client software by the host OS.
I don't need to worry about external hardware firewal... | Detecting whether a firewall or IP filtering software is installed on a Windows PC programmatically in C or C++ can be quite complex, primarily because of the variety of firewalls available and their differing APIs. However, there are several approaches you can take to check for the presence of firewall software and wh... | 23,164 | [
{
"from": "human",
"value": "Does anyone know if it is possible to reliably determine (programattically C/C++...) whether or not a firewall or IP filtering software is installed on a Windows PC? I need to detect whether a certain server IP is being blocked in my client software by the host OS.\nI don't nee... |
I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much?
It's MYSQL and I will be needing to add data ... | Updating a production database requires careful planning to ensure data integrity and minimal disruption to operations. Since you're working with MySQL and have a relatively small row count, you can perform the updates in a controlled manner. Here’s a step-by-step guide to update your production database while preservi... | 27,407 | [
{
"from": "human",
"value": "I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much?\nIt'... |
Is there a generic API call I can make to get a handle of the image or video feed coming from a webcam and replace it with an image or video of my own so that applications interfacing to the cam (e.g. MSN/Skype/Yahoo IM) will see my image instead of what the camera is capturing?
Ideally, I am trying to solve this in a ... | To achieve what you're aiming for—replacing the webcam feed with an image or video stream across various applications—you would typically look into utilizing a virtual camera driver. This virtual camera acts as a bridge between the application requesting the camera feed and the actual webcam. Here’s how you can approac... | 28,708 | [
{
"from": "human",
"value": "Is there a generic API call I can make to get a handle of the image or video feed coming from a webcam and replace it with an image or video of my own so that applications interfacing to the cam (e.g. MSN/Skype/Yahoo IM) will see my image instead of what the camera is capturing?... |
I've always wondered why the C++ Standard library has instantiated basic_[io]stream and all its variants using the char type instead of the unsigned char type. char means (depending on whether it is signed or not) you can have overflow and underflow for operations like get(), which will lead to implementation-defined v... | The choice of using `char` instead of `unsigned char` in the C++ Standard Library, particularly in the context of I/O streams (like `basic_ostream` and `basic_istream`), is indeed a topic that has garnered attention and discussion among C++ programmers. Here are several reasons that clarify why `char` was chosen:
1. *... | 29,453 | [
{
"from": "human",
"value": "I've always wondered why the C++ Standard library has instantiated basic_[io]stream and all its variants using the char type instead of the unsigned char type. char means (depending on whether it is signed or not) you can have overflow and underflow for operations like get(), wh... |
Is there a collection (BCL or other) that has the following characteristics:
Sends event if collection is changed AND sends event if any of the elements in the collection sends a PropertyChanged event. Sort of an ObservableCollection<T> where T: INotifyPropertyChanged and the collection is also monitoring the elements ... | As of my last knowledge update in October 2023, there is no built-in collection in the .NET Base Class Library (BCL) that directly meets your specific requirements: an `ObservableCollection<T>` that not only notifies when the collection changes (items added or removed) but also listens for `PropertyChanged` events from... | 28,773 | [
{
"from": "human",
"value": "Is there a collection (BCL or other) that has the following characteristics:\nSends event if collection is changed AND sends event if any of the elements in the collection sends a PropertyChanged event. Sort of an ObservableCollection<T> where T: INotifyPropertyChanged and the c... |
To trim the leading spaces we are using strmove. But we were advised to use strlmove instead of strmove. I have read and used strlcpy and strlcat. Whether strlmove does the similar functionality and what all are its advantages?
Edit 1: Thank you Mike B and Chris Young. This is how we use strlcpy.
size_t strlcpy(char *d... | The `strlmove()` function is not a standard library function in C, but the concept you're describing seems to be a hypothetical function that behaves similarly to `strlcpy()` and `strlcat()`, using `memmove()` for safe string movement.
### Purpose of `strlmove()`
1. **Safe String Movement**: The purpose of `strlmove(... | 27,890 | [
{
"from": "human",
"value": "To trim the leading spaces we are using strmove. But we were advised to use strlmove instead of strmove. I have read and used strlcpy and strlcat. Whether strlmove does the similar functionality and what all are its advantages?\nEdit 1: Thank you Mike B and Chris Young. This is ... |
I'm using c#, and have an open tcpip connection receiving data. Is it possible to save the stream to an ms sql server database as I'm receiving it, instead of receiving all the data then saving it all? If the stream could be sent to the database as it's being received, you wouldn't have to keep the entire chunk of da... | Yes, it is entirely possible to save a stream of data to an MS SQL Server database as it is being received over a TCP/IP connection in C#. This method can help you manage memory more efficiently, especially when dealing with large data streams. Below is a general approach you can take to accomplish this:
### General S... | 26,269 | [
{
"from": "human",
"value": "I'm using c#, and have an open tcpip connection receiving data. Is it possible to save the stream to an ms sql server database as I'm receiving it, instead of receiving all the data then saving it all? If the stream could be sent to the database as it's being received, you wou... |
I am cleaning up the DataReaders in an old .NET 1.1 project that I inherited.
The previous developer coded the data-access-layer in such a way that most of the DAL methods returned SqlDataReaders (thus leaving it up to the caller to properly call the .Close() or .Dispose() methods).
I have come across a situation, th... | In your situation, since the `UpdateData` method returns a `SqlDataReader` and the calling code does not capture that returned value, you are correct that there is a potential resource leak.
### Explanation:
1. **SqlDataReader Resource Management**: The `SqlDataReader` is a stream that is connected to the database. W... | 29,660 | [
{
"from": "human",
"value": "I am cleaning up the DataReaders in an old .NET 1.1 project that I inherited. \nThe previous developer coded the data-access-layer in such a way that most of the DAL methods returned SqlDataReaders (thus leaving it up to the caller to properly call the .Close() or .Dispose() met... |
I need to queue events and tasks for external systems in a reliable/transactional way. Using things like MSMQ or ActiveMQ look very seductive, but the transactional part becomes complicated (MSDTC, etc).
We could use the database (SQL Server 2005+, Oracle 9+) and achieve easier transactional support, but the queuing p... | When it comes to managing events and tasks for external systems in a reliable and transactional manner, you're faced with the trade-offs between using message queues (like MSMQ or ActiveMQ) and leveraging a relational database (like SQL Server or Oracle). Each approach has its own pros and cons, and it's important to f... | 22,565 | [
{
"from": "human",
"value": "I need to queue events and tasks for external systems in a reliable/transactional way. Using things like MSMQ or ActiveMQ look very seductive, but the transactional part becomes complicated (MSDTC, etc).\nWe could use the database (SQL Server 2005+, Oracle 9+) and achieve easie... |
I need a data structure that can store non-overlapping ranges within a single dimension. The entire range of the dimension need not be completely covered.
An example would be a conference room scheduler. The dimension is time. No two schedules may overlap. The conference room isn't always scheduled. In other words, for... | The problem you described—a scheduler that manages non-overlapping time ranges—has been a common one in various domains such as event scheduling, resource allocation, and interval management. Here are some commonly used data structures and approaches to handle such cases:
### 1. **Interval Tree**
An **Interval Tree**... | 23,159 | [
{
"from": "human",
"value": "I need a data structure that can store non-overlapping ranges within a single dimension. The entire range of the dimension need not be completely covered.\nAn example would be a conference room scheduler. The dimension is time. No two schedules may overlap. The conference room i... |
Say you create a form using ASP.NET MVC that has a dynamic number of form elements.
For instance, you need a checkbox for each product, and the number of products changes day by day.
How would you handle that form data being posted back to the controller? You can't set up parameters on the action method because you don... | In ASP.NET MVC, when you're dealing with a dynamic number of form elements (like checkboxes for a varying number of products), you can use a couple of approaches to handle the form data effectively when it's posted back to the controller.
### 1. Using a List of Boolean or a List of Product IDs
A common approach is to... | 22,152 | [
{
"from": "human",
"value": "Say you create a form using ASP.NET MVC that has a dynamic number of form elements.\nFor instance, you need a checkbox for each product, and the number of products changes day by day.\nHow would you handle that form data being posted back to the controller? You can't set up para... |
I have a very large table (8gb) with information about files, and i need to run a report against it that would would look something like this:
(select * from fs_walk_scan where file_path like '\\\\server1\\groot$\\%' order by file_size desc limit 0,30)
UNION ALL
(select * from fs_walk_scan where file_path like '\\\\ser... | To optimize the SQL query you've described, particularly given the large size of the table and the requirement to perform multiple subqueries, you can take several approaches. Here are some suggestions:
### 1. Use a Common Table Expression (CTE)
Using a Common Table Expression (CTE) can simplify the query structure a... | 27,207 | [
{
"from": "human",
"value": "I have a very large table (8gb) with information about files, and i need to run a report against it that would would look something like this:\n(select * from fs_walk_scan where file_path like '\\\\\\\\server1\\\\groot$\\\\%' order by file_size desc limit 0,30)\nUNION ALL\n(sele... |
Given a string of keywords, such as "Python best practices", I would like to obtain the first 10 Stack Overflow questions that contain that keywords, sorted by relevance (?), say from a Python script. My goal is to end up with a list of tuples (title, URL).
How can I accomplish this? Would you consider querying Google ... | To obtain the first 10 Stack Overflow questions related to a given keyword string such as "Python best practices" and to sort them by relevance, you can utilize the Stack Exchange API. Below is a step-by-step guide to achieving this using Python.
### Using the Stack Exchange API
1. **Sign up for a Stack Exchange API ... | 28,504 | [
{
"from": "human",
"value": "Given a string of keywords, such as \"Python best practices\", I would like to obtain the first 10 Stack Overflow questions that contain that keywords, sorted by relevance (?), say from a Python script. My goal is to end up with a list of tuples (title, URL).\nHow can I accompli... |
Say you get a recordset like the following:
| ID | Foo | Bar | Red |
|-----|------|------|------|
| 1 | 100 | NULL | NULL |
| 1 | NULL | 200 | NULL |
| 1 | NULL | NULL | 300 |
| 2 | 400 | NULL | NULL |
| ... | ... | ... | ... | -- etc.
And you want:
| ID | Foo | Bar | Red |
|-----|-----|-----|-----... | In SQL Server, you can achieve the desired result using the same `GROUP BY` technique, but with a little modification for handling `VARCHAR` columns. Since you want to aggregate `VARCHAR` fields where NULL values are present, you can use the `MAX` function in a similar way. The `MAX` function will effectively pick the ... | 30,915 | [
{
"from": "human",
"value": "Say you get a recordset like the following:\n| ID | Foo | Bar | Red |\n|-----|------|------|------|\n| 1 | 100 | NULL | NULL |\n| 1 | NULL | 200 | NULL |\n| 1 | NULL | NULL | 300 |\n| 2 | 400 | NULL | NULL |\n| ... | ... | ... | ... | -- etc.\n\nAnd you want:\... |
I have an HttpHandler on my webserver that takes a URL in the form of "https://servername/myhandler?op=get&k=Internal&m=jdahug1". I need to call this URL from my .NET app and capture whatever the output is. Does anyone know how I can do that? I want it to be simple so that I just get back a string with the output, a... | You can use the `HttpClient` class in .NET to call the HTTP handler URL and capture the output as a string. `HttpClient` provides a simple and efficient way to perform HTTP requests and includes options for setting timeouts.
Here's an example of how to do this:
1. Ensure you have `System.Net.Http` referenced in your ... | 27,596 | [
{
"from": "human",
"value": "I have an HttpHandler on my webserver that takes a URL in the form of \"https://servername/myhandler?op=get&k=Internal&m=jdahug1\". I need to call this URL from my .NET app and capture whatever the output is. Does anyone know how I can do that? I want it to be simple so that ... |
We have a series of drop down controls that determine the sort order of columns. The problem we are having is when the user selects a column as the 2nd column the other dropdown lists need to have their values changed so that there is only one "2nd".
Column A [1]
Column B [2]
Column C [3]
Column D ... | Certainly! You can achieve this functionality using JavaScript by listening for changes on the dropdowns and updating the other dropdowns accordingly. Here’s a basic implementation that demonstrates how you can achieve this.
### HTML Structure
First, create the HTML structure for your dropdowns:
```html
<!DOCTYPE h... | 21,136 | [
{
"from": "human",
"value": "We have a series of drop down controls that determine the sort order of columns. The problem we are having is when the user selects a column as the 2nd column the other dropdown lists need to have their values changed so that there is only one \"2nd\".\n\nColumn A [1]\nCo... |
You know that particular part of your code that is essential for the project but will probably take a lot of time to get it done? Do you ever get the feeling that you'd rather work on something else (probably less important) or not code at all instead of working on that part? That beast you try so hard to avoid and use... | Starting a complex coding task, especially one that feels overwhelming or daunting, can indeed be a challenge. Here are some steps to help overcome that initial inertia and get you moving on the project:
### 1. **Define the Goal Clearly:**
- Write down a clear and concise statement of what you want to achieve with ... | 28,385 | [
{
"from": "human",
"value": "You know that particular part of your code that is essential for the project but will probably take a lot of time to get it done? Do you ever get the feeling that you'd rather work on something else (probably less important) or not code at all instead of working on that part? Th... |
I've been doing "plain old java objects" programming for 10 years now, with Swing and JDBC, and I consider myself pretty good at it. But I start a new job in two weeks where they use JBoss, and I'd like to get a heads up and start learning all this stuff before I start. What are good resources? On-line tutorials, bo... | Transitioning from plain old Java objects (POJOs) to using JBoss, along with the frameworks and technologies often associated with it, is an exciting step in your development career. JBoss (now known as WildFly) is a popular Java EE application server, and it offers a variety of features including support for enterpris... | 27,456 | [
{
"from": "human",
"value": "I've been doing \"plain old java objects\" programming for 10 years now, with Swing and JDBC, and I consider myself pretty good at it. But I start a new job in two weeks where they use JBoss, and I'd like to get a heads up and start learning all this stuff before I start. What... |
Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)?
The "free" requirement comes from the fact that I'm only working on a prototype and can just load the BrowserControl and just render HTML if need be (even if it is slow) and that Developer Exp... | There are a few options available for converting HTML to RTF in .NET, especially for prototyping purposes. Here are a couple of libraries that you can consider, which are free and open source:
1. **HtmlToRtf**: This is a simple library that allows you to convert HTML to RTF. While it may not cover every HTML feature, ... | 24,939 | [
{
"from": "human",
"value": "Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)?\nThe \"free\" requirement comes from the fact that I'm only working on a prototype and can just load the BrowserControl and just render HTML if need be... |
I need to set up this scenario:
A SQL Server 2005 database will create a transactional replication subscription from another database to populate a set of lookup tables. These lookup tables will then be published as a merge replication publication to the client's SQL Server Mobile.
I remember seeing a similar scenar... | Setting up a scenario involving transactional replication and merge replication can be complex, especially with SQL Server 2005, which is quite dated. However, I can guide you through the general steps for this scenario, and I'll also point you to relevant documentation that might help.
### Steps for Setting Up Your S... | 27,035 | [
{
"from": "human",
"value": "I need to set up this scenario: \n\nA SQL Server 2005 database will create a transactional replication subscription from another database to populate a set of lookup tables. These lookup tables will then be published as a merge replication publication to the client's SQL Server ... |
I'm currently developping an application in java using Hibernate as a persistence manager and JPA as an abstraction of the persistence manage hibernate.
I'd like to know the impact of wrapping a result query around a transaction. I know the entity manager must stay open for lazily fetched field bug what about transact... | When you're using JPA and Hibernate, the transaction management is a crucial aspect of ensuring data integrity and handling concurrency. Your `get` method includes a conditional transaction management based on the `withTransaction` flag, and understanding the impact of this flag is important for proper application beha... | 27,600 | [
{
"from": "human",
"value": "I'm currently developping an application in java using Hibernate as a persistence manager and JPA as an abstraction of the persistence manage hibernate. \nI'd like to know the impact of wrapping a result query around a transaction. I know the entity manager must stay open for la... |
I'm working on an RSS feed for a custom tasking system we use, and I'm still wrapping my head around how things should work. What I want to have is a feed for each user that shows tasks assigned to them, and additionally a feed for each task that shows updates for the task.
What I want to know right now concerns the u... | In the context of RSS feeds, the `guid` (Globally Unique Identifier) serves as a unique identifier for each item within the feed. Ideally, it should remain constant for the same task, even if the task is updated. Changing the `guid` would indicate to readers that this is a completely new item, which is not the case whe... | 27,987 | [
{
"from": "human",
"value": "I'm working on an RSS feed for a custom tasking system we use, and I'm still wrapping my head around how things should work. What I want to have is a feed for each user that shows tasks assigned to them, and additionally a feed for each task that shows updates for the task.\nWh... |
I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008.
But when i tried to run the project creating an application in IIS7 then I recieved the following error message:
Looks like you forgot to register the http module
Castle.MicroKernel.Lifestyle... | It sounds like you are encountering an issue with the Windsor DI framework when trying to run your MVC project in IIS7. The error message indicates that the `PerWebRequestLifestyleModule` is not being recognized, even though you've stated it is present in your `web.config`.
Here are several steps you can take to troub... | 30,226 | [
{
"from": "human",
"value": "I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008.\nBut when i tried to run the project creating an application in IIS7 then I recieved the following error message:\n\nLooks like you forgot to register th... |
Taking shs's question a step further... Why isn't all government sponsored software open source? I can see excluding some for security purposes, but the rest? Didn't we as tax payers already pay for it? The government has no rights, only the people, so how can the government license something? Who is the licensee? ... | The debate over whether government-sponsored software should be open source is multifaceted, involving legal, economic, and philosophical considerations. Here are some reasons why not all government-sponsored software is open source, despite the arguments in favor of transparency and public ownership:
1. **Security Co... | 30,379 | [
{
"from": "human",
"value": "Taking shs's question a step further... Why isn't all government sponsored software open source? I can see excluding some for security purposes, but the rest? Didn't we as tax payers already pay for it? The government has no rights, only the people, so how can the government ... |
I want to create a WCF-service hosted in IIS6 and disable anonymous authentication in IIS. And don't use SSL.
So only way I have is to use basicHttpBinging with TransportCredentialOnly, itsn't it?
I create a virtual directory, set Windows Integrated Auth and uncheck "Enable Anonymous Access".
Here's my web.config:
<sys... | The issue you are experiencing is related to the security configuration of your WCF service. The error message indicates that the service is trying to enforce settings that require Anonymous authentication, even though you have explicitly disabled it in your IIS configuration. This can happen due to a few reasons in th... | 28,122 | [
{
"from": "human",
"value": "I want to create a WCF-service hosted in IIS6 and disable anonymous authentication in IIS. And don't use SSL.\nSo only way I have is to use basicHttpBinging with TransportCredentialOnly, itsn't it?\nI create a virtual directory, set Windows Integrated Auth and uncheck \"Enable A... |
I've never used any kind of source control before although I understand the concept. What I am confused about (and perhaps just not aware) is what benefit do I achieve and/or why would I want to configure Subversion and Apache? Do I need to configure it with Apache to be able to access my repositories from other comput... | Using a version control system like Subversion (SVN) can greatly enhance your workflow, especially if you're collaborating with others or managing multiple versions of your project. Let's break down your questions regarding the benefits of SVN and how it works with Apache.
### Benefits of Using Subversion (SVN):
1. *... | 25,477 | [
{
"from": "human",
"value": "I've never used any kind of source control before although I understand the concept. What I am confused about (and perhaps just not aware) is what benefit do I achieve and/or why would I want to configure Subversion and Apache? Do I need to configure it with Apache to be able to... |
How would I go about creating a web app login handler in C#?
In Java I would use a JSP that posts the username and password to a servlet, which then delegates to a POJO - for the db lookup and validation. If validation fails the servlet forwards onto the login.jsp for another attempt, if successfull then forwards to... | Creating a web application login handler in C# involves several components, primarily utilizing ASP.NET, which is a popular framework for building web applications. Here’s a step-by-step guide to create a simple login handler in C# using ASP.NET MVC, which is a widely-used pattern for web applications.
### Step 1: Set... | 23,146 | [
{
"from": "human",
"value": "How would I go about creating a web app login handler in C#? \nIn Java I would use a JSP that posts the username and password to a servlet, which then delegates to a POJO - for the db lookup and validation. If validation fails the servlet forwards onto the login.jsp for anothe... |
I am trying to run the wsdl2java command on a WSDL file that was given to me from another group in my company. I know wsdl2java works because I can run the examples but when I try it on the wsdl given to me it fails. The one big difference is that the WSDL given to me uses SSL.
I’m using Java 1.4 (checked it a few ti... | It looks like you've already identified and resolved the issue with your WSDL file that was causing the `wsdl2java` command to fail. For the benefit of others who may encounter a similar problem, let's summarize what the issue was and how it was fixed.
### Issue Summary:
1. **WSDL File Problem**: The WSDL provided to ... | 30,603 | [
{
"from": "human",
"value": "I am trying to run the wsdl2java command on a WSDL file that was given to me from another group in my company. I know wsdl2java works because I can run the examples but when I try it on the wsdl given to me it fails. The one big difference is that the WSDL given to me uses SSL... |
One of classes in my program uses some third-party library. Library object is a private member of my class:
// My.h
#include <3pheader.h>
class My
{
...
private:
3pObject m_object;
}
The problem with this - any other unit in my program that uses My class should be configured to include... | Certainly! You have identified two potential solutions to the problem of encapsulating the third-party library dependency within your `My` class. Here are additional approaches to consider:
### 1. Pimpl (Pointer to Implementation) Idiom
This is a common technique used to hide implementation details and reduce compile-... | 27,234 | [
{
"from": "human",
"value": "One of classes in my program uses some third-party library. Library object is a private member of my class:\n// My.h\n #include <3pheader.h>\n\n class My \n {\n ...\n private:\n 3pObject m_object;\n }\n\nThe problem with this - any other unit in my progra... |
What are my validation options with .net mvc?
Do any of them have a nice validation summary like webforms did?
| In ASP.NET MVC, you have several options for implementing validation. Here are the main options:
### 1. **Data Annotations**
This is the most common way to implement validation in ASP.NET MVC. You can use attributes from the `System.ComponentModel.DataAnnotations` namespace to decorate your model properties. Common va... | 23,418 | [
{
"from": "human",
"value": "What are my validation options with .net mvc?\nDo any of them have a nice validation summary like webforms did?\n"
},
{
"from": "gpt",
"value": "In ASP.NET MVC, you have several options for implementing validation. Here are the main options:\n\n### 1. **Data Annotati... |
Hopefully a picture is worth a thousand lines of code because I don't want to have to strip down all of the ASP.Net code, HTML, JavaScript, and CSS to provide an example (but I'll supply what I can upon request if someone doesn't say "Oh, I've seen that before! Try this...") [Actually, I did post some code and CSS - se... | It sounds like you've encountered a common issue with how different browsers handle margins, particularly in Internet Explorer. Based on your description and the code snippets you provided, you identified that the extra white space beside the `<input>` controls was due to inherited margins.
### Here’s a brief overview... | 28,654 | [
{
"from": "human",
"value": "Hopefully a picture is worth a thousand lines of code because I don't want to have to strip down all of the ASP.Net code, HTML, JavaScript, and CSS to provide an example (but I'll supply what I can upon request if someone doesn't say \"Oh, I've seen that before! Try this...\") [... |
I need to get the Folder size and display the info on a report (SSRS). I need to do this for a number of Databases (loop!). These DB's are websites' backends.
Are any samples available for this? Does xp_filesize and the like the right solution?
| To get the folder size of databases in SQL Server, particularly for the backend of websites, you'll want to use a combination of SQL Server system functions and possibly a stored procedure if you need to loop through multiple databases. However, `xp_fileexist` and `xp_cmdshell` can be useful for getting file sizes if y... | 29,266 | [
{
"from": "human",
"value": "I need to get the Folder size and display the info on a report (SSRS). I need to do this for a number of Databases (loop!). These DB's are websites' backends.\nAre any samples available for this? Does xp_filesize and the like the right solution?\n"
},
{
"from": "gpt",
... |
Is there a way in C# to play audio (for example, MP3) direcly from a System.IO.Stream that for instance was returend from a WebRequest without saving the data temporarily to the disk?
Solution with NAudio
With the help of NAudio 1.3 it is possible to:
Load an MP3 file from a URL into a MemoryStream
Convert MP3 data i... | Yes, your solution using NAudio to play an MP3 file directly from a `Stream` (like `MemoryStream` for data fetched from a URL) is a common approach. However, as you noted, NAudio does not support streaming playback of incomplete MP3 data directly. It requires the entire MP3 file to be loaded before it can decode and pl... | 26,343 | [
{
"from": "human",
"value": "Is there a way in C# to play audio (for example, MP3) direcly from a System.IO.Stream that for instance was returend from a WebRequest without saving the data temporarily to the disk?\n\nSolution with NAudio\nWith the help of NAudio 1.3 it is possible to:\n\nLoad an MP3 file fro... |
Does anyone know of a simple method for solving this?
I have a table which consists of start times for events and the associated durations. I need to be able to split the event durations into thirty minute intervals. So for example if an event starts at 10:45:00 and the duration is 00:17:00 then the returned set should... | Hi Steve,
You can solve the problem of splitting event durations into thirty-minute intervals with a straightforward approach using programming or even just a simple calculation method. Here's a step-by-step method in Python, which could be translated to other languages if needed.
### Python Example
```python
from d... | 26,593 | [
{
"from": "human",
"value": "Does anyone know of a simple method for solving this?\nI have a table which consists of start times for events and the associated durations. I need to be able to split the event durations into thirty minute intervals. So for example if an event starts at 10:45:00 and the duratio... |
Does anyone have any suggestions (or a regular expression) for parsing the HTTP Accept header?
I am trying to do some content-type negotiation in ASP.NET MVC. There doesn't seem to be a built in way (which is fine, because there are a lot of schools of thought here), but the parsing is not entirely trivial and I would ... | Parsing the `Accept` header can indeed be a bit tricky due to the complexity of its structure, which can include multiple content types, quality factors (q-values), and parameters. A regular expression can help with basic parsing, but for more robust handling, it may be better to implement a dedicated parser.
Here's a... | 26,862 | [
{
"from": "human",
"value": "Does anyone have any suggestions (or a regular expression) for parsing the HTTP Accept header?\nI am trying to do some content-type negotiation in ASP.NET MVC. There doesn't seem to be a built in way (which is fine, because there are a lot of schools of thought here), but the pa... |
I have been maintaining the git mirror of the watir project. Some time a couple weeks ago, we had someone ready to submit their first git-based patch. Unfortunately, we ran into some issues regarding line endings (CRLF vs. LF, etc.) because of the multi-platform nature of the project.
I tried what I could to set the ... | It sounds like you're facing a tough situation with your Git mirror of the Watir project. The error you're encountering (`Incomplete data: Delta source ended unexpectedly`) suggests that there may be corruption in your Git repository's object database, likely caused by issues arising during the `git svn rebase` operati... | 29,535 | [
{
"from": "human",
"value": "I have been maintaining the git mirror of the watir project. Some time a couple weeks ago, we had someone ready to submit their first git-based patch. Unfortunately, we ran into some issues regarding line endings (CRLF vs. LF, etc.) because of the multi-platform nature of the ... |
What are some good toolsets for graphing/charting in a web application? Preferably open-source/freeware, and particularly looking at developing with ASP.NET MVC or Silverlight 2.0.
| There are several open-source and free charting libraries you can consider for graphing and charting in a web application, especially when working with ASP.NET MVC or Silverlight 2.0. Here are some popular options:
### For ASP.NET MVC:
1. **Chart.js**
- **Description**: A simple yet flexible JavaScript charting li... | 27,410 | [
{
"from": "human",
"value": "What are some good toolsets for graphing/charting in a web application? Preferably open-source/freeware, and particularly looking at developing with ASP.NET MVC or Silverlight 2.0.\n"
},
{
"from": "gpt",
"value": "There are several open-source and free charting libr... |
I have seen a function whose prototype is:
int myfunc(void** ppt)
This function is called in a C file as
a = myfunc(mystruct **var1);
where mystruct is typedef for one of structure we have.
This works without any compilation errors in MSVC6.0, But when I compile it with some other C compiler, it gives an error a... | The issue you are encountering stems from the strictness of type compatibility rules in C, particularly with regard to pointer types.
In C, a `void **` pointer is a pointer to a pointer of a void type, and it is not directly compatible with a pointer to a specific type, such as `mystruct **`. This is because `void` do... | 28,863 | [
{
"from": "human",
"value": "I have seen a function whose prototype is:\nint myfunc(void** ppt)\n\nThis function is called in a C file as \n a = myfunc(mystruct **var1);\nwhere mystruct is typedef for one of structure we have. \nThis works without any compilation errors in MSVC6.0, But when I compile it ... |
I have seen this theme present itself more than once now. I am hoping that people here who are currently in similar situations or have been in the past can offer some insightful advice. It might be useful if you share your past experiences as well.
So there is this fairly large windows forms application that has been d... | Addressing the issues you've described in your Windows Forms application will require a systematic approach to refactor, improve code quality, and enhance test coverage while balancing the need to deliver new features and maintain current functionality. Here are some practical steps and strategies to help guide your ef... | 24,523 | [
{
"from": "human",
"value": "I have seen this theme present itself more than once now. I am hoping that people here who are currently in similar situations or have been in the past can offer some insightful advice. It might be useful if you share your past experiences as well.\nSo there is this fairly large... |
I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically.
Is there any possibility to get a centered ContentPane (or something similar) with a fixed width and height?
thx,
André
| Welcome to the Echo 2 framework! Centering content both horizontally and vertically can indeed be achieved, but the method depends on how you structure your components. One common approach is to use a combination of layout components to achieve the desired effect.
Here’s a simple way to create a centered `ContentPane`... | 27,678 | [
{
"from": "human",
"value": "I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically.\nIs there any possibility to get a centered ContentPane (or something similar) with a fixed width and height?\nthx,\nAndré\n"
},
{
... |
In a LINQ to SQL class, why are the properties that are created from the foreign keys EntitySet objects, which implement IEnumerable, where as the objects on the DataContext are Table objects which implement IQueryable?
EDIT: To clarify, here is an example that illustrates what I'm trying to understand. This example:
c... | In LINQ to SQL, the difference between `IEnumerable` and `IQueryable` plays a crucial role in how queries are executed and how the resulting data is processed, especially in the context of relationships between entities, such as when dealing with foreign keys.
### EntitySet vs. Table
1. **EntitySet**:
- The proper... | 29,084 | [
{
"from": "human",
"value": "In a LINQ to SQL class, why are the properties that are created from the foreign keys EntitySet objects, which implement IEnumerable, where as the objects on the DataContext are Table objects which implement IQueryable?\nEDIT: To clarify, here is an example that illustrates what... |
I have a string from an email header, like Date: Mon, 27 Oct 2008 08:33:29 -0700. What I need is an instance of GregorianCalendar, that will represent the same moment. As easy as that -- how do I do it?
And for the fastest ones -- this is not going to work properly:
SimpleDateFormat format = ... // whatever you want
Da... | To create an instance of `GregorianCalendar` that accurately represents the date and time specified in your email header, while also retaining the correct time zone offset, you can utilize the `SimpleDateFormat` class with the correct pattern to parse the date string, then create the `GregorianCalendar` instance using ... | 27,851 | [
{
"from": "human",
"value": "I have a string from an email header, like Date: Mon, 27 Oct 2008 08:33:29 -0700. What I need is an instance of GregorianCalendar, that will represent the same moment. As easy as that -- how do I do it?\nAnd for the fastest ones -- this is not going to work properly:\nSimpleDate... |
Possible duplicate
Windows Forms application like Google Chrome with multiple processes
Chrome / IE8 multi-process design, is it possible in .NET?
Sample for Multi-process C# app like Google Chrome
Both IE8 and Google Chrome browser have separate processes for each tab that is opened.
For example, you launch IE8 and ... | Creating a multi-process Windows Forms application similar to how browsers like Google Chrome manage their tabs is quite an advanced topic in .NET. The main concept involves inter-process communication (IPC) to allow different processes to communicate with one another. Here's a high-level overview of how you could impl... | 27,097 | [
{
"from": "human",
"value": "\nPossible duplicate\nWindows Forms application like Google Chrome with multiple processes\nChrome / IE8 multi-process design, is it possible in .NET?\nSample for Multi-process C# app like Google Chrome\n\nBoth IE8 and Google Chrome browser have separate processes for each tab t... |
OK, I have a somewhat complicated system in C++. In a nutshell, I need to add a method to a third party abstract base class. The third party also provides a ton of derived classes that also need the new functionality.
I'm using a library that provides a standard Shape interface, as well as some common shapes.
class Sha... | In your situation, where you're trying to extend a third-party library that employs a class hierarchy without using virtual inheritance, you indeed face the diamond problem with your proposed design. Here are a few approaches you can consider to work around the issue and extend the functionality without running into co... | 29,548 | [
{
"from": "human",
"value": "OK, I have a somewhat complicated system in C++. In a nutshell, I need to add a method to a third party abstract base class. The third party also provides a ton of derived classes that also need the new functionality.\nI'm using a library that provides a standard Shape interface... |
Until this morning, I have had Apache 2.0 running as a service using a local account which was configured with appropriate permissions. Sometime yesterday, someone must have changed something, and now Apache 2.0 won't start as a service under this account.
I made the account an Administrator temporarily, and Apache 2.0... | It sounds like you are facing a permissions issue with the Apache 2.0 service running under a specific local account. Since you mentioned that the service works when the account is temporarily elevated to Administrator, it’s likely that the service account does not have sufficient permissions to access certain resource... | 29,193 | [
{
"from": "human",
"value": "Until this morning, I have had Apache 2.0 running as a service using a local account which was configured with appropriate permissions. Sometime yesterday, someone must have changed something, and now Apache 2.0 won't start as a service under this account.\nI made the account an... |
Suppose I have a couple of spring beans:
<beans>
<bean name="A" ... />
<bean name="B" ... />
</beans>
"B" exposes a remote service that doesn't need "A". Assume that "A" takes a non-negligble time to load. What this means is that during a restart cycle, the application hangs the remote client, which can actuall... | You're right to be cautious about the implications of having a partially initialized Spring container. It's generally not recommended to expose beans to clients before they're fully initialized, as this can lead to unexpected behavior and state inconsistencies. However, there are ways to mitigate your issue with "B" ne... | 29,249 | [
{
"from": "human",
"value": "Suppose I have a couple of spring beans: \n<beans>\n <bean name=\"A\" ... />\n <bean name=\"B\" ... />\n</beans>\n\n\"B\" exposes a remote service that doesn't need \"A\". Assume that \"A\" takes a non-negligble time to load. What this means is that during a restart cycle, t... |
I'm experiencing a strange issue where my Visual Studio 2005 C++ program crashes the first time it runs after a new build. I'm having a difficult time debugging this intermittent issue and I suspect it's somehow related to a file somewhere on my hard drive that is being changed. If I can find the file(s), that might ... | Debugging intermittent crashes can be quite challenging, especially in older environments like Visual Studio 2005. To help you track down file changes during the execution of your program, you can use several tools to monitor file system activity. Here are a few recommendations:
1. **Process Monitor (ProcMon)**:
- ... | 29,282 | [
{
"from": "human",
"value": "I'm experiencing a strange issue where my Visual Studio 2005 C++ program crashes the first time it runs after a new build. I'm having a difficult time debugging this intermittent issue and I suspect it's somehow related to a file somewhere on my hard drive that is being changed... |
I've done some programming where I've embedded the Flash ActiveX control into my program. I'll play SWF files in a "playlist" provided by the user. Typically, I've kept a timer going that looks at the CurrentFrame vs. TotalFrames to detect forward motion. I don't allow for looping - if the CurrentFrame ever decreases, ... | In the scenario you described with Flash SWF files that do not have a continuous timeline (like those created from PowerPoint presentations), relying solely on the `CurrentFrame` and `TotalFrames` properties can indeed lead to premature termination of playback. To handle this case more robustly, you might want to consi... | 28,574 | [
{
"from": "human",
"value": "I've done some programming where I've embedded the Flash ActiveX control into my program. I'll play SWF files in a \"playlist\" provided by the user. Typically, I've kept a timer going that looks at the CurrentFrame vs. TotalFrames to detect forward motion. I don't allow for loo... |
Our Flex app would like to work with requests and responses as object graphs (nothing unusual there) e.g. response becomes the model of some view, and would be a structure with several layers of nesting.
** Now, ideally we would like to use the same client (and server) side objects for different message formats e.g. XM... | It sounds like you're tackling a complex issue of serialization and deserialization in a Flex application while trying to maintain a consistent model across different formats (AMF and XML). Your desire to leverage existing metadata for AMF serialization (like `[RemoteClass]` and `[Transient]`) in XML serialization is a... | 29,364 | [
{
"from": "human",
"value": "Our Flex app would like to work with requests and responses as object graphs (nothing unusual there) e.g. response becomes the model of some view, and would be a structure with several layers of nesting.\n** Now, ideally we would like to use the same client (and server) side obj... |
I'm running Apache on Windows XP via Xampplite, and could use help configuring my virtual directory. Here's what I'm hoping to do on my dev box:
I want my source files to live outside of the xampp htdocs dir
on my local machine I can access the project at http://myproject
others on my local network can access the proj... | To set up your virtual directory for your project while keeping the default `localhost` functionality in XAMPP on Windows XP, you can make some adjustments to your Apache configuration. Below are the steps to achieve this:
### Step 1: Modify the `httpd-vhosts.conf` file
Open your `httpd-vhosts.conf` file, which is ty... | 29,168 | [
{
"from": "human",
"value": "I'm running Apache on Windows XP via Xampplite, and could use help configuring my virtual directory. Here's what I'm hoping to do on my dev box:\n\nI want my source files to live outside of the xampp htdocs dir\non my local machine I can access the project at http://myproject\no... |
I am using a fictional example for this. Say, I have a Widget class like:
abstract class Widget
{
Widget parent;
}
Now, my other classes would be derived from this Widget class, but suppose I want to put some constraint in the class while defining the derived types such that only a particular "type" of widget can be p... | To achieve the desired behavior you described, you can utilize generics effectively by parameterizing both the `Widget` class and its derived classes. You can define a generic constraint that ensures a specific type of parent for each child widget.
Here's a revised version of your code that achieves this:
```csharp
/... | 27,936 | [
{
"from": "human",
"value": "I am using a fictional example for this. Say, I have a Widget class like:\nabstract class Widget\n{\nWidget parent;\n}\n\nNow, my other classes would be derived from this Widget class, but suppose I want to put some constraint in the class while defining the derived types such t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.