instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am planning to use jquery in Rails instead of prototype. I am not sure to use jRails or to use plain jquery and stay away from RJS. What do you think about this? EDIT: Two weeks later I found this http://www.loudthinking.com/posts/32-myth-3-rails-forces-you-to-use-prototype EDIT: This screencast is interesting too...
It's great to hear that you're planning to use jQuery with Rails! Switching from Prototype to jQuery is a common choice for many developers, as jQuery is widely used, well-supported, and has a large ecosystem of plugins. ### jRails vs. Plain jQuery **jRails**: - jRails is a gem that allows you to use jQuery with Rail...
27,610
[ { "from": "human", "value": "I am planning to use jquery in Rails instead of prototype. \nI am not sure to use jRails or to use plain jquery and stay away from RJS.\nWhat do you think about this? \nEDIT: Two weeks later I found this http://www.loudthinking.com/posts/32-myth-3-rails-forces-you-to-use-prototy...
I have my sources split up in several directories, so for each directory I get back a DLL. Is it possible to create a DLL from several other DLL's ? EDIT: I'm using C++ with Windows CE Platform Builder 6.0 ( it's not managed )
Yes, it is possible to create a single DLL from multiple existing DLLs in C++, but it can be a complex process, especially on the Windows CE platform using Platform Builder. Since you're using unmanaged C++, here are a few approaches to consider: ### 1. **Static Linking:** If you have access to the source code of the ...
26,616
[ { "from": "human", "value": "I have my sources split up in several directories, so for each directory I get back a DLL. Is it possible to create a DLL from several other DLL's ?\nEDIT: I'm using C++ with Windows CE Platform Builder 6.0 ( it's not managed )\n" }, { "from": "gpt", "value": "Yes, i...
PHONE HOME Everybody wants to now and then. ...What about software when it grows up and becomes a mature product? Shouldn't it be an adult and live in its new home quietly? Or, should it show some affection from whence it came?... I've heard some say they'd rip out from the platters any bits that try and communicate wi...
This is a complex issue that blends technical, ethical, and business considerations. Here’s a structured analysis of the "phone home" concept, along with insights on both sides of the argument: ### Pro "Phone Home" Arguments: 1. **Cheat Detection**: As you mentioned, a strong argument for phone home functionality is ...
24,079
[ { "from": "human", "value": "PHONE HOME\nEverybody wants to now and then. ...What about software when it grows up and becomes a mature product? Shouldn't it be an adult and live in its new home quietly? Or, should it show some affection from whence it came?...\nI've heard some say they'd rip out from the pl...
Example G76 I0.4779 J270 K7 C90 X20 Y30 If a number begins with I J K C X Y and it doesn't have a decimal then add decimal. Above example should look like: G76 I0.4779 J270 K7. C90. X20. Y30. Purpose of this code is to convert CNC code for an older Fanuc OPC controller
To convert the CNC code for the older Fanuc OPC controller according to your specification (adding a decimal point to numbers starting with I, J, K, C, X, Y if they do not already have one), you can follow the rules laid out in your example. Here's how the conversion works: 1. Identify the parameters: Look for paramet...
28,589
[ { "from": "human", "value": "Example\nG76 I0.4779 J270 K7 C90\nX20 Y30 \nIf a number begins with I J K C X Y and it doesn't have a decimal then add decimal.\nAbove example should look like:\nG76 I0.4779 J270 K7. C90.\nX20. Y30.\nPurpose of this code is to convert CNC code for an older Fanuc OPC controller\n...
Need a refresher on bits/bytes, hex notation and how it relates to programming (C# preferred). Looking for a good reading list (online preferably).
Sure! Here's a refresher on bits, bytes, and hexadecimal notation, along with how they relate to programming, especially in C#. I'll also provide some resources for further reading. ### Bits and Bytes 1. **Bits**: The smallest unit of data in a computer, a bit can be either a 0 or a 1. 2. **Bytes**: A byte consists of...
25,563
[ { "from": "human", "value": "Need a refresher on bits/bytes, hex notation and how it relates to programming (C# preferred).\nLooking for a good reading list (online preferably).\n" }, { "from": "gpt", "value": "Sure! Here's a refresher on bits, bytes, and hexadecimal notation, along with how the...
I have been recommended "Resource Tuner console" but it's a little out of my price range. I'm looking for something that could be launched from a nant build script and told to stamp an exe with an additional property as described in my previous question.
If you're looking for a way to modify executables and set additional properties without the cost of "Resource Tuner Console", there are a few alternatives you can consider. Many of these can be integrated into your NAnt build script. ### Alternatives for Resource Tuner Console 1. **Resource Hacker**: This is a free u...
26,772
[ { "from": "human", "value": "I have been recommended \"Resource Tuner console\" but it's a little out of my price range.\nI'm looking for something that could be launched from a nant build script and told to stamp an exe with an additional property as described in my previous question.\n" }, { "from...
When Using Dynamic Proxies, how do I access the underlying object's Annotations? Specifically I'm annotating settings of a ORM object with @Column("client_id") and then making a Dynamic Proxy keep track of when the annotated setters are called, but... It doesn't seem that the annotated proxy keeps any of the underlying...
When working with dynamic proxies in Java, one limitation is that the proxy instance does not directly inherit annotations from the underlying class. Annotations are associated with the class and its members, but proxies do not automatically carry these annotations. Therefore, if you want to access the annotations of t...
21,183
[ { "from": "human", "value": "When Using Dynamic Proxies, how do I access the underlying object's Annotations?\nSpecifically I'm annotating settings of a ORM object with @Column(\"client_id\") and then making a Dynamic Proxy keep track of when the annotated setters are called, but...\nIt doesn't seem that th...
I'm a novice OCaml programmer and thought I would throw myself into the deep end by attempting to implement a very tricky algorithm. I'm open to all criticisms great and small be they stylistic or security or performance related. One criticism that I'm already aware of is that the algorithm requires the entire messa...
Great to see your enthusiasm for diving into a complex algorithm like SHA-256 in OCaml! Below, I've outlined a variety of observations, suggestions, and possible improvements related to your code. ### 1. **Tail Recursion** - **Tail Recursion in `pack_sha256` and `hexdigits_inner`:** Both `pack_sha256` and `hexdigit...
24,663
[ { "from": "human", "value": "I'm a novice OCaml programmer and thought I would throw myself into the deep end by attempting to implement a very tricky algorithm. I'm open to all criticisms great and small be they stylistic or security or performance related. \nOne criticism that I'm already aware of is th...
I'm looking for some kind of text-parser for ASP.NET that can make HTML from some style of text that uses a special format. Like in Wiki's there is some special syntax for headings and such. I have tried to look on google, but I did not found anything for .NET. Do someone know about a library for .NET that can parse th...
There are several libraries available in the .NET ecosystem that can parse text with custom markup into HTML. If you're specifically looking for something that mimics the functionality of Wiki-style syntax, here are a few options you can consider: ### 1. **Markdown Libraries** Markdown is a lightweight markup language...
23,248
[ { "from": "human", "value": "I'm looking for some kind of text-parser for ASP.NET that can make HTML from some style of text that uses a special format. Like in Wiki's there is some special syntax for headings and such. I have tried to look on google, but I did not found anything for .NET.\nDo someone know ...
I'm a VMware user and far too often I use keyboard shortcuts while programming. However, this has proved to be quite distressing as sometimes the VMware gets hold of it and turns off / pauses (Ctrl+Z) the virtual machine. Is there a way to disable keyboard shortcuts on VMware? Has anyone here ever found a workaround?
Yes, it can be frustrating when keyboard shortcuts in VMware conflict with those in your host operating system or your development environment. There are a few strategies you can employ to mitigate this issue: ### 1. Disable Keyboard Shortcuts in VMware VMware provides an option to disable some keyboard shortcuts thr...
26,330
[ { "from": "human", "value": "I'm a VMware user and far too often I use keyboard shortcuts while programming. However, this has proved to be quite distressing as sometimes the VMware gets hold of it and turns off / pauses (Ctrl+Z) the virtual machine.\nIs there a way to disable keyboard shortcuts on VMware? ...
Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner? I'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciated.
Yes, there are several tools and plugins that can help you add code snippets to Microsoft Word or OpenOffice Writer in a clean and organized manner. Here are a few options: ### For Microsoft Word: 1. **Code Highlighting Add-ins**: - **Highlight.js**: This is a JavaScript library that can be integrated into Word do...
27,368
[ { "from": "human", "value": "Does anyone know of a good tool or plugin that enables Microsoft Word or OpenOffice Writer to add code snippets to a document in a clean manner? \nI'm not sure if such a plug-in even exists, so redirecting me to any other tool that can help me would be appreciated.\n" }, { ...
I have a (derived) Menu control, that displays a rather large list of items from a custom data source. I need to disable ViewState on the menu to avoid the very annoying "Can't select a disabled or unselectable menu item" when some other control causes the current selection to change on a postback. Unfortunately, when ...
It sounds like you're encountering a common issue when dealing with the ASP.NET Menu control and ViewState. The ViewState in ASP.NET is what keeps track of the current state of controls between postbacks, including which menu item was selected. When ViewState is disabled, the control does not have the necessary state i...
24,610
[ { "from": "human", "value": "I have a (derived) Menu control, that displays a rather large list of items from a custom data source. I need to disable ViewState on the menu to avoid the very annoying \"Can't select a disabled or unselectable menu item\" when some other control causes the current selection to...
I allow users to enter a regular expression to match IP addresses, for doing an IP filtration in a related system. I would like to validate if the entered regular expressions are valid as a lot of userse will mess op, with good intentions though. I can of course do a Regex.IsMatch() inside a try/catch and see if it blo...
Yes, there are indeed more efficient and cleaner ways to validate regular expressions without relying solely on exception handling. Here are a few approaches you can consider for validating user-entered regular expressions: ### 1. Use `Regex.Match` with a Try-Catch While you've mentioned that you want to avoid this, t...
25,420
[ { "from": "human", "value": "I allow users to enter a regular expression to match IP addresses, for doing an IP filtration in a related system. I would like to validate if the entered regular expressions are valid as a lot of userse will mess op, with good intentions though.\nI can of course do a Regex.IsMa...
I have a backup server that automatically backs up my live site, both files and database. On the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within some of the text. This text is stored within the news database table. Here is a screenshot of it being on the live server ...
The issue you're experiencing with the mirrored version of your site displaying `?` characters instead of the expected text is likely related to character encoding discrepancies between your live server and your mirrored server. Here are some potential causes and solutions: 1. **Character Encoding Differences**: - ...
25,637
[ { "from": "human", "value": "I have a backup server that automatically backs up my live site, both files and database.\nOn the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within some of the text. This text is stored within the news database table.\nHere is a...
I have a native VC++ project that uses a dll (which is not in a project). Now, I must to put the dll in one the "Search Path Used by Windows to Locate a DLL" link but I don't want the dll to sit in the exectuable or current or windows or system directory. So my only option according to that is adding the path to the %...
If you don't want to place the DLL in the executable's directory, the current working directory, or the Windows/System directory, modifying the `%PATH%` environment variable is indeed one option. However, it is not the only approach, and you might want to consider other methods for managing the DLL path. Below are some...
23,263
[ { "from": "human", "value": "I have a native VC++ project that uses a dll (which is not in a project). Now, I must to put the dll in one the \"Search Path Used by Windows to Locate a DLL\" \nlink\nbut I don't want the dll to sit in the exectuable or current or windows or system directory.\nSo my only option...
The vxWorks documentation states: The WDB agent itself is independent of the target operating system: it attaches to run-time OS services through a virtual-function run-time interface. The WDB agent can execute before VxWorks is running (as in the early stages of porting a BSP to a new board)." How can I use t...
Using the WDB (Wind River Debugging Agent) before the VxWorks kernel is running involves a few steps that typically focus on utilizing the debug agent in a pre-kernel environment. Here's a general approach you might consider: 1. **Set Up Your Development Environment**: Ensure you have the necessary tools and configura...
18,393
[ { "from": "human", "value": "The vxWorks documentation states: \n\nThe WDB agent itself is independent of the target operating system: it\n attaches to run-time OS services through a virtual-function run-time\n interface. The WDB agent can execute before VxWorks is running (as in\n the early stages of po...
I have a TListBox with multiselect and ExtendedSelect both set to true. I need to be able to drag multiple items in the list box to re-arrange them. My problem is what happens when the user clicks on an item that is already selected without holding down the CTRL or SHIFT key. Case 1: DragMode is set to dmManual The se...
To achieve the desired behavior for a multi-select TListBox with drag-and-drop functionality while addressing the specific issues you've described, you can implement a custom approach to handle the mouse events and selection changes. Below, I'll outline a strategy that involves overriding mouse event handling and makin...
25,429
[ { "from": "human", "value": "I have a TListBox with multiselect and ExtendedSelect both set to true. I need to be able to drag multiple items in the list box to re-arrange them. My problem is what happens when the user clicks on an item that is already selected without holding down the CTRL or SHIFT key.\n...
I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+m+a[i+1:])for m in'%d'%5**18] from sys import*;r(argv[1]) My own imp...
The code you've encountered is a highly condensed and obfuscated Python solution for solving Sudoku puzzles, which employs recursion and bitwise operations. Let's break it down to understand how it works: ### Overview The solver attempts to fill in the Sudoku grid using a recursive backtracking algorithm. It searches ...
25,387
[ { "from": "human", "value": "I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this:\ndef r(a):i=a.find('0');~i or exit(a);[m\nin[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for\nj in range(81)]or r(a[:i]+m+a[i+1:])for m in'%d'%5*...
I have a legacy WinForms Mdi App in VB.Net 2.0 which I am adding functionality to. One of the additions is a warning which needs to be raised when the current time nears a specified value (a deadline). My intention is to check the time once an hour until there is less than an hour until the deadline, then display warni...
In your case, since you are working with a WinForms application and you want to display warnings to the user while allowing them to continue using the app, the best approach is to use the `Windows.Forms.Timer`. This timer operates on the UI thread, making it safe to update UI elements without having to worry about thre...
23,669
[ { "from": "human", "value": "I have a legacy WinForms Mdi App in VB.Net 2.0 which I am adding functionality to. One of the additions is a warning which needs to be raised when the current time nears a specified value (a deadline). My intention is to check the time once an hour until there is less than an ho...
Why do database guys go on about normalisation? What is it? How does it help? Does it apply to anything outside of databases?
Normalization is a process in database design used to minimize data redundancy and improve data integrity. The primary goal of normalization is to ensure that data is stored efficiently, preventing issues such as data anomalies during insertions, updates, and deletions. ### What is Normalization? Normalization involv...
26,385
[ { "from": "human", "value": "Why do database guys go on about normalisation? \nWhat is it? How does it help? \nDoes it apply to anything outside of databases? \n" }, { "from": "gpt", "value": "Normalization is a process in database design used to minimize data redundancy and improve data inte...
I'm using the Infragistics WinForms UltaGrid control and I'm setting the RegexPattern property. How do I get the grid cell I'm setting the RegEx for to actually use that pattern to restrict entry? Or am I misunderstanding how the RegexPattern property works. Jeff
The `RegexPattern` property in the Infragistics WinForms UltraGrid control is indeed used to specify a regular expression that dictates the format or pattern of data that can be entered into a cell. However, setting the `RegexPattern` alone does not automatically enforce the pattern for user input. You need to implemen...
23,454
[ { "from": "human", "value": "I'm using the Infragistics WinForms UltaGrid control and I'm setting the RegexPattern property. How do I get the grid cell I'm setting the RegEx for to actually use that pattern to restrict entry? Or am I misunderstanding how the RegexPattern property works.\nJeff\n" }, { ...
We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered the following disturbing comment. From Update WINVER and _WIN32_WINNT: Beginning with Visual C++ 2008, Visual C++ does not support targeting Windows 95, Windows 98, Windows ME, or Windows NT. Does this mean that if we rebuild our p...
Yes, you are correct in your understanding. Starting with Visual C++ 2008, Microsoft made a significant change in the targeting capabilities of its compiler. The comment you encountered indicates that Visual C++ 2008 no longer supports building applications that are intended to run on Windows 95, Windows 98, Windows ME...
26,388
[ { "from": "human", "value": "We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered the following disturbing comment.\nFrom Update WINVER and _WIN32_WINNT:\n\nBeginning with Visual C++ 2008, Visual C++ does not support targeting Windows 95, Windows 98, Windows ME, or Windows ...
It seems like there should be a simpler way than: import string s = "string. With. Punctuation?" # Sample string out = s.translate(string.maketrans("",""), string.punctuation) Is there?
Yes, there is a simpler way to remove punctuation from a string in Python, especially if you're using Python 3. The `str.translate` method can be used with `str.maketrans`, but it can be a bit verbose. Instead, you can use a list comprehension combined with the `str.join` method to filter out punctuation characters. ...
29,630
[ { "from": "human", "value": "It seems like there should be a simpler way than:\nimport string\ns = \"string. With. Punctuation?\" # Sample string \nout = s.translate(string.maketrans(\"\",\"\"), string.punctuation)\n\nIs there?\n" }, { "from": "gpt", "value": "Yes, there is a simpler way to remo...
I keep wondering how does a debugger work? Particulary the one that can be 'attached' to already running executable. I understand that compiler translates code to machine language, but then how does debugger 'know' what it is being attached to?
A debugger is a tool that allows developers to inspect and manipulate the execution of a program to help diagnose and fix bugs. When a debugger attaches to an already running executable, it relies on several mechanisms and information to understand the program's state. Here's a high-level overview of how a debugger wor...
21,842
[ { "from": "human", "value": "I keep wondering how does a debugger work? Particulary the one that can be 'attached' to already running executable. I understand that compiler translates code to machine language, but then how does debugger 'know' what it is being attached to?\n" }, { "from": "gpt", ...
I am using running a simple find all and paginating with willpaginate, but I'd also like to have the query sorted by the user. The first solution that came to mind was just use a params[:sort] http://localhost:3000/posts/?sort=created_at+DESC @posts = Post.paginate :page => params[:page], :order => params[:sort] But ...
Your approach to sorting using `params[:sort]` can work, but it does have some potential security risks, especially if you're taking the user input directly and inserting it into your query without any validation or sanitization. An unsanitized input can lead to SQL injection attacks if users can manipulate the input i...
26,634
[ { "from": "human", "value": "I am using running a simple find all and paginating with willpaginate, but I'd also like to have the query sorted by the user. The first solution that came to mind was just use a params[:sort]\nhttp://localhost:3000/posts/?sort=created_at+DESC\n\n@posts = Post.paginate :page => ...
I have a Windows/Linux Qt 4.3 application that uses drag and drop in a QTreeView. I have two very similar applications which use the same set of Qt libraries. Drag and drop works in both on Linux but in only in one on Windows. In the application that does not work the QDrag object gets deleted as soon as the m...
It sounds like you've done a thorough job of investigating the drag-and-drop issue in your Qt application and discovered that it stems from a COM threading model conflict between your Qt application and the .NET CLR environment. This is a common pitfall when working with mixed-managed and unmanaged code, particularly w...
16,729
[ { "from": "human", "value": "I have a Windows/Linux Qt 4.3 application that uses drag and drop in a QTreeView. I have two very similar applications which use the same set of Qt libraries. Drag and drop works in both on Linux but in only in one on Windows. \nIn the application that does not work the ...
What is the purpose of the strdup() function in C?
The `strdup()` function in C is used to create a duplicate of a given string. Its purpose is to allocate sufficient memory to hold the duplicate string and copy the content of the original string to this newly allocated memory. ### Syntax: ```c char *strdup(const char *s); ``` ### Parameters: - `s`: A pointer to the...
26,535
[ { "from": "human", "value": "What is the purpose of the strdup() function in C?\n" }, { "from": "gpt", "value": "The `strdup()` function in C is used to create a duplicate of a given string. Its purpose is to allocate sufficient memory to hold the duplicate string and copy the content of the ori...
I'm trying to convert an XML file into the markup used by dokuwiki, using XSLT. This actually works to some degree, but the indentation in the XSL file is getting inserted into the results. At the moment, I have two choices: abandon this XSLT thing entirely, and find another way to convert from XML to dokuwiki markup...
In XSLT, handling whitespace and newlines in the output can be tricky, especially when you want to maintain the readability of your XSLT code while controlling the output format for your specific use case (like converting XML to DokuWiki markup). Here are a few strategies you can employ to achieve your goal: 1. **Use ...
24,761
[ { "from": "human", "value": "I'm trying to convert an XML file into the markup used by dokuwiki, using XSLT. This actually works to some degree, but the indentation in the XSL file is getting inserted into the results. At the moment, I have two choices: abandon this XSLT thing entirely, and find another w...
I recently began to use the NexusLight, a functional test automation framework. Are there more frameworks that does a similar job? Related question: End-to-End application testing from a users standpoint
Yes, there are several functional test automation frameworks that serve a similar purpose to NexusLight. These frameworks are designed to facilitate end-to-end application testing from a user's standpoint, ensuring that applications function as expected from the perspective of the end user. Here are some popular altern...
25,777
[ { "from": "human", "value": "I recently began to use the NexusLight, a functional test automation framework. \nAre there more frameworks that does a similar job?\nRelated question: End-to-End application testing from a users standpoint\n" }, { "from": "gpt", "value": "Yes, there are several func...
What is a good free/open source alternative to WebFOCUS? Is there an ASP.NET way of getting info from an OLAP cube? Update: I chose Magnus Smith's answer as the correct one, but Alexmac's answer was also very good!
A good free and open-source alternative to WebFOCUS is **Pentaho**. Pentaho offers a comprehensive suite of tools for data integration, business analytics, and reporting. It has a strong community and provides features for connecting to various data sources, including OLAP cubes, and allows for interactive dashboards a...
25,062
[ { "from": "human", "value": "What is a good free/open source alternative to WebFOCUS? \nIs there an ASP.NET way of getting info from an OLAP cube? \nUpdate: I chose Magnus Smith's answer as the correct one, but Alexmac's answer was also very good!\n" }, { "from": "gpt", "value": "A good free an...
I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP. A new functionality will require me to accept files through this webservice. Basically I'm allowing users to upload files to a file archive through the API, which they'd otherwise do by logging into our browser based administration system. ...
To implement file uploads in your ASP.NET web services API while maintaining ease of use, here are some considerations and best practices to address your questions and concerns: ### 1. File Upload Method You can create a method called `UploadFile`, which accepts a file upload via a POST request. In your API documenta...
23,610
[ { "from": "human", "value": "I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP.\nA new functionality will require me to accept files through this webservice. Basically I'm allowing users to upload files to a file archive through the API, which they'd otherwise do by logging into...
I have a function called FindSpecificRowValue that takes in a datatable and returns the row number that contains a particular value. If that value isn't found, I want to indicate so to the calling function. Is the best approach to: Write a function that returns false if not found, true if found, and the found row numb...
Both approaches you mentioned can effectively communicate whether a specific value is found in the DataTable and provide the corresponding row number. However, they have different implications in terms of design, readability, and usage. ### Option 1: Using a Boolean with a ByRef/Output Parameter **Function Signature ...
27,298
[ { "from": "human", "value": "I have a function called FindSpecificRowValue that takes in a datatable and returns the row number that contains a particular value. If that value isn't found, I want to indicate so to the calling function.\nIs the best approach to:\n\nWrite a function that returns false if not ...
Is it possible to set the cursor to 'wait' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run into: if an element (#id1) has a cursor st...
You're on the right track with your approach to changing the cursor to 'wait' during an AJAX call. However, achieving the desired effect requires a bit of attention to CSS specificity and ensuring that user interaction with the page is managed correctly during the loading process. Here is a simplified solution that ef...
25,005
[ { "from": "human", "value": "Is it possible to set the cursor to 'wait' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run in...
I am trying to build a dropdown list for a winform interop, and I am creating the dropdown in code. However, I have a problem getting the data to bind based on the DataTemplate I specify. What am I missing? drpCreditCardNumberWpf = new ComboBox(); DataTemplate cardLayout = new DataTemplate {DataType = typeof (CreditC...
It looks like you are trying to create a dropdown list (ComboBox) in a WPF application that binds to a list of objects of type `CreditCardPayment`. However, there are a couple of issues in the code you provided which may be preventing the data from binding properly to the ComboBox. ### 1. Using DataTemplate Your curr...
25,586
[ { "from": "human", "value": "I am trying to build a dropdown list for a winform interop, and I am creating the dropdown in code. However, I have a problem getting the data to bind based on the DataTemplate I specify.\nWhat am I missing?\ndrpCreditCardNumberWpf = new ComboBox(); \nDataTemplate cardLayout = ...
I'm currently working on a server-side product which is a bit complex to deploy on a new server, which makes it an ideal candidate for testing out in a VM. We are already using Hudson as our CI system, and I would really like to be able to deploy a virtual machine image with the latest and greatest software as a build...
Deploying a virtual machine (VM) image as a build artifact using your CI system (Hudson, now known as Jenkins) is a great approach for ensuring consistent environments across different stages of development and testing. Here’s a breakdown of how to go about it, including recommendations for VM software, scripting requi...
25,308
[ { "from": "human", "value": "I'm currently working on a server-side product which is a bit complex to deploy on a new server, which makes it an ideal candidate for testing out in a VM. We are already using Hudson as our CI system, and I would really like to be able to deploy a virtual machine image with th...
I'd like to use Oracle's utl_match.edit_distance function. It supposed to compare two strings and return the Levenshtein distance. select utl_match.edit_distance('a','b') from dual returns 1 as expected, but select utl_match.edit_distance('á','b') from dual returns 2. Obviously I'd like to get 1. It seems to be, it d...
The behavior you're encountering with `utl_match.edit_distance` in Oracle is due to the way it handles character encodings and the specific rules it applies for determining the Levenshtein distance. The `utl_match.edit_distance` function calculates the distance based on the code points of the characters in the strings...
27,140
[ { "from": "human", "value": "I'd like to use Oracle's utl_match.edit_distance function. It supposed to compare two strings and return the Levenshtein distance.\nselect utl_match.edit_distance('a','b') from dual\n\nreturns 1 as expected, but\nselect utl_match.edit_distance('á','b') from dual\n\nreturns 2. Ob...
What is the difference between ref and out parameters in .NET? What are the situations where one can be more useful than the other? What would be a code snippet where one can be used and another can't?
In .NET, both `ref` and `out` parameters are used to pass arguments by reference rather than by value, allowing a method to modify the value of the passed argument. However, there are key differences between them: ### Differences between `ref` and `out`: 1. **Initialization Requirement**: - **`ref`**: The variable...
24,996
[ { "from": "human", "value": "What is the difference between ref and out parameters in .NET? What are the situations where one can be more useful than the other? What would be a code snippet where one can be used and another can't?\n" }, { "from": "gpt", "value": "In .NET, both `ref` and `out` pa...
The case goes as following: You have a Boolean property called FullScreenEnabled. You enter some method, and the code within this method is executed iff FullScreenEnabled is true. Which of the 2 approaches below do you use in your everyday programming: private bool FullScreenEnabled { get; set; } // Check if Fu...
Both approaches have their merits, but the choice between them often depends on personal or team coding style, as well as considerations of readability and maintainability. Here are some points to consider for each case: ### Case 1: Early Return ```csharp private void Case1() { if (FullScreenEnabled == false) ...
27,855
[ { "from": "human", "value": "The case goes as following:\nYou have a Boolean property called FullScreenEnabled. You enter some method, and the code within this method is executed iff FullScreenEnabled is true. Which of the 2 approaches below do you use in your everyday programming:\n private bool FullScr...
We have a painfully slow report.I added a Response.flush and it seems a great deal better. What are some of the caveats of using this method.
Using `Response.Flush()` can improve the perceived performance of web applications by sending part of the response to the client before the entire server-side processing is complete. However, there are several caveats and potential issues to consider when using this method: 1. **Increased Bandwidth Usage**: Flushing c...
26,081
[ { "from": "human", "value": "We have a painfully slow report.I added a Response.flush and it seems a great deal better. What are some of the caveats of using this method.\n" }, { "from": "gpt", "value": "Using `Response.Flush()` can improve the perceived performance of web applications by sendin...
This is something that I have never fully grasped in .NET as to the correct application of the .dispose() method. Say I have something like Public Class someClass() sub someMethod ' do some stuff tying up resources end sub End Class public class mainApp dim _class as new SomeClass _class.someMethod() End ...
In .NET, the `IDisposable` interface and the `Dispose` method are important concepts for managing unmanaged resources and ensuring proper cleanup of resources that are no longer needed. Here's a breakdown of how and when to implement the `Dispose` pattern, as well as best practices around its usage. ### When to Implem...
24,896
[ { "from": "human", "value": "This is something that I have never fully grasped in .NET as to the correct application of the .dispose() method.\nSay I have something like\nPublic Class someClass()\n sub someMethod\n ' do some stuff tying up resources\n end sub\nEnd Class\n\npublic class mainApp \n dim ...
I want to get whois information of a domain name from my c#/java programs. Is there a simple way to do this?
Yes, you can retrieve WHOIS information for a domain name using various libraries and APIs available for both C# and Java. Below are simple ways to achieve this in both languages. ### C# Example In C#, you can use a third-party library like `Whois.Net`. Here's how you can use it: 1. **Install the package** using NuG...
7,212
[ { "from": "human", "value": "I want to get whois information of a domain name from my c#/java programs. Is there a simple way to do this? \n" }, { "from": "gpt", "value": "Yes, you can retrieve WHOIS information for a domain name using various libraries and APIs available for both C# and Java. B...
I recently migrated a website to a new CMS (Umbraco). A lot of the links have changed, but they can be easily corrected by searching for patters in the url, so I would like to write something that will redirect to the correct page if the old one is not found. That part isn't a problem. How can I obtain the requested U...
To obtain the requested URL after a user is redirected to your custom 404 page, you can use the `Request.RawUrl` property, which contains the original URL requested by the client. This is the preferred method for getting the URL that led to the 404 error, as it doesn't rely on the `HTTP_REFERER`, which may not always b...
26,350
[ { "from": "human", "value": "I recently migrated a website to a new CMS (Umbraco). A lot of the links have changed, but they can be easily corrected by searching for patters in the url, so I would like to write something that will redirect to the correct page if the old one is not found. That part isn't a p...
How do I transfer the users of a vBulletin forum to a new installation of IceBB?
Transferring users from a vBulletin forum to a new installation of IceBB involves several steps. Since both systems have different databases and structures, you will need to export the user data from vBulletin and import it into IceBB. Here’s a general guideline to help you through the process: ### 1. Prepare for the ...
23,006
[ { "from": "human", "value": "How do I transfer the users of a vBulletin forum to a new installation of IceBB?\n" }, { "from": "gpt", "value": "Transferring users from a vBulletin forum to a new installation of IceBB involves several steps. Since both systems have different databases and structur...
What is an NP-complete problem? Why is it such an important topic in computer science?
An NP-complete problem is a specific class of problems in computational complexity theory that are both in NP (nondeterministic polynomial time) and NP-hard. To understand this classification, let's break down these concepts: 1. **P vs. NP**: - **P (Polynomial Time)**: This class includes problems for which a solut...
23,241
[ { "from": "human", "value": "What is an NP-complete problem? Why is it such an important topic in computer science?\n" }, { "from": "gpt", "value": "An NP-complete problem is a specific class of problems in computational complexity theory that are both in NP (nondeterministic polynomial time) an...
I have the in my opinion odd request to close a wizard form as Done or OK if Enter was pressed on the keyboard even if the OK/DONE button is not focused. In my opinion that would be a usability mistake. For example: In the wizard you may have multiple controls, buttons, check boxes, multiple line controls and they all ...
Hi Michael, Your concerns about the usability implications of binding the Enter key to closing a wizard form, regardless of what control is focused, are valid and reflect a thoughtful approach to user experience design. Here are some points to consider, including usability principles, potential studies, and guidelines...
26,317
[ { "from": "human", "value": "I have the in my opinion odd request to close a wizard form as Done or OK if Enter was pressed on the keyboard even if the OK/DONE button is not focused.\nIn my opinion that would be a usability mistake. For example: In the wizard you may have multiple controls, buttons, check b...
Can someone please provide an implementation of a C function that gets invoked to dump the current stack? It's for a x86 linux system. It can be invoked in 2 ways: explicitly by another function, or after a crash (probably as a trap/int handler). The output can be either to the screen or to a file, as indicated by a ...
Implementing a function to dump the stack in a C program on an x86 Linux system involves a combination of reading the current stack pointer, accessing the function call frames, and then printing the contents. The function must be able to handle both explicit calls and be invoked during a crash via a signal handler. Be...
17,316
[ { "from": "human", "value": "Can someone please provide an implementation of a C function that gets invoked to dump the current stack? It's for a x86 linux system. It can be invoked in 2 ways: explicitly by another function, or after a crash (probably as a trap/int handler). The output can be either to th...
I have a small command line program that uses the Team System API. When the correct Team System isn't installed on the machine, the program prints a traceback with System.IO.FileNotFoundException, but it also crashes and shows the standard error messasge: XXX has encountered a problem and needs to close. We are sor...
When your command line program is encountering a `System.IO.FileNotFoundException` during the loading of the Team System API, it's likely happening because the required assembly or its dependencies are missing on the system. This kind of error typically occurs before the Main method of your program is executed, meaning...
24,375
[ { "from": "human", "value": "I have a small command line program that uses the Team System API. When the correct Team System isn't installed on the machine, the program prints a traceback with System.IO.FileNotFoundException, but it also crashes and shows the standard error messasge:\n\nXXX has encountered ...
I just want to see what files were modded/added/deleted between 2 arbitrary revisions. How do I do this? Can I do this in tortoise as well?
To see what files were modified, added, or deleted between two arbitrary revisions in a version control system like Subversion (SVN) using TortoiseSVN, you can follow these steps: ### Using TortoiseSVN: 1. **Open TortoiseSVN**: Navigate to the working directory that is under SVN control. 2. **Show Log**: - Right-...
27,644
[ { "from": "human", "value": "I just want to see what files were modded/added/deleted between 2 arbitrary revisions. How do I do this?\nCan I do this in tortoise as well?\n" }, { "from": "gpt", "value": "To see what files were modified, added, or deleted between two arbitrary revisions in a versi...
I'm working on a database that needs to represent computers and their users. Each computer can have multiple users and each user can be associated with multiple computers, so it's a classic many-to-many relationship. However, there also needs to be a concept of a "primary" user. I have to be able to join against the ...
You're addressing a classic case of many-to-many relationships with an added constraint for a primary user in a relational database schema. Your instincts are correct that you want to represent the relationships in a way that maintains referential integrity and allows easy querying. Let's analyze your options and provi...
21,577
[ { "from": "human", "value": "I'm working on a database that needs to represent computers and their users. Each computer can have multiple users and each user can be associated with multiple computers, so it's a classic many-to-many relationship. However, there also needs to be a concept of a \"primary\" us...
When I refer to nested set model I mean what is described here. I need to build a new system for storing "categories" (I can't think of better word for it) in a user defined hierarchy. Since the nested set model is optimized for reads instead of writes, I decided to use that. Unfortunately during my research and test...
The nested set model (NSM) is a popular approach for representing hierarchical data, particularly when read performance is critical. However, as you've observed, it can present challenges when it comes to sorting the results of a query, especially if you want to sort nodes differently than their natural order based on ...
26,980
[ { "from": "human", "value": "When I refer to nested set model I mean what is described here.\nI need to build a new system for storing \"categories\" (I can't think of better word for it) in a user defined hierarchy. Since the nested set model is optimized for reads instead of writes, I decided to use that...
Which performs better: Crystal Reports or SQL Server Reporting Services?
The choice between Crystal Reports and SQL Server Reporting Services (SSRS) largely depends on the specific needs of your organization, the complexity of the reporting required, and the existing technology stack. Here's a comparison of both to help you determine which might perform better for your use case: ### Crysta...
26,973
[ { "from": "human", "value": "Which performs better: Crystal Reports or SQL Server Reporting Services?\n" }, { "from": "gpt", "value": "The choice between Crystal Reports and SQL Server Reporting Services (SSRS) largely depends on the specific needs of your organization, the complexity of the rep...
I have the following situation: A user will define a certain filter on a page, and on postback I will query the database using that filter and return a bunch of matching records to the user, each with a checkbox next to it, so he can choose whether to act on each of those records. In Classic ASP / PHP I can generate a ...
In ASP.NET 2.0, managing state effectively while avoiding large ViewState can indeed be a challenge, especially in scenarios with many controls like checkboxes. Here are a couple of approaches you can consider to minimize ViewState usage while still maintaining a clean code structure: ### 1. Use an ASP.NET GridView wi...
23,977
[ { "from": "human", "value": "I have the following situation:\nA user will define a certain filter on a page, and on postback I will query the database using that filter and return a bunch of matching records to the user, each with a checkbox next to it, so he can choose whether to act on each of those recor...
Has anyone ever seen the storage class auto explicitly used in C/C++? If so, in what situation?
Yes, the `auto` storage class in C and C++ is often discussed, but it has different implications in the two languages. ### In C In the C programming language, the `auto` storage class is used to declare automatic variables, which are local to a block or function and are automatically deallocated when the block exits. ...
26,444
[ { "from": "human", "value": "Has anyone ever seen the storage class auto explicitly used in C/C++? If so, in what situation?\n" }, { "from": "gpt", "value": "Yes, the `auto` storage class in C and C++ is often discussed, but it has different implications in the two languages.\n\n### In C\nIn the...
Question: Is there an easy way (library function) to perform a bitwise AND or OR on numbers larger than 32-bit in ActionScript? From the docs: "Bitwise operators internally manipulate floating-point numbers to change them into 32-bit integers. The exact operation performed depends on the operator, but all bitwise ope...
In ActionScript, you indeed face the limitation that it only supports 32-bit integer operations with bitwise operators. When working with larger integers (like Java's `long`, which is 64-bit), you need to handle them manually. One common approach is to split your 64-bit values into two 32-bit integers, typically calle...
27,468
[ { "from": "human", "value": "Question: Is there an easy way (library function) to perform a bitwise AND or OR on numbers larger than 32-bit in ActionScript? \nFrom the docs:\n\"Bitwise operators internally manipulate floating-point numbers to change them into 32-bit integers. The exact operation performed ...
Having a vector containing pointers to objects then using the clear function doesn't call the destructors for the objects in the vector. I made a function to do this manually but I don't know how to make this a generic function for any kind of objects that might be in the vector. void buttonVectorCleanup(vector<Button ...
To create a generic function that can clean up a vector of pointers to any type of objects, you can use C++ templates. Here’s how you can modify your function to achieve that: ```cpp #include <vector> template<typename T> void vectorCleanup(std::vector<T*> &dVector) { for(T* ptr : dVector) { delete ptr; /...
26,988
[ { "from": "human", "value": "Having a vector containing pointers to objects then using the clear function doesn't call the destructors for the objects in the vector. I made a function to do this manually but I don't know how to make this a generic function for any kind of objects that might be in the vector...
I'm currently looking for a webhost that offers Windows 2008 virtual or dedicated hosting for my ASP.NET app. On dedicated hosting you pay a monthly fee for Windows, I noticed there's a noticeable difference in cost between the web edition and the standard edition, so, my question is: Does the standard edition come wit...
Windows Server 2008 Standard Edition does not include Microsoft Exchange by default. Microsoft Exchange is a separate product that you would need to purchase and install on top of your Windows Server installation. Both the Standard and Web editions of Windows Server do not come with Exchange; however, the Standard Edit...
29,617
[ { "from": "human", "value": "I'm currently looking for a webhost that offers Windows 2008 virtual or dedicated hosting for my ASP.NET app. On dedicated hosting you pay a monthly fee for Windows, I noticed there's a noticeable difference in cost between the web edition and the standard edition, so, my questi...
I have a database on ms sql 2000 that is being hit by hundreds of users at a time. There are intense reports using reporting services 2005 hitting the same database. When there are lots of reports running and people using the database concurrently we see blocking processes to the level that the system starts to give ti...
Dealing with blocking in SQL Server, especially in a high-concurrency environment like the one you described, can be challenging. Here are several strategies you can implement to minimize blocking and improve performance: ### 1. **Optimize Queries and Indexes** - **Review Execution Plans**: Use SQL Server Profiler ...
23,675
[ { "from": "human", "value": "I have a database on ms sql 2000 that is being hit by hundreds of users at a time. There are intense reports using reporting services 2005 hitting the same database.\nWhen there are lots of reports running and people using the database concurrently we see blocking processes to t...
I work in C#, and I've been pretty lax about using using blocks to declare objects that implement IDisposable, which you're apparently always supposed to do. However, I don't see an easy way of knowing when I'm slipping up. Visual Studio doesn't seem to indicate this in any way (am I just missing something?). Am I j...
It's understandable to feel overwhelmed by the need to properly manage resources in C#. The `IDisposable` pattern is indeed crucial for avoiding memory leaks and ensuring that unmanaged resources are released correctly. Let’s break down some strategies and tools that can help you manage this better and clarify your con...
26,512
[ { "from": "human", "value": "I work in C#, and I've been pretty lax about using using blocks to declare objects that implement IDisposable, which you're apparently always supposed to do. However, I don't see an easy way of knowing when I'm slipping up. Visual Studio doesn't seem to indicate this in any wa...
Does WebSphere offer an HTTP input filter / firewall like mod_security? I know that it's possible to have Apache be the HTTP server front-end to WebSphere, but that type of configuration is beyond my influence. We're stuck using just what WebSphere itself can do. EDIT - To clarify, I am not looking for authentication,...
As of my last knowledge update in October 2023, IBM WebSphere Application Server does not natively include an HTTP input filter or firewall equivalent to mod_security found in Apache. While WebSphere has various security features related to authentication, authorization, and encryption, it does not provide built-in sup...
24,636
[ { "from": "human", "value": "Does WebSphere offer an HTTP input filter / firewall like mod_security?\nI know that it's possible to have Apache be the HTTP server front-end to WebSphere, but that type of configuration is beyond my influence. We're stuck using just what WebSphere itself can do.\nEDIT - To cl...
I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restricted to use Ibatis as a data abstraction framework. Apart from ...
To design a system that securely accesses a remote database using iBatis (now known as MyBatis) in a JBoss environment, while also maintaining the security of database credentials and facilitating communication between the client and the server, here's a structured approach to consider: ### 1. **Use of Data Sources:**...
20,359
[ { "from": "human", "value": "I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side.\nI'm restricted to use Ibatis as...
Is there a free software for creating windows help files for your program? I would like something that allows an output of both CHM and HTML files.
Yes, there are several free tools available that can help you create Windows Help files (CHM) and HTML files for your program. Here are a few options: 1. **HelpNDoc**: This is a user-friendly help authoring tool that allows you to create CHM files as well as HTML, PDF, and other formats. The free version has some limi...
24,377
[ { "from": "human", "value": "Is there a free software for creating windows help files for your program?\nI would like something that allows an output of both CHM and HTML files.\n" }, { "from": "gpt", "value": "Yes, there are several free tools available that can help you create Windows Help fil...
I am using ADO.net with a DataSet and DataTables for the first time and I have run into a pretty significant problem. Each time that I change anything in my database table definitions, I don't seem to have an easy way to synchronize these changes to my DataTable definitions in my DataSet. So far, it has been quick to s...
I understand your frustration with managing changes in your database schema while working with ADO.NET and DataSets. Here are some strategies to help you better synchronize your DataTable definitions with your database changes without having to repeatedly delete and recreate your DataTables: ### 1. **Use TableAdapters...
23,395
[ { "from": "human", "value": "I am using ADO.net with a DataSet and DataTables for the first time and I have run into a pretty significant problem. Each time that I change anything in my database table definitions, I don't seem to have an easy way to synchronize these changes to my DataTable definitions in m...
I have a table in my Postgres database with columns named "type", "desc", and "start". When I call $dbh->column_info, only "desc" comes back quoted, whereas in pgAdmin all three of them are quoted. Is one of them wrong?
The behavior you're experiencing relates to how PostgreSQL handles column names and the use of quotes. In PostgreSQL, unquoted identifiers are folded to lowercase, whereas quoted identifiers maintain their case sensitivity. 1. **Column Names and Quoting**: - If you create a column with a name in quotes, it retains ...
27,711
[ { "from": "human", "value": "I have a table in my Postgres database with columns named \"type\", \"desc\", and \"start\". When I call $dbh->column_info, only \"desc\" comes back quoted, whereas in pgAdmin all three of them are quoted. Is one of them wrong?\n" }, { "from": "gpt", "value": "The b...
I was making the following call: result = RegOpenKeyEx(key, s, 0, KEY_READ, &key); (C++, Visual Studio 5, Vista 64bit). It is failing with error code 2 ("File not found") even though "regedit" shows that the key exists. This code has always worked on 32bit XP. Why is it "file not found" when it clearly is there?
The issue you're encountering is likely due to differences in the way 32-bit and 64-bit applications interact with the Windows registry on a 64-bit version of the operating system. When running a 32-bit application on a 64-bit version of Windows, the operating system uses a process called "registry redirection." This m...
25,995
[ { "from": "human", "value": "I was making the following call:\nresult = RegOpenKeyEx(key, s, 0, KEY_READ, &key);\n\n(C++, Visual Studio 5, Vista 64bit).\nIt is failing with error code 2 (\"File not found\") even though \"regedit\" shows that the key exists. This code has always worked on 32bit XP. Why is ...
I'd like to compare two consecutive elements in a std::list while iterating through the list. What is the proper way to access element i+1 while my iterator is at element i? Thanks Cobe
In C++, when you want to compare two consecutive elements in a `std::list` while iterating through it, you can use the iterator's `std::next` function from the `<iterator>` header to access the next element. Here's how you can do that: 1. Create an iterator to iterate through the list. 2. Use `std::next` to get the ne...
28,041
[ { "from": "human", "value": "I'd like to compare two consecutive elements in a std::list while iterating through the list. What is the proper way to access element i+1 while my iterator is at element i?\nThanks\nCobe\n" }, { "from": "gpt", "value": "In C++, when you want to compare two consecuti...
Im just starting a project and since this project is personal I was wondering what are the advantages of using Enterprise Library? We use the version 2 for several projects in the office but im not quite sure (aside of the good practices) of the advantages of it, especially in the database component. Any advice? Thanks...
Enterprise Library is a collection of reusable software components developed by Microsoft to assist with common enterprise development challenges. Although you are using version 2, many of the core advantages may still apply. Here are some key benefits, especially regarding the database component: 1. **Abstraction Lay...
26,139
[ { "from": "human", "value": "Im just starting a project and since this project is personal I was wondering what are the advantages of using Enterprise Library? We use the version 2 for several projects in the office but im not quite sure (aside of the good practices) of the advantages of it, especially in t...
Does anybody know if there is a way to make autocompletion work in MySQL Command Line Client under Windows? It's working nicely under Linux for me, but simply moves the cursor under Windows instead.
In the MySQL Command Line Client for Windows, autocompletion is not natively supported like it is in the Linux version. However, there are a few alternatives and workarounds you can consider to enhance your command-line experience: 1. **Use MySQL Workbench**: MySQL Workbench is a GUI tool that provides autocompletion ...
29,377
[ { "from": "human", "value": "Does anybody know if there is a way to make autocompletion work in MySQL Command Line Client under Windows? It's working nicely under Linux for me, but simply moves the cursor under Windows instead.\n" }, { "from": "gpt", "value": "In the MySQL Command Line Client f...
We are designing a Payroll Generation System for a client. The organization we are targeting has a hierarchy as follows: Company -> Cluster -> Business Unit (BU) -> Department -> Employee The salary for an employee is made up of various salary components. Each salary component has 3 rules associated with it, a Calculat...
Designing a Payroll Generation System that must cater to multiple clients with varying needs and rules can be quite complex. Let's break down your questions and concerns regarding where to implement the business logic, weighing the benefits of using stored procedures (SPs) versus handling logic within the application l...
21,879
[ { "from": "human", "value": "We are designing a Payroll Generation System for a client.\nThe organization we are targeting has a hierarchy as follows:\nCompany -> Cluster -> Business Unit (BU) -> Department -> Employee\nThe salary for an employee is made up of various salary components.\nEach salary compone...
I'd like to use the Wiimote (accelerometers, gyroscopes, infrared camera, etc, etc, etc) on various applications. It's a bluetooth device, and I know others have connected it to their computer. What's the easiest way to start using it in my software - are there libraries for C#, for instance? I want my software to be...
Using a Wiimote (Nintendo Wii Remote) for various applications can be an exciting project! Here’s a concise guide to get you started with using the Wiimote in your software, particularly in C#. ### 1. Setting Up Bluetooth Connectivity First, ensure that your computer has Bluetooth capabilities. Most modern computers ...
15,777
[ { "from": "human", "value": "I'd like to use the Wiimote (accelerometers, gyroscopes, infrared camera, etc, etc, etc) on various applications.\nIt's a bluetooth device, and I know others have connected it to their computer.\n\nWhat's the easiest way to start using it in my software - are there libraries fo...
I'm trying to get a simple search form working in my RoR site. I've got the following code: (in note_controller.rb) def search @results = Note.find_with_ferret(params[:term]).sort_by(&:ferret_rank) respond_to do |format| format.html format.xml { render :xml => @nootes } end end (in note.rb...
The issue you're encountering, `ArgumentError (Cannot add Array to a BooleanQuery)`, stems from the way the search term is being passed in the params. In your `index.html.erb`, you have the following line for the text field: ```erb <%= text_field 'term', nil %> ``` This generates a text field with the name `term`....
27,154
[ { "from": "human", "value": "I'm trying to get a simple search form working in my RoR site. I've got the following code:\n(in note_controller.rb)\n def search\n @results = Note.find_with_ferret(params[:term]).sort_by(&:ferret_rank)\n\n respond_to do |format|\n format.html\n format.xml { ren...
Visual Studio 2008 SP1 (although IIRC, the behavior was present in 2005 as well) keeps resizing a couple of grid controls (Janus.GridEx to be precise) I use. I can resize them back to normal, save, and compile just fine. When it does compile, these two controls will expand to ridiculous values. More Information: This p...
This issue with Visual Studio not respecting the initial size of controls when the Anchor property is set can indeed be frustrating, especially with third-party controls like Janus.GridEx. Unfortunately, Visual Studio's WinForms designer has some quirks that can lead to such unexpected behavior. Here are a few potentia...
25,000
[ { "from": "human", "value": "Visual Studio 2008 SP1 (although IIRC, the behavior was present in 2005 as well) keeps resizing a couple of grid controls (Janus.GridEx to be precise) I use.\nI can resize them back to normal, save, and compile just fine. When it does compile, these two controls will expand to r...
I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit. I could simply pass the record ID to the ...
Yes, you can use the POST method to dynamically create images for your web application, but you need to be aware that directly retrieving images via POST requests in HTML is not straightforward since the `img` tag only supports the `src` attribute, which requires a URL (usually via GET). Here are a few approaches to a...
15,505
[ { "from": "human", "value": "I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit.\...
I've looked at both the Named Parameter Idiom and the Boost::Parameter library. What advantages does each one have over the other? Is there a good reason to always choose one over the other, or might each of them be better than the other in some situations (and if so, what situations)?
Both the Named Parameter Idiom and the Boost.Parameter library are techniques for managing function parameters, especially when functions have many parameters, or when parameters are optional. However, they have different implementations and advantages, which might make one more suitable than the other depending on you...
26,182
[ { "from": "human", "value": "I've looked at both the Named Parameter Idiom and the Boost::Parameter library. What advantages does each one have over the other? Is there a good reason to always choose one over the other, or might each of them be better than the other in some situations (and if so, what situa...
i'm looking to learn about SSO, and heard about Sun Access Manager and openSSO(?) I want to build a small system that does SSO, like have Apache as a front end working with an SSO server. Should I investigate Sun AM and is openSSO a product? Do they offer these free for developers? Thanks
Single Sign-On (SSO) is an authentication process that allows a user to access multiple applications with one set of credentials. It simplifies the user experience and enhances security. ### Sun Access Manager and OpenSSO **Sun Access Manager** was a commercial product from Sun Microsystems, designed for web access m...
26,419
[ { "from": "human", "value": "i'm looking to learn about SSO, and heard about Sun Access Manager and openSSO(?)\nI want to build a small system that does SSO, like have Apache as a front end working with an SSO server.\nShould I investigate Sun AM and is openSSO a product?\nDo they offer these free for devel...
I have a project with Crystal Reports files that doesn't seem to build correctly if I upgrade it to VS 2005 and .NET 2.0. I think the reason is that the new version of Crystal Reports is incompatible with the older report format. Since I am now running Vista, and .NET 2003 doesn't work correctly on Vista, I want to b...
Yes, it is possible to use MSBuild to target the .NET Framework 1.1, but it requires a few workarounds since .NET 1.1 is not natively supported in the newer Visual Studio versions like VS 2005. Here’s how you can go about it: 1. **Install .NET Framework 1.1**: Ensure that .NET Framework 1.1 is installed on your syste...
24,967
[ { "from": "human", "value": "I have a project with Crystal Reports files that doesn't seem to build correctly if I upgrade it to VS 2005 and .NET 2.0. I think the reason is that the new version of Crystal Reports is incompatible with the older report format. Since I am now running Vista, and .NET 2003 doe...
I've figured out how to set VC++ to compile code into a .lib file instead of a .exe, but I'm having trouble getting a lib to link together with my other .obj files. Here is how I have the library and application folders set up. (I'm not sure if this is right) AppFolder App.sln App.ncb *.h *.cpp Debug *.o...
It sounds like you have the basic structure set up correctly for your application and library, but you need to ensure that the library is being linked properly in your project's settings. Here’s a step-by-step guide to help you resolve the linking issue in Visual C++: ### Step 1: Ensure Library Path Is Set 1. **Open ...
24,333
[ { "from": "human", "value": "I've figured out how to set VC++ to compile code into a .lib file instead of a .exe, but I'm having trouble getting a lib to link together with my other .obj files.\nHere is how I have the library and application folders set up. (I'm not sure if this is right)\nAppFolder\n App...
How can my vbscript detect whether or not it is running in a UAC elevated context? I have no problem detecting the user, and seeing if the user is within the Administrators group. But this still doesn't answer the question of whether the process has elevated privs or not, when running under Vista or Windows 2008. Pleas...
In VBScript, you can check if the current process is running with elevated privileges by attempting to access a protected system folder or checking the security token associated with the process. Here's a common approach to detect whether your script is running with elevated privileges using the `WScript.Shell` object ...
24,061
[ { "from": "human", "value": "How can my vbscript detect whether or not it is running in a UAC elevated context?\nI have no problem detecting the user, and seeing if the user is within the Administrators group. But this still doesn't answer the question of whether the process has elevated privs or not, when ...
There is a GUI ADM2 Progress v9 application using AppServer. It needs to give users an ability to view MS Excel files stored on the AppServer. So far it: Pulls .xls file from AppServer to a local drive. Fires up a copy of MS Excel and opens the file. The problem is that the temporary file on the local drive needs to...
To manage temporary files effectively in your GUI ADM2 Progress v9 application, you can follow these general strategies: ### 1. Use Temporary Directories When pulling the .xls files from the AppServer to the local drive, consider saving them in a temporary directory that is specifically designated for temporary files ...
26,473
[ { "from": "human", "value": "There is a GUI ADM2 Progress v9 application using AppServer. \nIt needs to give users an ability to view MS Excel files stored on the AppServer. So far it:\n\nPulls .xls file from AppServer to a local drive.\nFires up a copy of MS Excel and opens the file.\n\nThe problem is that...
I'm getting an Exception while trying to insert a row in oracle table. I'm using ojdbc5.jar for oracle 11 this is the sql i'm trying INSERT INTO rule_definitions(RULE_DEFINITION_SYS,rule_definition_type, rule_name,rule_text,rule_comment,rule_message,rule_condition,rule_active, rule_type,current_value,last_modified_by,...
The `ArrayIndexOutOfBoundsException` that you're encountering typically indicates that there is a mismatch between the number of parameters you are trying to set in your prepared statement and the number of placeholders (`?`) specified in your SQL query. In your SQL statement, you have **15 placeholders** for the valu...
29,526
[ { "from": "human", "value": "I'm getting an Exception while trying to insert a row in oracle table.\nI'm using ojdbc5.jar for oracle 11\nthis is the sql i'm trying \nINSERT INTO rule_definitions(RULE_DEFINITION_SYS,rule_definition_type,\nrule_name,rule_text,rule_comment,rule_message,rule_condition,rule_acti...
I have tried what seems like everything - I've done similiar things many times before, but I'm obviously missing something. I have a UserControl (ucA) - on ucA is a LinkButton that loads a different UserControl (ucB) programatically into a panel on ucA. ucB has TextBoxes, etc. Why isn't my control maintaining it's s...
The issue you're encountering is related to the ASP.NET Page Lifecycle and how UserControls are loaded dynamically. When controls are added to the page dynamically, they must be added in the correct lifecycle stage in order to maintain their state across postbacks. In your code, you're trying to load the UserControls ...
25,851
[ { "from": "human", "value": "I have tried what seems like everything - I've done similiar things many times before, but I'm obviously missing something.\nI have a UserControl (ucA) - on ucA is a LinkButton that loads a different UserControl (ucB) programatically into a panel on ucA. ucB has TextBoxes, etc....
My company has a 3rd party application that runs on a Progress database. I've been building an application on top of their database using an ODBC connection. One of the "quirks" of Progress is that it doesn't honor SQL column widths, so it will allow 100 characters in a column defined as a varchar(50). When reading t...
In the context of Progress OpenEdge ODBC drivers, the "WorkArounds" and "WorkArounds2" registry keys are intended to address various limitations or quirks when interacting with the database through ODBC. While the specifics of these flags might not be thoroughly documented, they generally allow for certain behaviors to...
26,612
[ { "from": "human", "value": "My company has a 3rd party application that runs on a Progress database. I've been building an application on top of their database using an ODBC connection.\nOne of the \"quirks\" of Progress is that it doesn't honor SQL column widths, so it will allow 100 characters in a colu...
I have asp.net form that contains fields. When I access this window, my javascript functions can access the fields via the DOM with the getElementById() method and when I postpack to the server I am receiving the updates made by the client. However, when I launch the form as a child window using Telerik's RadWindow c...
When dealing with child windows in ASP.NET, especially when using Telerik's RadWindow, there are several factors that can affect how you access elements, such as hidden fields, via JavaScript. Here are some insights to your questions: ### 1. Accessing Hidden Fields in a Child Window Yes, hidden fields in a child windo...
26,474
[ { "from": "human", "value": "I have asp.net form that contains fields. When I access this window, my javascript functions can access the fields via the DOM with the getElementById() method and when I postpack to the server I am receiving the updates made by the client.\nHowever, when I launch the form as ...
I'm interested in using Functional MetaPost on Mac OS X: http://cryp.to/funcmp/ I'm looking for a tutorial like: http://haskell.org/haskellwiki/Haskell_in_5_steps but for a trivial FuncMP example, i.e. using GHC, I can compile something simple such as: import FMP myPicture = text "blah" main = generate "foo" 1 myPi...
To get started with Functional MetaPost (FuncMP) on macOS and to produce some simple output, you'll want to follow these steps. This will guide you through compiling and viewing a simple FuncMP example, including fixing the "virmp" issue and handling the output files generated by MetaPost. ### Step 1: Install the Requ...
22,653
[ { "from": "human", "value": "I'm interested in using Functional MetaPost on Mac OS X:\nhttp://cryp.to/funcmp/\nI'm looking for a tutorial like:\nhttp://haskell.org/haskellwiki/Haskell_in_5_steps\nbut for a trivial FuncMP example, i.e. using GHC, I can compile something simple such as:\nimport FMP \nmyPictu...
I have a menu that I am using and it will change the background color when I hover using a:hover but I want to know how to change the class=line so that it sticks. So from the home if they click contacts the home pages from (a href="#" class="clr") to (a href="#") and Contacts would change from (a href="#") to ...
Certainly! To achieve this functionality where clicking on a menu item changes its class to indicate that it's the active page (sticking it in a different style), you'll need to use a combination of HTML, CSS, and JavaScript (or jQuery). Here's a basic example of how you can implement this: ### HTML Structure ```htm...
27,870
[ { "from": "human", "value": "I have a menu that I am using and it will change the background color when I hover using a:hover but I want to know how to change the class=line so that it sticks. \nSo from the home if they click contacts the home pages \n\nfrom (a href=\"#\" class=\"clr\") to (a href=\"#\")\n...
Joe Duffy states in the MSDN article "Using concurrency for scalability" that the cost of creating a thread is approximately 200,000 cycles, and the cost of destroying is about 100,000 cycles. When I try to create a new thread to perform some calculations, I would like to be sure that the calculations themselves are mo...
Measuring CPU cycles directly can be a bit tricky, but there are several ways to approximate or estimate the number of cycles consumed by a specific piece of code. Here are a few methods you can consider: ### 1. Use CPU Performance Counters Most modern CPUs have performance monitoring capabilities that allow you to m...
25,084
[ { "from": "human", "value": "Joe Duffy states in the MSDN article \"Using concurrency for scalability\" that the cost of creating a thread is approximately 200,000 cycles, and the cost of destroying is about 100,000 cycles.\nWhen I try to create a new thread to perform some calculations, I would like to be ...
My view-state to action-state transition does not appear to be happening. In the following example, I want the view-state to transition to the action-state when the user submits the form. Pretty basic stuff. But the setA() method does not get called. In the jsp, does the submit input element need to have a name of ...
In Spring Web Flow, the transition to an action state (like your `changeA`) is typically triggered by a specific event from a form submission. The event name is determined by the `name` attribute of the submit input in your JSP. ### Required `name` for the Submit Button To trigger the transition correctly in your sce...
24,534
[ { "from": "human", "value": "My view-state to action-state transition does not appear to be happening. In the following example, I want the view-state to transition to the action-state when the user submits the form. Pretty basic stuff. But the setA() method does not get called.\nIn the jsp, does the su...
I have an SQLite table that contains prices for various products. It's a snapshot table, so it contains the prices on 5 minute intervals. I would like to write a query that would return the difference in price from one row to the next on each item. The columns are id (auto inc), record_id (id of the product), price (pr...
Yes, you can achieve the desired output using SQLite by leveraging the `LAG()` window function to compute the price difference from one row to the next for each product. Below is a sample SQL query that does this: ```sql WITH PriceDifferences AS ( SELECT id, record_id, price, time, ...
27,829
[ { "from": "human", "value": "I have an SQLite table that contains prices for various products. It's a snapshot table, so it contains the prices on 5 minute intervals. I would like to write a query that would return the difference in price from one row to the next on each item.\nThe columns are id (auto inc)...
We have a custom collection of objects that we bind to a listbox control. When an item is added to the list the item appears in the listbox, however when one selects the item the currency manager position will not go to the position. Instead the currency manager position stays at the existing position. The listbox item...
When working with a custom collection of objects in a ListBox control, there are a few common issues that could cause the CurrencyManager to not update correctly upon item selection, particularly in scenarios where your collection involves nested collections or custom objects. Here are a few potential causes and soluti...
22,273
[ { "from": "human", "value": "We have a custom collection of objects that we bind to a listbox control. When an item is added to the list the item appears in the listbox, however when one selects the item the currency manager position will not go to the position. Instead the currency manager position stays a...
What are your favorite applications, products, or any applications that you know of that use .NET or Asp.NET as their underlying platform? What popular companies do you know of as a .NET shop? This question is related to a few others that I have seen. So I've just made this one as a community wiki to see what kind of a...
.NET and ASP.NET are widely used in a variety of applications and by numerous companies, given their versatility and strong support from Microsoft. Here are some notable applications and companies known for using these technologies: ### Applications: 1. **Stack Overflow**: The popular Q&A platform for programmers is b...
25,850
[ { "from": "human", "value": "What are your favorite applications, products, or any applications that you know of that use .NET or Asp.NET as their underlying platform? What popular companies do you know of as a .NET shop?\nThis question is related to a few others that I have seen. So I've just made this one...
Possible Duplicate: Most Useful Attributes in C# besides: [DefaultValue(100)] [Description("Some descriptive field here")] public int MyProperty{get; set;} What other C# Attributes are useful for Properties, after learning these I feel like I'm Missing out. Related Questions Most Useful Attributes in C#
C# provides a rich set of attributes that can be used to annotate properties, enhancing their functionality and providing metadata. Here are some other useful attributes you might consider: 1. **[Required]**: Used in data validation scenarios, especially in ASP.NET applications, to indicate that a property must have a...
22,598
[ { "from": "human", "value": "\nPossible Duplicate:\nMost Useful Attributes in C# \n\nbesides:\n[DefaultValue(100)]\n[Description(\"Some descriptive field here\")]\npublic int MyProperty{get; set;}\n\nWhat other C# Attributes are useful for Properties, after learning these I feel like I'm Missing out.\nRelat...
I have a custom control that inherits from WebControl and implements IValidator, but I also want to have a property for ValidationGroup. From research, it appears I need to inherit from BaseValidator to do so. Can anybody provide a successfull example from a ASP.Net custom control that implements both BaseValidator a...
Certainly! To create a custom ASP.NET control that implements validation and allows for a `ValidationGroup` property, you'll typically want to inherit from `BaseValidator`, which already implements `IValidator`. Below is an example of how to create such a control. This example demonstrates a simple custom validator th...
23,934
[ { "from": "human", "value": "I have a custom control that inherits from WebControl and implements IValidator, but I also want to have a property for ValidationGroup. From research, it appears I need to inherit from BaseValidator to do so. Can anybody provide a successfull example from a ASP.Net custom con...
I have the ActiveMQ-CPP 2.2.1 Visual Studio 2005 project compiling and running. In the console window, it shows the messages are being sent, though they're not being received. I can both send and receive messages with ActiveMQ-CPP 2.0.1, but not 2.2.1. I'm new to ActiveMQ and don't even know where to begin troublesh...
When troubleshooting message reception issues with ActiveMQ-CPP 2.2.1 while using ActiveMQ 5.1.0, consider the following steps: ### 1. Check Connection Settings - **Broker URL**: Ensure that you are connecting to the correct broker URL. Verify that it matches the URL you were using in version 2.0.1. - **Username and P...
25,478
[ { "from": "human", "value": "I have the ActiveMQ-CPP 2.2.1 Visual Studio 2005 project compiling and running. In the console window, it shows the messages are being sent, though they're not being received. I can both send and receive messages with ActiveMQ-CPP 2.0.1, but not 2.2.1. I'm new to ActiveMQ and...
I'd like to read whole content of a text file to a std::string object with c++. With Python, I can write: text = open("text.txt", "rt").read() It is very simple and elegant. I hate ugly stuff, so I'd like to know - what is the most elegant way to read a text file with C++? Thanks.
Reading a text file into a `std::string` in C++ can indeed be done elegantly with a few lines of code. Here’s a simple and clean way to achieve this using C++17 and above, which includes the use of file streams and the `std::string` class. Here is an example: ```cpp #include <iostream> #include <fstream> #include <st...
18,895
[ { "from": "human", "value": "I'd like to read whole content of a text file to a std::string object with c++. \nWith Python, I can write:\ntext = open(\"text.txt\", \"rt\").read()\n\nIt is very simple and elegant. I hate ugly stuff, so I'd like to know - what is the most elegant way to read a text file with ...
From the MSDN documentation: "Synchronized supports multiple writing threads, provided that no threads are reading the Hashtable. The synchronized wrapper does not provide thread-safe access in the case of one or more readers and one or more writers." Source: http://msdn.microsoft.com/en-us/library/system.collections.h...
The `Hashtable.Synchronized` method creates a thread-safe wrapper around a `Hashtable`. While it's true that `Hashtable.Synchronized` allows multiple writers, it comes with caveats, particularly around concurrent reads and writes. Here are some reasons why you might still choose to use it: 1. **Ease of Use**: The `Syn...
28,555
[ { "from": "human", "value": "From the MSDN documentation:\n\"Synchronized supports multiple writing threads, provided that no threads are reading the Hashtable. The synchronized wrapper does not provide thread-safe access in the case of one or more readers and one or more writers.\"\nSource:\nhttp://msdn.mi...
I have the following query: UPDATE lessonstatus INNER JOIN user ON lessonstatus.user_id = user.user_id SET user_id = (SELECT user_id FROM user WHERE username = 'too_many_accounts') WHERE last_name = 'stupid' AND first_name = 'user' AND username != 'too_many_accounts' AND lessonstatus.lesson_id NOT IN (SELECT lesson_id...
The error you are encountering is due to MySQL's restriction on modifying a table while selecting from the same table within the subquery. In your case, you are trying to update the `lessonstatus` table while also selecting from it in the subquery in the `NOT IN` clause. To resolve this issue, you can use a derived ta...
29,214
[ { "from": "human", "value": "I have the following query:\nUPDATE lessonstatus\nINNER JOIN user ON lessonstatus.user_id = user.user_id\nSET user_id = (SELECT user_id FROM user WHERE username = 'too_many_accounts')\nWHERE last_name = 'stupid' \nAND first_name = 'user'\nAND username != 'too_many_accounts'\nAND...
How would you go about introducing acceptance tests into a team using the .NET framework? What tools are available for this purpose? Thanks!
Introducing acceptance tests into a team using the .NET framework can significantly improve software quality and alignment with business requirements. Here are some steps you can take to effectively introduce acceptance testing, along with recommended tools for implementation: ### Steps to Introduce Acceptance Testing...
23,476
[ { "from": "human", "value": "How would you go about introducing acceptance tests into a team using the .NET framework? What tools are available for this purpose?\nThanks!\n" }, { "from": "gpt", "value": "Introducing acceptance tests into a team using the .NET framework can significantly improve...
Is there an algorithm that is more time efficient than O(n^2) for detecting cycles within a directed graph? I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic ...
Yes, there is a more time-efficient algorithm than O(n^2) for detecting cycles in a directed graph. The most commonly used algorithms for this purpose are based on Depth-First Search (DFS) and can detect cycles in O(V + E) time, where V is the number of vertices (nodes) and E is the number of edges in the graph. ### A...
27,393
[ { "from": "human", "value": "Is there an algorithm that is more time efficient than O(n^2) for detecting cycles within a directed graph?\nI have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a ...
We are an organisation who have purchased a system which is used by doctors to view test results of patients (quite sensitive information). Being a programmer, I have poked and prodded with the system and found that it submits the username and password via a HTTP GET request. On the domain it is run on, all computers a...
You've identified a significant security concern with the way user credentials are being handled in this system. Here’s how you can make a case to management regarding the necessity of implementing HTTPS and improving the security of the application: ### 1. **Highlight the Risks** - **Credential Exposure:** Explain t...
25,579
[ { "from": "human", "value": "We are an organisation who have purchased a system which is used by doctors to view test results of patients (quite sensitive information).\nBeing a programmer, I have poked and prodded with the system and found that it submits the username and password via a HTTP GET request.\n...
I'm optimizing some frequently run Perl code (once per day per file). Do comments slow Perl scripts down? My experiments lean towards no: use Benchmark; timethese(20000000, { 'comments' => '$b=1; # comment ... (100 times) ', 'nocomments' => '$b=1;'}); Gives pretty much identical values (apart from noise). Benc...
Your observations regarding the performance impact of comments in Perl code are correct: comments do not significantly slow down the execution of scripts. Here's a more detailed explanation of why this is the case: 1. **Comments Ignored by the Interpreter**: In Perl, comments (denoted by the `#` symbol) are ignored by...
29,363
[ { "from": "human", "value": "I'm optimizing some frequently run Perl code (once per day per file). \nDo comments slow Perl scripts down? My experiments lean towards no:\nuse Benchmark;\ntimethese(20000000, {\n 'comments' => '$b=1;\n# comment ... (100 times)\n', 'nocomments' => '$b=1;'});\n\nGives pret...
I'm trying to determine how I can detect when the user changes the Windows Font Size from Normal to Extra Large Fonts, the font size is selected by executing the following steps on a Windows XP machine: Right-click on the desktop and select Properties. Click on the Appearance Tab. Select the Font Size: Normal/Large Fo...
Detecting changes in the Windows Font Size settings, especially for legacy systems like Windows XP, can be tricky due to how DPI and font settings are managed in the Windows API. Below are some steps and considerations that may help you to accomplish your goal of detecting font size changes. ### Key Points 1. **DPI a...
23,068
[ { "from": "human", "value": "I'm trying to determine how I can detect when the user changes the Windows Font Size from Normal to Extra Large Fonts, the font size is selected by executing the following steps on a Windows XP machine:\n\nRight-click on the desktop and select Properties.\nClick on the Appearanc...