instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm doing a custom 404 page for a large website that's undergoing a redesign. There are about 40 high-use pages that customers may have bookmarked, and our new site structure will break these bookmarks.
On my custom 404 page, I want to alert them to the new URL if they attempt to navigate to one of these high-use pa... | You're on the right track by considering a key/value pair data structure to map the old URLs (or keywords) to the new URLs. Using a dictionary is indeed a common and effective approach for this type of task. Let's break down the two options you mentioned:
### Dictionary vs. IDictionary
1. **Dictionary<TKey, TValue>**... | 21,958 | [
{
"from": "human",
"value": "I'm doing a custom 404 page for a large website that's undergoing a redesign. There are about 40 high-use pages that customers may have bookmarked, and our new site structure will break these bookmarks. \nOn my custom 404 page, I want to alert them to the new URL if they attem... |
On my website, I have several html files I do not link off the main portal page. Without other people linking to them, is it possible for Jimmy Evil Hacker to find them?
| Yes, it is possible for an individual with malicious intent, like "Jimmy Evil Hacker," to find HTML files on your website that are not linked from your main portal page. Here are several methods that can be used:
1. **Web Crawling**: Search engines or web crawlers might index your pages if they are accessible via URLs... | 30,369 | [
{
"from": "human",
"value": "On my website, I have several html files I do not link off the main portal page. Without other people linking to them, is it possible for Jimmy Evil Hacker to find them?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible for an individual with malicious intent, lik... |
We are using Hibernate Spring MVC with OpenSessionInView filter.
Here is a problem we are running into (pseudo code)
transaction 1
load object foo
transaction 1 end
update foo's properties (not calling session.save or session.update but only foo's setters)
validate foo (using hibernate validator)
if validation fails... | The problem you're encountering is a known issue when using the OpenSessionInView pattern combined with Hibernate's session management. Because you're keeping the same session open for the entire duration of the HTTP request, any changes made to entities in the session can inadvertently affect subsequent operations, ev... | 25,301 | [
{
"from": "human",
"value": "We are using Hibernate Spring MVC with OpenSessionInView filter.\nHere is a problem we are running into (pseudo code)\ntransaction 1 \nload object foo\ntransaction 1 end\n\nupdate foo's properties (not calling session.save or session.update but only foo's setters)\n\nvalidate fo... |
I know a role name and want to find all users in this role.
How do I acheive this in SQL Server 2000 (in the SQL script, not in Management Studio or other tool)?
| In SQL Server 2000, you can query the system tables to find users associated with a specific role. The relevant tables include `sysusers` and `sysmembers`.
Here's a SQL script that retrieves all users in a specified role:
```sql
-- Specify the role name you are interested in
DECLARE @RoleName NVARCHAR(128)
SET @Role... | 29,362 | [
{
"from": "human",
"value": "I know a role name and want to find all users in this role. \nHow do I acheive this in SQL Server 2000 (in the SQL script, not in Management Studio or other tool)?\n"
},
{
"from": "gpt",
"value": "In SQL Server 2000, you can query the system tables to find users asso... |
I'm writing a WinForms app which has two modes: console or GUI. Three projects within the same solution, one for the console app, one for the UI forms and the third to hold the logic that the two interfaces will both connect too. The Console app runs absolutely smoothly.
A model which holds the user-selections, it ha... | The issue you're experiencing with accessing the `DataGridView` from a different thread stems from the nature of how Windows Forms manages its controls. Windows Forms is not thread-safe, meaning that controls (like `DataGridView`) can only be accessed from the thread they were created on, which is usually the main UI t... | 25,919 | [
{
"from": "human",
"value": "I'm writing a WinForms app which has two modes: console or GUI. Three projects within the same solution, one for the console app, one for the UI forms and the third to hold the logic that the two interfaces will both connect too. The Console app runs absolutely smoothly. \nA mo... |
I would to change the menuitems in the default context menu provided in the Web Browser Control. I have already tried: webbrowser.contextmenu = mycontextmenu.
Nothing changed. Is there a way to do this?
| The Web Browser Control in Windows Forms does not provide built-in support for modifying the default context menu directly. However, you can achieve the desired effect by handling the `ContextMenuStrip` and suppressing the default context menu.
Here's how you can create a custom context menu for a Web Browser Control ... | 26,053 | [
{
"from": "human",
"value": "I would to change the menuitems in the default context menu provided in the Web Browser Control. I have already tried: webbrowser.contextmenu = mycontextmenu.\nNothing changed. Is there a way to do this?\n"
},
{
"from": "gpt",
"value": "The Web Browser Control in Win... |
We're using MyFaces, Richfaces & Restfaces to build a website on top of Oracle Stellant CMS. We're not using Site Studio. Are there any widgets/combination of widgets out there that could provide a unified navigation system? The site structure needs to be read from a DB table and CMS metadata fields, and we need a top ... | Creating a unified navigation system with MyFaces, RichFaces, and RestFaces while leveraging Oracle Stellent CMS is a complex but achievable task. Below, I’ll outline a potential approach using a combination of RichFaces and custom logic to provide the required features: a top tab menu, expandable sidebar menu, breadcr... | 22,722 | [
{
"from": "human",
"value": "We're using MyFaces, Richfaces & Restfaces to build a website on top of Oracle Stellant CMS. We're not using Site Studio. Are there any widgets/combination of widgets out there that could provide a unified navigation system? The site structure needs to be read from a DB table an... |
I have a local user, which is member of Administrators local group.
When I run this code:
using System;
using System.DirectoryServices;
namespace nanttest
{
class Program
{
public static void Main(string[] args)
{
using(DirectoryEntry entry = new DirectoryEntry("IIS://localhost/W3SV... | The `COMException` with the error code `0x80070005` (Access Denied) suggests that the user running the code does not have sufficient permissions to access the IIS metabase on your local machine. Even though your user is a member of the local Administrators group, the IIS metabase has its own security settings that can ... | 31,924 | [
{
"from": "human",
"value": "I have a local user, which is member of Administrators local group.\nWhen I run this code:\nusing System;\nusing System.DirectoryServices;\n\nnamespace nanttest\n{\n class Program\n {\n public static void Main(string[] args)\n {\n using(DirectoryEn... |
I am familiar with C++ RTTI, and find the concept interesting.
Still there exist a lot of more ways to abuse it than to use it correctly (the RTTI-switch dread comes to mind). As a developer, I found (and used) only two viable uses for it (more exactly, one and a half).
Could you share some of the ways RTTI is a viable... | C++'s Runtime Type Information (RTTI) provides valuable tools for managing polymorphism, especially when dealing with class hierarchies. Although it's essential to use it judiciously, there are scenarios where RTTI can be beneficial. Below are several viable uses for RTTI, complete with example code to illustrate each ... | 24,271 | [
{
"from": "human",
"value": "I am familiar with C++ RTTI, and find the concept interesting.\nStill there exist a lot of more ways to abuse it than to use it correctly (the RTTI-switch dread comes to mind). As a developer, I found (and used) only two viable uses for it (more exactly, one and a half).\nCould ... |
I know it is a good practice to declare virtual destructors for base classes in C++, but is it always important to declare virtual destructors even for abstract classes that function as interfaces? Please provide some reasons and examples why.
| In C++, declaring a virtual destructor in a base class is crucial when using polymorphism, particularly in scenarios where derived classes might be instantiated and deleted through a base class pointer. This ensures that the correct destructor is called, preventing resource leaks or undefined behavior.
When dealing wi... | 31,330 | [
{
"from": "human",
"value": "I know it is a good practice to declare virtual destructors for base classes in C++, but is it always important to declare virtual destructors even for abstract classes that function as interfaces? Please provide some reasons and examples why.\n"
},
{
"from": "gpt",
... |
I have created an application which needs 'hand-over' to the support group in the next month.
The application is fairly small (2 months development), and consists of two client side applications and a database, it's written in c# for the windows platform.
I have a broad idea of what to include in a support document, bu... | Creating a thorough and organized support document is essential for a smooth handover of your application to the support group. Here's a comprehensive list of items to include, along with additional suggestions to make the support process more manageable.
### Essential Contents of a Support Document
1. **Application ... | 24,433 | [
{
"from": "human",
"value": "I have created an application which needs 'hand-over' to the support group in the next month.\nThe application is fairly small (2 months development), and consists of two client side applications and a database, it's written in c# for the windows platform.\nI have a broad idea o... |
My database consists of 3 tables (one for storing all items, one for the tags, and one for the relation between the two):
Table: Post
Columns: PostID, Name, Desc
Table: Tag
Columns: TagID, Name
Table: PostTag
Columns: PostID, TagID
What is the best way to save a space separated string (e.g. "smart funny wonderful") int... | To save a space-separated string of tags (e.g., "smart funny wonderful") into the three database tables (`Post`, `Tag`, and `PostTag`), you will need to follow these steps:
### 1. Save the Post
First, save the post information into the `Post` table if it does not already exist. This will provide you with a `PostID`.
... | 27,548 | [
{
"from": "human",
"value": "My database consists of 3 tables (one for storing all items, one for the tags, and one for the relation between the two):\nTable: Post\nColumns: PostID, Name, Desc\nTable: Tag\nColumns: TagID, Name\nTable: PostTag\nColumns: PostID, TagID\nWhat is the best way to save a space sep... |
So I'm trying to figure out how the Form's AutoScaleMode property can possibly help to support a system with a font or DPI that is different from my work development machine.
From the SDK:
AutoScaleMode Enumeration
public enum AutoScaleMode
None
Automatic scaling is disabled.
Font
Controls scale relativ... | When developing Windows Forms applications, it is indeed important to ensure that your UI scales properly across different DPI settings and font settings to provide a good user experience. While the `AutoScaleMode` property can help, it's often not enough by itself to fully support different configurations. Here are so... | 27,518 | [
{
"from": "human",
"value": "So I'm trying to figure out how the Form's AutoScaleMode property can possibly help to support a system with a font or DPI that is different from my work development machine.\nFrom the SDK:\n\nAutoScaleMode Enumeration\npublic enum AutoScaleMode\nNone \n Automatic scaling is ... |
I have the following javascript:
$.ajax({
type: "POST",
dataType: "json",
url: "/Home/Submit",
data: {
email: strEmail,
message: strMessage
},
success: function(result) {
//alert('here');
alert(result.message);
},
error: function(error) {
alert(error);
}
});
This makes a call to t... | The issue you are experiencing where the JavaScript AJAX call works in debug mode but fails when accessing the virtual directory directly could be due to several factors. Here are some troubleshooting steps and considerations:
### Troubleshooting the AJAX Call:
1. **Check URL**: Make sure the URL (`/Home/Submit`) is ... | 27,601 | [
{
"from": "human",
"value": "I have the following javascript:\n$.ajax({\n type: \"POST\",\n dataType: \"json\",\n url: \"/Home/Submit\",\n data: {\n email: strEmail,\n message: strMessage\n },\n success: function(result) {\n //alert('here');\n alert(result.message);\n },\n error: functio... |
This question exists because it has
historical significance, but it is not
considered a good, on-topic question
for this site, so please do not use it
as evidence that you can ask similar
questions here.
More info: https://stackoverflow.com/faq
There are always features that would be useful in fringe scen... | While many programming concepts and features are covered in textbooks, there are indeed several lesser-known or fringe features that can be quite useful. Here are some examples across different programming languages:
### Python
1. **Decorators**: Functions that modify the behavior of another function. They are great f... | 13,570 | [
{
"from": "human",
"value": "\nThis question exists because it has\n historical significance, but it is not\n considered a good, on-topic question\n for this site, so please do not use it\n as evidence that you can ask similar\n questions here.\nMore info: https://stackoverflow.com/faq\n\n\nThere are ... |
I've tried this, but it doesn't work:
col * format a20000
Do I really have to list every column specifically? That is a huge pain in the arse.
| It sounds like you're trying to apply a format to multiple columns in a data management or statistical software environment, perhaps in SAS. In many programming languages and environments, you can apply a format to multiple columns without listing each one individually, but the exact syntax will depend on the software ... | 30,668 | [
{
"from": "human",
"value": "I've tried this, but it doesn't work:\ncol * format a20000\n\nDo I really have to list every column specifically? That is a huge pain in the arse.\n"
},
{
"from": "gpt",
"value": "It sounds like you're trying to apply a format to multiple columns in a data managemen... |
I'd like to use the newer <button> tag in an ASP.NET website which, among other things, allows CSS-styled text and embedding a graphic inside the button. The asp:Button control renders as <input type="button">, is there any way to make a preexisting control render to <button>?
From what I've read there is an incompatib... | Creating a custom ASP.NET server control that renders as a `<button>` tag can be a bit involved, especially if you want to maintain the existing functionality of ASP.NET's postback mechanism and Command handling. Here's a structured approach to build such a control, which I'll call `ModernButton`.
### Step 1: Define t... | 24,486 | [
{
"from": "human",
"value": "I'd like to use the newer <button> tag in an ASP.NET website which, among other things, allows CSS-styled text and embedding a graphic inside the button. The asp:Button control renders as <input type=\"button\">, is there any way to make a preexisting control render to <button>?... |
I have a really simple WPF UserControl:
<UserControl x:Class="dr.SitecoreCompare.WPF.ConnectionEntry"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="connEntry"
BorderBrush="Navy" BorderThickness="1" Margin="5,0,0,5" >
<StackPanel Margin... | The issue you're experiencing, where the second `TextBox` (`txtDatabase`) in the second instance of your `UserControl` cannot be selected, might be due to the data binding of the `DatabaseName` property. If the property isn't implemented correctly, it could lead to unexpected behavior, including inability to focus the ... | 28,662 | [
{
"from": "human",
"value": "I have a really simple WPF UserControl:\n<UserControl x:Class=\"dr.SitecoreCompare.WPF.ConnectionEntry\"\nxmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\nxmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \nx:Name=\"connEntry\" \nBorderBrush=\"Navy\" B... |
is there a quick way to sort the items of a select element?
Or I have to resort to writing javascript?
Please any ideas.
<select size="4" name="lstALL" multiple="multiple" id="lstALL" tabindex="12" style="font-size:XX-Small;height:95%;width:100%;">
<option value="0"> XXX</option>
<option value="1203">ABC</option>
<opti... | There isn't a built-in HTML attribute or CSS property that automatically sorts the items of a `<select>` element. If you need the items to be sorted, you'll indeed have to resort to JavaScript to do it dynamically. Here's a quick way to sort the options in a `<select>` element using JavaScript:
### Example JavaScript ... | 29,907 | [
{
"from": "human",
"value": "is there a quick way to sort the items of a select element?\nOr I have to resort to writing javascript?\nPlease any ideas.\n<select size=\"4\" name=\"lstALL\" multiple=\"multiple\" id=\"lstALL\" tabindex=\"12\" style=\"font-size:XX-Small;height:95%;width:100%;\">\n<option value=... |
I'd like to change this:
<a href='foo'>
<div> Moo </div>
</a>
to be standards compliant (you're not supposed to have block elements in inline elements). Wiring javascript to the divs just for navigation seems like a hack and degrades accessibility.. In this case, my requirements are for 2 sets of borders on my fi... | To make your code standards compliant while still achieving your design goals, you should avoid placing a block-level element (`<div>`) inside an inline element (`<a>`). Instead, you can use CSS to style the `<a>` tag as a block-level element, which allows you to achieve your desired layout without violating HTML stand... | 30,111 | [
{
"from": "human",
"value": "I'd like to change this:\n<a href='foo'> \n <div> Moo </div>\n</a>\n\nto be standards compliant (you're not supposed to have block elements in inline elements). Wiring javascript to the divs just for navigation seems like a hack and degrades accessibility.. In this case, my r... |
Of the two methods below, which do you prefer to read?
Is there another (better?) way to check if a flag is set?
bool CheckFlag(FooFlag fooFlag)
{
return fooFlag == (this.Foo & fooFlag);
}
And
bool CheckFlag(FooFlag fooFlag)
{
return (this.Foo & fooFlag) != 0;
}
Please vote up the method you prefer... | Between the two methods you provided for checking if a flag is set, I prefer the second method:
```csharp
bool CheckFlag(FooFlag fooFlag)
{
return (this.Foo & fooFlag) != 0;
}
```
### Reasons for Preference:
1. **Simplicity**: The second method is more straightforward and easier to read. It directly checks if th... | 33,016 | [
{
"from": "human",
"value": "Of the two methods below, which do you prefer to read?\nIs there another (better?) way to check if a flag is set?\n bool CheckFlag(FooFlag fooFlag)\n {\n return fooFlag == (this.Foo & fooFlag);\n }\n\nAnd\n bool CheckFlag(FooFlag fooFlag)\n {\n return (this.Foo & fooFl... |
There are times when I want to use mootools for certain things and Prototype & script.aculo.us for others but within the same site. I've even considered adding others, but was concerned about conflicts. Anyone have experience, or am I just trying to make things too complicated for myself?
| Using multiple JavaScript libraries on the same site can certainly introduce complexities and potential conflicts, but it is definitely feasible with some care. Here are some considerations and tips for successfully using MooTools and Prototype (along with Script.aculo.us) together:
### 1. **Namespace Conflicts:**
... | 30,146 | [
{
"from": "human",
"value": "There are times when I want to use mootools for certain things and Prototype & script.aculo.us for others but within the same site. I've even considered adding others, but was concerned about conflicts. Anyone have experience, or am I just trying to make things too complicated... |
Related to https://stackoverflow.com/questions/139944/where-can-one-find-free-software-icons-images
I have a need for free weather-related icons. Specifically, I need icons that you might see in a ten-day forecast (clear day/night, rainy day/night, etc.) Where might I find such images?
Requirements: Like the author of... | Finding free weather-related icons that respect intellectual property rights can be done through a variety of resources. Here are some websites where you can find such icons, typically under Creative Commons licenses or other free-use licenses:
1. **Flaticon**: [flaticon.com](https://www.flaticon.com)
- Flaticon of... | 29,939 | [
{
"from": "human",
"value": "Related to https://stackoverflow.com/questions/139944/where-can-one-find-free-software-icons-images\nI have a need for free weather-related icons. Specifically, I need icons that you might see in a ten-day forecast (clear day/night, rainy day/night, etc.) Where might I find suc... |
I am trying to save data to a database on a button push, but the variables seem to be private by the nature of where they are defined. I have tried to move where they are defined, but this seems to produce other errors.
Given a fix, why was it fixed that way?
The code follows.
namespace enable
{
public partial clas... | The issue you are experiencing is due to the scope of the variables `adapter` and `dTable`. In your current implementation, these variables are defined inside the constructor of the `Form1` class, which means they have local scope and are not accessible outside of that constructor. Therefore, when you try to use `adapt... | 21,609 | [
{
"from": "human",
"value": "I am trying to save data to a database on a button push, but the variables seem to be private by the nature of where they are defined. I have tried to move where they are defined, but this seems to produce other errors.\nGiven a fix, why was it fixed that way?\nThe code follows.... |
I am using VS 2008/C# and binding a local List of helper classes as the DataSource for a DataGridView control. Calling the Remove() method on my List of helper classes fires the CellFormatting event of the DataGridView, which makes sense (a bit).
When removing whatever happens to be the DataBoundItem of the last row... | The behavior you're encountering with the `DataGridView` and the `CellFormatting` event can be tricky, especially when manipulating the underlying data source (like a `List<T>`) while the `DataGridView` is actively rendering its cells.
To resolve the `IndexOutOfRangeException`, there are several approaches you can con... | 28,347 | [
{
"from": "human",
"value": "I am using VS 2008/C# and binding a local List of helper classes as the DataSource for a DataGridView control. Calling the Remove() method on my List of helper classes fires the CellFormatting event of the DataGridView, which makes sense (a bit). \nWhen removing whatever happe... |
Required is the true language version of the OS, not the user interface language or the current locale settings.
Use case: software installation which has to apply security settings and user account creation. The scripts have to know certain system properties like user group names in the original language of the OS.
(S... | To determine the true language version of the Windows operating system, you can use various methods, such as querying the registry or using system commands. The following methods will help you identify the original language of the OS, regardless of the user interface language or current locale settings.
### Method 1: ... | 30,258 | [
{
"from": "human",
"value": "Required is the true language version of the OS, not the user interface language or the current locale settings.\nUse case: software installation which has to apply security settings and user account creation. The scripts have to know certain system properties like user group na... |
I need to do a join across two different database servers (IPs 10.0.0.50 and 10.0.0.51). What's the best way?
| Joining data across two different database servers can be a bit challenging since traditional SQL joins work within the same database. However, there are several approaches you can consider depending on the database systems you are using, their capabilities, and your requirements. Here are a few common methods:
### 1.... | 17,891 | [
{
"from": "human",
"value": "I need to do a join across two different database servers (IPs 10.0.0.50 and 10.0.0.51). What's the best way?\n"
},
{
"from": "gpt",
"value": "Joining data across two different database servers can be a bit challenging since traditional SQL joins work within the same... |
Is there support in Linq to SQL for submitting changes to a single object? The SubmitChanges method sends all of the changes to the database, but what if I'm associating with an errorlog table and only want to save the records going into the errorlog without submitting all of the changes to my other tables?
Example:
O... | In LINQ to SQL, the `SubmitChanges` method submits all changes made to the objects in the data context to the database. If you want to submit only the changes related to the `ActionError` entity without affecting the `Action` entity, using separate data contexts is indeed a common and effective approach.
### Using Sep... | 24,717 | [
{
"from": "human",
"value": "Is there support in Linq to SQL for submitting changes to a single object? The SubmitChanges method sends all of the changes to the database, but what if I'm associating with an errorlog table and only want to save the records going into the errorlog without submitting all of t... |
I've got an HTML "select" element which I'm updating dynamically with code something like this:
var selector = document.getElementById('selectorId');
for (var i = 0; i < data.length; ++i)
{
var opt = document.createElement('option');
opt.value = data[i].id;
opt.text = data[i].name;
selector.appendChild(opt)... | To ensure compatibility across browsers, especially in older ones like Internet Explorer 7, you may want to explicitly set the size of the `<select>` element or update its options in a way that forces a redraw. Here are a couple of approaches you can try to fix the issue with the resizing of the `<select>` element:
##... | 28,078 | [
{
"from": "human",
"value": "I've got an HTML \"select\" element which I'm updating dynamically with code something like this:\nvar selector = document.getElementById('selectorId'); \nfor (var i = 0; i < data.length; ++i)\n{\n var opt = document.createElement('option');\n opt.value = data[i].id;\n opt... |
I've been asked by my team leader to investigate MSMQ as an option for the new version of our product. We use SQL Service Broker in our current version. I've done my fair share of experimentation and Googling to find which product is better for my needs, but I thought I'd ask the best site I know for programming answer... | It's great to see that you've already done a thorough investigation into both MSMQ and SQL Service Broker. Based on the criteria you've provided, here are some additional considerations that might help solidify your choice or clarify your analysis:
### Message Durability and Reliability
- **MSMQ**: Messages in MSMQ ar... | 27,774 | [
{
"from": "human",
"value": "I've been asked by my team leader to investigate MSMQ as an option for the new version of our product. We use SQL Service Broker in our current version. I've done my fair share of experimentation and Googling to find which product is better for my needs, but I thought I'd ask th... |
cmd /C "myshortcut1.lnk"
cmd /C "myshortcut2.lnk"
Works, but gives me a pop-up DOS window which, when closed, kills my two loaded programs. Same is true for this:
start /B cmd /C "1.lnk"
start /B cmd /C "2.lnk"
start /B cmd /C "3.lnk"
start /B cmd /C "4.lnk"
| To run shortcuts without getting a pop-up DOS window and without terminating your programs when you close the window, you can use the `start` command without the `/B` option, as it will run the commands in a new console window, and then you can use the `/min` option to minimize it right away.
However, if you want to p... | 30,795 | [
{
"from": "human",
"value": "cmd /C \"myshortcut1.lnk\"\ncmd /C \"myshortcut2.lnk\"\n\nWorks, but gives me a pop-up DOS window which, when closed, kills my two loaded programs. Same is true for this:\nstart /B cmd /C \"1.lnk\"\nstart /B cmd /C \"2.lnk\"\nstart /B cmd /C \"3.lnk\"\nstart /B cmd /C \"4.lnk\"... |
OpenOffice ships with HSQLDB. Is it possible to easily import the contents of an OO spreadsheet into the built in database? An added nice to have would be to include the formatting of the cell contents. ie. colors, line feeds, etc.
This question has gone unanswered so I'm offering a bounty. Please provide the code ... | Importing data from an OpenOffice Calc spreadsheet to the built-in HSQLDB database in OpenOffice can be accomplished by following a series of steps, as you've outlined. While this method doesn't retain cell formatting (like colors or line feeds), it does provide a straightforward way to transfer data.
Here’s a detail... | 29,861 | [
{
"from": "human",
"value": "OpenOffice ships with HSQLDB. Is it possible to easily import the contents of an OO spreadsheet into the built in database? An added nice to have would be to include the formatting of the cell contents. ie. colors, line feeds, etc.\nThis question has gone unanswered so I'm of... |
How can I restrict the list of drive letters displayed by the WPF SaveFileDialog?
| In WPF, the `SaveFileDialog` does not provide built-in options to restrict the display of drive letters directly. However, you can implement a workaround by controlling the options available in the dialog through the use of the `FileDialog` class's `FileName` and `InitialDirectory` properties, combined with a custom fi... | 30,505 | [
{
"from": "human",
"value": "How can I restrict the list of drive letters displayed by the WPF SaveFileDialog?\n"
},
{
"from": "gpt",
"value": "In WPF, the `SaveFileDialog` does not provide built-in options to restrict the display of drive letters directly. However, you can implement a workaroun... |
I'm using SimpleDateFormat with the pattern EEE MM/dd hh:mma, passing in the date String Thu 10/9 08:15PM and it's throwing an Unparseable date exception. Why? I've used various patterns with SimpleDateFormat before so I'm fairly familiar with its usage. Maybe I'm missing something obvious from staring at it too long... | The issue you're encountering with `SimpleDateFormat` and the unparseable date exception is likely due to the whitespace and possibly other non-visible characters in your input string. In `SimpleDateFormat`, the pattern needs to match the input string exactly, including spaces.
Looking at your input date string `Thu 1... | 26,295 | [
{
"from": "human",
"value": "I'm using SimpleDateFormat with the pattern EEE MM/dd hh:mma, passing in the date String Thu 10/9 08:15PM and it's throwing an Unparseable date exception. Why? I've used various patterns with SimpleDateFormat before so I'm fairly familiar with its usage. Maybe I'm missing some... |
If I download a .gem file to a folder in my computer, can I install it later using gem install?
| Yes, you can install a `.gem` file later using the `gem install` command. If you have downloaded a `.gem` file and saved it in a folder on your computer, you can install it by specifying the path to that file in the command line.
For example, if your `.gem` file is named `example.gem` and is located in the `Downloads`... | 34,022 | [
{
"from": "human",
"value": "If I download a .gem file to a folder in my computer, can I install it later using gem install?\n"
},
{
"from": "gpt",
"value": "Yes, you can install a `.gem` file later using the `gem install` command. If you have downloaded a `.gem` file and saved it in a folder on... |
If an interface inherits IEquatable the implementing class can define the behavior of the Equals method. Is it possible to define the behavior of == operations?
public interface IFoo : IEquatable
{}
public class Foo : IFoo
{
// IEquatable.Equals
public bool Equals(IFoo other)
{
// Com... | In C#, the `==` operator is not automatically linked to the `IEquatable<T>.Equals` method or any method that you define. By default, the `==` operator checks for reference equality unless you explicitly overload it in your class.
To make the `==` operator compare the values of two `IFoo` references in the same way th... | 27,671 | [
{
"from": "human",
"value": "If an interface inherits IEquatable the implementing class can define the behavior of the Equals method. Is it possible to define the behavior of == operations?\npublic interface IFoo : IEquatable \n{} \n\npublic class Foo : IFoo \n{ \n // IEquatable.Equals \n public ... |
I have a format file where I want one of the columns to be "group". I'm auto-generating the format file and a client wants to upload a file with "group" as one of the columns. I could restrict it so they can't use SQL keywords, but then I need a function to determine if a column name is a SQL keyword, so I'd like to ... | Yes, it is possible to use reserved SQL keywords as column names in SQL Server format files, but you need to handle them appropriately in your format file.
In SQL Server, you can use square brackets (`[]`) to escape keywords when defining column names in a format file, just as you would in T-SQL queries. However, in ... | 28,732 | [
{
"from": "human",
"value": "I have a format file where I want one of the columns to be \"group\". I'm auto-generating the format file and a client wants to upload a file with \"group\" as one of the columns. I could restrict it so they can't use SQL keywords, but then I need a function to determine if a ... |
So I assume I'm not the only one. I'm wondering if there are others out there who have compiled a personal code library. Something that you take from job to job that has examples of best practices, things you are proud of, or just common methods you see yourself using over and over.
I just recently started my C# libra... | Creating a personal code library is a fantastic idea, and many developers find it invaluable as they move between projects and jobs. It allows you to capture best practices, reusable patterns, and code that reflects your unique problem-solving style. Here are some ideas and components that might be useful to include in... | 23,721 | [
{
"from": "human",
"value": "So I assume I'm not the only one. I'm wondering if there are others out there who have compiled a personal code library. Something that you take from job to job that has examples of best practices, things you are proud of, or just common methods you see yourself using over and o... |
Example. 123456, and we want the third from the right ('4') out.
The idea in practise is to access each digit seperately (ie. 6 5 4 3 2 1).
C/C++/C# preferred.
| You can access individual digits from an integer in C, C++, or C# by converting the number to a string or by repeatedly using division and modulus operations. Below are examples in each of the three languages demonstrating how to retrieve the third digit from the right in the number `123456`.
### C Example
```c
#incl... | 27,508 | [
{
"from": "human",
"value": "Example. 123456, and we want the third from the right ('4') out.\nThe idea in practise is to access each digit seperately (ie. 6 5 4 3 2 1).\nC/C++/C# preferred.\n"
},
{
"from": "gpt",
"value": "You can access individual digits from an integer in C, C++, or C# by con... |
I have a wysiwyg editor in my back end, and it is tripping up the first regular expression I wrote. This is in PHP4, using preg_replace(). I'm capturing the URI and linked text.
@<a\shref=\"http[s]?://([^\"]*)\"[]>(.*)<\/a>@siU
The client wanted all external links to open in a new window, so that's the expression I wa... | To modify your regular expression to accommodate the `style` attribute (or any other attributes) in the `<a>` tag, you can update your regex to make it more flexible. You can achieve this by changing the way you capture the attributes in the `<a>` tag.
Here’s a revised version of your regular expression:
```php
@<a\s... | 26,781 | [
{
"from": "human",
"value": "I have a wysiwyg editor in my back end, and it is tripping up the first regular expression I wrote. This is in PHP4, using preg_replace(). I'm capturing the URI and linked text.\n@<a\\shref=\\\"http[s]?://([^\\\"]*)\\\"[]>(.*)<\\/a>@siU\n\nThe client wanted all external links to... |
I want to load the data into session so that when the next button is clicked in crystal report viewer then in should load the data from the datatable instead retrieving the data again from the database. Here goes my code...
ReportDocument rpt = new ReportDocument();
DataTable resultSet = new DataTable();
st... | The issue you are experiencing with the Crystal Report Viewer is likely due to the way the session state is being handled and how you're setting the report source. When the Next button is clicked in the Crystal Report Viewer, a postback occurs, and you need to ensure that the data remains in the session and that the re... | 27,948 | [
{
"from": "human",
"value": "I want to load the data into session so that when the next button is clicked in crystal report viewer then in should load the data from the datatable instead retrieving the data again from the database. Here goes my code... \n ReportDocument rpt = new ReportDocument();\n Da... |
Does anyone know where I can find an algorithm that given a set of values (dates) for an axis I can calculate a reasonable scale and tick interval?
| Certainly! To create an algorithm that calculates a reasonable scale and tick interval for a set of date values, you can follow these steps. This approach is often used in data visualization libraries, and you can implement it in languages like Python, JavaScript, etc.
### Steps to Calculate Scale and Tick Intervals:
... | 28,008 | [
{
"from": "human",
"value": "Does anyone know where I can find an algorithm that given a set of values (dates) for an axis I can calculate a reasonable scale and tick interval?\n"
},
{
"from": "gpt",
"value": "Certainly! To create an algorithm that calculates a reasonable scale and tick interval... |
I need to parse a transcript of a live chat conversation. My first thought on seeing the file was to throw regular expressions at the problem but I was wondering what other approaches people have used.
I put elegant in the title as i've previously found that this type of task has a danger of getting hard to maintain j... | Parsing a chat transcript can indeed be a complex task, especially if you want to make the solution elegant and maintainable. While regular expressions can be effective for some simple pattern matching, they can quickly become unwieldy for more complex structures, especially when handling variations in formatting, pote... | 24,244 | [
{
"from": "human",
"value": "I need to parse a transcript of a live chat conversation. My first thought on seeing the file was to throw regular expressions at the problem but I was wondering what other approaches people have used. \nI put elegant in the title as i've previously found that this type of task ... |
I'm using several variants of the Validator controls (RequiredFieldValidator, CompareValidator, etc) and am using the CssClass property of the validator. I can see (via Firebug) that the class is being applied, but the validator control itself is adding a style element to it, namely color: red. But I don't want that.... | To prevent ASP.NET Validator controls from applying their default styles (like `color: red`), you can create a custom CSS class that overrides the default styles. This way, you can control the appearance of your validator messages through CSS without having to set the `ForeColor` property for each individual validator.... | 30,419 | [
{
"from": "human",
"value": "I'm using several variants of the Validator controls (RequiredFieldValidator, CompareValidator, etc) and am using the CssClass property of the validator. I can see (via Firebug) that the class is being applied, but the validator control itself is adding a style element to it, n... |
Programs that index filesystems seem to know which parts have changed since their last index and only rescan that part. How can I determine where the filesystem/files have changed since my last index. Don't care what language you answer in but I'm thinking c and windows.
An example of such a program is Sequoia View whi... | To determine which parts of a filesystem or files have changed since your last index on a Windows system, you can leverage the Windows API, particularly using the **Change Journal** feature of NTFS. The Change Journal maintains a log of changes to files and directories, allowing you to efficiently track changes without... | 26,480 | [
{
"from": "human",
"value": "Programs that index filesystems seem to know which parts have changed since their last index and only rescan that part. How can I determine where the filesystem/files have changed since my last index. Don't care what language you answer in but I'm thinking c and windows.\nAn exa... |
I just finished a 2d platformer in C++/Allegro. Its still in an incomplete stage...
I wonder how to go about a peer-review from people who are into game development.
I would like to review my project on grounds of
game play
Collision detection
use of OOP
programming of sounds, effects etc
any further ideas
ways in wh... | It's great to hear that you've completed a 2D platformer and are looking for peer review! Getting feedback from fellow developers can be incredibly valuable in improving your skills and your project. Here are some suggestions on how to go about obtaining that feedback and areas you may want to consider:
### Where to S... | 27,858 | [
{
"from": "human",
"value": "I just finished a 2d platformer in C++/Allegro. Its still in an incomplete stage...\nI wonder how to go about a peer-review from people who are into game development.\nI would like to review my project on grounds of \n\ngame play\nCollision detection\nuse of OOP\nprogramming of ... |
I have a MySQL database behind a firewall which can only be accessed via an SSH connection. Does anyone know of an implementation of java.sql.Connection which would allow me to make an SSH connection to this database?
| To connect to a MySQL database behind a firewall using an SSH tunnel in Java, you'll need to create an SSH connection first and then use that connection to access the MySQL database. Unfortunately, the standard `java.sql.Connection` does not directly support SSH tunneling, so you'll have to use a combination of librari... | 25,944 | [
{
"from": "human",
"value": "I have a MySQL database behind a firewall which can only be accessed via an SSH connection. Does anyone know of an implementation of java.sql.Connection which would allow me to make an SSH connection to this database?\n"
},
{
"from": "gpt",
"value": "To connect to a ... |
I'm planning to make a very simple program using php and mySQL. The main page will take information and make a new row in the database with that information. However, I need a number to put in for the primary key. Unfortunately, I have no idea about the normal way to determine what umber to use. Preferably, if I delete... | Using `AUTOINCREMENT` in MySQL is a common and effective solution for handling primary keys when you want to ensure each new row gets a unique identifier, even if some rows are deleted. When you define a column as `AUTOINCREMENT`, MySQL automatically generates a unique integer value for that column each time a new row ... | 25,382 | [
{
"from": "human",
"value": "I'm planning to make a very simple program using php and mySQL. The main page will take information and make a new row in the database with that information. However, I need a number to put in for the primary key. Unfortunately, I have no idea about the normal way to determine w... |
We are using Linq To SQL with our own data context logic that executes the one linq query across multiple databases. When we get the results back, we need the database for each of the rows. So...
I want to have a property on my class that will return the database name (SQL Server, so DB_NAME()). How can I do this in Li... | To achieve your requirement of returning the database name for each row in your LINQ to SQL query results without creating views in each database, you can use a combination of a custom projection and raw SQL within LINQ to SQL. Here’s how you can do it:
1. **Create a DTO Class**: Define a Data Transfer Object (DTO) th... | 26,799 | [
{
"from": "human",
"value": "We are using Linq To SQL with our own data context logic that executes the one linq query across multiple databases. When we get the results back, we need the database for each of the rows. So...\nI want to have a property on my class that will return the database name (SQL Serv... |
We all know the good old "disable the submit button" trick but what are the best ways to handle multiple submissions server side? I have an application where it is absolutely critical that a form only be sent once - it processes a credit card. I didn't write how it is right now but as a quick fix I threw on the disable... | Handling multiple submissions effectively, especially for sensitive operations like processing credit card transactions, is critical. Here are several best practices and techniques you can employ on the server side to ensure that a form is submitted only once:
### 1. **Unique Submission Tokens**
You mentioned the toke... | 26,640 | [
{
"from": "human",
"value": "We all know the good old \"disable the submit button\" trick but what are the best ways to handle multiple submissions server side? I have an application where it is absolutely critical that a form only be sent once - it processes a credit card. I didn't write how it is right no... |
We've been creating banners using the getURL linking method (in a blank window). For many people, it works just fine. You click the banner and are taken to our site. For others (me included), clicking the flash object triggers a pop-up warning in FireFox (both 2 and 3, default settings). The weird thing is that it does... | It sounds like you're experiencing a frustrating issue with the Flash banners and their interaction with Firefox. Here are several possible causes and solutions you can investigate:
1. **Browser Extensions and Add-ons**: Sometimes, certain extensions or add-ons can interfere with how web content is displayed and inter... | 30,023 | [
{
"from": "human",
"value": "We've been creating banners using the getURL linking method (in a blank window). For many people, it works just fine. You click the banner and are taken to our site. For others (me included), clicking the flash object triggers a pop-up warning in FireFox (both 2 and 3, default s... |
I'm looking to convert a small .NET console application into a Windows Service. I'd like to build two versions, one using .NET 2.0 and another with .NET 3.5 .
Are there radically different approaches that need to be taken, or will the 2.0 version be roughly equivalent to the 3.5 version? Where's a good source of info... | Converting a .NET console application into a Windows Service generally involves a similar process regardless of whether you're using .NET 2.0 or .NET 3.5. However, there are a few differences and improvements in .NET 3.5 that you might want to take advantage of. Here’s a basic overview of how to create a Windows Servic... | 29,347 | [
{
"from": "human",
"value": "I'm looking to convert a small .NET console application into a Windows Service. I'd like to build two versions, one using .NET 2.0 and another with .NET 3.5 .\nAre there radically different approaches that need to be taken, or will the 2.0 version be roughly equivalent to the 3... |
Is there a way to use a Graphics object's 'setClip()' method to clip using a Line-ish shape? Right now I'm trying to use a Polygon shape but I'm having problems simulating the "width" of the line. I basically draw the line, and when I reach the end, I redraw it but this time subtract the line width from y-coordinate:... | To create a more consistent approach for simulating the "width" of a line, you might want to consider using a `BasicStroke` along with a `Shape` implementation such as `Line2D` or `GeneralPath`. The `BasicStroke` class allows you to specify the thickness of the line when rendering, which can give you more control over ... | 25,212 | [
{
"from": "human",
"value": "Is there a way to use a Graphics object's 'setClip()' method to clip using a Line-ish shape? Right now I'm trying to use a Polygon shape but I'm having problems simulating the \"width\" of the line. I basically draw the line, and when I reach the end, I redraw it but this time... |
Our WinForms application has been reported to occasionally just close on its own. It neither shows our own crash error submit dialog nor Windows' error submit dialog, it just closes and is gone, often when the person was afk and not doing anything with the application. It seems to be a semi-rare occurrence, maybe lik... | Diagnosing an issue where a WinForms application closes unexpectedly without an error message can be challenging, particularly when it is a semi-rare occurrence. Here are some steps you can take to start tracking this problem down:
### 1. **Enable Unhandled Exception Logging**
Since you are using .NET 2.0, make sure y... | 26,716 | [
{
"from": "human",
"value": "Our WinForms application has been reported to occasionally just close on its own. It neither shows our own crash error submit dialog nor Windows' error submit dialog, it just closes and is gone, often when the person was afk and not doing anything with the application. It seem... |
I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP ... | Installing PHP on Windows XP with IIS 5.1 can be tricky, especially with older versions like PHP 5.2.6. The error you're encountering about "Cannot find httpd.conf" is because the MSI installer is typically designed for Apache, and it expects an Apache configuration file to be present, which isn't applicable when you'r... | 23,127 | [
{
"from": "human",
"value": "I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error \"Cannot find httpd.conf\". After that the install seems to breeze by quickly (more quickly than I would have expect... |
In Cygwin a space in a path has to be escaped with a backslash
Not true in Windows, put the whole path in a quote
Is there a way to convert to this automatically in Ruby?
Otherwise, how in Ruby do I detect if I am running with Windows or Cygwin?
| To automatically convert paths from Cygwin-style escaping (using backslashes for spaces) to Windows-style quoting (using double quotes around the entire path), you can use a simple Ruby method. First, you need to check whether you're running in a Cygwin or Windows environment.
### Detecting Cygwin or Windows
You can ... | 30,498 | [
{
"from": "human",
"value": "In Cygwin a space in a path has to be escaped with a backslash\nNot true in Windows, put the whole path in a quote\nIs there a way to convert to this automatically in Ruby?\nOtherwise, how in Ruby do I detect if I am running with Windows or Cygwin?\n"
},
{
"from": "gpt",... |
I am working on a project that requires reliable access to historic feed entries which are not necessarily available in the current feed of the website. I have found several ways to access such data, but none of them give me all the characteristics I need.
Look at this as a brainstorm. I will tell you how much I have f... | It sounds like you're facing quite a challenge in sourcing reliable historical feed data. Here are some additional ideas and approaches that you might consider:
1. **RSS Aggregators and Archive Services**: Some services specialize in archiving and providing access to older web content. For example:
- **Feedly**: Wh... | 29,692 | [
{
"from": "human",
"value": "I am working on a project that requires reliable access to historic feed entries which are not necessarily available in the current feed of the website. I have found several ways to access such data, but none of them give me all the characteristics I need.\nLook at this as a bra... |
I am declaring an array of void pointers. Each of which points to a value of arbitary type.
void **values; // Array of void pointers to each value of arbitary type
Initializing values as follows:
values = (void**)calloc(3,sizeof(void*));
//can initialize values as: values = new void* [3];
int ival =... | To properly free the memory allocated for your `values` array and the values it points to, you need to follow these steps:
1. Free each individual element in the `values` array.
2. Free the memory allocated for the `values` array itself.
Here’s how you can do that correctly:
```c
#include <cstdlib>
#include <iostrea... | 30,314 | [
{
"from": "human",
"value": "I am declaring an array of void pointers. Each of which points to a value of arbitary type.\nvoid **values; // Array of void pointers to each value of arbitary type\nInitializing values as follows:\n\n values = (void**)calloc(3,sizeof(void*));\n //can initialize val... |
I'm a long time Windows developer, and it looks like I'm going to be involved in porting a Windows app to the Mac.
We've decided to use Flex/Air for the gui for both sides, which looks really slick BTW.
My Windows application has a C++ DLL that controls network adapters (wired and wireless). This is written using the s... | As a long-time Windows developer transitioning to macOS for your C++ application, you'll find some good tools and resources available.
### IDE/Compiler for C++ on macOS
1. **Xcode**: The most popular Integrated Development Environment (IDE) for macOS development. It includes a powerful compiler (Clang) and provides g... | 27,872 | [
{
"from": "human",
"value": "I'm a long time Windows developer, and it looks like I'm going to be involved in porting a Windows app to the Mac.\nWe've decided to use Flex/Air for the gui for both sides, which looks really slick BTW.\nMy Windows application has a C++ DLL that controls network adapters (wired... |
I've looked for references on the Audible format, and it appears that people are only interested in cracking/converting out of it. I've got a collection of MP3 files that I want to convert into Audible format for use on my Kindle and iPod.
Does anybody have a good reference on the Audible or protected AAC formats and ... | Creating Audible format files (such as AAX or AA files) from MP3s or other audio formats is not straightforward due to the proprietary nature of the Audible format and the DRM (Digital Rights Management) protections associated with it. However, I can provide you with some general guidance on the Audible format and sugg... | 28,551 | [
{
"from": "human",
"value": "I've looked for references on the Audible format, and it appears that people are only interested in cracking/converting out of it. I've got a collection of MP3 files that I want to convert into Audible format for use on my Kindle and iPod.\nDoes anybody have a good reference on... |
I want to use google chrome as a control.
I think Enso does this because they have a dir in their folder called chrome...
Maybe there is a google chrome toolkit, SDK
| If you're looking to use Google Chrome as a control or interact with it programmatically, there are a few options available:
### 1. Chrome DevTools Protocol
The Chrome DevTools Protocol allows for interaction with Chrome and Chromium-based browsers. It provides a way to automate tasks such as testing and scraping. You... | 30,076 | [
{
"from": "human",
"value": "I want to use google chrome as a control.\nI think Enso does this because they have a dir in their folder called chrome...\nMaybe there is a google chrome toolkit, SDK\n"
},
{
"from": "gpt",
"value": "If you're looking to use Google Chrome as a control or interact wi... |
I am trying to create a route with a Username...
So the URL would be mydomain.com/abrudtkhul (abrudtkhul being the username)
My application will have public profiles based on usernames (Ex: http://delicious.com/abrudtkuhl). I want to replicate this URL scheme.
How can I structure this in ASP.Net MVC? I am using Members... | To create a public profile URL structure in an ASP.NET MVC application where you want to access user profiles via a URL like `http://mydomain.com/abrudtkhul` (with `abrudtkhul` being the username), you can follow these steps:
### 1. Create a Route for the Username
You need to define a route that captures the username... | 24,350 | [
{
"from": "human",
"value": "I am trying to create a route with a Username...\nSo the URL would be mydomain.com/abrudtkhul (abrudtkhul being the username)\nMy application will have public profiles based on usernames (Ex: http://delicious.com/abrudtkuhl). I want to replicate this URL scheme.\nHow can I struc... |
I am working on an iPhone Application that stores images in the Applications 'Document' folder.
I am currently doing the majority of my testing using the iPhone Simulator. In order to aid development I want to have some test images pre-loaded into the Document folder of the application that my application can access an... | When developing an iPhone application, especially if you need test images or data, there are several strategies you can use to efficiently manage test resources without having to manually copy files every time you build and run your app.
### 1. Using the Application Bundle
You can include test images in your applicat... | 30,299 | [
{
"from": "human",
"value": "I am working on an iPhone Application that stores images in the Applications 'Document' folder.\nI am currently doing the majority of my testing using the iPhone Simulator. In order to aid development I want to have some test images pre-loaded into the Document folder of the app... |
There's a lot of advice out there that you shouldn't expose your fields publically, and instead use trivial properties. I see it over & over.
I understand the arguments, but I don't think it's good advice in most cases.
Does anyone have an example of a time when it really mattered? When writing a trivial property mad... | The discussion around exposing fields directly versus using properties is a common one in software development, and while it can often seem theoretical, there are real-world scenarios where adhering to property-based design has proven beneficial. Here are a few examples:
### 1. **Validation Logic**
In many application... | 25,953 | [
{
"from": "human",
"value": "There's a lot of advice out there that you shouldn't expose your fields publically, and instead use trivial properties. I see it over & over.\nI understand the arguments, but I don't think it's good advice in most cases.\nDoes anyone have an example of a time when it really mat... |
I'm using iptables under linux to NAT SNMP traffic. Some of the SNMP packets have VARBINDs that contain the (real) IP addresses of the devices that generated them. This confuses standard management tools, which need to see the NATted addresses in the VARBINDs. So I need to translate the addresses in the payload in a... | Translating SNMP payloads while using iptables for NAT is indeed a non-trivial task, particularly since the SNMP protocol itself is not designed to accommodate NAT scenarios seamlessly. Given that you've encountered issues with existing modules, you might need to approach the problem in a couple of ways. Here are some ... | 28,229 | [
{
"from": "human",
"value": "I'm using iptables under linux to NAT SNMP traffic. Some of the SNMP packets have VARBINDs that contain the (real) IP addresses of the devices that generated them. This confuses standard management tools, which need to see the NATted addresses in the VARBINDs. So I need to tr... |
How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentController which takes a CommentID. The action url might look like /Comments/Delete/3 to delete the comment with the id 3.
Now obviously you dont want an... | When it comes to ensuring that users cannot tamper with query string values or action URL values, especially in scenarios like deleting resources (e.g., comments), there are several strategies to consider. It's critical to enforce authorization rules effectively while minimizing the risk of unauthorized actions. Here a... | 27,202 | [
{
"from": "human",
"value": "How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentController which takes a CommentID. The action url might look like /Comments/Delete/3 to delete the comment with... |
I have a picture that I need to resize to a specific dimension and then move one of the corner to a place higher than before so the image is not rectangular anymore but some kind of polygon. Is there a library that could help me with this kind of image manipulation or does someone knows the name of this operation?
This... | For the type of image manipulation you are describing, you can use libraries such as **ImageSharp** or **SkiaSharp** in your .NET application. Both of these libraries provide extensive capabilities for image processing, including resizing, cropping, and transforming images into polygons.
### ImageSharp
[ImageSharp](ht... | 26,789 | [
{
"from": "human",
"value": "I have a picture that I need to resize to a specific dimension and then move one of the corner to a place higher than before so the image is not rectangular anymore but some kind of polygon. Is there a library that could help me with this kind of image manipulation or does someo... |
I want to create a .bat file so I can just click on it so it can run:
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service
Can someone help me with the structure of the .bat file?
| Creating a `.bat` (batch) file to run a command like `svcutil.exe` is quite straightforward. You just need to create a text file with the appropriate command and save it with a `.bat` extension. Here’s how you can do this step-by-step:
1. **Open Notepad (or any text editor)**:
- You can use any text editor like Not... | 30,425 | [
{
"from": "human",
"value": "I want to create a .bat file so I can just click on it so it can run:\nsvcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service\n\nCan someone help me with the structure of the .bat file?\n"
},
{
"from": "gpt",
... |
I am well aware that the Rest based approach is targeting HTTP. I would love to use the REST APIs and other goodness between processes on the same computer. Since ADO.NET data services is built on top of WCF it would seem reasonable to assume that the transport in configurable to work with any of the WCF supported tr... | Yes, it is possible to configure WCF services to use named pipes as a transport mechanism, which can be useful for inter-process communication on the same machine. However, it's worth noting that the ADO.NET Data Services (now known as WCF Data Services) primarily targets HTTP for RESTful communications. Nonetheless, i... | 26,436 | [
{
"from": "human",
"value": "I am well aware that the Rest based approach is targeting HTTP. I would love to use the REST APIs and other goodness between processes on the same computer. Since ADO.NET data services is built on top of WCF it would seem reasonable to assume that the transport in configurable... |
I'm trying to use jcarousel to build a container with multiple rows, I've tried a few things but have had no luck. Can anyone make any suggestions on how to create it?
| Creating a multi-row carousel using jCarousel can be a bit tricky since jCarousel is primarily designed for single row display. However, you can achieve a multi-row effect by using some CSS styling and modifying your HTML structure slightly. Here are the steps to create a multi-row carousel:
### Step 1: Include jCarou... | 26,171 | [
{
"from": "human",
"value": "I'm trying to use jcarousel to build a container with multiple rows, I've tried a few things but have had no luck. Can anyone make any suggestions on how to create it?\n"
},
{
"from": "gpt",
"value": "Creating a multi-row carousel using jCarousel can be a bit tricky ... |
The purpose of this component is to test knowledge of a student on a given subject - in the example below it would be geography. The student is given a piece of text with missing words in it. He/she has to fill in (type in this case) the missing words - hence this kind of test/exercise is called gap-fill.There could be... | To create a gap-fill component based on your description, we can design a simple application that takes a string with special tokens, dynamically displays the text with input fields for the gaps, and checks the answers upon submission. Below is a basic outline of how you might implement such a component in JavaScript, ... | 22,104 | [
{
"from": "human",
"value": "The purpose of this component is to test knowledge of a student on a given subject - in the example below it would be geography. The student is given a piece of text with missing words in it. He/she has to fill in (type in this case) the missing words - hence this kind of test/e... |
Why does a Boolean consume 4 bytes and a char 2 bytes in the .NET framework? A Boolean should take up 1bit or at least be smaller than a char.
| In the .NET Framework, the size of data types such as `Boolean` and `Char` is influenced by several factors, including memory alignment, performance considerations, and platform compatibility.
### Boolean Type
1. **Size**: In .NET, a `Boolean` occupies 4 bytes (32 bits). Although logically, a Boolean only needs 1 bit ... | 30,335 | [
{
"from": "human",
"value": "Why does a Boolean consume 4 bytes and a char 2 bytes in the .NET framework? A Boolean should take up 1bit or at least be smaller than a char.\n"
},
{
"from": "gpt",
"value": "In the .NET Framework, the size of data types such as `Boolean` and `Char` is influenced by... |
How do you reverse the effect of a merge on polarised branches without dying of agony?
This problem has been plaguing me for months and I have finally given up.
You have 1 Repository, with 2 Named Branches. A and B.
Changes that occur to A will inevitably occur on B.
Changes that occur directly on B MUST NEVER occ... | You have an intricate problem with your repository structure, and dealing with merges between branches where changes in one branch should never appear in the other can indeed be a challenge. Here are several approaches to address your situation:
### 1. Use Feature Flags
Instead of directly merging changes that should ... | 29,400 | [
{
"from": "human",
"value": "How do you reverse the effect of a merge on polarised branches without dying of agony?\nThis problem has been plaguing me for months and I have finally given up. \nYou have 1 Repository, with 2 Named Branches. A and B. \nChanges that occur to A will inevitably occur on B. \nCh... |
When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask.
What are the benefits of using WebServiceHostFactory?
Are there any performance i... | When hosting a WCF (Windows Communication Foundation) service in IIS (Internet Information Services), you have the option of configuring the service endpoints either manually or declaratively using the `WebServiceHostFactory`. Here are some benefits of using `WebServiceHostFactory` along with considerations about perfo... | 27,432 | [
{
"from": "human",
"value": "When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask.\n\nWhat are the benefits of using WebServi... |
I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file.
If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file.
... | Distributing Python software with a time-restricted license file while protecting the source code from unauthorized access and modification can be challenging, but there are several strategies you can consider. Here are some common approaches:
### 1. **Use a License Management System**
Implement a licensing library or... | 27,440 | [
{
"from": "human",
"value": "I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file.\nIf we distribute the .py files or even .pyc files it will be easy to (decompile and) remo... |
I'm developing my first Word 2007 addin, and I've added an OfficeRibbon to my project. In a button-click handler, I'd like a reference to either the current Word.Document or Word.Application.
I'm trying to get a reference via the OfficeRibbon.Context property, which the documentation says should refer to the current Ap... | When working with Office Add-ins, especially in older versions like Word 2007, it's common to run into some challenges. The `OfficeRibbon.Context` property being null is a known issue that many developers have encountered. Here are some solutions and workarounds to get a reference to the `Word.Application` or the activ... | 27,120 | [
{
"from": "human",
"value": "I'm developing my first Word 2007 addin, and I've added an OfficeRibbon to my project. In a button-click handler, I'd like a reference to either the current Word.Document or Word.Application.\nI'm trying to get a reference via the OfficeRibbon.Context property, which the documen... |
The expected probability of randomly selecting an element from a set of n elements is P=1.0/n .
Suppose I check P using an unbiased method sufficiently many times. What is the distribution type of P? It is clear that P is not normally distributed, since cannot be negative. Thus, may I correctly assume that P is gamma d... | To analyze the expected probability \( P = \frac{1}{n} \) for a set of \( n \) elements and the distribution of observed probabilities \( P^* \) based on repeated selections, let's consider a few aspects:
1. **Expected Probability Distribution**:
The expected probability \( P \) is a deterministic value for a given... | 23,014 | [
{
"from": "human",
"value": "The expected probability of randomly selecting an element from a set of n elements is P=1.0/n .\nSuppose I check P using an unbiased method sufficiently many times. What is the distribution type of P? It is clear that P is not normally distributed, since cannot be negative. Thus... |
Does anyone know where to find a good, opensource RSS reader in Flash? I see lots that implement RSS or ATOM or RSS2, but none that do all of the different RSS style formats out there. I'd prefer to keep this in Flash, as I'm trying to keep this so it'll run with minimal server requirements...
Requirements:
- Parses RS... | Finding a good open-source RSS reader built in Flash that meets all of your requirements can be challenging, especially since Flash is no longer widely supported and has fallen out of favor for web development. However, here are some suggestions you might consider:
1. **RSS Flash Reader**: You may come across various ... | 30,773 | [
{
"from": "human",
"value": "Does anyone know where to find a good, opensource RSS reader in Flash? I see lots that implement RSS or ATOM or RSS2, but none that do all of the different RSS style formats out there. I'd prefer to keep this in Flash, as I'm trying to keep this so it'll run with minimal server ... |
I'm trying to see if there's a way to get a consistent unit test result across multiple test runners. The current situation is that we have a test assembly where 4 of the tests pass if you run them in NUnit GUI, but fail if you run them using TestDriven.NET or the ReSharper test runner. In the cases where these tests... | In the scenario you're describing, it sounds like the behavior of `Application.ExecutablePath` is contributing to the inconsistent results across different test runners because it is returning the path of the test runner's executable rather than the DLL of your test assembly. This can cause issues if your tests rely on... | 29,856 | [
{
"from": "human",
"value": "I'm trying to see if there's a way to get a consistent unit test result across multiple test runners. The current situation is that we have a test assembly where 4 of the tests pass if you run them in NUnit GUI, but fail if you run them using TestDriven.NET or the ReSharper tes... |
I am using the syndicated client experience (SCE) SDK. Has anyone had success with creating custom datafeeds for this? I want to be able to host the masterfeed and other feeds at a URL instead of compiling as embedded resources like the example. For instance, the client application would gather its feeds from http://so... | Using the Syndicated Client Experience (SCE) SDK, you can create custom data feeds and host them externally instead of embedding them in resources. However, it seems that you’re encountering an `AccessViolationException`, which typically indicates that there is a problem accessing memory—either because of trying to acc... | 27,573 | [
{
"from": "human",
"value": "I am using the syndicated client experience (SCE) SDK. Has anyone had success with creating custom datafeeds for this? I want to be able to host the masterfeed and other feeds at a URL instead of compiling as embedded resources like the example. For instance, the client applicat... |
My company has a large application written in VB6, and for historical reasons, the application is navigated with the Enter key instead of with the Tab key. I don't know VB6, but I know that they currently set the focus for each control in a big select statement in the Form's KeyUp event if it's an EnterKey. Now we ar... | You've implemented a system in your ancestor forms that handles the `Enter` key for navigation effectively. However, there are several considerations to ensure your solution is both robust and maintainable as you transition from VB6 to .NET.
### Alternative Approaches
1. **Global Event Handling**:
Instead of handl... | 27,517 | [
{
"from": "human",
"value": "My company has a large application written in VB6, and for historical reasons, the application is navigated with the Enter key instead of with the Tab key. I don't know VB6, but I know that they currently set the focus for each control in a big select statement in the Form's Ke... |
It appear that SQL Server like most other products Random Function really is not that random. So we have this nice little function to generate a 10 char value. Is there a better way to accomplish what the following does. I am betting there is.
DECLARE @SaltCount INT;
SELECT @SaltCount = COUNT(*) FROM tmp_NewLogin;
P... | Your current approach for generating a random 10-character string (salt) for records in a SQL Server database is functional, but there are indeed some improvements you could make to enhance readability and potentially performance. Here's an alternative approach using a more concise method with a recursive common table ... | 28,935 | [
{
"from": "human",
"value": "It appear that SQL Server like most other products Random Function really is not that random. So we have this nice little function to generate a 10 char value. Is there a better way to accomplish what the following does. I am betting there is.\nDECLARE @SaltCount INT;\nSELECT... |
I'm trying to determine what kinds of interactions a mobile website can handle. For example, I obviously can't track page-level dragging operations because this scrolls on mobile browsers. So, I'm looking for demos that can tell me what interactions work, how well, and hopefully for information about how consistently t... | When it comes to testing mobile website interactions, you're right to consider the constraints and differences between mobile and desktop experiences. While there's no widely recognized single test suite equivalent to ACID for mobile interactions, there are several considerations and methods to effectively evaluate mob... | 27,520 | [
{
"from": "human",
"value": "I'm trying to determine what kinds of interactions a mobile website can handle. For example, I obviously can't track page-level dragging operations because this scrolls on mobile browsers. So, I'm looking for demos that can tell me what interactions work, how well, and hopefully... |
For a web app I'm working on, I need to know the lat/lon of about 300 US cities. I also need to know the lat/lon for every US zip code.
Does anyone know of a free source to get this information?
| Yes, there are several free sources where you can obtain the latitude and longitude of US cities and zip codes. Here are some options:
### 1. **US Geological Survey (USGS)**
The USGS provides a database of geographic names that can include latitude and longitude information for cities. You can access the data through ... | 31,238 | [
{
"from": "human",
"value": "For a web app I'm working on, I need to know the lat/lon of about 300 US cities. I also need to know the lat/lon for every US zip code.\nDoes anyone know of a free source to get this information?\n"
},
{
"from": "gpt",
"value": "Yes, there are several free sources w... |
I'd like to group the methods in the javadoc for my class.
For example:
Admin methods:
blah1
blah2
Accessor methods:
foo1
foo2
Do you know of any way I can achieve this in javadoc?
Are there any doclets available for doing this?
Thanks,
Calum
| Yes, you can group methods in your Javadoc by using custom tags and specifying a doclet that supports grouping. Unfortunately, standard Javadoc does not natively support grouping methods out of the box, but you can implement this behavior by creating a custom doclet or using existing third-party doclets.
### Option 1:... | 27,785 | [
{
"from": "human",
"value": "I'd like to group the methods in the javadoc for my class.\nFor example:\n\nAdmin methods:\n blah1\n blah2\nAccessor methods:\n foo1\n foo2\n\nDo you know of any way I can achieve this in javadoc?\nAre there any doclets available for doing this?\nThanks,\nCalum\n"
},
... |
The DBMS_AQ package has a method called POST.
The documentation says,
This procedure posts to a list of
anonymous subscriptions, allowing all
clients who are registered for the
subscriptions to get notifications of
persistent messages. This feature is
not supported with buffered messages.
and
This call pr... | Non-guaranteed messaging and lightweight notifications, such as those provided by the `DBMS_AQ.POST` procedure, can be valuable in specific use cases where strict message delivery guarantees are less critical. Here are some scenarios where non-guaranteed messaging might be useful:
1. **Real-Time Notifications**: Appli... | 30,484 | [
{
"from": "human",
"value": "The DBMS_AQ package has a method called POST. \nThe documentation says,\n\nThis procedure posts to a list of\n anonymous subscriptions, allowing all\n clients who are registered for the\n subscriptions to get notifications of\n persistent messages. This feature is\n not sup... |
Possible Duplicate:
Resizing an iframe based on content
I'm loading an iFrame and want the parent to automatically change the height based upon the height of the iFrame's content.
To simply things, all pages belong to the same domain, so I shouldn't run into cross-site scripting issues.
| To automatically resize an iframe based on its content, you can use JavaScript to adjust the iframe's height once the content is fully loaded. Since the pages are on the same domain, you won't encounter cross-domain issues. Here’s how you can implement this:
1. **HTML structure**: Add an iframe in your HTML with a uni... | 29,492 | [
{
"from": "human",
"value": "\nPossible Duplicate:\nResizing an iframe based on content \n\nI'm loading an iFrame and want the parent to automatically change the height based upon the height of the iFrame's content.\nTo simply things, all pages belong to the same domain, so I shouldn't run into cross-site s... |
Can you recommend a Java library for reading, parsing, validating and mapping rows in a comma separated value (CSV) file to Java value objects (JavaBeans)?
| Certainly! A popular Java library for handling CSV files is **Apache Commons CSV**. This library provides a simple API to read, parse, and write CSV files, and it allows for easy mapping of CSV rows to JavaBeans using custom implementations.
### Features of Apache Commons CSV:
- **Reading and Writing**: It supports re... | 28,257 | [
{
"from": "human",
"value": "Can you recommend a Java library for reading, parsing, validating and mapping rows in a comma separated value (CSV) file to Java value objects (JavaBeans)?\n"
},
{
"from": "gpt",
"value": "Certainly! A popular Java library for handling CSV files is **Apache Commons C... |
I am developing Eclipse plugins, and I need to be able to automate the building and execution of the test suite for each plugin. (Using Junit)
Test are working within Eclipse, and I can break the plugins into the actual plugin and a fragment plugin for unit testing as described here, here and in a couple places here.
... | Automating the building and testing of Eclipse plugins using JUnit can be a bit tricky, especially when working with older versions of Eclipse, like 3.4. Here’s a general approach to help you set up a build and test environment using Ant, CruiseControl, or similar tools, while addressing the issues you've encountered.
... | 26,737 | [
{
"from": "human",
"value": "I am developing Eclipse plugins, and I need to be able to automate the building and execution of the test suite for each plugin. (Using Junit)\nTest are working within Eclipse, and I can break the plugins into the actual plugin and a fragment plugin for unit testing as describe... |
My studio has a large codebase that has been developed over 10+ years. The coding standards that we started with were developed with few developers in house and long before we had to worry about any kind of standards related to C++.
Recently, we started a small R&D project in house and we updated our coding convention... | Refactoring a large codebase to conform to a new coding standard is indeed a significant challenge, especially when it involves a large amount of source code. It’s great to hear you’re committed to having a unified standard across your projects.
Here are some recommendations for tools and approaches that can assist y... | 28,851 | [
{
"from": "human",
"value": "My studio has a large codebase that has been developed over 10+ years. The coding standards that we started with were developed with few developers in house and long before we had to worry about any kind of standards related to C++.\nRecently, we started a small R&D project in ... |
I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. The application was running without errors until recently. After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005). The error happens when I make a call to p... | The `System.Runtime.InteropServices.COMException` with the error code `80080005` typically indicates an issue with the COM object you're trying to instantiate, often related to permission problems or the state of the COM server. Here are some steps and suggestions that may help you debug and resolve the issue:
### Pos... | 25,734 | [
{
"from": "human",
"value": "I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. The application was running without errors until recently. After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005). ... |
I am trying to create an Xercesc DOM Parser in my code and for some reason and try to instiate an XercescDOM object I get a NULL pointer returned. I am using xercesc version 2.8
Here the code.
using namespace xercesc;
int main(int argc, char*argv[])
{
try
{
XMLPlatformUtils::Initialize();
}
catch (const XMLExceptio... | It looks like you're trying to create an instance of `XercesDOMParser` using Xerces-C++ version 2.8, but you are encountering a NULL pointer when you instantiate it. Let's check the code for any potential issues.
Here’s your code, slightly modified for clarity and robustness:
```cpp
#include <iostream>
#include <xerc... | 28,202 | [
{
"from": "human",
"value": "I am trying to create an Xercesc DOM Parser in my code and for some reason and try to instiate an XercescDOM object I get a NULL pointer returned. I am using xercesc version 2.8\nHere the code.\nusing namespace xercesc;\nint main(int argc, char*argv[])\n{\ntry\n{\n XMLPlatfor... |
I would like to create a many to many relationship of a table (RoutePlace) with itself using JPA anotations. The singularity of the table I want to join with itself is that it has a compound-key.
example: https://h4losw2.files.wordpress.com/2008/10/tables.png
Any suggestions?
Thanks in advance
| Creating a self-referential many-to-many relationship in JPA with a compound key involves several steps. You need to define a composite key class and then create the main entity class that references itself. Below is a guide on how to do this using JPA annotations.
### Step 1: Define the Composite Key Class
First, yo... | 28,133 | [
{
"from": "human",
"value": "I would like to create a many to many relationship of a table (RoutePlace) with itself using JPA anotations. The singularity of the table I want to join with itself is that it has a compound-key.\nexample: https://h4losw2.files.wordpress.com/2008/10/tables.png\n\nAny suggestions... |
I have a function that takes a struct, and I'm trying to store its variables in array:
int detect_prm(Param prm) {
int prm_arr[] = {prm.field1, prm.field2, prm.field3};
return 0;
}
But with gcc -Wall -ansi -pedantic-errors -Werror I get the following error:
initializer element is not computable at load time
It ... | The issue you're encountering is due to the way you're trying to initialize the array `prm_arr`. In C, when you declare an array with the initializer list syntax (i.e., with curly braces `{}`), the elements must be constants that can be computed at compile time. However, `prm.field1`, `prm.field2`, and `prm.field3` are... | 21,736 | [
{
"from": "human",
"value": "I have a function that takes a struct, and I'm trying to store its variables in array:\nint detect_prm(Param prm) {\n int prm_arr[] = {prm.field1, prm.field2, prm.field3};\n\n return 0;\n}\n\nBut with gcc -Wall -ansi -pedantic-errors -Werror I get the following error:\n\niniti... |
The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well.
A few months ago I attended the Heroes Happen Here launch event, and ... | Virtualizing SQL Server can offer significant benefits, but there are also valid concerns when it comes to performance, management, and overall operational considerations for production systems. Here are some specific reasons why virtualization may not be optimal for SQL Server in a production environment, along with a... | 17,902 | [
{
"from": "human",
"value": "The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well.\nA few months ago I attended... |
I have the following members defined in a class that I'm trying to deserialise:
[DataMemberAttribute(Name = "cust_title")]
public String Title { get; set; }
[DataMemberAttribute(Name = "cust_description")]
public String Description { get; set; }
For some reason, the deserialisation fails (it se... | If you're experiencing issues with deserialization despite having the `DataMemberAttribute` applied to your properties, there could be a few potential reasons for this. Let's go through some common troubleshooting steps and solutions:
### 1. Ensure You Are Using the Correct Serializer
Make sure you are using the corre... | 29,576 | [
{
"from": "human",
"value": "I have the following members defined in a class that I'm trying to deserialise:\n[DataMemberAttribute(Name = \"cust_title\")]\n public String Title { get; set; }\n [DataMemberAttribute(Name = \"cust_description\")]\n public String Description { get; set; }\n... |
How can I turn off certificate revocation for a WCF service's client?
The client proxy was generated by wsdl.exe and inherits SoapHttpClientProtocol.
| Disabling certificate revocation checks for a WCF service's client can be useful for testing purposes, but it's important to note that doing so can expose your application to security risks. You should only consider this approach in controlled environments, such as development or testing, and not in production.
To tur... | 29,928 | [
{
"from": "human",
"value": "How can I turn off certificate revocation for a WCF service's client?\nThe client proxy was generated by wsdl.exe and inherits SoapHttpClientProtocol.\n"
},
{
"from": "gpt",
"value": "Disabling certificate revocation checks for a WCF service's client can be useful fo... |
Uphill about 5 years ago my career was going fairly well, but separation, family deaths and a bit of illness caused me to make a couple of BAD career decisions, and I ended up in a dead end job doing mainly vb 6, though it was the end as mid to late 30, but was recently handed a break, working with a forward thinking v... | It sounds like you're already on the right path by actively seeking to improve your skills and taking advantage of the opportunity you have at your new job. Transitioning from older versions of VB to VB.NET can certainly be challenging, but with the right resources and approach, you can make the leap effectively. Here ... | 29,286 | [
{
"from": "human",
"value": "Uphill about 5 years ago my career was going fairly well, but separation, family deaths and a bit of illness caused me to make a couple of BAD career decisions, and I ended up in a dead end job doing mainly vb 6, though it was the end as mid to late 30, but was recently handed a... |
I have written a script that goes through a bunch of files and snips out a portion of the files for further processing. The script creates a new directory and creates new files for each snip that is taken out. I have to now evaluate each of the files that were created to see if it is what I needed. The script also cr... | Yes, you can definitely create an HTML file with delete buttons that trigger a Python script to delete the corresponding files. This involves setting up a simple web server with Flask, a lightweight web framework for Python. Here’s a basic outline of how you can achieve this:
1. **Setup a Flask App**: You will create ... | 27,339 | [
{
"from": "human",
"value": "I have written a script that goes through a bunch of files and snips out a portion of the files for further processing. The script creates a new directory and creates new files for each snip that is taken out. I have to now evaluate each of the files that were created to see if... |
I have a JavaScript resource that has the possibility of being edited at any time. Once it is edited I would want it to be propagated to the user's browser relatively quickly (like maybe 15 minutes or so), however, the frequency of this resource being editing is few and far between (maybe 2 a month).
I'd rather the res... | Caching behavior for resources in web browsers is indeed influenced by various factors, including HTTP headers, cache policies, and browser-specific implementations. When you want a resource to be cached in the user's browser but also updated periodically (in your case, every 15 minutes), you have a couple of options t... | 28,427 | [
{
"from": "human",
"value": "I have a JavaScript resource that has the possibility of being edited at any time. Once it is edited I would want it to be propagated to the user's browser relatively quickly (like maybe 15 minutes or so), however, the frequency of this resource being editing is few and far betw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.