instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Currently I use .Net WebBrowser.Document.Images() to do this. It requires the Webrowser to load the document. It's messy and takes up resources.
According to this question XPath is better than a regex at this.
Anyone know how to do this in C#?
| If you want to extract images (or any other elements) from an HTML document without using the `.NET WebBrowser` control, you can use an HTML parsing library like **HtmlAgilityPack**. This allows you to load HTML content and query it using XPath, which is both efficient and resource-friendly.
First, you'll need to inst... | 13,990 | [
{
"from": "human",
"value": "Currently I use .Net WebBrowser.Document.Images() to do this. It requires the Webrowser to load the document. It's messy and takes up resources. \nAccording to this question XPath is better than a regex at this. \nAnyone know how to do this in C#?\n"
},
{
"from": "gpt",
... |
I am looking for a free tool to quickly create a screen design in a workshop with a customer (for a web application).
The focus of the tool should be on a functional definition of screens and not on the design of them.
Do you have any suggestions for an appropriate tool?
| Certainly! For creating screen designs with a focus on functional definitions rather than aesthetics, there are several free tools that can help you facilitate workshops effectively. Here are a few suggestions:
1. **Balsamiq Wireframes**: While Balsamiq is primarily a paid tool, it does offer a free trial. It focuses ... | 10,368 | [
{
"from": "human",
"value": "I am looking for a free tool to quickly create a screen design in a workshop with a customer (for a web application). \nThe focus of the tool should be on a functional definition of screens and not on the design of them.\nDo you have any suggestions for an appropriate tool?\n"
... |
I'm using gvim on Windows.
In my _vimrc I've added:
set shell=powershell.exe
set shellcmdflag=-c
set shellpipe=>
set shellredir=>
function! Test()
echo system("dir -name")
endfunction
command! -nargs=0 Test :call Test()
If I execute this function (:Test) I see nonsense characters (non number/letter ASCII character... | The issue you're encountering with using PowerShell as the shell in Vim (GVim) and receiving nonsensical characters in the output can often be attributed to encoding mismatches between PowerShell's output and Vim's expectations. The fact that it works when you run the command directly with `:!` or `:r !` indicates that... | 11,380 | [
{
"from": "human",
"value": "I'm using gvim on Windows.\nIn my _vimrc I've added:\nset shell=powershell.exe\nset shellcmdflag=-c\nset shellpipe=>\nset shellredir=>\n\nfunction! Test()\n echo system(\"dir -name\")\nendfunction\n\ncommand! -nargs=0 Test :call Test()\n\nIf I execute this function (:Test) I se... |
I need a way to determine the space remaining on a disk volume using python on linux, Windows and OS X. I'm currently parsing the output of the various system calls (df, dir) to accomplish this - is there a better way?
| Yes, you can determine the space remaining on a disk volume in a more portable and reliable way using Python's built-in libraries rather than parsing command line outputs. The `shutil` module provides a convenient function for this purpose.
Here’s how you can use `shutil.disk_usage()` to get the total, used, and free ... | 13,156 | [
{
"from": "human",
"value": "I need a way to determine the space remaining on a disk volume using python on linux, Windows and OS X. I'm currently parsing the output of the various system calls (df, dir) to accomplish this - is there a better way?\n"
},
{
"from": "gpt",
"value": "Yes, you can de... |
I use the commercial version of Jalopy for my Java projects but it doesn't work on Groovy files. IntelliJ has a serviceable formatter but I don't like requiring a particular IDE.
| If you are using Jalopy for Java projects and looking for a similar code formatting solution for Groovy files, there are a few alternatives you can consider that do not tie you to a specific IDE:
1. **CodeNarc**: This is a static analysis tool for Groovy that can also help with some formatting issues. While it primari... | 14,082 | [
{
"from": "human",
"value": "I use the commercial version of Jalopy for my Java projects but it doesn't work on Groovy files. IntelliJ has a serviceable formatter but I don't like requiring a particular IDE.\n"
},
{
"from": "gpt",
"value": "If you are using Jalopy for Java projects and looking ... |
I have a very large cascading menu system with over 300 items in it. (I know it's large but it's a requirement.)
Currently, it's written in javascript so the external file is cached by browsers.
To improve search engine results I need to convert this to a css menu system.
I realize the browsers will also cache extern... | When it comes to creating a large cascading menu system with good search engine optimization (SEO) and performance considerations, there are a few approaches you can consider. Let’s discuss each option and its implications:
### Option 1: HTML Markup with CSS for Styling
The most SEO-friendly solution is to use plain ... | 12,230 | [
{
"from": "human",
"value": "I have a very large cascading menu system with over 300 items in it. (I know it's large but it's a requirement.)\nCurrently, it's written in javascript so the external file is cached by browsers. \nTo improve search engine results I need to convert this to a css menu system.\nI... |
I'm facing a problem with IE6.
I took the toggle function from this website but when I apply it to my page I get the error (only in IE6):
Could not get the display property.
Invalid argument.
I can get the display property, but the error is thrown when I want to set to the new value.
EDIT:
I know that several deve... | The issue you're encountering with Internet Explorer 6 regarding the `display` property is indeed a known quirk. Specifically, IE6 does not handle the `table-row` display property correctly when toggling visibility.
When you try to set the display property to an empty string (`''`), IE can revert to its default displ... | 11,825 | [
{
"from": "human",
"value": "I'm facing a problem with IE6.\nI took the toggle function from this website but when I apply it to my page I get the error (only in IE6): \n\nCould not get the display property.\n Invalid argument.\n\nI can get the display property, but the error is thrown when I want to set t... |
Our Java code (not the test code) reads files from the current directory, which means the working directory needs to be set properly whenever we run the code.
When launching a JUnit test from within Eclipse, a launch configuration automatically gets created. The problem is, that the working directory in that launch con... | Yes, Eclipse does not provide a direct way to set a global default working directory for all new JUnit launch configurations. However, there are a few workarounds you can consider to minimize the hassle.
### Workaround 1: Change the Eclipse Preferences
While Eclipse does not allow you to set a global working director... | 12,506 | [
{
"from": "human",
"value": "Our Java code (not the test code) reads files from the current directory, which means the working directory needs to be set properly whenever we run the code.\nWhen launching a JUnit test from within Eclipse, a launch configuration automatically gets created. The problem is, tha... |
I have a super-simple WCF Service. I host it on my local machine using IIS7.
When I add a service reference to my service, Visual Studio tells me there was an error. I can click a Details link, and that bring up a dialog box saying: Object reference not set to an instance of an object.
I can build my WCF service with ... | The issue you are encountering with adding a service reference in Visual Studio could stem from various problems. Since you mentioned a "Fatal Execution Engine Error" in the event log, it's likely tied to the .NET runtime you are using or some misconfiguration in the WCF service or client. Here are several steps you ca... | 12,227 | [
{
"from": "human",
"value": "I have a super-simple WCF Service. I host it on my local machine using IIS7.\nWhen I add a service reference to my service, Visual Studio tells me there was an error. I can click a Details link, and that bring up a dialog box saying: Object reference not set to an instance of an... |
What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, and I worry if they will be unusable once... | Hosting an ASP.NET MVC application on older versions of IIS (like IIS 5, 6, or 7) can indeed be challenging due to the way ASP.NET MVC handles routing and the configurations required. Here are the best practices and considerations for getting your ASP.NET MVC application to work on these environments:
### General Cons... | 8,449 | [
{
"from": "human",
"value": "What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, ... |
I've been thinking a lot lately about a music-oriented project I'd like to work on. Kind of like a game... kind of like a studio workstation (FL Studio, Reason).
I guess the best way to describe it would be: like "Guitar Hero", but with no canned tracks. All original music--composed by you, on the fly--but the software... | Your project sounds intriguing and ambitious! Here are a few Java libraries and frameworks you might consider for generating high-quality audio with synth-like capabilities. These libraries focus on flexibility, configurability, and rich sound generation without tying you down to a specific GUI:
1. **JASS (Java Audio ... | 11,665 | [
{
"from": "human",
"value": "I've been thinking a lot lately about a music-oriented project I'd like to work on. Kind of like a game... kind of like a studio workstation (FL Studio, Reason).\nI guess the best way to describe it would be: like \"Guitar Hero\", but with no canned tracks. All original music--c... |
I'm trying to find a way to invoke the Ctrl+Alt+Delete dialog on a Windows 2000 computer that I'm connected to via Remote Desktop. Windows XP and 2003 include a new start menu command called "Windows Security" that does this, but Windows 2000 has no such option.
It appears that Ctrl+Alt+End will do this, but it only go... | To invoke the Ctrl+Alt+Delete dialog on a remote computer (like computer C in your scenario) when you're connected via Remote Desktop to another remote machine (computer B), you can use a programming solution. Below are a couple of approaches to achieve this:
### Method 1: Using `SendKeys` in a Windows Forms Applicati... | 12,093 | [
{
"from": "human",
"value": "I'm trying to find a way to invoke the Ctrl+Alt+Delete dialog on a Windows 2000 computer that I'm connected to via Remote Desktop. Windows XP and 2003 include a new start menu command called \"Windows Security\" that does this, but Windows 2000 has no such option.\nIt appears th... |
I have buy.php with a form where you enter items, quantity, shipping data, etc.
When you click the Submit button, it posts back to buy.php ($_SERVER['PHP_SELF']) and does some data validation.
If there are fields missing or errors, they are highlighted. If everything is correct, I save the $_POST data in $_SESSION va... | The scenario you've described is a common one in web development. You want to ensure that users can navigate back to previous forms without triggering a re-submission of data. There are several best practices to manage multi-page forms and avoid issues with resending POST data. Here are a few approaches you can conside... | 12,234 | [
{
"from": "human",
"value": "I have buy.php with a form where you enter items, quantity, shipping data, etc. \nWhen you click the Submit button, it posts back to buy.php ($_SERVER['PHP_SELF']) and does some data validation. \nIf there are fields missing or errors, they are highlighted. If everything is corr... |
I'm a student in software engineering in Montreal. For the last 3 years I've had a few interships (once per year). The first two (in the same company) were mostly sysadmin jobs, but I did get to do a few Perl programs (mostly log file analysing and statistics generation).
My other intership was in the IT security field... | Hi Guillaume,
It's great that you're being proactive about your career and seeking an internship in software development that aligns with your interests. It sounds like you have a solid foundation in programming and system administration, which can serve as valuable assets as you transition to OO programming. Here are... | 9,512 | [
{
"from": "human",
"value": "I'm a student in software engineering in Montreal. For the last 3 years I've had a few interships (once per year). The first two (in the same company) were mostly sysadmin jobs, but I did get to do a few Perl programs (mostly log file analysing and statistics generation).\nMy ot... |
I am trying to develop everything in sharepoint as features so I can easily deploy to test and live sites without having to do any manual steps.
I can deploy my master page okay, and though currently i have to switch it on by hand I am confident I can automate that in the future.
What I am having difficulty is getting ... | To link a CSS file to your SharePoint Master Page programmatically, you can use a combination of SharePoint features and the SharePoint Designer. Below are the steps you can follow to properly link your CSS file to your Master Page as part of a SharePoint feature deployment.
### Step 1: Deploy Your CSS File
Make sure... | 9,070 | [
{
"from": "human",
"value": "I am trying to develop everything in sharepoint as features so I can easily deploy to test and live sites without having to do any manual steps.\nI can deploy my master page okay, and though currently i have to switch it on by hand I am confident I can automate that in the futur... |
This question was already asked in the context of C#/.Net.
Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.
I'll start with an obvious difference:
If you don't specify public: or private:, ... | You're correct that one of the primary differences between `struct` and `class` in C++ is their default access specifiers. However, there are several other distinctions and implications for object-oriented design. Let's explore both the technical differences and the design considerations involved in choosing between th... | 9,513 | [
{
"from": "human",
"value": "This question was already asked in the context of C#/.Net.\nNow I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.\nI'll start with an obvious difference:\... |
How do I detect if my program runs in an Active Directory environment?
I'm using C# and .Net 2.0
| In a C# application running under .NET 2.0, you can check if your program is running in an Active Directory (AD) environment by leveraging the `System.DirectoryServices` namespace. One common way to determine this is to check if the machine is joined to a domain. You can do this by checking the machine's domain informa... | 13,034 | [
{
"from": "human",
"value": "How do I detect if my program runs in an Active Directory environment?\nI'm using C# and .Net 2.0\n"
},
{
"from": "gpt",
"value": "In a C# application running under .NET 2.0, you can check if your program is running in an Active Directory (AD) environment by leveragi... |
I know how to do a HEAD request with httplib, but I have to use mechanize for this site.
Essentially, what I need to do is grab a value from the header (filename) without actually downloading the file.
Any suggestions how I could accomplish this?
| To perform a HEAD request and retrieve the headers (including the filename) using `mechanize`, you'll have to follow a slightly different approach since `mechanize` does not support HEAD requests directly. However, you can make a GET request and limit the amount of data you download to just the headers.
Here's how you... | 10,736 | [
{
"from": "human",
"value": "I know how to do a HEAD request with httplib, but I have to use mechanize for this site. \nEssentially, what I need to do is grab a value from the header (filename) without actually downloading the file.\nAny suggestions how I could accomplish this?\n"
},
{
"from": "gpt"... |
I want (barely computer literate) people to easily submit a large number of files (pictures) through my web application. Is there a simple, robust, free/cheap, widely used, standard tool/component (Flash or .NET - sorry no java runtime on the browser) that allows a web user to select a folder or a bunch of files on the... | For a web application that allows users to easily upload multiple files or entire folders, there are several modern solutions you can consider that are user-friendly and do not require the user to have any special runtime environments like Java. Here are a few options:
1. **HTML5 File API with JavaScript**:
- You c... | 9,198 | [
{
"from": "human",
"value": "I want (barely computer literate) people to easily submit a large number of files (pictures) through my web application. Is there a simple, robust, free/cheap, widely used, standard tool/component (Flash or .NET - sorry no java runtime on the browser) that allows a web user to s... |
I'm experimenting with VS 2008 Express edition and when I hit f1 on a keyword or class name I seem to get the Information Not Found page more than 90% of the time.
Is this a configuration problem? Is it because this is the "free-as-in-beer" Express edition? Did Microsoft move their online documentation since the versio... | The issue you're encountering with the Help system in Visual Studio 2008 Express Edition is somewhat common, and it can stem from a few different reasons:
1. **Missing or Incorrect Help Configuration**: The Help system may not have been correctly installed or configured during the installation of Visual Studio. Someti... | 11,391 | [
{
"from": "human",
"value": "I'm experimenting with VS 2008 Express edition and when I hit f1 on a keyword or class name I seem to get the Information Not Found page more than 90% of the time.\nIs this a configuration problem? Is it because this is the \"free-as-in-beer\" Express edition? Did Microsoft move... |
I've got a young nephew who aspires to grow up to be a game programmer and i'd like to introduce him to the world of open-source as well as get him a sweet gift.
Anything like that out there?
| It's great to hear that you want to support your nephew's aspirations in game programming and introduce him to open source! Here are some gift ideas that could inspire him and help him get started:
1. **Books on Game Development**:
- **"The Nature of Code" by Daniel Shiffman**: This book dives into programming conc... | 14,470 | [
{
"from": "human",
"value": "I've got a young nephew who aspires to grow up to be a game programmer and i'd like to introduce him to the world of open-source as well as get him a sweet gift. \nAnything like that out there?\n"
},
{
"from": "gpt",
"value": "It's great to hear that you want to sup... |
Ten years ago when I first encountered the CMM for software I was, I suppose like many, struck by how accurately it seemed to describe the chaotic "level one" state of software development in many businesses, particularly with its reference to reliance on heroes. It also seemed to provide realistic guidance for an org... | Your reflections on the Capability Maturity Model (CMM) and its real-world impact resonate with many in the software development field. It's true that while CMM provides a structured approach to process improvement, the outcomes can vary significantly between organizations.
### Tangible Benefits of Adherence to CMM
1... | 13,668 | [
{
"from": "human",
"value": "Ten years ago when I first encountered the CMM for software I was, I suppose like many, struck by how accurately it seemed to describe the chaotic \"level one\" state of software development in many businesses, particularly with its reference to reliance on heroes. It also seem... |
I am trying to create some cached user controls. Basically Header and Footer are static.
Except the footer has one link that reads in the URL of the page and puts it into the javascript for sending a link to a friend. So I need that link to be dynamic.
I set up a substitution control and had the static method return ... | In ASP.NET, the Substitution control is indeed limited in its scope and does not support user controls directly. However, there are workarounds you can implement to achieve similar functionality. Here are a few approaches you can consider:
### 1. Use a Property in the User Control
You can expose a property in your use... | 12,871 | [
{
"from": "human",
"value": "I am trying to create some cached user controls. Basically Header and Footer are static. \nExcept the footer has one link that reads in the URL of the page and puts it into the javascript for sending a link to a friend. So I need that link to be dynamic.\nI set up a substitutio... |
I have a real-time embedded app with the major cycle running at 10KHz. It runs on a TI TMS320C configured to boot from flash. I recently added an initialized array to a source file, and all of a sudden the timing is screwed up (in a way too complex to explain well - essentially a serial port write is no longer comp... | Based on your description, there are several potential causes for the timing issues you're experiencing after adding an initialized array, even if you are not accessing it directly. Here are some factors to consider:
1. **.cinit Segment Initialization**: The .cinit segment is typically responsible for initializing sta... | 12,621 | [
{
"from": "human",
"value": "I have a real-time embedded app with the major cycle running at 10KHz. It runs on a TI TMS320C configured to boot from flash. I recently added an initialized array to a source file, and all of a sudden the timing is screwed up (in a way too complex to explain well - essentia... |
I am trying to use the Google Maps API in a ColdFusion template that is a border type cflayoutarea container. However, the map simply doesn't show up:
<cfif isdefined("url.lat")>
<cfset lat="#url.lat#">
<cfset lng="#url.lng#">
</cfif>
<head>
<script src= "http://maps.google.com/maps?f... | It sounds like you're facing an issue with the Google Maps API in a ColdFusion layout that uses cflayoutarea, specifically with compatibility checks when using the map inside a layout container. Here are a few suggestions to troubleshoot and potentially resolve the issue:
1. **Ensure the Google Maps API is loaded corr... | 11,542 | [
{
"from": "human",
"value": "I am trying to use the Google Maps API in a ColdFusion template that is a border type cflayoutarea container. However, the map simply doesn't show up:\n<cfif isdefined(\"url.lat\")>\n <cfset lat=\"#url.lat#\">\n <cfset lng=\"#url.lng#\">\n</cfif> \n<head>\n<script src= ... |
Is it possible to tell if the user of a website is using multiple monitors? I need to find the position of a popup but it's quite likely the user will have a multiple monitor setup. Whilst window.screenX etc. will give the position of the browser window it's useless for multiple monitors.
| Detecting whether a user is using multiple monitors and determining the precise position of elements on those monitors is not directly supported in standard web development. The web browser's JavaScript environment does not expose APIs that can definitively tell you about the user's multi-monitor setup or provide the c... | 12,462 | [
{
"from": "human",
"value": "Is it possible to tell if the user of a website is using multiple monitors? I need to find the position of a popup but it's quite likely the user will have a multiple monitor setup. Whilst window.screenX etc. will give the position of the browser window it's useless for multipl... |
I have a table that is dynamically created using DIVs. Each row of the table has two images. I want to set the height for the div (that represents a particular row) to the height of image that is greater of the two images being displayed in that particular row. The images to displayed will always change, and they are f... | To dynamically set the height of a row (represented by a `div`) to the height of the tallest image in that row, you can use JavaScript (or jQuery) to handle the loading of the images and adjust the height accordingly. Here's a general approach:
### Using JavaScript
1. **Set up your HTML structure** for the rows and i... | 7,150 | [
{
"from": "human",
"value": "I have a table that is dynamically created using DIVs. Each row of the table has two images. I want to set the height for the div (that represents a particular row) to the height of image that is greater of the two images being displayed in that particular row. The images to dis... |
I've been trying to display text using a Quartz context, but no matter what I've tried I simply haven't had luck getting the text to display (I'm able to display all sorts of other Quartz objects though). Anybody knows what I might be doing wrong?
example:
-(void)drawRect:(CGRect)rect
{
// Drawing code
CGContext... | Using Core Graphics (Quartz) to render text directly like you are trying to do can be a bit tricky, and it has become less common in favor of using higher-level text rendering frameworks, such as Core Text or UILabel in UIKit.
In your current code, you're using `CGContextShowText`, which is quite limited and less ofte... | 11,430 | [
{
"from": "human",
"value": "I've been trying to display text using a Quartz context, but no matter what I've tried I simply haven't had luck getting the text to display (I'm able to display all sorts of other Quartz objects though). Anybody knows what I might be doing wrong?\nexample:\n-(void)drawRect:(CGR... |
I use int.MaxValue as a penalty and sometimes I am computing the penalties together. Is there a function or how would you create one with the most grace and efficiency that does that.
ie.
50 + 100 = 150
int.Max + 50 = int.Max and not int.Min + 50
| To handle the summation of penalties gracefully, especially when involving `int.MaxValue`, you can create a function that checks for potential overflows before performing the addition. Here's how you can implement that in C#:
```csharp
using System;
public class PenaltyCalculator
{
public static int AddPenalties(... | 14,306 | [
{
"from": "human",
"value": "I use int.MaxValue as a penalty and sometimes I am computing the penalties together. Is there a function or how would you create one with the most grace and efficiency that does that. \nie. \n50 + 100 = 150\nint.Max + 50 = int.Max and not int.Min + 50 \n"
},
{
"from": "g... |
I believe any programmer who has been dealing with database requests in a gui application has run into some or all of the following problems:
Your GUI freezes because you call
database layer from within the event
dispatch thread
When you have multiple windows/panels/jframes where user can start a db request your perfo... | Yes, managing long-running tasks in a GUI application is a common concern, especially in Java applications using Swing. While you mentioned `SwingWorker`, which is a good starting point for handling background tasks, there are several other frameworks and approaches that can help manage these issues more effectively. H... | 11,528 | [
{
"from": "human",
"value": "I believe any programmer who has been dealing with database requests in a gui application has run into some or all of the following problems:\n\nYour GUI freezes because you call\ndatabase layer from within the event\ndispatch thread\nWhen you have multiple windows/panels/jframe... |
I need to change the DataTemplate for items in a ListBox depending on whether the item is selected or not (displaying different/more information when selected).
I don't get a GotFocus/LostFocus event on the top-most element in the DataTemplate (a StackPanel) when clicking the ListBox item in question (only through tabb... | In WPF, you can accomplish the behavior of changing the `DataTemplate` of items in a `ListBox` depending on whether they are selected by using a combination of Data Binding, DataTemplates, and Triggers. You won’t need to rely on focus events for this. Instead, you can bind your templates to the `IsSelected` property of... | 11,726 | [
{
"from": "human",
"value": "I need to change the DataTemplate for items in a ListBox depending on whether the item is selected or not (displaying different/more information when selected).\nI don't get a GotFocus/LostFocus event on the top-most element in the DataTemplate (a StackPanel) when clicking the L... |
I've just started one of my courses, as classes just began 2 weeks ago, and we are learning Scheme right now in one for I assume some reason later on, but so far from what he is teaching is basically how to write in scheme. As I sit here trying to stay awake I'm just trying to grasp why I would want to know this, and ... | It's great that you're taking the initiative to understand the purpose of learning Scheme! Here are some reasons why Scheme and functional programming languages, in general, are valuable to study:
1. **Understanding Fundamental Concepts**: Scheme is a dialect of Lisp, and learning it can help you understand fundamenta... | 11,500 | [
{
"from": "human",
"value": "I've just started one of my courses, as classes just began 2 weeks ago, and we are learning Scheme right now in one for I assume some reason later on, but so far from what he is teaching is basically how to write in scheme. As I sit here trying to stay awake I'm just trying to ... |
An example of an app that does this is Enso, it pops up when you press the caps lock.
| It sounds like you are referring to a productivity app or tool that enhances user interaction by providing quick access to features when the Caps Lock key is pressed. Enso is known for its ability to bring up a command palette or launcher that allows users to execute commands, search for files, or perform other actions... | 15,248 | [
{
"from": "human",
"value": "An example of an app that does this is Enso, it pops up when you press the caps lock.\n"
},
{
"from": "gpt",
"value": "It sounds like you are referring to a productivity app or tool that enhances user interaction by providing quick access to features when the Caps Lo... |
What's the best way to create recurring tasks?
Should I create some special syntax and parse it, kind of similar to Cronjobs on Linux or should I much rather just use a cronjob that runs every hour to create more of those recurring tasks with no end?
Keep in mind, that you can have endless recurring tasks and tasks wit... | When designing a system for creating and managing recurring tasks, both approaches you mentioned have their pros and cons. Let's evaluate each one:
### 1. **Custom Syntax for Recurring Tasks (Similar to Cron)**
**Pros:**
- **Flexibility**: You can define your own syntax that caters specifically to the needs of your ap... | 7,896 | [
{
"from": "human",
"value": "What's the best way to create recurring tasks?\nShould I create some special syntax and parse it, kind of similar to Cronjobs on Linux or should I much rather just use a cronjob that runs every hour to create more of those recurring tasks with no end?\nKeep in mind, that you can... |
Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version.
I wrote an app that relies on the System.Data.SQLite.dll, i went to test it on a machine where that dll was missing, and my app just... | To ensure that any external assemblies (DLLs) your application relies on are available and of the correct version, you can implement several strategies:
### 1. **Bundle DLLs with Your Application**
One common approach is to include the necessary DLLs with your application's installation package or directly in the appl... | 8,930 | [
{
"from": "human",
"value": "Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version.\nI wrote an app that relies on the System.Data.SQLite.dll, i went to test it on a machine w... |
First time working with UpdatePanels in .NET.
I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.
When the UpdatePanel refreshes, it needs values from the FormView control so that on the server it can use them to q... | When working with `UpdatePanel` in ASP.NET Web Forms, passing values from one control (like a `FormView`) to an `UpdatePanel` on a partial postback can be done by using the `Page.FindControl` method and/or storing values in the `ViewState` or `Session`. Here's a step-by-step approach to help you achieve what you're loo... | 4,912 | [
{
"from": "human",
"value": "First time working with UpdatePanels in .NET. \nI have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.\nWhen the UpdatePanel refreshes, it needs values from the FormView control... |
I've been reading up on Linux's "swappiness" tuneable, which controls how aggressive the kernel is about swapping applications' memory to disk when they're not being used. If you Google the term, you get a lot of pages like this discussing the pros and cons. In a nutshell, the argument goes like this:
If your swappine... | Your reasoning touches on an interesting idea about memory management and how the Linux kernel handles inactive applications, but there are some key concepts to clarify regarding memory pages, paging, and how operating systems manage resources.
1. **Memory Pages and Swapping**: In Linux, when a process is inactive and... | 12,953 | [
{
"from": "human",
"value": "I've been reading up on Linux's \"swappiness\" tuneable, which controls how aggressive the kernel is about swapping applications' memory to disk when they're not being used. If you Google the term, you get a lot of pages like this discussing the pros and cons. In a nutshell, the... |
I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it?
Thank you!
Addition
I do understand the process in general, so I need more detailed advices, for example, how to fill new GUID column. Using default value newid(... | Changing primary keys from integers to GUIDs while maintaining referential integrity in a relational database is a multi-step process. Below are the steps involved along with detailed advice on how to handle the transition, including how to populate the new GUID column.
### Step-by-Step Process
1. **Add a New GUID Co... | 11,532 | [
{
"from": "human",
"value": "I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it?\nThank you!\nAddition\nI do understand the process in general, so I need more detailed advices, for example, how to fill... |
Is is possible to configure a server to allow using links with and without using the .aspx extention.
If yes, how could I go about setting this up.
I'm working on a client site who is using umbraco. I know it has built in friendly URL capibility. Unfortunatly the site is already live and turning the feature on for the... | Yes, it is possible to configure a server to allow using links with and without the `.aspx` extension. This can usually be done by setting up URL rewriting or redirection rules, depending on your server environment. Here’s how you can accomplish this on an IIS server, as Umbraco is commonly hosted on IIS.
### Steps t... | 12,143 | [
{
"from": "human",
"value": "Is is possible to configure a server to allow using links with and without using the .aspx extention. \nIf yes, how could I go about setting this up.\nI'm working on a client site who is using umbraco. I know it has built in friendly URL capibility. Unfortunatly the site is alre... |
I recently downloaded ndepend and ran an analysis on an open source project I participate in.
I did not now where to look next - a bit of visual and information overload and it turned out I don't even know where to start.
Can anyone suggest starting points?
What information should I look for first?
What points out pro... | Using NDepend can indeed be overwhelming at first due to the wealth of information it provides. However, there are several key areas you can focus on to effectively analyze your project and identify potential issues. Here are some suggested starting points:
### Starting Points for Analyzing Code with NDepend
1. **Das... | 12,048 | [
{
"from": "human",
"value": "I recently downloaded ndepend and ran an analysis on an open source project I participate in.\nI did not now where to look next - a bit of visual and information overload and it turned out I don't even know where to start.\nCan anyone suggest starting points?\n\nWhat information... |
My server already runs IIS on TCP ports 80 and 443. I want to make a centralized "push/pull" Git repository available to all my team members over the Internet.
So I should use HTTP or HTTPS.
But I cannot use Apache because of IIS already hooking up listening sockets on ports 80 and 443! Is there any way to publish a Gi... | Yes, you can publish a Git repository over IIS, and while Git's HTTP functionality is primarily read-only, there are ways to implement a "push/pull" setup with additional configurations.
### Setting Up a Git Repository on IIS
1. **Install Git for Windows**: Ensure you have Git installed on your server where IIS is ru... | 12,719 | [
{
"from": "human",
"value": "My server already runs IIS on TCP ports 80 and 443. I want to make a centralized \"push/pull\" Git repository available to all my team members over the Internet.\nSo I should use HTTP or HTTPS.\nBut I cannot use Apache because of IIS already hooking up listening sockets on ports... |
Is there a plugin for targetting .NET 1.1 with VS 2008?
| Visual Studio 2008 does not natively support targeting .NET Framework 1.1, as it was designed to work primarily with .NET Framework 3.5 and later. However, there are a few approaches you can take to work with .NET Framework 1.1 in a Visual Studio environment:
1. **Use Visual Studio 2003**: The most straightforward app... | 12,434 | [
{
"from": "human",
"value": "Is there a plugin for targetting .NET 1.1 with VS 2008?\n"
},
{
"from": "gpt",
"value": "Visual Studio 2008 does not natively support targeting .NET Framework 1.1, as it was designed to work primarily with .NET Framework 3.5 and later. However, there are a few approa... |
How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#?
Something like:
DateTime.Now.StartWeek(Monday);
| To find the start of the week in C# based on the current date and time, you can create an extension method that calculates the start of the week for both Sunday and Monday. Below is an example of how to implement such a method:
1. **Create an Enum for the Start Day of the Week:**
```csharp
public enum WeekStart
{
... | 5,225 | [
{
"from": "human",
"value": "How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#?\nSomething like:\nDateTime.Now.StartWeek(Monday);\n\n"
},
{
"from": "gpt",
"value": "To find the start of the week in C# based on the current date and time, you can crea... |
Can someone explain when to use each of these? They almost seem interchangeable in many cases.
The Custom Control gets added to the toolbar while the User Control (ascx) can not. The Custom Control does not get rendered in the Designer while the User Control does. Beyond that, how do you choose which is the right ... | Certainly! The distinction between Custom Controls and User Controls in ASP.NET can indeed be subtle, but they serve different purposes and have different characteristics. Let's break down the key differences and use cases for each:
### User Controls (ASCX)
- **Definition**: User controls are .ascx files that encapsul... | 9,877 | [
{
"from": "human",
"value": "Can someone explain when to use each of these? They almost seem interchangeable in many cases. \nThe Custom Control gets added to the toolbar while the User Control (ascx) can not. The Custom Control does not get rendered in the Designer while the User Control does. Beyond t... |
As a project manager, you are required to organize time so that the project meets a deadline.
Is there some sort of equations to use for estimating how long the development will take?
let's say the database
time = sql storedprocedures * tables manipulated or something similar
Or are you just stuck having to get the exp... | Estimating project timelines, particularly in software development, can be challenging due to the complexity and variability of tasks. While there isn’t a one-size-fits-all equation, there are several methods and heuristics that can help you make more informed estimates. Below are some common approaches you might consi... | 11,890 | [
{
"from": "human",
"value": "As a project manager, you are required to organize time so that the project meets a deadline.\nIs there some sort of equations to use for estimating how long the development will take?\nlet's say the database\ntime = sql storedprocedures * tables manipulated or something similar... |
My site has quite a deep navigation structure and quite often it looks like the out of the box navigation is leaking memory, especially the SPWeb objects.
The log message looks like
Potentially excessive number of SPRequest objects (14) currently unreleased on thread 5. Ensure that this object or its parent (such as ... | The log message you're seeing indicates that there are multiple instances of `SPRequest` objects that haven't been released properly, which can lead to memory leaks in your SharePoint application. This typically happens when SPWeb or SPSite objects are not disposed of correctly.
Here are some steps you can take to ad... | 12,643 | [
{
"from": "human",
"value": "My site has quite a deep navigation structure and quite often it looks like the out of the box navigation is leaking memory, especially the SPWeb objects.\nThe log message looks like\n\nPotentially excessive number of SPRequest objects (14) currently unreleased on thread 5. Ens... |
I am using Vim for windows installed in Unix mode. Thanks to this site I now use the gf command to go to a file under the cursor.
I'm looking for a command to either:
return to the previous file (similar
to Ctrl+T for ctags), or
remap gf
to automatically launch the new file
in a new window.
| In Vim, you can easily manage file navigation and control how files open when using commands like `gf`. Here’s how to achieve both of your objectives:
### 1. Return to the Previous File
To return to the previous file, you can use the `:e#` command. This command will edit the alternate file, allowing you to toggle bet... | 14,540 | [
{
"from": "human",
"value": "I am using Vim for windows installed in Unix mode. Thanks to this site I now use the gf command to go to a file under the cursor.\nI'm looking for a command to either:\n\nreturn to the previous file (similar\nto Ctrl+T for ctags), or \nremap gf\nto automatically launch the new ... |
We create thumb images on our server and I'm looking for a way to save metadata (text) in that image. Is that possible?
At this moment we use PHP and we create JPG images.
| Yes, it is possible to save metadata within JPEG images. JPEG images can contain metadata in several formats, with the most common being Exif, IPTC, and XMP. You can use libraries in PHP to add or manipulate metadata in JPEG files. Here are a couple of options you can consider:
### Option 1: Using the `exif_write_data... | 10,287 | [
{
"from": "human",
"value": "We create thumb images on our server and I'm looking for a way to save metadata (text) in that image. Is that possible?\nAt this moment we use PHP and we create JPG images.\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to save metadata within JPEG images. JPEG... |
I'm trying to install Maatkit following the maatkit instructions. I can't get past having to install DBD::mysql. "Warning: prerequisite DBD::mysql 1 not found."
When I try to install DBD::mysql from cpan, I get very helpful "make had returned bad status, install seems impossible".
Perl is "v5.8.8 built for darwin-thre... | The warning you are encountering indicates that the `DBD::mysql` Perl module is not installed on your system. Since you're using an older version of Perl (v5.8.8), there might be additional complications when trying to install `DBD::mysql`. Here are some steps to help you resolve the issue:
### Step 1: Install MySQL D... | 10,701 | [
{
"from": "human",
"value": "I'm trying to install Maatkit following the maatkit instructions. I can't get past having to install DBD::mysql. \"Warning: prerequisite DBD::mysql 1 not found.\"\nWhen I try to install DBD::mysql from cpan, I get very helpful \"make had returned bad status, install seems impos... |
In C#.Net WPF During UserControl.Load ->
What is the best way of showing a whirling circle / 'Loading' Indicator on the UserControl until it has finished gathering data and rendering it's contents?
| In a WPF UserControl, you can display a loading indicator (such as a whirling circle) while your data is being gathered and rendered. The best way to do this is to use asynchronous programming with `async` and `await`, along with a `ProgressBar` or a custom loading animation that you can show and hide based on the load... | 10,506 | [
{
"from": "human",
"value": "In C#.Net WPF During UserControl.Load ->\nWhat is the best way of showing a whirling circle / 'Loading' Indicator on the UserControl until it has finished gathering data and rendering it's contents?\n"
},
{
"from": "gpt",
"value": "In a WPF UserControl, you can displ... |
I'm working on several distinct but related projects in different programming languages. Some of these projects need to parse filenames written by other projects, and expect a certain filename pattern.
This pattern is now hardcoded in several places and in several languages, making it a maintenance bomb. It is fairly e... | Maintaining a consistent filename pattern across multiple projects and programming languages can indeed become complex, especially when the same logic is duplicated in several places. Here are some techniques to define the filename pattern once and use it consistently across different projects and languages:
### 1. **... | 7,783 | [
{
"from": "human",
"value": "I'm working on several distinct but related projects in different programming languages. Some of these projects need to parse filenames written by other projects, and expect a certain filename pattern.\nThis pattern is now hardcoded in several places and in several languages, ma... |
Is there any setting in Visual Studio 2008 to group/organize tabs? For example, I'd prefer to have all code-behind files open in a tab next to its .aspx page if that page is open and vice versa. Dragging tabs around really kills my productivity.
| Visual Studio 2008 does not have built-in support for tab grouping or organizing tabs in a way that keeps related files (like `.aspx` and its code-behind file) next to each other by default. However, there are a few workarounds and tips you can use to improve your workflow:
1. **Solution Explorer**: Use the Solution E... | 13,828 | [
{
"from": "human",
"value": "Is there any setting in Visual Studio 2008 to group/organize tabs? For example, I'd prefer to have all code-behind files open in a tab next to its .aspx page if that page is open and vice versa. Dragging tabs around really kills my productivity.\n"
},
{
"from": "gpt",
... |
I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created.
The tests on my development machine... | Integrating MS MapPoint into your WinForms application can indeed lead to performance issues like you're experiencing, especially when calling methods that load maps. Since you mentioned that the `NewMap` method blocks the GUI thread and you can't show a loading dialog, here are some strategies you can try to improve t... | 5,654 | [
{
"from": "human",
"value": "I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is creat... |
I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments where machine names and IP addresses are different. The web service signature w... | To achieve a dynamic web service address in your application, you can follow these steps. You can store the web service address in a configuration file (like `appsettings.json` for .NET Core applications or `Web.config` for .NET Framework applications) or even a database if you prefer. Here’s how you can implement it:
... | 10,239 | [
{
"from": "human",
"value": "I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments where machine names and IP addresses ar... |
I'm not going to be too surprised if I get shot-down for asking a "non programming" question, but maybe somebody knows ...
I was zipping the contents of my subversion sandbox using WinXP's inbuilt "Send to Compressed (zipped) Folder" capability and was surprised to find that the .zip file created did not contain the .s... | When you use the built-in "Send to Compressed (zipped) Folder" feature in Windows, it generally includes all visible files and folders in the selected directory. However, in the case of Subversion (`.svn`) directories, they are hidden by default. Because of this, if your Windows settings are not configured to show hidd... | 11,616 | [
{
"from": "human",
"value": "I'm not going to be too surprised if I get shot-down for asking a \"non programming\" question, but maybe somebody knows ...\nI was zipping the contents of my subversion sandbox using WinXP's inbuilt \"Send to Compressed (zipped) Folder\" capability and was surprised to find tha... |
I'm building a Silverlight application and one of my caveats from last time was that if you need anything done right in Silverlight/WPF way you'd need to model your objects as a DependecyObject and use DependencyProperty(ies)
I find this model to be rather cumbersome, requiring static fields and initializers in half t... | Using `DependencyObject` and `DependencyProperty` in Silverlight and WPF provides several benefits that align well with the framework's architecture, particularly around data binding, styling, and animation. However, if you're aiming to minimize boilerplate and simplify your code, there are strategies to reduce your re... | 12,831 | [
{
"from": "human",
"value": "I'm building a Silverlight application and one of my caveats from last time was that if you need anything done right in Silverlight/WPF way you'd need to model your objects as a DependecyObject and use DependencyProperty(ies) \nI find this model to be rather cumbersome, requirin... |
When you open a solution in Visual Studio 2008 (or ealier versions for that matter), it opens all the documents that you did not close before you closed Visual Studio. Is there anyway to turn this functionality off, or a plugin that fixes this behavior? It takes forever to load a solution with 50 files open?
| In Visual Studio 2008 and earlier versions, there isn’t a built-in option to disable the reopening of documents when you open a solution. However, there are a few workarounds that you can consider to mitigate the issue:
1. **Close Files Before Exiting**: The simplest solution, though not very convenient, is to make a ... | 15,745 | [
{
"from": "human",
"value": "When you open a solution in Visual Studio 2008 (or ealier versions for that matter), it opens all the documents that you did not close before you closed Visual Studio. Is there anyway to turn this functionality off, or a plugin that fixes this behavior? It takes forever to load ... |
Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ?
| Retrofitting unit tests onto a codebase that currently lacks them can be a challenging but rewarding process. Here are several strategies to approach this task effectively:
### 1. **Understand the Codebase**
- **Read the Code**: Familiarize yourself with the existing code. Look for important classes and functions, ... | 5,503 | [
{
"from": "human",
"value": "Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ?\n"
},
{
"from": "gpt",
"value": "Retrofitting unit tests onto a codebase that currently lacks them can be a challenging but rewarding process. Here are several ... |
How do you guys manage the information overflow?
What are the tools that you guys use?
One of the usefull tool is RSS feed reader.
Does Any body uses any other tools or any other ways to effectively manage the information?
| Managing information overflow can be quite challenging, especially with the vast amount of content available online. Here are some effective tools and strategies beyond RSS feed readers that can help manage information overload:
### Tools
1. **Bookmarking Services:**
- **Pocket**: Save articles and videos for late... | 13,790 | [
{
"from": "human",
"value": "How do you guys manage the information overflow? \nWhat are the tools that you guys use?\nOne of the usefull tool is RSS feed reader. \nDoes Any body uses any other tools or any other ways to effectively manage the information?\n"
},
{
"from": "gpt",
"value": "Managi... |
Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control?
The report definition should be embedded in the executable and should not use the Reporting Services web service.
| Yes, it is possible to generate a report in PDF format (or other formats) from a standalone executable without displaying the ReportViewer control and without using the Reporting Services web service. You can achieve this by using the LocalReport class provided by the Microsoft.ReportingServices.ReportViewerControl ass... | 11,574 | [
{
"from": "human",
"value": "Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control? \nThe report definition should be embedded in the executable and should not us... |
I am told that good developers can spot/utilize the difference between Null and False and 0 and all the other good "nothing" entities.
What is the difference, specifically in PHP? Does it have something to do with ===?
| Yes, in PHP, understanding the differences between `null`, `false`, `0`, and other "empty" or "falsy" values is important for writing clear and bug-free code. Each of these values has distinct meanings and uses.
### Definitions
1. **`null`**: This is a special data type in PHP that represents the absence of a value. ... | 10,636 | [
{
"from": "human",
"value": "I am told that good developers can spot/utilize the difference between Null and False and 0 and all the other good \"nothing\" entities.\nWhat is the difference, specifically in PHP? Does it have something to do with ===?\n"
},
{
"from": "gpt",
"value": "Yes, in PHP... |
How do I write a program that tells when my other program ends?
| To write a program that monitors the execution of another program and determines when it ends, you can use various programming languages and techniques depending on your operating system. Below are examples in Python, which is a cross-platform language, as well as alternatives in other environments.
### Using Python
... | 10,559 | [
{
"from": "human",
"value": "How do I write a program that tells when my other program ends?\n"
},
{
"from": "gpt",
"value": "To write a program that monitors the execution of another program and determines when it ends, you can use various programming languages and techniques depending on your ... |
Is it possible to modify a registry value (whether string or DWORD) via a .bat/.cmd script?
| Yes, it is possible to modify a registry value using a batch file (.bat or .cmd) in Windows. You can use the `reg` command to achieve this. Here are some examples for modifying both string and DWORD values in the registry.
### Modifying a String Value
To modify a string value, you can use the following command:
```b... | 13,339 | [
{
"from": "human",
"value": "Is it possible to modify a registry value (whether string or DWORD) via a .bat/.cmd script?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to modify a registry value using a batch file (.bat or .cmd) in Windows. You can use the `reg` command to achieve this. He... |
Here is the scenario:
I have a winforms application using NHibernate. When launched, I populate a DataGridView with the results of a NHibernate query. This part works fine. If I update a record in that list and flush the session, the update takes in the database. Upon closing the form after the update, I call a met... | The issue you're experiencing with NHibernate seems to be related to its first-level cache (session cache) and how it manages object state. When you retrieve an object from the database, it gets cached in the session. If you update this object but don't explicitly refresh it or clear the session afterward, any subseque... | 11,567 | [
{
"from": "human",
"value": "Here is the scenario:\nI have a winforms application using NHibernate. When launched, I populate a DataGridView with the results of a NHibernate query. This part works fine. If I update a record in that list and flush the session, the update takes in the database. Upon closi... |
I definitifely like the one at stackoverflow, because it's clean and simple. Also the live preview with code/syntax hilighting is really helpful (and motivating).
What is your favourite Javascript Editor Framework and why?
| As an AI language model, I don’t have personal preferences, but I can certainly highlight some popular JavaScript editor frameworks that developers commonly appreciate for various reasons:
1. **CodeMirror**:
- **Why**: CodeMirror is highly flexible and customizable, making it a great choice for building text editor... | 14,949 | [
{
"from": "human",
"value": "I definitifely like the one at stackoverflow, because it's clean and simple. Also the live preview with code/syntax hilighting is really helpful (and motivating).\nWhat is your favourite Javascript Editor Framework and why?\n"
},
{
"from": "gpt",
"value": "As an AI l... |
Is there an IE6/PNG fix that is officially developed by the jQuery team?
If not which of the available plugins should I use?
| The jQuery team did not officially develop an IE6/PNG fix. However, one popular and widely used solution for handling PNG transparency issues in Internet Explorer 6 is **DD_belatedPNG**. This is a lightweight JavaScript library that helps to render PNG images correctly in IE6.
**DD_belatedPNG** provides an easy way to... | 14,642 | [
{
"from": "human",
"value": "Is there an IE6/PNG fix that is officially developed by the jQuery team?\nIf not which of the available plugins should I use?\n"
},
{
"from": "gpt",
"value": "The jQuery team did not officially develop an IE6/PNG fix. However, one popular and widely used solution for... |
A poorly-written back-end system we interface with is having trouble with handling the load we're producing. While they fix their load problems, we're trying to reduce any additional load we're generating, one of which is that the back-end system continues to try and service a form submission even if another submission... | To handle form submissions more effectively and prevent multiple submissions due to double-clicking, you can implement a debounce mechanism that not only disables the submission button but also allows the loading animation to run smoothly while waiting for the form submission to complete.
Here's how you can enhance yo... | 11,047 | [
{
"from": "human",
"value": "A poorly-written back-end system we interface with is having trouble with handling the load we're producing. While they fix their load problems, we're trying to reduce any additional load we're generating, one of which is that the back-end system continues to try and service a f... |
I need to execute a large set of SQL statements (creating a bunch of tables, views and stored procedures) from within a C# program.
These statements need to be separated by GO statements, but SqlCommand.ExecuteNonQuery() does not like GO statements. My solution, which I suppose I'll post for reference, was to split the... | Your approach of splitting the SQL statements by "GO" and executing them separately is a common way to handle this in C#. Since "GO" is not a valid SQL command but rather a batch separator understood by SQL Server Management Studio (SSMS) and some other SQL clients, it won't be processed by SQL Server directly.
Howeve... | 4,696 | [
{
"from": "human",
"value": "I need to execute a large set of SQL statements (creating a bunch of tables, views and stored procedures) from within a C# program.\nThese statements need to be separated by GO statements, but SqlCommand.ExecuteNonQuery() does not like GO statements. My solution, which I suppose... |
A single Biztalk Server can have multiple Host processes. Is it possible to create an application config file for each host process? For example I would like to use Unity or log4net or whatever which needs such a configuration file.
Edit: Thanks at David Hall. To elaborate a bit more:
We have 12 Biztalk Servers in a gr... | In BizTalk Server, the concept of host processes is integral to its architecture, allowing for better performance and scalability. However, BizTalk does not natively support having separate application configuration files for each host process out of the box. Each BizTalk application generally uses a single configurati... | 11,706 | [
{
"from": "human",
"value": "A single Biztalk Server can have multiple Host processes. Is it possible to create an application config file for each host process? For example I would like to use Unity or log4net or whatever which needs such a configuration file.\nEdit: Thanks at David Hall. To elaborate a bi... |
I followed google to this MSDN forum thread.
The last answer was and I qoute : "Using threads? Don't"
Does someone knows a walk around?
As far as I can tell, I'm playing the cards well.
I'm using BeginInvoke inorder to populate the data source inside the UI thread.
More details :
I've got a background thread that make ... | It sounds like you're facing a common issue when working with threads in a UI application, particularly when interacting with UI elements in a multi-threaded environment. The recommendation to avoid using threads can often stem from the complications that arise when managing UI updates from background threads.
Here's ... | 10,847 | [
{
"from": "human",
"value": "I followed google to this MSDN forum thread.\nThe last answer was and I qoute : \"Using threads? Don't\"\nDoes someone knows a walk around?\nAs far as I can tell, I'm playing the cards well.\nI'm using BeginInvoke inorder to populate the data source inside the UI thread.\nMore d... |
I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits.
This is to help me consider moving from ASP.NET WebForms to ASP.NET MVC.
| The performance difference between ASP.NET MVC and ASP.NET WebForms can indeed be significant, although the specific metrics will vary based on the application context, the complexity of the pages, and how the frameworks are used. Here’s an overview of the differences and the benefits of migrating from WebForms to MVC.... | 6,807 | [
{
"from": "human",
"value": "I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits.\nThis is to help me consider moving from ASP.NET WebForms to ASP.NET MVC.\n"
},
{
"fro... |
Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user.
Any ideas?
I know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed.
| If your application is able to record errors in an `OnError` method but can't redirect or show meaningful messages to the user, you can implement a global error handling mechanism that allows you to capture errors, log them, and show user-friendly messages.
Here are some ideas you can consider:
### 1. Custom Error Pa... | 10,868 | [
{
"from": "human",
"value": "Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user.\nAny ideas?\nI know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed.\... |
After working with .NET's HttpWebRequest/Response objects, I'd rather shoot myself than use this to crawl through web sites. I'm looking for an existing .NET library that can fetch URLs, and give you the ability to follow links, extract/fill in/submit forms on the page, etc. Perl's LWP and WWW::Mechanize modules do t... | Yes, there are several libraries in .NET that can help you with web crawling, link following, and form submission similar to Perl's LWP and WWW::Mechanize modules. Here are a few options you might find useful:
1. **Html Agility Pack (HAP)**: While you mentioned that HAP itself does not simulate links/forms, it is exce... | 11,590 | [
{
"from": "human",
"value": "After working with .NET's HttpWebRequest/Response objects, I'd rather shoot myself than use this to crawl through web sites. I'm looking for an existing .NET library that can fetch URLs, and give you the ability to follow links, extract/fill in/submit forms on the page, etc. P... |
We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers.
We've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the old config not working. The recipe works fine for the linu... | To automate your deployment process for mixed Windows and Linux environments while addressing the challenges you've encountered with Capistrano, SVN, and manual updates, I recommend a multi-step approach that combines several tools and practices:
### 1. **Use Ansible for Deployment**
Ansible is a powerful automation ... | 13,534 | [
{
"from": "human",
"value": "We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers. \nWe've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the old config not w... |
I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders the readability of the control (... | To restrict a ComboBox in WinForms to allow only the predefined options and not accept user-entered strings, you can set the `DropDownStyle` property of the ComboBox to `DropDownList`. This way, the user can only select from the list of items you provide, and they won't be able to enter any custom text.
Here's how you... | 15,729 | [
{
"from": "human",
"value": "I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it... |
Is there ever a circumstance in which I would not want to use the AndAlso operator rather than the And operator? …or in which I would not want to use the OrElse operator rather than the Or operator?
| Yes, there are specific circumstances in which you might want to use the `And` operator (also known as bitwise AND) instead of the `AndAlso` operator (short-circuit AND) or the `Or` operator instead of the `OrElse` operator (short-circuit OR).
### 1. **When to Use `And` and `Or`:**
- **Bitwise Operations**:
The `... | 14,150 | [
{
"from": "human",
"value": "Is there ever a circumstance in which I would not want to use the AndAlso operator rather than the And operator? …or in which I would not want to use the OrElse operator rather than the Or operator?\n"
},
{
"from": "gpt",
"value": "Yes, there are specific circumstan... |
If you have an API, and you are a UK-based developer with a highly international audience, should your API be
setColour()
or
setColor()
(To take one word as a simple example.)
UK-based engineers are often quite defensive about their 'correct' spellings but it could be argued that US spelling is more 'standard' in th... | The question of whether to use British English (e.g., "setColour()") or American English (e.g., "setColor()") in your API design is an important one, especially when considering an international audience. Here are some factors to consider:
### 1. Audience and Market:
- **International Audience:** If your API is target... | 13,542 | [
{
"from": "human",
"value": "If you have an API, and you are a UK-based developer with a highly international audience, should your API be \nsetColour()\n\nor\nsetColor()\n\n(To take one word as a simple example.)\nUK-based engineers are often quite defensive about their 'correct' spellings but it could be ... |
I have this strange call stack and I am stumped to understand why.
It seems to me that asio calls open ssl's read and then gets a negative return value (-37) .
Asio seems to then try to use it inside the memcpy function.
The function that causes this call stack is used hunderds of thousands of times without this error... | When debugging an issue like the one you're experiencing, it’s crucial to break down the components of the call stack and analyze what could lead to a negative return value from OpenSSL, which in turn leads to a problem in `memcpy`. Here are some potential causes for the negative return value and the subsequent behavio... | 11,392 | [
{
"from": "human",
"value": "I have this strange call stack and I am stumped to understand why.\nIt seems to me that asio calls open ssl's read and then gets a negative return value (-37) .\nAsio seems to then try to use it inside the memcpy function. \nThe function that causes this call stack is used hunde... |
I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design.
To save me from constantly having to create instances of my service layer/data access layer classes, I have made the methods in them all static. I shouldn't get concurrency issues as they use local variables e... | Using static methods in your service and data access layers can simplify your code and make it cleaner for small projects, especially when you're just learning and experimenting. However, there are several considerations and potential drawbacks to this approach that you should be aware of:
### Pros of Using Static Met... | 12,182 | [
{
"from": "human",
"value": "I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design.\nTo save me from constantly having to create instances of my service layer/data access layer classes, I have made the methods in them all static. I shouldn't get concur... |
Ideally I'd like a way to enable the mouse wheel for scrolling in old compiled java runtime apps, but java code to explicitly utilise it for an individual app would suffice.
| Enabling mouse wheel scrolling in a Java application depends on the underlying GUI framework you're using, typically Swing or AWT. If you have access to the source code of the application, you can add mouse wheel support to it. If you don't have the source code, your options may be more limited.
### Adding Mouse Wheel... | 14,124 | [
{
"from": "human",
"value": "Ideally I'd like a way to enable the mouse wheel for scrolling in old compiled java runtime apps, but java code to explicitly utilise it for an individual app would suffice. \n"
},
{
"from": "gpt",
"value": "Enabling mouse wheel scrolling in a Java application depend... |
Sorry for the second newbie question, I'm a developer not a sysadmin so this is all quite new to me. I hope I can explain myself clearly! Here goes.
Here's what I did:
Logged into the root account
Created the accounts 'richard' and 'austin'
Created the group 'developers', and added 'richard' and 'austin' to it
Created... | You're on the right track, but the issue you're encountering is due to how the default permissions and ownership are set when a new directory is created. By default, when a user creates a directory, it typically inherits their user ownership and the default permissions (which do not include group write access).
To ens... | 12,921 | [
{
"from": "human",
"value": "Sorry for the second newbie question, I'm a developer not a sysadmin so this is all quite new to me. I hope I can explain myself clearly! Here goes.\nHere's what I did:\n\nLogged into the root account\nCreated the accounts 'richard' and 'austin'\nCreated the group 'developers', ... |
I want to log on to a server inside my program using Windows authentication of the current user logged in. I thought that perhaps I could use
System.Security.Principal.WindowsIdentity.GetCurrent().Name
but while that does give a name, I do not see how I can find out the password of the user to enter it.
| When using Windows authentication, your application typically does not need to manage user credentials such as usernames and passwords. Instead, it can utilize the existing Windows session of the currently logged-in user. The `System.Security.Principal.WindowsIdentity.GetCurrent()` method provides you with the identity... | 14,160 | [
{
"from": "human",
"value": "I want to log on to a server inside my program using Windows authentication of the current user logged in. I thought that perhaps I could use \nSystem.Security.Principal.WindowsIdentity.GetCurrent().Name\nbut while that does give a name, I do not see how I can find out the passw... |
Am I the only person who has the need to view multiple directories at once (usually on the same remote server, but sometimes other ones too)? Disconnecting and reconnecting is driving me crazy.
Preferably a free tool, but I'm getting to the stage where I'll try anything!
Can you have multiple FireFTP tabs in Firefox? A... | You're definitely not alone in wanting to view multiple directories or sessions simultaneously! Here are several options that might help you:
### 1. **Using FileZilla**
FileZilla is a free, open-source FTP client that supports multiple tabs for different connections. You can open multiple tabs to connect to different ... | 8,647 | [
{
"from": "human",
"value": "Am I the only person who has the need to view multiple directories at once (usually on the same remote server, but sometimes other ones too)? Disconnecting and reconnecting is driving me crazy.\nPreferably a free tool, but I'm getting to the stage where I'll try anything!\nCan y... |
I have 3 tables
Links
Link ID
Link Name
GroupID (FK into Groups)
SubGroupID (FK into Subgroups)
Groups
GroupID
GroupName
SubGroup
SubGroupID
SubGroupName
GroupID (FK into Groups)
Every link needs to have a GroupID but teh SubGroupID is optional. How do i write a SQL query to show:
Links.LinkName, Groups.GroupName,... | You can achieve this using a single SQL query by using a `LEFT JOIN`. This allows you to include all records from the `Links` table and match with `Groups` and `SubGroup` tables, even if there are no matching records in the `SubGroup` table. The `LEFT JOIN` will return `NULL` for the `SubGroupName` when there is no cor... | 14,518 | [
{
"from": "human",
"value": "I have 3 tables\n\nLinks\nLink ID\nLink Name\nGroupID (FK into Groups)\nSubGroupID (FK into Subgroups)\n\nGroups\nGroupID\nGroupName\nSubGroup\nSubGroupID\nSubGroupName\nGroupID (FK into Groups)\n\nEvery link needs to have a GroupID but teh SubGroupID is optional. How do i writ... |
How do I represent an aggregation relation between two classes in UML, such that each class has a link to the other class's interface, not the implementing class?
E.g. I have a class Foo that implements iFoo, and Bar that implements iBar. Foo should have a member variable of type iBar, and Bar should have a member vari... | In UML, to represent an aggregation relation between two classes where each class holds a reference to the other's interface, you can follow these guidelines:
### 1. **Use Interfaces in the Class Diagram:**
Define your interfaces (`iFoo` and `iBar`) and classes (`Foo` and `Bar`) in the diagram. Your classes should imp... | 8,911 | [
{
"from": "human",
"value": "How do I represent an aggregation relation between two classes in UML, such that each class has a link to the other class's interface, not the implementing class?\nE.g. I have a class Foo that implements iFoo, and Bar that implements iBar. Foo should have a member variable of ty... |
Does anybody have a short code sample that can be run in the VS macro editor on how to enumerate the tool windows in VS 2008 and show the GUID for each one?
Or do you know another way to find this out?
| Certainly! To enumerate the tool windows in Visual Studio 2008 and display their GUIDs using a macro, you can use the `DTE` object. Below is a short code sample that you can run in the Visual Studio macro editor.
1. Open Visual Studio 2008.
2. Go to `Tools` -> `Macros` -> `Macros IDE`.
3. In the Macros IDE, create a n... | 13,957 | [
{
"from": "human",
"value": "Does anybody have a short code sample that can be run in the VS macro editor on how to enumerate the tool windows in VS 2008 and show the GUID for each one?\nOr do you know another way to find this out?\n"
},
{
"from": "gpt",
"value": "Certainly! To enumerate the too... |
We have got loads of options for php + MySQL + Apache combo... Which is the best pack among these ?
Lets confine our ideas to WAMP vs XAMPP, is there a better option to go for?
I created an online programming contest web app called CodeFire on XAMPP, later I had to switch to WAMP, where none of the php scripts worked p... | When deciding between WAMP and XAMPP for your development needs, both stacks have their strengths and weaknesses. Here’s a breakdown of each to help you decide which is better suited for your purposes:
### WAMP (Windows, Apache, MySQL, PHP)
**Pros:**
1. **Windows Native:** WAMP is specifically designed for Windows, w... | 11,720 | [
{
"from": "human",
"value": "We have got loads of options for php + MySQL + Apache combo... Which is the best pack among these ?\nLets confine our ideas to WAMP vs XAMPP, is there a better option to go for?\nI created an online programming contest web app called CodeFire on XAMPP, later I had to switch to W... |
Our application is a hybrid Win32 unmanaged application and a .NET 2.0 managed application. The Win32 part is the main executable, which at some point loads and hosts the .NET 2.0 runtime and loads some managed modules to open new winforms windows.
We've had our share of CASPOL-type problems, but today we have a very o... | It sounds like you are experiencing a frustrating issue that could be tied to several factors, especially given the hybrid nature of your application and the differences in execution context based on the directory location. Here are some potential areas to investigate further:
1. **File Permissions**: Ensure that the ... | 10,887 | [
{
"from": "human",
"value": "Our application is a hybrid Win32 unmanaged application and a .NET 2.0 managed application. The Win32 part is the main executable, which at some point loads and hosts the .NET 2.0 runtime and loads some managed modules to open new winforms windows.\nWe've had our share of CASPOL... |
I want to add a property to my User model that returns the number of rows in the Project table that have a user Id of the user.
So something like this...
def numProjects = {
/* somehow get count from Project table
The straight sql would be:
SELECT COUNT(*) FROM projects WHERE userId = <the current us... | To add a property to your User model that returns the number of projects associated with that user, you will typically want to define a computed property or method that queries the `Project` table based on the user's ID. The exact implementation will depend on the framework and ORM (Object-Relational Mapping) you are u... | 12,594 | [
{
"from": "human",
"value": "I want to add a property to my User model that returns the number of rows in the Project table that have a user Id of the user.\nSo something like this...\ndef numProjects = {\n\n /* somehow get count from Project table\n The straight sql would be:\n SELECT COUNT(... |
I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful
| Setting up Mono on a Mac for ASP.NET development can be a bit different from Linux, but it's definitely doable. Here are some tips and steps to help you get started:
### Step 1: Install Homebrew
Homebrew is a package manager for macOS that simplifies the installation of software. If you haven't installed it yet, open ... | 8,932 | [
{
"from": "human",
"value": "I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice w... |
I wan't to know the real size of a web page (HTML + CSS + Javascript + Images + etc.) but from the browser side, maybe with a software, Firefox Add-On or similar?
| To determine the total size of a web page, including HTML, CSS, JavaScript, images, and other resources, you can use various tools and browser extensions. Here are some methods you can try, specifically for Firefox:
### 1. **Firefox Developer Tools**
Firefox has built-in Developer Tools that you can use to inspect the... | 14,350 | [
{
"from": "human",
"value": "I wan't to know the real size of a web page (HTML + CSS + Javascript + Images + etc.) but from the browser side, maybe with a software, Firefox Add-On or similar?\n"
},
{
"from": "gpt",
"value": "To determine the total size of a web page, including HTML, CSS, JavaScr... |
Is there any free tool available for creating and editing PNG Images?
| Yes, there are several free tools available for creating and editing PNG images. Here are some popular options:
1. **GIMP**: A powerful open-source image editor that supports a variety of formats, including PNG. It offers advanced features similar to Adobe Photoshop.
2. **Paint.NET**: A free raster graphics editor fo... | 16,084 | [
{
"from": "human",
"value": "Is there any free tool available for creating and editing PNG Images?\n"
},
{
"from": "gpt",
"value": "Yes, there are several free tools available for creating and editing PNG images. Here are some popular options:\n\n1. **GIMP**: A powerful open-source image editor ... |
So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on)
I want to make this framework, and the apps it has use a Resource Oriented Architecture.
Now, I want to creat... | Creating a URL routing class for a framework based on Resource Oriented Architecture (ROA) is an excellent idea, as it helps in building scalable and maintainable applications. Here are some concepts and practices from established frameworks that you can consider when designing your own URL routing class:
### 1. **Def... | 10,562 | [
{
"from": "human",
"value": "So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on)\nI want to make this framework, and the apps it has use a Resource O... |
In other words, is it correct to use:
public class CustomerList : System.Collections.Generic.List<Customer>
{
/// supposed to be empty
}
instead of:
using CustomerList = System.Collections.Generic.List<Customer>
I'd rather use the first approach because I'd just define CustomerList once, and every time I needed a... | Your first approach is valid but serves a different purpose than the second one. Let's break down the differences between the two approaches:
### First Approach: Inheritance
```csharp
public class CustomerList : System.Collections.Generic.List<Customer>
{
/// supposed to be empty
}
```
In this case, you're creat... | 12,891 | [
{
"from": "human",
"value": "In other words, is it correct to use:\npublic class CustomerList : System.Collections.Generic.List<Customer>\n{\n /// supposed to be empty\n}\n\ninstead of:\nusing CustomerList = System.Collections.Generic.List<Customer>\n\nI'd rather use the first approach because I'd just d... |
My C application uses 3rd libraries, which do their own memory management.
In order to be robust, my application has code to deal with failures of library functions due to lack of free memory.
I would like to test this code, and for this, I need to simulate failures due to lack of memory.
What tool/s are recommended fo... | Simulating memory allocation failures in a C application can be quite useful for testing the robustness of your error handling mechanisms. In a Linux environment using gcc, there are a few methods and tools you can use to achieve this:
### 1. **Using `LD_PRELOAD` with a custom allocator**
One of the most flexible way... | 10,337 | [
{
"from": "human",
"value": "My C application uses 3rd libraries, which do their own memory management.\nIn order to be robust, my application has code to deal with failures of library functions due to lack of free memory.\nI would like to test this code, and for this, I need to simulate failures due to lac... |
I'm writing an asp.net application that will need to be localized to several regions other than North America. What do I need to do to prepare for this globalization? What are your top 1 to 2 resources for learning how to write a world ready application.
| Preparing your ASP.NET application for globalization involves several key steps and considerations to ensure that it can be easily adapted for different regions and cultures. Here are the essential actions you should take to get started:
### Steps for Preparing for Globalization
1. **Use Resource Files:**
- Store ... | 7,175 | [
{
"from": "human",
"value": "I'm writing an asp.net application that will need to be localized to several regions other than North America. What do I need to do to prepare for this globalization? What are your top 1 to 2 resources for learning how to write a world ready application.\n"
},
{
"from"... |
How do I configure the content-types returned from mongrel. Speficially I want it to return some javascripts files as application/x-javascript to try and reproduce a bug I am seeing on a remote server
| To configure the content types returned by Mongrel, you typically need to modify the way your application serves files. Mongrel itself, being a Ruby web server for Rack and Rails applications, usually serves static files with a default MIME type. If you want to return specific content types for JavaScript files (e.g., ... | 10,600 | [
{
"from": "human",
"value": "How do I configure the content-types returned from mongrel. Speficially I want it to return some javascripts files as application/x-javascript to try and reproduce a bug I am seeing on a remote server\n"
},
{
"from": "gpt",
"value": "To configure the content types re... |
Scenario: Several people go on holiday together, armed with digital cameras, and snap away. Some people remembered to adjust their camera clocks to local time, some left them at their home time, some left them at local time of the country they were born in, and some left their cameras on factory time.
The Problem: Tim... | To correct the timestamp differences in the EXIF metadata of photos on Windows Vista, you can use a couple of methods. Here’s a straightforward approach that involves using a batch script along with ExifTool, a powerful command-line application for reading, writing, and editing meta information in a variety of files.
... | 12,399 | [
{
"from": "human",
"value": "Scenario: Several people go on holiday together, armed with digital cameras, and snap away. Some people remembered to adjust their camera clocks to local time, some left them at their home time, some left them at local time of the country they were born in, and some left their ... |
I want to write a word addin that does some computations and updates some ui whenever the user types something or moves the current insertion point. From looking at the MSDN docs, I don't see any obvious way such as an TextTyped event on the document or application objects.
Does anyone know if this is possible without ... | Creating a Word add-in that responds to user actions such as typing or moving the insertion point can be a bit challenging since Word's JavaScript API does not directly support events like `TextTyped`. However, you can achieve this behavior using the following approaches:
### Using the Office.js Add-in API
While ther... | 12,177 | [
{
"from": "human",
"value": "I want to write a word addin that does some computations and updates some ui whenever the user types something or moves the current insertion point. From looking at the MSDN docs, I don't see any obvious way such as an TextTyped event on the document or application objects.\nDoe... |
I asked a question about Lua perfromance, and on of the responses asked:
Have you studied general tips for keeping Lua performance high? i.e. know table creation and rather reuse a table than create a new one, use of 'local print=print' and such to avoid global accesses.
This is a slightly different question from Lua... | Certainly! Here’s a performance tip for Lua:
### Use Local Variables
**Tip**: Always prefer using `local` variables instead of global ones.
**Explanation**: In Lua, accessing local variables is significantly faster than accessing global variables. This is because local variables are stored in the stack and can be a... | 15,220 | [
{
"from": "human",
"value": "I asked a question about Lua perfromance, and on of the responses asked:\n\nHave you studied general tips for keeping Lua performance high? i.e. know table creation and rather reuse a table than create a new one, use of 'local print=print' and such to avoid global accesses.\n\nT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.