instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I want to generate a Kerberos ticket using .NET with auth credentials supplied through a login form on a web page (this will authenticate user against in a sql db) and then use this ticket to authenticate the user as a single sign on across several other web apps.
Is this possible? I have had a look at WSE and it seems... | Generating a Kerberos ticket in a web application context using .NET can be quite complex, especially if you're looking to authenticate against a SQL database and then use that authentication to obtain a Kerberos ticket. Here's a high-level overview of how you might implement this.
### Understanding Kerberos Authentic... | 27,657 | [
{
"from": "human",
"value": "I want to generate a Kerberos ticket using .NET with auth credentials supplied through a login form on a web page (this will authenticate user against in a sql db) and then use this ticket to authenticate the user as a single sign on across several other web apps.\nIs this possi... |
Please help me with a sanity check. Assuming a many-to-many relationship:
Post, PostTagAssoc, Tag http://www.codingthewheel.com/pics/many_to_many.gif
What's the most succinct way (using LINQ to SQL) to get a result set showing, for each tag (or post), the aggregate number of posts (or tags) assigned to it?
Thanks!
| To achieve this using LINQ to SQL in a many-to-many relationship between `Post`, `PostTagAssoc`, and `Tag`, you would typically have a structure where:
- `Post` contains information about the posts.
- `Tag` contains information about the tags.
- `PostTagAssoc` is a join table linking `Post` and `Tag`.
To get an aggre... | 31,059 | [
{
"from": "human",
"value": "Please help me with a sanity check. Assuming a many-to-many relationship:\nPost, PostTagAssoc, Tag http://www.codingthewheel.com/pics/many_to_many.gif\nWhat's the most succinct way (using LINQ to SQL) to get a result set showing, for each tag (or post), the aggregate number of p... |
I have to concatenate a bunch of Strings in Javascript and am searching for the fastest way to do so. Let's assume that the Javascript has to create a large XML-"file" that, naturally, consists of many small Strings. So I came up with:
var sbuffer = [];
for (var idx=0; idx<10000; idx=idx+1) {
sbuffer.pu... | Your approach using an array to collect strings and then joining them at the end is already one of the most efficient methods to concatenate strings in JavaScript, especially when working with a large number of strings. This is because string concatenation using the `+` operator in a loop can lead to performance issues... | 27,486 | [
{
"from": "human",
"value": "I have to concatenate a bunch of Strings in Javascript and am searching for the fastest way to do so. Let's assume that the Javascript has to create a large XML-\"file\" that, naturally, consists of many small Strings. So I came up with:\n var sbuffer = [];\n for (var idx=... |
I've taken the plunge and upgraded (or maybe downgraded?!) from WinXP to Vista.
Everything appeared to be working ok except that when I fired up my machine this morning and opened my C# application in Visual Studio I got a few "Load of property 'OutputPath' failed. The entered path is not a valid output path" errors.
I... | It sounds like you're running into some common permissions issues that can occur when upgrading from Windows XP to Windows Vista, particularly when using development tools like Visual Studio. Vista introduced User Account Control (UAC), which can change the way permissions work compared to XP.
Here are some steps you ... | 33,363 | [
{
"from": "human",
"value": "I've taken the plunge and upgraded (or maybe downgraded?!) from WinXP to Vista.\nEverything appeared to be working ok except that when I fired up my machine this morning and opened my C# application in Visual Studio I got a few \"Load of property 'OutputPath' failed. The entered... |
I have a RESTful web service deployed at http://example.com/v1/SomeResource. One day, a new protocol version (that is not backwards compatible) is deployed to http://example.com/v2/SomeResource. From the client of view, this upgrade could occur at any time between two HTTP requests.
How does the server indicate to the ... | In this scenario, the server can respond to requests made to the old version (v1) of the resource with an appropriate HTTP status code to indicate that the client is required to upgrade to the new version (v2). The most suitable response code for this situation is **410 Gone** or **426 Upgrade Required**.
Here's a bri... | 32,291 | [
{
"from": "human",
"value": "I have a RESTful web service deployed at http://example.com/v1/SomeResource. One day, a new protocol version (that is not backwards compatible) is deployed to http://example.com/v2/SomeResource. From the client of view, this upgrade could occur at any time between two HTTP reque... |
If you are using php5 and mysql5, is there a substantial advantage to using stored procs over prepared statements? ( i read somewhere you may not get substantial performance gains from mysql5 stored proc)
| When comparing the use of stored procedures and prepared statements in MySQL (especially with PHP 5 and MySQL 5), it's essential to understand the differences in their functionality and when one might be preferred over the other. Here's a breakdown of the advantages and considerations of each:
### Stored Procedures
*... | 27,835 | [
{
"from": "human",
"value": "If you are using php5 and mysql5, is there a substantial advantage to using stored procs over prepared statements? ( i read somewhere you may not get substantial performance gains from mysql5 stored proc)\n"
},
{
"from": "gpt",
"value": "When comparing the use of sto... |
One of the responses to a question I asked yesterday suggested that I should make sure my database can handle UTF-8 characters correctly. How I can do this with MySQL?
| To ensure that your MySQL database can handle UTF-8 characters correctly, follow these steps:
1. **Database Character Set**: When you create your database, specify the character set as UTF-8. You can use the following command:
```sql
CREATE DATABASE your_database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_uni... | 31,463 | [
{
"from": "human",
"value": "One of the responses to a question I asked yesterday suggested that I should make sure my database can handle UTF-8 characters correctly. How I can do this with MySQL?\n"
},
{
"from": "gpt",
"value": "To ensure that your MySQL database can handle UTF-8 characters cor... |
I need to extend MS Project's functionality for my company, so I would like to embed some .NET GUI controls into Project. The plan is that my controls save the user input into my custom DB tables, but I do have to bind them to tasks, current user, resources etc. Could you give me some advise how to start? I am interest... | Embedding .NET GUI controls in Microsoft Project and extending its functionality involves a combination of Visual Studio development, understanding the Project Object Model (POM), and potentially using add-ins or VSTO (Visual Studio Tools for Office). Here’s a structured approach to help you get started:
### 1. Enviro... | 27,647 | [
{
"from": "human",
"value": "I need to extend MS Project's functionality for my company, so I would like to embed some .NET GUI controls into Project. The plan is that my controls save the user input into my custom DB tables, but I do have to bind them to tasks, current user, resources etc. Could you give m... |
Ok I have an apache IBM HTTP Server WAS 6.1 setup
I have my certs correctly installed and can successfully load http and https pages.
After a successful j_security_check authentication via https, I want the now authorized page (and all subsequent pages) to load as http.
I want this all to work with mod_rewrite because... | It sounds like you're experiencing a common issue with mod_rewrite in conjunction with j_security_check in a WebSphere Application Server (WAS) environment. Given your description, it seems like the behavior you're observing is tied to how WAS processes requests after the authentication phase.
### Understanding the Pr... | 31,778 | [
{
"from": "human",
"value": "Ok I have an apache IBM HTTP Server WAS 6.1 setup \nI have my certs correctly installed and can successfully load http and https pages.\nAfter a successful j_security_check authentication via https, I want the now authorized page (and all subsequent pages) to load as http.\nI wa... |
I know it's simple to implement, but I want to reuse something that already exist.
Problem I want to solve is that I load configuration (from XML so I want to cache them) for different pages, roles, ... so the combination of inputs can grow quite much (but in 99% will not). To handle this 1%, I want to have some max nu... | If you're looking for caching solutions that are easy to implement and fit your needs, there are several options beyond `LRUMap` from Apache Commons Collections. Here are some alternatives you might want to consider:
1. **Caffeine**:
- Caffeine is a high-performance caching library for Java that provides an in-memo... | 33,004 | [
{
"from": "human",
"value": "I know it's simple to implement, but I want to reuse something that already exist.\nProblem I want to solve is that I load configuration (from XML so I want to cache them) for different pages, roles, ... so the combination of inputs can grow quite much (but in 99% will not). To ... |
I have a MySQL database table with a couple thousand rows. The table is setup like so:
id | text
The id column is an auto-incrementing integer, and the text column is a 200-character varchar.
Say I have the following rows:
3 | I think I'll have duck tonight
4 | Maybe the chicken will be alright
5 | I have a pet duck no... | To accomplish your goal of counting the occurrences of each word in the `text` column of your MySQL table, while also ignoring certain substrings, you can follow these general steps:
1. **Select and Prepare the Data**: Retrieve the text data from your table and preprocess it to split the sentences into individual word... | 26,033 | [
{
"from": "human",
"value": "I have a MySQL database table with a couple thousand rows. The table is setup like so:\nid | text\nThe id column is an auto-incrementing integer, and the text column is a 200-character varchar.\nSay I have the following rows:\n3 | I think I'll have duck tonight\n4 | Maybe the ch... |
Update
Got it! See my solution (fifth comment)
Here is my problem:
I have created a small binary called "jail" and in /etc/password I have made it the default shell for a test user.
Here is the -- simplified -- source code:
#define HOME "/home/user"
#define SHELL "/bin/bash"
...
if(chdir(HOME) || chroot(HOME)) return -... | Based on the information you provided, it looks like you are trying to set up a chroot jail for a user and execute a shell with a custom rc file. However, you mentioned that the `myscript` file is not being sourced when the user logs in, and you've outlined some key points regarding your setup.
Here are some potential... | 30,500 | [
{
"from": "human",
"value": "Update\nGot it! See my solution (fifth comment)\nHere is my problem:\nI have created a small binary called \"jail\" and in /etc/password I have made it the default shell for a test user.\nHere is the -- simplified -- source code:\n#define HOME \"/home/user\"\n#define SHELL \"/bi... |
Is there a way I can create Windows firewall exceptions in VB2005? I'm trying to deploy a small app that opens up a few ports so I can connect to them and convert them using VMWare Converter.
Thanks in advance
| Creating Windows Firewall exceptions programmatically in VB.NET (including VB2005) involves using Windows Management Instrumentation (WMI) or the Firewall API provided by Windows. Below, I’ll provide an example of how to do this using WMI, which is a straightforward approach.
### Example Code to Create a Firewall Exce... | 31,592 | [
{
"from": "human",
"value": "Is there a way I can create Windows firewall exceptions in VB2005? I'm trying to deploy a small app that opens up a few ports so I can connect to them and convert them using VMWare Converter.\nThanks in advance\n"
},
{
"from": "gpt",
"value": "Creating Windows Firewa... |
I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck.
I am wrapping everything in this div:
#scroll {
height:400px;
overflow:scroll;
}
Is there a way to keep it scrolled to the bottom by default using JS?
Is there a way to keep it scrolled to the... | Yes, you can easily achieve auto-scrolling behavior for your chat messages div using JavaScript. Here’s how you can do it:
### Step 1: HTML Structure
First, ensure your HTML structure has the messages wrapped inside the `#scroll` div.
```html
<div id="scroll">
<div id="messages">
<!-- Chat messages will b... | 30,507 | [
{
"from": "human",
"value": "I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck.\nI am wrapping everything in this div:\n#scroll {\n height:400px;\n overflow:scroll;\n}\n\nIs there a way to keep it scrolled to the bottom by default usi... |
I am trying to develop a script to pull some data from a large number of html tables. One problem is that the number of rows that contain the information to create the column headings is indeterminate. I have discovered that the last row of the set of header rows has the attribute border-bottom for each cell with a v... | It looks like the issue with your code is in how you are using the `find` method. The `find` method is typically used for searching within a tag, but in your case, you want to check whether each cell itself has the specified style attribute.
Instead of using `find`, you can directly check if the cell has the desired s... | 31,361 | [
{
"from": "human",
"value": "I am trying to develop a script to pull some data from a large number of html tables. One problem is that the number of rows that contain the information to create the column headings is indeterminate. I have discovered that the last row of the set of header rows has the attri... |
I've done numerous searches and I realize that I can just download this file and install it either in windows/system32 or in the application's directory. My question is, how does this dll generally get installed on Vista? I tried installing the .net framework 3.5 and it didn't get installed with that.
Background:
I'm ... | When dealing with DLL files and their installation on Windows Vista or any Windows operating system, it's important to understand how DLLs typically come into the system. Here are some common points regarding the installation and registration of DLLs:
1. **Software Installation**: DLLs usually get installed as part of... | 30,829 | [
{
"from": "human",
"value": "I've done numerous searches and I realize that I can just download this file and install it either in windows/system32 or in the application's directory. My question is, how does this dll generally get installed on Vista? I tried installing the .net framework 3.5 and it didn't g... |
Is there a way for me to loop over a Javascript Object's built-in properties?
for...in gets me close to where I want to go, but "A for...in loop does not iterate over built-in properties."
| In JavaScript, the `for...in` loop is used to iterate over the enumerable properties of an object, including those that are inherited from its prototype chain. However, it does not include non-enumerable properties, which are typically the built-in properties of JavaScript objects.
If you want to loop over an object's... | 33,474 | [
{
"from": "human",
"value": "Is there a way for me to loop over a Javascript Object's built-in properties?\nfor...in gets me close to where I want to go, but \"A for...in loop does not iterate over built-in properties.\"\n"
},
{
"from": "gpt",
"value": "In JavaScript, the `for...in` loop is used... |
I have a web page that displays a long line graph inside a div with overflow-x: scroll.
This works well as a web page allowing the use to scroll back and forward through the graph.
However, when printing the page the scroll position is reset to zero.
Is there a way to overcome this?
| When printing a web page, browsers typically ignore scroll positions and print the content from the top of the page. This is why you're experiencing the scroll position resetting to zero when you try to print.
To work around this issue, you can implement a solution using JavaScript that captures the current scroll po... | 31,058 | [
{
"from": "human",
"value": "I have a web page that displays a long line graph inside a div with overflow-x: scroll.\nThis works well as a web page allowing the use to scroll back and forward through the graph.\nHowever, when printing the page the scroll position is reset to zero.\nIs there a way to overcom... |
In a tightly looped test application that prints out the value of DateTime.UtcNow.Ticks, I notice that the value will jump a remarkable amount once every hour or so. Look closely at the following sample data:
1:52:14.312 PM - 633614215343125000
1:52:14.359 PM - 633614215343593750
1:52:14.421 PM - 633614215344218750
1:... | The behavior you are observing with the `DateTime.UtcNow.Ticks` values is indeed consistent with the way Windows handles time synchronization, particularly with the Windows Time service (W32Time). The significant jump you see in the tick count is likely due to a time correction event that occurs when the system clock i... | 29,252 | [
{
"from": "human",
"value": "In a tightly looped test application that prints out the value of DateTime.UtcNow.Ticks, I notice that the value will jump a remarkable amount once every hour or so. Look closely at the following sample data:\n1:52:14.312 PM - 633614215343125000\n1:52:14.359 PM - 63361421534359... |
Has anyone used jQuery to populate an autocomplete list on a textbox using ASP.NET webforms? If so, can anyone recommend a good method? From my reading so far, it seems like most people are using delimited lists rather than JSON to bring the items back. I'm open to any ideas that will get me up and running rather quick... | Using jQuery to populate an autocomplete list in a textbox with data from an ASP.NET Web Forms application is definitely achievable. The approach usually involves using AJAX to fetch the data from the server in JSON format, which is more flexible and easier to work with compared to delimited lists.
### Here’s a step-b... | 28,160 | [
{
"from": "human",
"value": "Has anyone used jQuery to populate an autocomplete list on a textbox using ASP.NET webforms? If so, can anyone recommend a good method? From my reading so far, it seems like most people are using delimited lists rather than JSON to bring the items back. I'm open to any ideas tha... |
Is there an elegant way to specialize a template based on one of its template parameters?
Ie.
template<int N> struct Junk {
static int foo() {
// stuff
return Junk<N - 1>::foo();
}
};
// compile error: template argument '(size * 5)' involves template parameter(s)
template<int N> struct Junk<N*5... | In C++, specializing templates based on some condition involving the template parameter can be done using template metaprogramming techniques, including SFINAE (Substitution Failure Is Not An Error) and `std::enable_if`. However, in your specific case where you're trying to specialize based on divisibility by 5, you ca... | 30,232 | [
{
"from": "human",
"value": "Is there an elegant way to specialize a template based on one of its template parameters?\nIe.\ntemplate<int N> struct Junk {\n static int foo() {\n // stuff\n return Junk<N - 1>::foo();\n }\n};\n\n// compile error: template argument '(size * 5)' involves tem... |
I'm running Windows Server 2008 64-bit "workstation" and would like to get corflags.exe. Which SDK do I need to download?
I know about .NET Framework 2.0 Software Development Kit (SDK) (x64) and Windows SDK for Windows Server 2008 and .NET Framework 3.5 but I was hoping to find something smaller as these are quite lar... | To obtain `corflags.exe`, the most common approach would indeed be to download the Windows SDK for Windows Server 2008 and .NET Framework 3.5, as it includes `corflags.exe` along with other useful tools for development.
However, if you're looking for a smaller download specifically for `corflags.exe`, you can extract ... | 33,200 | [
{
"from": "human",
"value": "I'm running Windows Server 2008 64-bit \"workstation\" and would like to get corflags.exe. Which SDK do I need to download? \nI know about .NET Framework 2.0 Software Development Kit (SDK) (x64) and Windows SDK for Windows Server 2008 and .NET Framework 3.5 but I was hoping to f... |
I am having trouble in exporting to excel and it crashes out at the .set_Value function.
It seems to work if I change object[,] to string[,] but by doing this I lose the formatting.
Anyone Help?
| It sounds like you're encountering a problem with exporting data to Excel using a two-dimensional array. The `.set_Value` function can behave differently based on the type of data being passed, which can lead to crashes if the data types do not match the expected types that Excel can handle.
When you're using an `obje... | 29,697 | [
{
"from": "human",
"value": "I am having trouble in exporting to excel and it crashes out at the .set_Value function.\nIt seems to work if I change object[,] to string[,] but by doing this I lose the formatting.\nAnyone Help?\n"
},
{
"from": "gpt",
"value": "It sounds like you're encountering a ... |
What are the best online code beautifier and formatter out there? I'm not asking for highlighters. Any language will do.
| There are several online code beautifiers and formatters available that support various programming languages. Here are some of the best options:
1. **Prettier**:
- Website: [prettier.io](https://prettier.io/)
- Supports: JavaScript, TypeScript, HTML, CSS, JSON, Markdown, YAML, and more.
- Features: Prettier ... | 30,537 | [
{
"from": "human",
"value": "What are the best online code beautifier and formatter out there? I'm not asking for highlighters. Any language will do.\n"
},
{
"from": "gpt",
"value": "There are several online code beautifiers and formatters available that support various programming languages. He... |
I'm just concerned about Windows, so there's no need to go into esoterica about Mono compatibility or anything like that.
I should also add that the app that I'm writing is WPF, and I'd prefer to avoid taking a dependency on System.Windows.Forms if at all possible.
| It sounds like you're focusing on developing a WPF (Windows Presentation Foundation) application and want to keep your dependencies minimal, avoiding any reliance on Windows Forms. That’s a good approach if you want to maintain the modern UI capabilities and features that WPF offers.
Here are some key points and tips ... | 33,535 | [
{
"from": "human",
"value": "I'm just concerned about Windows, so there's no need to go into esoterica about Mono compatibility or anything like that.\nI should also add that the app that I'm writing is WPF, and I'd prefer to avoid taking a dependency on System.Windows.Forms if at all possible.\n"
},
{
... |
How can I know in a C#-Application, in which direction the screen of the mobile device is orientated? (i.e. horizontal or vertical).
| To determine the orientation of a mobile device screen (horizontal or vertical) in a C# application, you can use the features provided by the platform's API. Below are examples for Xamarin.Forms, which is commonly used for C# mobile development.
### Xamarin.Forms
In Xamarin.Forms, you can use the `DeviceDisplay` clas... | 31,274 | [
{
"from": "human",
"value": "How can I know in a C#-Application, in which direction the screen of the mobile device is orientated? (i.e. horizontal or vertical).\n"
},
{
"from": "gpt",
"value": "To determine the orientation of a mobile device screen (horizontal or vertical) in a C# application, ... |
I have a .ini file with sensitive information in my php wab app. I denied access to it using a .htaccess file:
<files my.ini>
order deny,allow
deny from all
</files>
I don't have access to folders outside of htdocs, so I can't move the .ini file out of browsable territory.
Is my solution safe?
| Using a `.htaccess` file to deny access to your sensitive `.ini` file is a reasonable step to help protect it from being accessed via the web. However, there are some important considerations to ensure your solution is effective:
1. **Check Apache Configuration**: Make sure your Apache server is configured to respect ... | 33,042 | [
{
"from": "human",
"value": "I have a .ini file with sensitive information in my php wab app. I denied access to it using a .htaccess file:\n<files my.ini>\n order deny,allow\n deny from all\n</files>\n\nI don't have access to folders outside of htdocs, so I can't move the .ini file out of browsable terri... |
Should I always wrap external resource calls in a try-catch? (ie. calls to a database or file system) Is there a best practice for error handling when calling external resources?
| When working with external resources such as databases, file systems, or web services, it's generally a good practice to wrap these calls in try-catch blocks. Here are some guidelines and best practices for error handling in these scenarios:
### 1. **Use Try-Catch for External Calls**
- **Purpose**: Wrapping extern... | 29,115 | [
{
"from": "human",
"value": "Should I always wrap external resource calls in a try-catch? (ie. calls to a database or file system) Is there a best practice for error handling when calling external resources?\n"
},
{
"from": "gpt",
"value": "When working with external resources such as database... |
I have a UIView that will eventually contain about 2 screens worth of information. I want to give the user the ability to scroll down via flicking (just standard flicking like in Safari).
How do I do this?
| To enable scrolling in your `UIView` that contains a lot of information, you should use a `UIScrollView`. This allows you to scroll through your content easily with flick gestures, similar to how scrolling works in Safari.
Here's how you can implement a scrollable view in your iOS app:
1. **Create a UIScrollView**: Y... | 30,736 | [
{
"from": "human",
"value": "I have a UIView that will eventually contain about 2 screens worth of information. I want to give the user the ability to scroll down via flicking (just standard flicking like in Safari).\nHow do I do this?\n"
},
{
"from": "gpt",
"value": "To enable scrolling in your... |
Specifically, I'm looking for a client-side, JavaScript and / or Flash based multiple file uploader. The closest thing I've found is FancyUpload. Anyone have experience with it? If not, what else is out there?
| FancyUpload is an older solution for file uploads using Flash, but since Flash has been deprecated and is no longer supported in modern browsers, it's generally not recommended to use Flash-based solutions anymore. Instead, you might want to consider several modern JavaScript-based alternatives that support multiple fi... | 31,975 | [
{
"from": "human",
"value": "Specifically, I'm looking for a client-side, JavaScript and / or Flash based multiple file uploader. The closest thing I've found is FancyUpload. Anyone have experience with it? If not, what else is out there?\n"
},
{
"from": "gpt",
"value": "FancyUpload is an old... |
I often have to convert a retreived value (usually as a string) - and then convert it to an int. But in C# (.Net) you have to choose either int16, int32 or int64 - how do you know which one to choose when you don't know how big your retrieved number will be?
| In C#, choosing between `Int16`, `Int32`, and `Int64` when converting a retrieved string value to an integer type involves considering both the expected range of the values you are working with and the potential for future changes to those values. Here's a breakdown of each type's range and when to use each:
1. **Int1... | 29,716 | [
{
"from": "human",
"value": "I often have to convert a retreived value (usually as a string) - and then convert it to an int. But in C# (.Net) you have to choose either int16, int32 or int64 - how do you know which one to choose when you don't know how big your retrieved number will be? \n"
},
{
"f... |
I would like to programatically shutdown a Windows Mobile device using Compact framework 2.0, Windows mobile 5.0 SDK.
Regards,
| To programmatically shutdown a Windows Mobile device using the .NET Compact Framework 2.0 in a Windows Mobile 5.0 application, you can use P/Invoke to call native APIs. The `ExitWindowsEx` function from the `coredll.dll` library allows you to shutdown or reboot the device.
Below is an example of how you can implement... | 32,677 | [
{
"from": "human",
"value": "I would like to programatically shutdown a Windows Mobile device using Compact framework 2.0, Windows mobile 5.0 SDK.\nRegards,\n"
},
{
"from": "gpt",
"value": "To programmatically shutdown a Windows Mobile device using the .NET Compact Framework 2.0 in a Windows Mob... |
I have a problem with how ASP.Net generates the img tag.
I have a server control like this:
<asp:Image runat="server" ID="someWarning" ImageUrl="~/images/warning.gif" AlternateText="Warning" />
I expect it to generate this:
<img id="ctl00_ContentPlaceHolder1_ctl00_someWarning" src="../images/warning.gif" />
but ins... | The issue you're experiencing with the `<asp:Image>` control generating an unexpected `<img>` tag is likely related to how ASP.NET handles image resources, particularly in terms of optimization or resource management.
When you use the `<asp:Image>` control, ASP.NET may be configured to process the image URL through an... | 28,843 | [
{
"from": "human",
"value": "I have a problem with how ASP.Net generates the img tag.\nI have a server control like this: \n<asp:Image runat=\"server\" ID=\"someWarning\" ImageUrl=\"~/images/warning.gif\" AlternateText=\"Warning\" />\n\nI expect it to generate this: \n<img id=\"ctl00_ContentPlaceHolder1_ctl... |
This is what I have written:
if ((lstProperty[i].PropertyIdentifier as string).CompareTo("Name") == 0)
Resharper put me an error (I am new with ReSharper... I am trying it) and it suggests me :
if (((string) lstProperty[i].PropertyIdentifier).CompareTo("Name") == 0)
Why is the second is NullException safe? For me b... | The main difference between the two code snippets you've provided lies in how they handle the possibility of `PropertyIdentifier` being `null`.
1. Your original code:
```csharp
if ((lstProperty[i].PropertyIdentifier as string).CompareTo("Name") == 0)
```
In this version, if `PropertyIdentifier` is `null`,... | 32,749 | [
{
"from": "human",
"value": "This is what I have written:\nif ((lstProperty[i].PropertyIdentifier as string).CompareTo(\"Name\") == 0)\n\nResharper put me an error (I am new with ReSharper... I am trying it) and it suggests me :\n if (((string) lstProperty[i].PropertyIdentifier).CompareTo(\"Name\") == 0)\n... |
I try get the mp3 flash player to work with my javascript on all browsers. All went well for first, but fast realized that my code doesn't work on MSIE.
After trying to find out I found this in the reference code:
<!--[if IE]>
<script type="text/javascript" event="FSCommand(command,args)" for="myFlash">
eval(args);
</... | To adapt the provided conditional comment for Internet Explorer into a more modern JavaScript or jQuery clause, you can check for Internet Explorer using the user agent string or by checking the `document.documentMode` property. Below is an example of how you could implement this logic in your `audio.js` file.
### Usi... | 33,259 | [
{
"from": "human",
"value": "I try get the mp3 flash player to work with my javascript on all browsers. All went well for first, but fast realized that my code doesn't work on MSIE.\nAfter trying to find out I found this in the reference code:\n<!--[if IE]>\n<script type=\"text/javascript\" event=\"FSComma... |
I have a simple panel that is used as a drawing surface. The goal here is to draw a 4 pixel wide outline around a child ListView under certain circumstances. I would like to make the outline pulsate when something can be dragged into it.
I am just drawing a simple rectangle around the ListView and updating the opac... | To achieve a smooth pulsating outline effect around a `ListView` without flickering, you can optimize your drawing method and consider alternative approaches to manage the rendering process. Here are some strategies to reduce flicker and improve performance:
### 1. **Use a BufferedGraphics Object**
Instead of double-b... | 30,839 | [
{
"from": "human",
"value": "I have a simple panel that is used as a drawing surface. The goal here is to draw a 4 pixel wide outline around a child ListView under certain circumstances. I would like to make the outline pulsate when something can be dragged into it. \nI am just drawing a simple rectangle... |
I've got a simple little WPF app with a TextBox and a WebBrowser control. As I type into the TextBox the WebBrowser updates with its content.
But on each keystroke, when the WebBrowser updates, it makes a click sound. How can I disable the WebBrowser control's refresh click sound?
WPF TextBox and WebBrowser controls ... | To suppress the click sound that occurs when the `WebBrowser` control updates its content in a WPF application, you can try a couple of different approaches, but unfortunately, there is no direct property or method on the `WebBrowser` control to disable this sound.
### Option 1: Use a Timer to Delay Updates
One workar... | 30,053 | [
{
"from": "human",
"value": "I've got a simple little WPF app with a TextBox and a WebBrowser control. As I type into the TextBox the WebBrowser updates with its content.\nBut on each keystroke, when the WebBrowser updates, it makes a click sound. How can I disable the WebBrowser control's refresh click s... |
I use div tags to define areas within my web pages. I set all the obvious things like background, size, padding, etc. But it is all very square.
How can I use only CSS to round the corners?
| To round the corners of your `div` elements using only CSS, you can utilize the `border-radius` property. This property allows you to define how rounded the corners of an element should be.
Here’s a simple example:
```html
<div class="rounded-corners">This is a div with rounded corners.</div>
```
And the correspondi... | 33,610 | [
{
"from": "human",
"value": "I use div tags to define areas within my web pages. I set all the obvious things like background, size, padding, etc. But it is all very square.\nHow can I use only CSS to round the corners?\n"
},
{
"from": "gpt",
"value": "To round the corners of your `div` elemen... |
Is there a difference between generating multiple numbers using a single random number generator (RNG) versus generating one number per generator and discarding it? Do both implementations generate numbers which are equally random? Is there a difference between the normal RNGs and the secure RNGs for this?
I have a web... | The discussion around random number generation (RNG) is nuanced, particularly when considering the context of web applications and the requirements for randomness.
### Generating Multiple Numbers vs. Generating One Number per Generator
1. **Single RNG for Multiple Numbers**: Using a single RNG to generate multiple ran... | 19,868 | [
{
"from": "human",
"value": "Is there a difference between generating multiple numbers using a single random number generator (RNG) versus generating one number per generator and discarding it? Do both implementations generate numbers which are equally random? Is there a difference between the normal RNGs a... |
I'm having trouble getting a rails app on Dreamhost's Passenger to see compiled libraries in my ~/opt/lib directory. I have to put them here because I don't have root access.
I can boot up my app in ./script/console and it sees them libraries just fine because I updated my .bash_profile's LD_LIBRARY_PATH environment... | It looks like you're having an issue with environment variables not being set correctly for your Ruby on Rails application when it's run under Passenger. Here are some steps you can take to resolve the issue:
### 1. Setting Environment Variables for Passenger
Passenger may not be inheriting your user's shell environm... | 26,578 | [
{
"from": "human",
"value": "I'm having trouble getting a rails app on Dreamhost's Passenger to see compiled libraries in my ~/opt/lib directory. I have to put them here because I don't have root access. \nI can boot up my app in ./script/console and it sees them libraries just fine because I updated my .... |
Suppose I have some code:
let listB = [ 1; 2; 3 ]
Using Lisp notation, how do I do a car and cadr against this list? I know cons is ::.
Or in Scheme, first and rest?
| In Lisp notation, you can use the `car` and `cadr` functions to retrieve elements from a list. Assuming `listB` is defined as `(list 1 2 3)` in Lisp, you would retrieve the first and second elements like this:
- **`car` retrieves the first element**:
```lisp
(car listB) ; This would return 1
```
- **`cadr` retrieves ... | 34,601 | [
{
"from": "human",
"value": "Suppose I have some code:\nlet listB = [ 1; 2; 3 ] \n\nUsing Lisp notation, how do I do a car and cadr against this list? I know cons is ::.\nOr in Scheme, first and rest?\n"
},
{
"from": "gpt",
"value": "In Lisp notation, you can use the `car` and `cadr` functions ... |
What compatibility issues have you found when developing with Visual FoxPro 9 on Windows Vista?
| Developing with Visual FoxPro 9 on Windows Vista can present a few compatibility issues due to differences in the operating system architecture, security features, and how certain functionalities work. Here are some common issues that developers might encounter:
1. **User Account Control (UAC)**: Windows Vista introdu... | 31,774 | [
{
"from": "human",
"value": "What compatibility issues have you found when developing with Visual FoxPro 9 on Windows Vista?\n"
},
{
"from": "gpt",
"value": "Developing with Visual FoxPro 9 on Windows Vista can present a few compatibility issues due to differences in the operating system archite... |
looking for the standard bug-proofed way to convert "long names" such as "C:\Documents and settings" to their equivalent "short names" "C:\DOCUME~1"
I need this to run an external process from withing my C# app. It fails if I feed it with paths in the "long name".
| To convert a long path to a short (8.3) path in C#, you can use the Windows API function `GetShortPathName`. Here's how you can achieve this using P/Invoke in C#:
1. Import the required namespaces.
2. Declare the `GetShortPathName` function from `kernel32.dll`.
3. Create a method to convert the long path to the short ... | 31,811 | [
{
"from": "human",
"value": "looking for the standard bug-proofed way to convert \"long names\" such as \"C:\\Documents and settings\" to their equivalent \"short names\" \"C:\\DOCUME~1\"\nI need this to run an external process from withing my C# app. It fails if I feed it with paths in the \"long name\".\n... |
I am working on an ASP.Net web application that must print dynamically created labels on standard Avery-style label sheets (one particular size, so only one overall layout). The labels have a variable number of lines (3-6) and may contain either lines of text or a graphic barcode image.
Our first cut, that I inherited,... | It seems like you've gone through quite a journey with your ASP.NET label printing application! Switching to generating PDFs with libraries like iTextSharp can indeed offer more control over layout and printing consistency across different devices and printers. However, since you asked for additional insights into abso... | 28,493 | [
{
"from": "human",
"value": "I am working on an ASP.Net web application that must print dynamically created labels on standard Avery-style label sheets (one particular size, so only one overall layout). The labels have a variable number of lines (3-6) and may contain either lines of text or a graphic barcod... |
I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to call this web service from a web page, and ... | To achieve an asynchronous call to your ASP.NET web service and have a mechanism for polling to get real-time progress updates, you'll need to implement a few components in your solution. Here's a step-by-step guide to set this up:
### 1. Web Service Setup
Make sure your web service can handle the long-running operat... | 26,147 | [
{
"from": "human",
"value": "I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to ca... |
I'm currently working on a program in C# that works with data from ACT!. To be able to search and update a record you need to use the GUID. The only way I have been able to get a GUID from the framework is when I create a new record.
How can I retrieve GUIDs from existing records in ACT!?
| In ACT!, every record is associated with a GUID (Globally Unique Identifier), and this GUID is essential for operations such as updating or searching for records. If you're using the ACT! SDK, you can retrieve the GUID of existing records through the `Contact` or `Opportunity` classes depending on the type of record yo... | 32,484 | [
{
"from": "human",
"value": "I'm currently working on a program in C# that works with data from ACT!. To be able to search and update a record you need to use the GUID. The only way I have been able to get a GUID from the framework is when I create a new record.\nHow can I retrieve GUIDs from existing reco... |
We're starting a new facebook app (incidentally in Rails), and are faced with the decision to use FBML or to use IFrames. It seems like in the past the consensus generally was that FBML was the better way to go, as it made things more inherently Facebook looking, however it seems now like things on the iFrame side are ... | As of the current state of Facebook's platform, FBML (Facebook Markup Language) has been deprecated and is no longer supported for new applications. All new apps should be developed using IFrames, which has become the standard approach. Here are some of the benefits and drawbacks of using IFrames, as well as a brief co... | 32,567 | [
{
"from": "human",
"value": "We're starting a new facebook app (incidentally in Rails), and are faced with the decision to use FBML or to use IFrames. It seems like in the past the consensus generally was that FBML was the better way to go, as it made things more inherently Facebook looking, however it seem... |
I have a function I've written that was initially supposed to take a string field and populate an excel spreadsheet with the values. Those values continually came up null. I started tracking it back to the recordset and found that despite the query being valid and running properly through the Access query analyzer th... | It sounds like you're experiencing an odd behavior with ADO when working with linked tables in Access that connect to SQL Server. Given the specifics you've provided, here are some troubleshooting steps and suggestions that may help you identify the root cause of your issue:
### Troubleshooting Steps
1. **Check for C... | 28,593 | [
{
"from": "human",
"value": "I have a function I've written that was initially supposed to take a string field and populate an excel spreadsheet with the values. Those values continually came up null. I started tracking it back to the recordset and found that despite the query being valid and running prop... |
We have simple web-based data entry internal business app.
Now business wants to be able to attach a document to a row in the database that represents business entity. Document can be Word, Excel, PDF.
How can we do that?
I think creating yet another home grown document management system is not a good idea.
Instead we ... | Integrating a document management system (DMS) into your existing web-based data entry application is a great way to avoid reinventing the wheel. Both SharePoint and Documentum are viable options for document management, and they offer features that can be integrated into your Java/WebSphere application. Here's a break... | 30,417 | [
{
"from": "human",
"value": "We have simple web-based data entry internal business app.\nNow business wants to be able to attach a document to a row in the database that represents business entity. Document can be Word, Excel, PDF.\nHow can we do that?\nI think creating yet another home grown document manag... |
I just asked this question. Which lead me to a new question :)
Up until this point, I have used the following pattern of selecting stuff with Linq to SQL, with the purpose of being able to handle 0 "rows" returned by the query:
var person = (from p in [DataContextObject].Persons
where p.PersonsID == 1
... | You're correct that when using LINQ to SQL, you can encounter situations where you want to select specific columns, but you also want to ensure that you can handle cases where no results are returned.
In your second code snippet, you are using an anonymous type to select only specific columns from the database. Howev... | 28,733 | [
{
"from": "human",
"value": "I just asked this question. Which lead me to a new question :)\nUp until this point, I have used the following pattern of selecting stuff with Linq to SQL, with the purpose of being able to handle 0 \"rows\" returned by the query:\nvar person = (from p in [DataContextObject].Per... |
The renewal wizard doesn't seem to ask for a renewal period.
| If the renewal wizard you're using isn't prompting you for a renewal period, there could be several reasons for this issue. Here are some troubleshooting steps you can take:
1. **Check Software Version:** Ensure that you are using the latest version of the renewal wizard. Sometimes, outdated software can cause functio... | 33,326 | [
{
"from": "human",
"value": "The renewal wizard doesn't seem to ask for a renewal period.\n"
},
{
"from": "gpt",
"value": "If the renewal wizard you're using isn't prompting you for a renewal period, there could be several reasons for this issue. Here are some troubleshooting steps you can take:... |
I have a web application written using CherryPy, which is run locally on 127.0.0.1:4321. We use mod-rewrite and mod-proxy to have Apache act as a reverse proxy; Apache also handles our SSL encryption and may eventually be used to transfer all of our static content.
This all works just fine for small workloads. Howeve... | The issue you're encountering likely stems from how connections are being managed between your Apache reverse proxy and the CherryPy application. Here are several strategies you can employ to mitigate the problem:
1. **Disable KeepAlive in Apache:** Since you're facing issues with Apache holding on to connections, try... | 23,435 | [
{
"from": "human",
"value": "I have a web application written using CherryPy, which is run locally on 127.0.0.1:4321. We use mod-rewrite and mod-proxy to have Apache act as a reverse proxy; Apache also handles our SSL encryption and may eventually be used to transfer all of our static content.\nThis all wo... |
I have a database that I would like class files generated from, and also a .aspx page generated which contains a listview to interface with the classfile for create/read/update/delete. I have started to use Subsonic but am not sure how flexible the scaffold control is. Also, LINQ seems like an option, but it would be... | Creating a Data Access Layer (DAL) and a corresponding user interface for CRUD operations in a .NET environment can indeed be time-consuming. However, there are tools and frameworks available that can automate much of this work, while still providing you the flexibility to customize the generated code.
Here's a genera... | 24,696 | [
{
"from": "human",
"value": "I have a database that I would like class files generated from, and also a .aspx page generated which contains a listview to interface with the classfile for create/read/update/delete. I have started to use Subsonic but am not sure how flexible the scaffold control is. Also, L... |
I just saw the anouncement for the Visual Studio CTP today, and am currently waiting for all those files to download...
Have you already tried the CTP, or maybe a previous version? What are your thoughts? There is another question What features would you most like to see in Visual Studio 2010, now here it is, what do y... | As an AI language model, I don't have the ability to try software or have personal experiences, but I can provide an overview of the general feedback and features that have been discussed in relation to Visual Studio CTP (Community Technology Preview) and the features that users often hope to see in Visual Studio versi... | 33,764 | [
{
"from": "human",
"value": "I just saw the anouncement for the Visual Studio CTP today, and am currently waiting for all those files to download...\nHave you already tried the CTP, or maybe a previous version? What are your thoughts? There is another question What features would you most like to see in Vis... |
I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em ...
I understand that there are several different approaches, one being th... | Sure! I can definitely help guide you in the right direction for creating a poker odds calculator for Texas Hold'em. There are two main aspects to consider, as you've identified: calculating the odds of completing a certain hand (drawing odds) and calculating the odds of winning against other players (win odds). Here's... | 30,385 | [
{
"from": "human",
"value": "I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em ...\nI understand that there are ... |
I have a QGraphicsScene that I want to copy and append to the start of a list. What is the best method of doing this?
QGraphicsScene* m_scene = new QGraphicsScene();
QGraphicsScene* m_DuplicateScene;
QList<QGraphicsScene *>m_list;
| To copy a `QGraphicsScene` and append the copy to the start of a list, you cannot directly copy a `QGraphicsScene` because Qt does not provide a copy constructor for `QGraphicsScene`. Instead, you would typically create a new scene and then manually copy the items from the original scene to the new one.
Here’s how you... | 32,718 | [
{
"from": "human",
"value": "I have a QGraphicsScene that I want to copy and append to the start of a list. What is the best method of doing this?\nQGraphicsScene* m_scene = new QGraphicsScene();\nQGraphicsScene* m_DuplicateScene;\n\nQList<QGraphicsScene *>m_list;\n\n"
},
{
"from": "gpt",
"valu... |
Whats the normal procedure of clearing a form after POST? Just loop through the textboxes and cleat all text? I have an ASP.NET application with several forms and I am trying to avoid them sending the data twice?
Thanks
| To prevent double submission of forms in your ASP.NET application, there are several strategies you can implement. Clearing textboxes after a POST request is one approach, but here are some best practices you might consider:
### 1. **Disable the Submit Button:**
After the form is submitted, you can disable the submit ... | 27,572 | [
{
"from": "human",
"value": "Whats the normal procedure of clearing a form after POST? Just loop through the textboxes and cleat all text? I have an ASP.NET application with several forms and I am trying to avoid them sending the data twice?\nThanks\n"
},
{
"from": "gpt",
"value": "To prevent do... |
I've been crossing things out on my TODO list. I've recently picked up Colemak. Next I wanted to learn Vim or Emacs. I was leaning towards Vim, however one of its benefits are sticking to the home row. With Colemak, the home row has been changed. I realize that I could remap the keys, but assigning the functionali... | It's great to see that you're diving into different keyboard layouts and text editors! Colemak is a fantastic choice, and it has its unique advantages, especially for programmers and writers. Here are some thoughts on using Colemak with Vim or Emacs, along with suggestions for alternative key mappings:
### Vim and Col... | 28,351 | [
{
"from": "human",
"value": "I've been crossing things out on my TODO list. I've recently picked up Colemak. Next I wanted to learn Vim or Emacs. I was leaning towards Vim, however one of its benefits are sticking to the home row. With Colemak, the home row has been changed. I realize that I could rema... |
I have the same problem as described in the posts listed below. That is, certain keys don't work at all when I type them into my combobox until I first hit the spacebar. One of the keys is ".", but another is the letter "Q", and there are others: "$", "%".
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=659... | It seems you're encountering an issue with specific keys not working in a ComboBox within a DataGridView until the spacebar is pressed. This can often be linked to various causes, including focus issues, message handling, or specific keyboard events being ignored or improperly processed.
Here are some potential soluti... | 29,196 | [
{
"from": "human",
"value": "I have the same problem as described in the posts listed below. That is, certain keys don't work at all when I type them into my combobox until I first hit the spacebar. One of the keys is \".\", but another is the letter \"Q\", and there are others: \"$\", \"%\". \nhttp://... |
If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints:
The keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK)
The software is internationalized and will run in different locales
... | In the scenario you've described, where the keys in the dictionary come from C# code or config files written in English (either US or UK), and considering that your software is internationalized and will run in different locales, using `StringComparer.InvariantCultureIgnoreCase` is generally a good choice for a case-in... | 31,161 | [
{
"from": "human",
"value": "If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints:\n\nThe keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK)\nThe software is internati... |
Today somebody told me that interface implementation in C# is just "Can-Do" relationship, not "Is-A" relationship. This conflicts with my long-time believing in LSP(Liskov Substitution Principle). I always think that all inheritance should means "Is-A" relationship.
So, If interface implementation is just a "Can-Do" r... | Your question touches on an important distinction in object-oriented programming, particularly when it comes to interfaces and inheritance.
### "Can-Do" vs "Is-A"
1. **"Can-Do" Relationship (Interfaces)**:
- When you implement an interface in C#, you are stating that the class can perform the actions (methods) de... | 26,999 | [
{
"from": "human",
"value": "Today somebody told me that interface implementation in C# is just \"Can-Do\" relationship, not \"Is-A\" relationship. This conflicts with my long-time believing in LSP(Liskov Substitution Principle). I always think that all inheritance should means \"Is-A\" relationship. \nSo, ... |
What the minimum basic setup required to begin developing a Firefox extension?
| To begin developing a Firefox extension, you will need a minimal setup consisting of the following components:
1. **Web Browser**:
- You will need a recent version of Firefox installed on your computer for testing your extension.
2. **Text Editor/IDE**:
- You can use any text editor, but a code editor with sy... | 32,383 | [
{
"from": "human",
"value": "What the minimum basic setup required to begin developing a Firefox extension?\n"
},
{
"from": "gpt",
"value": "To begin developing a Firefox extension, you will need a minimal setup consisting of the following components:\n\n1. **Web Browser**: \n - You will need ... |
I'm writing a url rewrite in django that when a person goes to http://mysite.com/urlchecker/http://www.google.com it sends the url: http://ww.google.com to a view as a string variable.
I tried doing:
(r'^urlchecker/(?P<url>\w+)/$', 'mysite.main.views.urlchecker'),
But that didn't work. Anyone know what I'm doing wr... | It looks like you're trying to capture a full URL as a parameter in your Django URL pattern, but the `\w+` regex pattern only matches word characters (alphanumeric characters plus underscores), and does not account for the special characters found in a URL (like slashes, colons, and periods).
To capture a full URL, yo... | 33,598 | [
{
"from": "human",
"value": "I'm writing a url rewrite in django that when a person goes to http://mysite.com/urlchecker/http://www.google.com it sends the url: http://ww.google.com to a view as a string variable. \nI tried doing:\n(r'^urlchecker/(?P<url>\\w+)/$', 'mysite.main.views.urlchecker'),\n\nBut t... |
I'm using Microsoft WebTest and want to be able to do something similar to NUnit's Assert.Fail(). The best i have come up with is to throw new webTestException() but this shows in the test results as an Error rather than a Failure.
Other than reflecting on the WebTest to set a private member variable to indicate the f... | When working with Microsoft WebTest, the way it handles test results differs from other testing frameworks like NUnit. It is indeed challenging to assert a failure in a way that registers as a "failed" test within the WebTest framework.
Since you've already tried using `Assert.Fail()` and `throw new WebTestException(... | 29,447 | [
{
"from": "human",
"value": "I'm using Microsoft WebTest and want to be able to do something similar to NUnit's Assert.Fail(). The best i have come up with is to throw new webTestException() but this shows in the test results as an Error rather than a Failure. \nOther than reflecting on the WebTest to set a... |
I'm trying to create a QTVR movie via QTKit, and I've got all the frames in the movie. However, setting the attributes necessary doesn't seem to be having any effect. For example:
NSNumber *val = [NSNumber numberWithBool:YES];
[fMovie setAttribute:val forKey:QTMovieIsInteractiveAttribute];
val = [NSNumber numberWith... | When working with QTKit and setting attributes on a QuickTime movie, it's important to ensure that you're applying these attributes after the movie has been fully initialized and ready for modifications. Here are some common troubleshooting steps and considerations to ensure that the attributes are being set correctly:... | 29,930 | [
{
"from": "human",
"value": "I'm trying to create a QTVR movie via QTKit, and I've got all the frames in the movie. However, setting the attributes necessary doesn't seem to be having any effect. For example:\nNSNumber *val = [NSNumber numberWithBool:YES];\n[fMovie setAttribute:val forKey:QTMovieIsInterac... |
What is the difference between anonymous methods of C# 2.0 and lambda expressions of C# 3.0.?
| Anonymous methods and lambda expressions are both features in C# that allow you to define inline methods without explicitly declaring them with a name. However, there are key differences between the two, particularly in terms of syntax, functionality, and the contexts in which they can be used. Here’s a breakdown of th... | 32,334 | [
{
"from": "human",
"value": "What is the difference between anonymous methods of C# 2.0 and lambda expressions of C# 3.0.?\n"
},
{
"from": "gpt",
"value": "Anonymous methods and lambda expressions are both features in C# that allow you to define inline methods without explicitly declaring them w... |
In a coding style question about infinite loops, some people mentioned they prefer the for(;;) style because the while(true) style gives warning messages on MSVC about a conditional expression being constant.
This surprised me greatly, since the use of constant values in conditional expressions is a useful way of avoid... | The MSVC warning you are encountering when using `while (true)` or `if (true)` is rooted in how the compiler interprets constant expressions in the context of control flow statements. Specifically, MSVC generates a warning when it sees an unconditionally true condition, which it believes may indicate a mistake or an ov... | 29,064 | [
{
"from": "human",
"value": "In a coding style question about infinite loops, some people mentioned they prefer the for(;;) style because the while(true) style gives warning messages on MSVC about a conditional expression being constant.\nThis surprised me greatly, since the use of constant values in condit... |
Premise:
Usually during preparation of a new Ruby on Rails App, I draw out models and relations regarding user navigations. Usually I hit a place where I need to ask myself, whether or not I should go beyond the usual "rule of thumb" of nesting no more 1 level deep. Sometimes I feel the need to nest, rather than creati... | In Ruby on Rails, it is generally advisable to limit the nesting of routes to one level deep. Here are several reasons why sticking to this guideline is preferred:
1. **Readability and Simplicity**: Deeply nested routes can become complex and harder to read. When routes are more straightforward, it's easier for develo... | 31,083 | [
{
"from": "human",
"value": "Premise:\nUsually during preparation of a new Ruby on Rails App, I draw out models and relations regarding user navigations. Usually I hit a place where I need to ask myself, whether or not I should go beyond the usual \"rule of thumb\" of nesting no more 1 level deep. Sometimes... |
I'm using Visual Studio 2008 Team System with SP1, and I've noticed an annoying tendency for the IDE to hang for several (10-15) seconds whenever I stop debugging an application. At first I thought this only happened with WPF apps, but I've observed the behavior in Windows Forms apps and ASP.NET sites as well. I've m... | The behavior you're experiencing with Visual Studio 2008 hanging for several seconds when stopping the debugger can be quite frustrating. This is a known issue that can stem from various factors, including the project's configuration, debugging settings, and other environmental factors. Here are several potential solut... | 25,471 | [
{
"from": "human",
"value": "I'm using Visual Studio 2008 Team System with SP1, and I've noticed an annoying tendency for the IDE to hang for several (10-15) seconds whenever I stop debugging an application. At first I thought this only happened with WPF apps, but I've observed the behavior in Windows Form... |
All stuff is running under Windows XP Pro SP2/32-bit.
I have downloaded Jetty 7 pre3 from http://dist.codehaus.org/jetty/jetty-7.0.0-prereleases/jetty-7.0.0pre3/jetty-assembly-7.0.0pre3.zip>dist.codehaus.org.
I have extracted jetty to C:\jetty-7.0.0pre3\ (so I have C:\jetty-7.0.0pre3\bin\ and other dirs)
I have put my ... | The error you're encountering (`java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource`) indicates that the Jetty server cannot find the class `org.mortbay.jetty.plus.naming.Resource`. Here are a few steps to resolve the issue:
1. **Verify Jetty Installation**:
Ensure that you have downloaded and ... | 17,662 | [
{
"from": "human",
"value": "All stuff is running under Windows XP Pro SP2/32-bit.\nI have downloaded Jetty 7 pre3 from http://dist.codehaus.org/jetty/jetty-7.0.0-prereleases/jetty-7.0.0pre3/jetty-assembly-7.0.0pre3.zip>dist.codehaus.org.\nI have extracted jetty to C:\\jetty-7.0.0pre3\\ (so I have C:\\jetty... |
Is there any way of pulling in a CSS stylesheet into FireFox 2 or 3 that is not a static file?
Bellow is the code we are using to pull in a stylesheet dynamically generated by a CGI script.
<link rel="stylesheet" href="/cgi-bin/Xebra?ShowIt&s=LH4X6I2l4fSYwf4pky4k&shw=795430-0&path=customer/DEMO/demo1.css" type="text... | Yes, you can dynamically load a CSS stylesheet in Firefox 2 or 3 using a link element, even when the URL does not end with `.css`. Your current approach looks valid, but here are a few things to ensure:
1. **Correct HTTP Response**: The CGI script must return the correct HTTP headers for the response. Specifically, it... | 32,445 | [
{
"from": "human",
"value": "Is there any way of pulling in a CSS stylesheet into FireFox 2 or 3 that is not a static file? \nBellow is the code we are using to pull in a stylesheet dynamically generated by a CGI script.\n<link rel=\"stylesheet\" href=\"/cgi-bin/Xebra?ShowIt&s=LH4X6I2l4fSYwf4pky4k&shw=795... |
Note: Mathematical expression evaluation is not the focus of this question. I want to compile and execute new code at runtime in .NET. That being said...
I would like to allow the user to enter any equation, like the following, into a text box:
x = x / 2 * 0.07914
x = x^2 / 5
And have that equation applied to incomi... | Yes, it's certainly possible to compile and execute code at runtime in .NET. One of the approaches you can use is the Roslyn compiler, which is part of the .NET Compiler Platform. Roslyn provides APIs for compiling C# code dynamically, and it's ideal for scenarios like yours where you want to convert user-input equatio... | 23,491 | [
{
"from": "human",
"value": "Note: Mathematical expression evaluation is not the focus of this question. I want to compile and execute new code at runtime in .NET. That being said...\nI would like to allow the user to enter any equation, like the following, into a text box:\nx = x / 2 * 0.07914\nx = x^2 /... |
A coworker of mine has had issue with Mootools being backward compatible and I was wondering if anyone else had noticed this? He said that his main problem was when trying to using the drag and drop functionality offered in an older version. I never really looked into it myself, but when I mentioned it when asking the... | Yes, there have been reports of backward compatibility issues with MooTools, particularly when transitioning between major versions. These issues can manifest when older functionality, such as drag-and-drop features, is either altered or deprecated in newer versions of the library. While MooTools aims to maintain a lev... | 34,725 | [
{
"from": "human",
"value": "A coworker of mine has had issue with Mootools being backward compatible and I was wondering if anyone else had noticed this? He said that his main problem was when trying to using the drag and drop functionality offered in an older version. I never really looked into it myself... |
I'm using Emgu.CV which is a C# wrapper for the OpenCV libraries.
I changed the Emgu.CV source to invoke from the latest OpenCV library cv110.dll instead of cv100.dll and now I get this error (where ????? is cv110.dll). I have placed the cv110.dll file in all the same locations as the cv100.dll file however this does ... | When you're encountering issues with DLL loading in a .NET application using Emgu.CV, there are a few things to keep in mind regarding how the .NET runtime and Windows handle DLLs. Here’s a breakdown of how DLL search works, along with potential reasons for the error you’re experiencing:
### DLL Search Order
Windows u... | 32,387 | [
{
"from": "human",
"value": "I'm using Emgu.CV which is a C# wrapper for the OpenCV libraries. \nI changed the Emgu.CV source to invoke from the latest OpenCV library cv110.dll instead of cv100.dll and now I get this error (where ????? is cv110.dll). I have placed the cv110.dll file in all the same location... |
I am working on a small parser that should accept input in a number of languages. I am going to have maybe 50 strings that will serve as keywords/anchors in parsing the input. In PHP, what would be the best way to organize these translated keywords?
One possible solution that comes to my mind is to use an associative ... | Using an associative array in PHP to store translated keywords is indeed a solid and straightforward approach. It is easy to understand and maintain, especially for a small number of keywords. However, there are a few best practices and enhancements you can consider to make your implementation more robust and scalable.... | 29,333 | [
{
"from": "human",
"value": "I am working on a small parser that should accept input in a number of languages. I am going to have maybe 50 strings that will serve as keywords/anchors in parsing the input. In PHP, what would be the best way to organize these translated keywords? \nOne possible solution that ... |
I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with :: or leading zeros omitted from each byte pair).
Can someone suggest a regular expression that would fulfill the requirement?
I'm considering expanding each byte pair and matching the res... | Certainly! Writing a regular expression to match valid IPv6 addresses can be tricky due to the various formats they can take. Below is a regular expression that should handle the full range of valid IPv6 formats, including compressed forms and omitted leading zeros.
Here’s a regex pattern for matching valid IPv6 addre... | 6,836 | [
{
"from": "human",
"value": "I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with :: or leading zeros omitted from each byte pair). \nCan someone suggest a regular expression that would fulfill the requirement?\nI'm considering ex... |
Using the client-side ASP.NET AJAX library, I have created an instance of a client component with the $create shortcut-method (http://msdn.microsoft.com/da-dk/library/bb397487(en-us).aspx). The object is attached to a DOM element. Now I need to get a reference to the instance, but it is neither registered on window or ... | In ASP.NET AJAX, when you create an instance of a client component using the `$create` method, the instance is not automatically exposed in a way that you can easily retrieve it later through global variables or directly from the DOM element. However, there are a few ways to keep track of your client component instance... | 30,453 | [
{
"from": "human",
"value": "Using the client-side ASP.NET AJAX library, I have created an instance of a client component with the $create shortcut-method (http://msdn.microsoft.com/da-dk/library/bb397487(en-us).aspx). The object is attached to a DOM element. Now I need to get a reference to the instance, b... |
I am looking for a way to truncate a string in Python that will not cut off the string in the middle of a word.
For example:
Original: "This is really awesome."
"Dumb" truncate: "This is real..."
"Smart" truncate: "This is really..."
I'm looking for a way to accomplish the "smart" truncate from above.
| To achieve a "smart" truncation of a string in Python, where you ensure that the string does not cut off in the middle of a word, you can follow these steps:
1. Determine the maximum length of the string you want to allow, including the truncation suffix (like "...").
2. Split the string into words and iteratively bui... | 34,350 | [
{
"from": "human",
"value": "I am looking for a way to truncate a string in Python that will not cut off the string in the middle of a word.\nFor example:\n\nOriginal: \"This is really awesome.\"\n\"Dumb\" truncate: \"This is real...\"\n\"Smart\" truncate: \"This is really...\"\n\nI'm looking fo... |
In short: How do you specify a BIGINT in Django models?
In a current project I am doing using Django (0.97-svn release), I've all the integer fields in all the models defined as IntegerField. It was working immaculately during the development cycle where I was using SQLite for the DB backend. However, as soon as I rol... | In Django, if you want to specify a `BIGINT` field in your models, you should use the `BigIntegerField`. This field is specifically designed to handle large integers that exceed the limits of a standard `IntegerField`.
Here is how you can define a `BigIntegerField` in your Django model:
```python
from django.db impor... | 35,016 | [
{
"from": "human",
"value": "In short: How do you specify a BIGINT in Django models?\nIn a current project I am doing using Django (0.97-svn release), I've all the integer fields in all the models defined as IntegerField. It was working immaculately during the development cycle where I was using SQLite for... |
I've got a project which requires a fairly complicated process and I want to make sure I know the best way to do this. I'm using ASP.net C# with Adobe Flex 3. The app server is Mosso (cloud server) and the file storage server is Amazon S3. The existing site can be viewed at NoiseTrade.com
I need to do this:
Allow user... | It looks like you have a solid plan for uploading MP3 files to your app server and then creating a zip file for Amazon S3. However, as you've pointed out, the challenge of handling updates to the uploaded tracks can complicate things. Here are some suggestions to help you improve your approach:
### Suggested Approach:... | 31,603 | [
{
"from": "human",
"value": "I've got a project which requires a fairly complicated process and I want to make sure I know the best way to do this. I'm using ASP.net C# with Adobe Flex 3. The app server is Mosso (cloud server) and the file storage server is Amazon S3. The existing site can be viewed at Nois... |
I want my Qt application to be able to save simple vector graphics to clipboard in a compatible way. On windows I want to be able to paste the graphics into Microsoft Word or Powerpoint. On Linux I want to be compatible with the Open Office.
Which format would you recommend? Can Qt generate EMF in an easy way? Is SVG ... | To achieve compatibility for your Qt application with Microsoft Word and PowerPoint on Windows, as well as with OpenOffice on Linux, you'll want to choose a graphic format that can be universally recognized by these applications. Here’s a breakdown of the options:
### Recommended Formats
1. **EMF (Enhanced Metafile)*... | 31,039 | [
{
"from": "human",
"value": "I want my Qt application to be able to save simple vector graphics to clipboard in a compatible way. On windows I want to be able to paste the graphics into Microsoft Word or Powerpoint. On Linux I want to be compatible with the Open Office. \nWhich format would you recommend? C... |
I have a C# .NET web project that I'm currently working on. What I'm trying to do is read some files that I dropped into a dir which is at the same level as fileReader.cs which is attempting to read them. On a normal desktop app the following would work:
DirectoryInfo di = new DirectoryInfo(./myDir);
However because... | In a C# .NET web project, particularly an ASP.NET application, you must consider the execution context and security restrictions. The context in which your code runs can vary significantly from a desktop application, especially regarding file access.
### Accessing Files in ASP.NET
To read files from a directory in a ... | 30,986 | [
{
"from": "human",
"value": "I have a C# .NET web project that I'm currently working on. What I'm trying to do is read some files that I dropped into a dir which is at the same level as fileReader.cs which is attempting to read them. On a normal desktop app the following would work:\nDirectoryInfo di = ne... |
I have always been a very big fan of the DHTML calendar http://www.dynarch.com/projects/calendar/
I was planning on using this for an upcoming project in ASP.NET, but I wouldn't mind finding a new calendar control that is specifically made as a ASP.NET user control.
Does anyone know of some good ones out there that I s... | There are several ASP.NET calendar controls available that you can consider for your project. Here are some popular ones:
1. **ASP.NET Calendar Control (built-in)**: The built-in Calendar control in ASP.NET Web Forms provides basic functionality and can be a good starting point for simpler applications. It's customiza... | 32,181 | [
{
"from": "human",
"value": "I have always been a very big fan of the DHTML calendar http://www.dynarch.com/projects/calendar/\nI was planning on using this for an upcoming project in ASP.NET, but I wouldn't mind finding a new calendar control that is specifically made as a ASP.NET user control.\nDoes anyon... |
I know we can do like mget *.xml which will download all xml files. But how is it possible that we using mget with certain file name patterns. can we do something like *SS.xml which mean it will download all files ending with SS.xml?
| Yes, you can use the `mget` command in FTP (File Transfer Protocol) clients to download files based on specific patterns, including those that match a specific suffix.
In your example, using `mget *SS.xml` would indeed work to download all files that end with `SS.xml` from the current directory on the remote FTP serve... | 26,927 | [
{
"from": "human",
"value": "I know we can do like mget *.xml which will download all xml files. But how is it possible that we using mget with certain file name patterns. can we do something like *SS.xml which mean it will download all files ending with SS.xml?\n"
},
{
"from": "gpt",
"value": "... |
The installer sets up a default DB (if one doesn't already exist) and I want to exclude that from the uninstall process (Or have the user option to remove it or not, once I take the time to figure out customizing the GUI)
Seems like best practice would be to just create the DB at runtime rather than install time, but f... | To conditionally manage the uninstallation of a default database in your MSI installer, you can use the `Remove` property and conditions in your WiX configuration. The general approach is to create a custom action that checks for the existence of the database during the uninstall process and then conditionally removes ... | 30,734 | [
{
"from": "human",
"value": "The installer sets up a default DB (if one doesn't already exist) and I want to exclude that from the uninstall process (Or have the user option to remove it or not, once I take the time to figure out customizing the GUI)\nSeems like best practice would be to just create the DB ... |
I've created a VSTO in C# that is supposed to hook Outlook 2007's NewMailEx event. However, it doesn't fire sometimes when I do a manual send/receive, or when there is only 1 unread mail in the inbox. It almost seems as if it fires on the inbox BEFORE the message actually arrives.
Is there a better way of monitoring fo... | When working with Outlook and trying to handle new emails, using the `NewMailEx` event can be problematic for the reasons you've mentioned. It may not always trigger as expected, particularly in cases of manual send/receive operations or when there are specific mailbox states.
Here are some alternatives and strategies... | 31,530 | [
{
"from": "human",
"value": "I've created a VSTO in C# that is supposed to hook Outlook 2007's NewMailEx event. However, it doesn't fire sometimes when I do a manual send/receive, or when there is only 1 unread mail in the inbox. It almost seems as if it fires on the inbox BEFORE the message actually arrive... |
Perl and PHP do this with backticks. For example,
$output = `ls`;
Returns a directory listing. A similar function, system("foo"), returns the operating system return code for the given command foo. I'm talking about a variant that returns whatever foo prints to stdout.
How do other languages do this? Is there a canoni... | In various programming languages, executing a system command and capturing its output can be done in different ways, and there is no universally canonical name for this functionality. However, different languages have their own idiomatic methods for achieving it. Here are a few examples:
### 1. **Python**
In Python, y... | 31,561 | [
{
"from": "human",
"value": "Perl and PHP do this with backticks. For example,\n$output = `ls`;\n\nReturns a directory listing. A similar function, system(\"foo\"), returns the operating system return code for the given command foo. I'm talking about a variant that returns whatever foo prints to stdout.\nHo... |
Is there a way to include all the jar files within a directory in the classpath?
I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars. Do I need to add each jar file to the classpath separately?
| The way you're trying to use wildcard `*` in the classpath with `java -classpath lib/*.jar:.` is actually a common point of confusion in many environments.
In the command line, wildcards like `*` do not get expanded by the Java Runtime Environment (JRE) itself. Instead, they are expanded by the shell (like bash or cmd... | 31,583 | [
{
"from": "human",
"value": "Is there a way to include all the jar files within a directory in the classpath?\nI'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars. Do I need to add each jar file to the classpath separately? \n"
... |
We would like to enumerate all strings in a resource file in .NET (resx file). We want this to generate a javascript object containing all these key-value pairs. We do this now for satellite assemblies with code like this (this is VB.NET, but any example code is fine):
Dim rm As ResourceManager
rm = New ResourceManager... | It looks like you've implemented a custom `ResXResourceManager` to handle resource files in a .NET application, allowing you to enumerate the strings in a `.resx` file similar to how you'd do it with satellite assemblies.
Below is an example of how you can use your `ResXResourceManager` class to read all the key-valu... | 30,087 | [
{
"from": "human",
"value": "We would like to enumerate all strings in a resource file in .NET (resx file). We want this to generate a javascript object containing all these key-value pairs. We do this now for satellite assemblies with code like this (this is VB.NET, but any example code is fine):\nDim rm A... |
I'm using the contentEditable attribute on a DIV element in Firefox 3.03. Setting it to true allows me to edit the text content of the DIV, as expected.
Then, when I set contentEditable to "false", the div is no longer editable, also as expected.
However the flashing caret (text input cursor) remains visible even th... | It seems you've encountered a known issue with the handling of the caret in `contentEditable` elements in older versions of Firefox, including Firefox 3.03. The caret remaining visible even after setting `contentEditable` to `false` is a rendering glitch that can occur in some situations.
Here are a few approaches you... | 32,203 | [
{
"from": "human",
"value": "I'm using the contentEditable attribute on a DIV element in Firefox 3.03. Setting it to true allows me to edit the text content of the DIV, as expected.\nThen, when I set contentEditable to \"false\", the div is no longer editable, also as expected. \nHowever the flashing care... |
I'm looking for a method to acurately determine if an interface is the physical 802.3 ethernet port on a pc in windows.
Using ipconfig /all I can list all the interfaces, and when I do this on my pc several entries can be listed here including VPN, Bluetooth, Wifi and the physical ethernet interface.
I'm looking for so... | Determining whether a network interface is a physical Ethernet port or a virtual one can be tricky, especially with the presence of virtual adapters created by virtualization software. While you’ve already explored various methods, I will summarize a few approaches you can take to differentiate physical network interfa... | 26,491 | [
{
"from": "human",
"value": "I'm looking for a method to acurately determine if an interface is the physical 802.3 ethernet port on a pc in windows.\nUsing ipconfig /all I can list all the interfaces, and when I do this on my pc several entries can be listed here including VPN, Bluetooth, Wifi and the physi... |
Html.TextBox("ParentPassword", "", new { @class = "required" })
what the gosh darned heck is the @ for the @class.
| In the context of ASP.NET MVC, the `@` symbol is used to denote that what follows is a code expression. When you see `@class`, it's specifying that you want to use the HTML attribute `class` in the anonymous object being passed as the third argument to the `Html.TextBox` method.
Since `class` is a reserved keyword in ... | 35,504 | [
{
"from": "human",
"value": "Html.TextBox(\"ParentPassword\", \"\", new { @class = \"required\" })\nwhat the gosh darned heck is the @ for the @class.\n"
},
{
"from": "gpt",
"value": "In the context of ASP.NET MVC, the `@` symbol is used to denote that what follows is a code expression. When you... |
For my Django app I have Events, Ratings, and Users. Ratings are related to Events and Users through a foreign keys. When displaying a list of Events I want to filter the ratings of the Event by a user_id so I know if an event has been rated by the user.
If I do:
event_list = Event.objects.filter(rating__user=request... | Certainly! In Django, you can achieve the equivalent of the SQL query you provided using `annotate()` along with a `Subquery` or `OuterRef`. This allows you to fetch all events and include the information about whether they have been rated by a specific user.
Here's how you can do it:
### Using `annotate` with `Outer... | 34,206 | [
{
"from": "human",
"value": "For my Django app I have Events, Ratings, and Users. Ratings are related to Events and Users through a foreign keys. When displaying a list of Events I want to filter the ratings of the Event by a user_id so I know if an event has been rated by the user. \nIf I do:\nevent_list ... |
and to spice things a bit , what is the best approach for globalization in Asp.net Mvc App
| Globalization in an ASP.NET MVC application is essential for creating applications that can cater to users from different locales and cultures. Here are the best approaches to achieve globalization in an ASP.NET MVC app:
### 1. **Use Resource Files (.resx)**
- **Create Resource Files**: Use `.resx` files to store l... | 29,947 | [
{
"from": "human",
"value": "and to spice things a bit , what is the best approach for globalization in Asp.net Mvc App \n"
},
{
"from": "gpt",
"value": "Globalization in an ASP.NET MVC application is essential for creating applications that can cater to users from different locales and cultures... |
I have reasonable experience to manage my own server, so gogrid style management is not a problem. But seems mosso is a tag cheaper somewhat- except the very difficult to access compute cycles terms. Anyone could share about this would be very welcomed.
| It sounds like you are considering cloud hosting options and comparing GoGrid and Mosso (now known as Rackspace Cloud). Here are some points to consider based on your experience and the services offered by both:
### GoGrid
- **Control**: GoGrid provides a cloud infrastructure that allows for fine-grained control over ... | 31,195 | [
{
"from": "human",
"value": "I have reasonable experience to manage my own server, so gogrid style management is not a problem. But seems mosso is a tag cheaper somewhat- except the very difficult to access compute cycles terms. Anyone could share about this would be very welcomed.\n"
},
{
"from": "... |
Has anyone else run into this problem before? I've got a method that calls a generic method with a delegate, inside of a generic class. I've marked the class as Serializable, and it serializes without complaint. But, when I try to deserialize an object of this class, it pegs the CPU and hangs the machine.
Code example:... | The issue you're encountering with the deserialization of your `SDictionary<TKey, TValue>` class is likely related to the delegate being non-serializable. Delegates hold references to methods and those methods are not guaranteed to be serializable, which can lead to problems when attempting to serialize/deserialize obj... | 30,855 | [
{
"from": "human",
"value": "Has anyone else run into this problem before? I've got a method that calls a generic method with a delegate, inside of a generic class. I've marked the class as Serializable, and it serializes without complaint. But, when I try to deserialize an object of this class, it pegs the... |
I have a Visual Basic .NET program which needs to open and close an Excel spreadsheet. Opening and reading the spreadsheet work fine, but trying to close the Excel 2007 application causes it to hang. It seems to close, but if you look in the task manager the application is still running. The code that I'm using to c... | When automating Excel through Visual Basic .NET, it's important to ensure that all references to Excel objects are properly released to avoid the Excel application hanging or remaining in memory. Here are some steps to ensure proper closing of Excel:
1. **Release all COM objects:** In addition to setting your workbook... | 31,819 | [
{
"from": "human",
"value": "I have a Visual Basic .NET program which needs to open and close an Excel spreadsheet. Opening and reading the spreadsheet work fine, but trying to close the Excel 2007 application causes it to hang. It seems to close, but if you look in the task manager the application is sti... |
I've got a WordPress powered blog that I'm trying to get setup on our IIS6 server and everything works besides the permalink structure which I'm having a big headache with.
After googling around/wordpress codex I learned that it's because IIS6 doesn't have the equivalent of Apache's mod_rewrite which is required for th... | Getting pretty permalinks to work on an IIS6 server can be a challenge since it doesn't have built-in support for mod_rewrite like Apache does. However, you can achieve a similar functionality by utilizing URL rewriting through ISAPI Rewrite or by modifying your `web.config` and using custom scripts. Here are a few met... | 17,634 | [
{
"from": "human",
"value": "I've got a WordPress powered blog that I'm trying to get setup on our IIS6 server and everything works besides the permalink structure which I'm having a big headache with.\nAfter googling around/wordpress codex I learned that it's because IIS6 doesn't have the equivalent of Apa... |
I'm getting this error on a compact framework form.
"code generation for property 'inputControl' failed. Error was: 'object reference not set to an instance of an object.'"
Anyone have any idea why? It just started and was never an issue before.
| The error message you're encountering in your Compact Framework form suggests that there is a problem with the code generation for the property `inputControl`. The specific error message "object reference not set to an instance of an object" indicates that there is likely an attempt to access an object that hasn't been... | 30,803 | [
{
"from": "human",
"value": "I'm getting this error on a compact framework form.\n\"code generation for property 'inputControl' failed. Error was: 'object reference not set to an instance of an object.'\"\nAnyone have any idea why? It just started and was never an issue before. \n"
},
{
"from": "... |
I wish to ensure a user has access to an aspx page by 'Zone'. For example, "Financials" is a Security Zone which some users should not have access to.
The result should not involve patterns such as MVP, MVC, MVVM, etc. I'm looking for something that's light and quick to do.
To make things easier I have a base class whi... | To implement security zone checks in a light and quick way, you can leverage the base class you've mentioned for your ASPX pages. Here’s how you can accomplish this:
1. **Define Security Zones**: Create a simple enumeration or a static class to represent the different security zones, such as "Financials".
2. **User A... | 30,317 | [
{
"from": "human",
"value": "I wish to ensure a user has access to an aspx page by 'Zone'. For example, \"Financials\" is a Security Zone which some users should not have access to.\nThe result should not involve patterns such as MVP, MVC, MVVM, etc. I'm looking for something that's light and quick to do.\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.