instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
Say I have a class named Frog, it looks like: public class Frog { public int Location { get; set; } public int JumpCount { get; set; } public void OnJump() { JumpCount++; } } I need help with 2 things: I want to create an event named Jump in the class definition. I want to create ...
Certainly! To create an event in your `Frog` class, you'll need to define a delegate that represents the signature of the methods that can be called when the event occurs. Then, you can declare the event itself. Below is an updated version of your `Frog` class that includes the `Jump` event, as well as an example of ho...
4,678
[ { "from": "human", "value": "Say I have a class named Frog, it looks like:\npublic class Frog\n{\n public int Location { get; set; }\n public int JumpCount { get; set; }\n\n\n public void OnJump()\n {\n JumpCount++;\n }\n\n}\n\nI need help with 2 things:\n\nI want to create an ev...
When should I not use the ThreadPool in .Net? It looks like the best option is to use a ThreadPool, in which case, why is it not the only option? What are your experiences around this?
The ThreadPool in .NET is a useful tool for managing multiple threads efficiently, particularly when handling short-lived tasks. However, there are scenarios when using the ThreadPool might not be the best choice. Here are some situations when you might want to avoid using the ThreadPool: ### 1. Long-Running Tasks If ...
4,967
[ { "from": "human", "value": "When should I not use the ThreadPool in .Net?\nIt looks like the best option is to use a ThreadPool, in which case, why is it not the only option?\nWhat are your experiences around this?\n" }, { "from": "gpt", "value": "The ThreadPool in .NET is a useful tool for man...
After a couple of hours fighting with the Gallery2 RSS module and getting only the message, "no feeds have yet been defined", I gave up. Based on a Google search for "no feeds have yet been defined", this is a pretty common problem. Do you have any tips and/or tricks for getting the Gallery2 RSS module to work? Or a...
Getting the Gallery2 RSS module to work can sometimes be a challenge, especially if you're not well-versed in PHP. Here are some tips and tricks to help you troubleshoot the issue of "no feeds have yet been defined" and improve your debugging process: ### Tips for Getting Gallery2 RSS Module to Work 1. **Check Module...
2,901
[ { "from": "human", "value": "After a couple of hours fighting with the Gallery2 RSS module and getting only the message, \"no feeds have yet been defined\", I gave up. Based on a Google search for \"no feeds have yet been defined\", this is a pretty common problem. Do you have any tips and/or tricks for g...
I do a lot of work in the grid and HPC space and one of the biggest challenges we have with a system distributed across hundreds (or in some case thousands) of servers is analysing the log files. Currently log files are written locally to the disk on each blade but we could also consider publishing logging informatio...
In a distributed system where you need to analyze logs from hundreds or thousands of servers, centralizing log management is essential for effective monitoring, alerting, and troubleshooting. Here are some recommendations to help you achieve near real-time log analysis: 1. **Centralized Logging Infrastructure**: - ...
3,773
[ { "from": "human", "value": "I do a lot of work in the grid and HPC space and one of the biggest challenges we have with a system distributed across hundreds (or in some case thousands) of servers is analysing the log files. \nCurrently log files are written locally to the disk on each blade but we could a...
I'm trying to maintain a Setup Project in Visual Studio 2003 (yes, it's a legacy application). The problem we have at the moment is that we need to write registry entries to HKCU for every user on the computer. They need to be in the HKCU rather than HKLM because they are the default user settings, and they do change p...
In Visual Studio 2003, Setup Projects primarily have limitations when it comes to writing to the HKCU (HKEY_CURRENT_USER) registry key during installation. When an installer runs, it executes with the privileges of the user who is installing it, and it primarily modifies the current user's profile. Hence, if you are de...
3,066
[ { "from": "human", "value": "I'm trying to maintain a Setup Project in Visual Studio 2003 (yes, it's a legacy application). The problem we have at the moment is that we need to write registry entries to HKCU for every user on the computer. They need to be in the HKCU rather than HKLM because they are the de...
What's the best way to handle a user going back to a page that had cached items in an asp.net app? Is there a good way to capture the back button (event?) and handle the cache that way?
Handling the back button behavior in an ASP.NET application, especially regarding cached items on a page, can be a bit tricky since the browser's back button does not expose a direct event in JavaScript or ASP.NET. However, there are various strategies you can employ to manage cache and ensure a better user experience ...
2,675
[ { "from": "human", "value": "What's the best way to handle a user going back to a page that had cached items in an asp.net app? Is there a good way to capture the back button (event?) and handle the cache that way?\n" }, { "from": "gpt", "value": "Handling the back button behavior in an ASP.NET...
I have a query: SELECT * FROM Items WHERE column LIKE '%foo%' OR column LIKE '%bar%' How do I order the results? Let's say I have rows that match 'foo' and rows that match 'bar' but I also have a row with 'foobar'. How do I order the returned rows so that the first results are the ones that matched more LIKEs?
To order the results so that rows matching more `LIKE` conditions appear first, you can use a case statement to create a custom ordering based on the number of matches. In your SQL query, you can count the matches for 'foo' and 'bar' and use that count to sort the results. Here's how you can do it: ```sql SELECT *, ...
7,568
[ { "from": "human", "value": "I have a query:\nSELECT *\nFROM Items\nWHERE column LIKE '%foo%'\n OR column LIKE '%bar%'\n\nHow do I order the results?\nLet's say I have rows that match 'foo' and rows that match 'bar' but I also have a row with 'foobar'.\nHow do I order the returned rows so that the first r...
I have always wondered how many different search techniques existed, for searching text, for searching images and even for videos. However, I have never come across a solution that searched for content within audio files. For example: Let us assume that I have about 200 podcasts downloaded to my PC in the form of mp3,...
Your idea of using speech-to-text (STT) software to transcribe audio files into text and then searching through those transcripts is indeed one of the most effective approaches to solve the problem you described. Here’s a detailed breakdown of how you might go about implementing this project: ### Step 1: Speech-to-Tex...
3,695
[ { "from": "human", "value": "I have always wondered how many different search techniques existed, for searching text, for searching images and even for videos.\nHowever, I have never come across a solution that searched for content within audio files. \nFor example: Let us assume that I have about 200 podca...
Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all, check it with different names or do som...
Dealing with environment-specific configuration files in a source-controlled project can be tricky. However, there are several common strategies that teams use to handle this situation effectively. Here are some of the most popular methods: ### 1. Ignore the File in Version Control You can choose not to check in the c...
4,799
[ { "from": "human", "value": "Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all...
I used git pull and had a merge conflict: unmerged: some_file.txt You are in the middle of a conflicted merge. How do I abandon my changes to the file and keep only the pulled changes?
To abandon your changes to the file and keep only the changes from the branch you pulled from, you can use the following command: ```bash git checkout --theirs some_file.txt ``` This command tells Git to take the version of `some_file.txt` from the "theirs" side of the merge conflict, which corresponds to the changes...
7,581
[ { "from": "human", "value": "I used git pull and had a merge conflict:\nunmerged: some_file.txt\n\nYou are in the middle of a conflicted merge.\n\nHow do I abandon my changes to the file and keep only the pulled changes?\n" }, { "from": "gpt", "value": "To abandon your changes to the file and ...
This is a low-level systems question. I need to mix 32 bit and 16 bit code because I'm trying to return to real-mode from protected mode. As a bit of background information, my code is doing this just after GRUB boots so I don't have any pesky operating system to tell me what I can and can't do. Anyway, I use [BITS 32]...
Mixing 16-bit and 32-bit code in the same file can be tricky, as you've found. NASM indeed uses the `[BITS 16]` and `[BITS 32]` directives to specify the mode for the subsequent code, but there are some subtleties to how the assembler handles certain instructions and operand sizes, particularly when transitioning betwe...
448
[ { "from": "human", "value": "This is a low-level systems question.\nI need to mix 32 bit and 16 bit code because I'm trying to return to real-mode from protected mode. As a bit of background information, my code is doing this just after GRUB boots so I don't have any pesky operating system to tell me what I...
I use solr to search for documents and when trying to search for documents using this query "id:*", I get this query parser exception telling that it cannot parse the query with * or ? as the first character. HTTP Status 400 - org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not allowed as...
The error you're encountering is due to the fact that using a wildcard query (i.e., `*` or `?`) as the first character in a query is not allowed in Lucene's QueryParser, which underlies Solr's query parsing mechanism. In your case, the query `id:*` is attempting to match all documents that have an `id` field, and the...
5,779
[ { "from": "human", "value": "I use solr to search for documents and when trying to search for documents using this query \"id:*\", I get this query parser exception telling that it cannot parse the query with * or ? as the first character. \nHTTP Status 400 - org.apache.lucene.queryParser.ParseException: Ca...
Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in th...
Finding the MIME type of a file and managing it in your web application can be accomplished in various ways across different operating systems. Here’s how you can approach this, including considerations for Mac and Windows, and available libraries in Python. ### Finding the MIME Type of a File #### 1. Using Command L...
4,110
[ { "from": "human", "value": "Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer.\nAssumption: The browser figures out which application/viewer to use by ...
In handling a form post I have something like public ActionResult Insert() { Order order = new Order(); BindingHelperExtensions.UpdateFrom(order, this.Request.Form); this.orderService.Save(order); return this.RedirectToAction("Details", new { id = order.ID }); } I am not u...
The challenge you're facing is common in ASP.NET MVC applications, especially when dealing with dynamic forms that can have a variable number of fields. Let's explore a few approaches and their implications: ### 1. Using `BindingHelperExtensions` Your current approach using a helper method to update the order object ...
1,340
[ { "from": "human", "value": "In handling a form post I have something like\n public ActionResult Insert()\n {\n Order order = new Order();\n BindingHelperExtensions.UpdateFrom(order, this.Request.Form);\n\n this.orderService.Save(order);\n\n return this.RedirectToAction(\"D...
The .NET Security Policy can be changed from a script by using CasPol.exe. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the relevant command. I think I shall be looking into dom...
When working with .NET Framework 2.0 and the need to configure security policies such as adjusting the Code Access Security (CAS) using `CasPol.exe`, you are indeed faced with some challenges, especially when dealing with unprivileged, standard user accounts. ### Domain Logon Scripts Using domain logon scripts is an ...
3,942
[ { "from": "human", "value": "The .NET Security Policy can be changed from a script by using CasPol.exe. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the relevant com...
When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on. I know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style of notification system in asp.net AJAX. O...
The style of notification bar you’re referring to is often called a "toast notification" or simply a "notification bar." It provides non-intrusive feedback to users about the status of an operation or alerts them to new updates. If you're looking for an implementation of a notification system in ASP.NET AJAX that mimi...
4,590
[ { "from": "human", "value": "When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on.\nI know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style...
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux. The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point me in the ...
Absolutely, Python is a versatile programming language that can be used for a variety of applications, including desktop applications with a graphical user interface (GUI). Below are some suggestions for libraries to create a GUI in Python, as well as guidance on how to compile your application into an executable for d...
2,557
[ { "from": "human", "value": "Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.\nThe problem being I have no idea where to start or how to write a GUI with it, can anybody sh...
I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn. Having limited time, I really only have time to look learn one of them. Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run?
Both IronRuby and IronPython are interesting dynamic languages built on top of the Dynamic Language Runtime (DLR), each with its own strengths and areas of applicability. Your choice of which one to learn should depend on your interests, background, and future goals. Here are some considerations for each language: ###...
5,002
[ { "from": "human", "value": "I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn.\nHaving limited time, I really only have time to look learn one of them.\nAny opinions on which of the two (Iron Ruby or Iron Python...
I have a line of C# in my ASP.NET code behind that looks like this: DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates"); The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView control. When my code hits this line, I am...
The `ArithmeticException` you are encountering with the message "Value was either too large or too small for an Int32" when trying to find the `DropDownList` control in your `FormView` suggests that there might be an issue with how the `FormView` is handling its data, or with the state of the control itself. Here are ...
5,043
[ { "from": "human", "value": "I have a line of C# in my ASP.NET code behind that looks like this:\nDropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl(\"ddlStates\");\n\nThe DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormV...
If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?
Yes, there are several ways to interpret error codes from Cocoa functions without having to grep through header files: 1. **Apple Documentation**: The official Apple Developer Documentation is a great starting point. Many error codes are documented in the relevant API documentation. If you know the function or framewo...
5,934
[ { "from": "human", "value": "If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?\n" }, { "from": "gpt", "value": "Yes, there are several ways to interpret error codes fr...
I've found ScriptingJsonSerializationSection but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the <System.Web.Services.WebMethod()> and <System.Web.Script.Services.ScriptMethod()> attributes so there must be a built-in way...
In ASP.NET 2.0, if you are looking for an easy way to serialize objects to JSON without manually writing the serialization code, you can use the `System.Web.Script.Serialization.JavaScriptSerializer` class, which is available in the .NET Framework starting from version 3.5. However, since you're specifically using ASP....
2,806
[ { "from": "human", "value": "I've found ScriptingJsonSerializationSection but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the <System.Web.Services.WebMethod()> and <System.Web.Script.Services.ScriptMethod()> a...
What is your favorite technique for launching a windbg user-mode remote debugging session? Why is do you prefer this technique over other techniques? (pros/cons) There are at least four different ways to do user-mode remote debug using windbg, as documented in the "Remote Debugging" section of the debugging tools for w...
While all four techniques for launching a WinDbg user-mode remote debugging session have their own merits, I prefer the "smart client" technique, where the host WinDbg launches the app on the target via a process server running on the target. Here’s why: ### Pros: 1. **Ease of Use**: This method abstracts a lot of the...
4,709
[ { "from": "human", "value": "What is your favorite technique for launching a windbg user-mode remote debugging session?\nWhy is do you prefer this technique over other techniques? (pros/cons)\nThere are at least four different ways to do user-mode remote debug using windbg, as documented in the \"Remote Deb...
How do I find out whether or not Caps Lock is activated, using VB.NET? This is a follow-up to my earlier question.
To determine whether the Caps Lock key is activated in VB.NET, you can use the `Control.IsKeyLocked` method. This method checks the status of a specified key, including Caps Lock, Num Lock, and Scroll Lock. Here is a simple example of how to check if Caps Lock is activated: ```vb.net Imports System.Windows.Forms Mod...
6,832
[ { "from": "human", "value": "How do I find out whether or not Caps Lock is activated, using VB.NET?\nThis is a follow-up to my earlier question.\n" }, { "from": "gpt", "value": "To determine whether the Caps Lock key is activated in VB.NET, you can use the `Control.IsKeyLocked` method. This meth...
Some code that rounds up the division to demonstrate (C-syntax): #define SINT64 long long int #define SINT32 long int SINT64 divRound(SINT64 dividend, SINT64 divisor) { SINT32 quotient1 = dividend / divisor; SINT32 modResult = dividend % divisor; SINT32 multResult = modResult * 2; SINT32 quotient2 = multResul...
Hi Chad, You're correct in noting the differences between signed and unsigned arithmetic in kernel space, and that you're limited by the absence of library functions like `libgcc` in this context. When working with 64-bit signed integers in the Linux kernel, you need to implement your own division functions, as the ke...
5,039
[ { "from": "human", "value": "Some code that rounds up the division to demonstrate (C-syntax):\n#define SINT64 long long int\n#define SINT32 long int\n\nSINT64 divRound(SINT64 dividend, SINT64 divisor)\n{\n SINT32 quotient1 = dividend / divisor;\n\n SINT32 modResult = dividend % divisor;\n SINT32 multResu...
Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML? Note: The solution needs to handle XML data sources that use character encodings other than UTF-8,...
Handling XML with invalid hexadecimal characters can be a challenge, especially if you want to maintain the original encoding of the document. Since your current approach involves parsing the XML into a string and using regular expressions, this can indeed lead to performance issues with large documents. A more efficie...
3,309
[ { "from": "human", "value": "Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML?\nNote: \n\nThe solution needs to handle XML\ndata sources t...
I'm trying to add an SVN repository to Eclipse. I've installed Subclipse, and it seems to be working fine. But, when I try to "add a new SVN repository", I input this, for example: http://svn.python.org/projects/peps/trunk I get this: Error validating location: "org.tigris.subversion.javahl.ClientException: RA layer ...
The error message you're encountering indicates that Eclipse, via Subclipse, is unable to connect to the specified SVN repository URL. Here are some steps you can take to troubleshoot and resolve this issue: 1. **Check the Repository URL**: Verify that the SVN repository URL you are trying to use is correct and access...
4,905
[ { "from": "human", "value": "I'm trying to add an SVN repository to Eclipse. \nI've installed Subclipse, and it seems to be working fine. But, when I try to \"add a new SVN repository\", I input this, for example:\nhttp://svn.python.org/projects/peps/trunk\nI get this:\n\nError validating location: \"org.ti...
I was (and still am) looking for an embedded database to be used in a .net (c#) application. The caveat: The Application (or at least the database) is stored on a Network drive, but only used by 1 user at a time. Now, my first idea was SQL Server Compact edition. That is really nicely integreated, but it can not run of...
For an embedded database that can run from a network drive and integrates well with .NET (C#), here are some alternatives to consider: 1. **SQLite**: - **Overview**: SQLite is a popular embedded database that is lightweight and serverless. It can easily be used from a network drive. - **Integration**: You can us...
2,954
[ { "from": "human", "value": "I was (and still am) looking for an embedded database to be used in a .net (c#) application. The caveat: The Application (or at least the database) is stored on a Network drive, but only used by 1 user at a time.\nNow, my first idea was SQL Server Compact edition. That is really...
I've been using WWF for a while as part of an internal call center application (ASP.NET), and while learning it was a good practice in understanding how a state machine based workflow system should work, I am definitely not in love with WWF itself. In my opinion it is: Overly complex, especially for use within web app...
If you're looking for an alternative to Windows Workflow Foundation (WF) that fits your specific requirements, there are a few .NET-based workflow frameworks that you may find appealing: 1. **Elsa**: - **Description**: Elsa is a lightweight, extensible workflow engine that supports both state machines and long-runn...
3,438
[ { "from": "human", "value": "I've been using WWF for a while as part of an internal call center application (ASP.NET), and while learning it was a good practice in understanding how a state machine based workflow system should work, I am definitely not in love with WWF itself. In my opinion it is:\n\nOverly...
I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the default state. How do I get my design chan...
The issue you're facing is likely related to how the properties of the controls within your UserControl are managed by the designer in Visual Studio. When you modify properties in the designer, those changes need to be serialized so that they persist after a build. ### Here's a general approach to ensure that your des...
4,304
[ { "from": "human", "value": "I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the de...
We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++. What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party software/drivers if one is available.
Burning files to a CD using the native Windows API can be a bit tricky, especially considering that Windows XP and Vista do not expose a simple API for directly burning CDs. However, you can utilize the Windows IMAPI (Image Mastering API), which is available in Windows XP (with SP1 and later) and is more robust in Wind...
3,136
[ { "from": "human", "value": "We need to programatically burn files to CD in a C\\C++ Windows XP/Vista application we are developing using Borlands Turbo C++.\nWhat is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party sof...
I inherited a Windows Forms app written in VB.Net. Certain parts of the app run dreadfully slow. What's the easiest way to find which parts of the code are holding things up? I'm looking for a way to quickly find the slowest subroutines and tackle them first in an attempt to speed up the app. I know that there are s...
Finding performance bottlenecks in a VB.NET Windows Forms application can be accomplished without spending money on commercial profiling tools. Here are some approaches you can take to identify slow subroutines in your application: ### 1. Use the Built-in Visual Studio Diagnostic Tools If you have Visual Studio, you ...
4,093
[ { "from": "human", "value": "I inherited a Windows Forms app written in VB.Net. Certain parts of the app run dreadfully slow. What's the easiest way to find which parts of the code are holding things up? I'm looking for a way to quickly find the slowest subroutines and tackle them first in an attempt to ...
In Visual Studio 2008 add a new DataGridView to a form Edit Columns Add a a new DataGridViewImageColumn Open the CellStyle Builder of this column (DefaultCellStyle property) Change the NullValue from System.Drawing.Bitmap to null Try to add a new Row to the DataGridView at runtime (dataGridView1.Rows.Add();) You get t...
The issue you are encountering is related to how the DataGridView and its columns handle the `NullValue` property at design time compared to runtime. ### Explanation 1. **NullValue Property**: The `NullValue` property of the `DefaultCellStyle` for a `DataGridViewImageColumn` specifies what to display in the cell when...
5,607
[ { "from": "human", "value": "In Visual Studio 2008\n\nadd a new DataGridView to a form\nEdit Columns\nAdd a a new DataGridViewImageColumn\nOpen the CellStyle Builder of this column (DefaultCellStyle property)\nChange the NullValue from System.Drawing.Bitmap to null\nTry to add a new Row to the DataGridView ...
I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value. I've given him a number of different reasons against this, the main one...
You and your colleague raise valid concerns about using random values in unit tests, particularly in the context of unit testing, where the primary goal is to verify the behavior of specific pieces of code under controlled conditions. Here are additional points you can use to argue against the practice of using random ...
3,824
[ { "from": "human", "value": "I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value.\nI've given him a number of di...
I'm currently using the awesome attachment-fu plugin for a Rails app, but as a novice developer, I've never encountered a scenario like the one I've found myself in. Essentially, I'm using the attachment-fu plugin on two levels. Is for user avatars in the user class. Is to allow file attachments (PDFs, etc) in a messa...
When dealing with file attachments in a Rails application using the attachment-fu plugin (or any similar file attachment library), it's essential to keep your code DRY (Don't Repeat Yourself), clear, and maintainable. Given that you have two distinct use cases for file attachments (user avatars and message file attachm...
1,862
[ { "from": "human", "value": "I'm currently using the awesome attachment-fu plugin for a Rails app, but as a novice developer, I've never encountered a scenario like the one I've found myself in.\nEssentially, I'm using the attachment-fu plugin on two levels.\n\nIs for user avatars in the user class.\nIs to ...
I have seen lots of questions recently about WPF... What is it? What does it stand for? How can I begin programming WPF?
### What is WPF? WPF stands for **Windows Presentation Foundation**. It is a graphical subsystem by Microsoft for rendering user interfaces in Windows-based applications. It was introduced as part of .NET Framework 3.0 and allows developers to create rich desktop applications that can take advantage of modern graphics...
3,899
[ { "from": "human", "value": "I have seen lots of questions recently about WPF...\n\nWhat is it?\nWhat does it stand for?\nHow can I begin programming WPF?\n\n" }, { "from": "gpt", "value": "### What is WPF?\n\nWPF stands for **Windows Presentation Foundation**. It is a graphical subsystem by Mic...
I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're talking 500G of database). This process fai...
The issue you're facing with "too many files open" while trying to import a large MySQL dump into your MySQL server can be caused by several factors, including limitations set at the operating system level or configuration settings within MySQL. Here are several steps you can take to resolve this issue: 1. **Increase ...
3,350
[ { "from": "human", "value": "I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used \"mysqldump --host otherhost -A | mysql\", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're t...
I am trying to enable Full-text indexing in SQL Server 2005 Express. I am running this on my laptop with Vista Ultimate. I understand that the standard version of SQL Server Express does not have full-text indexing. I have already downloaded and installed "Microsoft SQL Server 2005 Express Edition with Advanced Service...
It sounds like you have set up the necessary components to enable full-text indexing in SQL Server 2005 Express, but you're running into issues when trying to create a full-text index. Here are a few steps and checks you can perform to resolve the issue: 1. **Check Permissions**: Ensure that the account you're using h...
4,339
[ { "from": "human", "value": "I am trying to enable Full-text indexing in SQL Server 2005 Express. I am running this on my laptop with Vista Ultimate.\nI understand that the standard version of SQL Server Express does not have full-text indexing. I have already downloaded and installed \"Microsoft SQL Server...
Does anybody here have positive experience of working with MS SQL Server 2005 from Rails 2.x? Our developers use Mac OS X, and our production runs on Linux. For legacy reasons we should use MS SQL Server 2005. We're using ruby-odbc and are running into various problems, too depressing to list here. I get an impressio...
Working with MS SQL Server 2005 from Rails 2.x can be quite challenging, especially since both the Rails version and the database are quite old and might have compatibility issues. However, it is possible to set up a working environment. Here are some tips that might help you achieve a more stable integration: 1. **Us...
4,163
[ { "from": "human", "value": "Does anybody here have positive experience of working with MS SQL Server 2005 from Rails 2.x?\nOur developers use Mac OS X, and our production runs on Linux. For legacy reasons we should use MS SQL Server 2005.\nWe're using ruby-odbc and are running into various problems, too ...
quick question: my customer has a situation where he has his database with a varchar field and the corresponding jdbc code is storing/retrieving a boolean. I guess that the boolean values false and true are going to be translated to "0" and "1" but I would like to have a confirmation of this (I can't find the precise b...
In general, when dealing with JDBC and Oracle databases, the way booleans are stored and retrieved can indeed vary based on the specific JDBC driver being used, as well as the database schema and data types involved. However, here’s a typical behavior you can expect: 1. **Storing Boolean Values**: When you store a boo...
5,513
[ { "from": "human", "value": "quick question: my customer has a situation where he has his database with a varchar field and the corresponding jdbc code is storing/retrieving a boolean.\nI guess that the boolean values false and true are going to be translated to \"0\" and \"1\" but I would like to have a co...
I was curious if anyone out there has experience getting the necessary legal documents (user agreements, privacy policies, disclaimers, etc.) for a small software business. For example if you just want to have a software 'company' that sells a few piece of software that you have written, are there cheap solutions for ...
Yes, many small software businesses look for cost-effective ways to obtain the necessary legal documents, such as user agreements, privacy policies, and disclaimers. Here are some options you might consider: 1. **Online Legal Services**: There are several online platforms that offer affordable legal document templates...
5,275
[ { "from": "human", "value": "I was curious if anyone out there has experience getting the necessary legal documents (user agreements, privacy policies, disclaimers, etc.) for a small software business. For example if you just want to have a software 'company' that sells a few piece of software that you hav...
I have Windows File sharing enabled on an OS X 10.4 computer. It's accessible via \rudy\myshare for all the Windows users on the network, except for one guy running Vista Ultimate 64-bit edition. All the other users are running Vista or XP, all 32-bit. All the workgroup information is the same, all login with the same...
The issue you're experiencing with the Windows Vista Ultimate 64-bit machine not being able to log in to your OS X 10.4 computer could be attributed to several factors. Here are some potential solutions and troubleshooting steps you can take to resolve this issue: 1. **Check Credentials**: Make sure that the username ...
4,283
[ { "from": "human", "value": "I have Windows File sharing enabled on an OS X 10.4 computer. It's accessible via \\rudy\\myshare for all the Windows users on the network, except for one guy running Vista Ultimate 64-bit edition. \nAll the other users are running Vista or XP, all 32-bit. All the workgroup info...
I am considering creating my own website using Java and am trying to decide what framework to use. However, doing a quick search for Java frameworks returns more than 50 to choose from! My website is just going to be for my own enjoyment of building it in the beginning, but if it becomes popular, it would be good for i...
Choosing a Java framework for building your website can indeed be overwhelming given the variety of options available. However, many frameworks cater to different needs, and each has its strengths and weaknesses. Let's take a closer look at some of the most popular Java web frameworks and their characteristics: ### Po...
1,145
[ { "from": "human", "value": "I am considering creating my own website using Java and am trying to decide what framework to use. However, doing a quick search for Java frameworks returns more than 50 to choose from!\nMy website is just going to be for my own enjoyment of building it in the beginning, but if ...
I have a scenario where I need to make a call to a telephone(landline/mobile) or send SMS to a particular set of users only using ASP.NET and C#. The web application is not a mobile application. How do I go about doing these? What typically would be the hardware requirements? I would be extremely grateful if you could...
To enable your ASP.NET application to make phone calls or send SMS messages, you will typically leverage external APIs provided by telecommunications service providers. Here’s a step-by-step guide on how to do this: ### 1. Choose a Communication API Provider Several third-party APIs allow you to send SMS or make phone...
1,728
[ { "from": "human", "value": "I have a scenario where I need to make a call to a telephone(landline/mobile) or send SMS to a particular set of users only using ASP.NET and C#. The web application is not a mobile application.\nHow do I go about doing these? What typically would be the hardware requirements? ...
Is it possible to reach the individual columns of table2 using HQL with a configuration like this? <hibernate-mapping> <class table="table1"> <set name="table2" table="table2" lazy="true" cascade="all"> <key column="result_id"/> <many-to-many column="group_id"/> </set> </class> </hibernate-mappi...
Yes, it is possible to access individual columns of `table2` using HQL (Hibernate Query Language) with the provided mapping configuration. However, the way you've mapped `table2` indicates a many-to-many relationship where `table1` has a collection of entities from `table2`. To access the columns of `table2` in your HQ...
6,560
[ { "from": "human", "value": "Is it possible to reach the individual columns of table2 using HQL with a configuration like this?\n<hibernate-mapping>\n <class table=\"table1\">\n <set name=\"table2\" table=\"table2\" lazy=\"true\" cascade=\"all\">\n <key column=\"result_id\"/>\n <many-to-many c...
More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file?
Yes, you can set up Emacs to give you a warning when you attempt to kill a buffer that is not associated with a file. You can achieve this by advising the `kill-buffer` function to check if the buffer is associated with a file and display a warning if it is not. You can add the following code to your Emacs configuratio...
5,754
[ { "from": "human", "value": "More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file?\n" }, { "from": "gpt", "value": "Yes, you can set up Emacs to give you a warning when you atte...
What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test? I'd be interested in knowing if people have any specific thresholds for determining whether their tests are too slow, or is it just when the friction of a long running test suite gets ...
When it comes to unit tests, there are several considerations regarding execution rates, durations, and strategies to ensure tests run efficiently. Here's a summary based on common practices and experiences: ### Execution Rate - **Test per Second Aim**: Many developers aim for unit tests to run under 10ms each, leadin...
5,217
[ { "from": "human", "value": "What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test? \nI'd be interested in knowing if people have any specific thresholds for determining whether their tests are too slow, or is it just when the f...
I need to write a program used internally where different users will have different abilities within the program. Rather than making users have a new username and password, how do I tie into an existing domain server's login system? Assume .NET (C#, VB, ASP, etc) -Adam
To integrate your application with an existing domain server's login system, you can utilize Windows Authentication, which allows users to log in using their existing domain credentials without requiring a new username and password. Here's a general approach on how to implement this in a .NET application, particularly ...
3,561
[ { "from": "human", "value": "I need to write a program used internally where different users will have different abilities within the program.\nRather than making users have a new username and password, how do I tie into an existing domain server's login system?\nAssume .NET (C#, VB, ASP, etc)\n-Adam\n" ...
I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I modify the startup project, which means my ...
You're right in noting that there has been a change in behavior regarding how Visual Studio determines which projects to build in a solution when you start debugging (F5). In Visual Studio 2008, the default behavior is to build only the startup project unless it has dependencies that require building. To ensure that ...
4,119
[ { "from": "human", "value": "I have a solution with several projects, where the startup project has a post-build event that does all the copying of \"plugin\" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I ...
I have a small application I am working on that at one point needs to update a user's home directory path in AD under the profile tab where it allows you to map a drive letter to a particular path. The code I have put together so far sets the Home Folder Local path portion OK, but I'm trying to figure out the name for...
It's great that you're making progress with your application! To set the "Connect" portion of a user's home folder settings in Active Directory, you need to update the `HomeDrive` attribute along with the `HomeDirectory` attribute. Here's how you can set both the local path and the drive letter: ```csharp using Syste...
6,318
[ { "from": "human", "value": "I have a small application I am working on that at one point needs to update a user's home directory path in AD under the profile tab where it allows you to map a drive letter to a particular path. The code I have put together so far sets the Home Folder Local path portion OK, ...
What's the easiest way to do an "instring" type function with a regex? For example, how could I reject a whole string because of the presence of a single character such as :? For example: this - okay there:is - not okay because of : More practically, how can I match the following string: //foo/bar/baz[1]/ns:foo2/@a...
To accomplish your goals using regular expressions (regex), you can utilize lookaheads or negation to ensure that you only match strings that do not contain certain characters or patterns. ### 1. Rejecting a string due to the presence of a specific character If you want to reject a whole string if it contains a speci...
4,834
[ { "from": "human", "value": "What's the easiest way to do an \"instring\" type function with a regex? For example, how could I reject a whole string because of the presence of a single character such as :? For example: \n\nthis - okay\nthere:is - not okay because of :\n\nMore practically, how can I match th...
We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often... (overflows or bad initializations usually) :-( I was reading that Google Chrome uses a process for every tab so if something goes wrong then the program does not crash compleatelly, only t...
Creating robust and portable C++ code requires careful design, error handling, and testing strategies. Here are some tips and resources to help you build more resilient applications, as well as recommendations for managing processes across platforms. ### Tips for Robust C++ Code 1. **Use Smart Pointers**: Utilize sma...
4,453
[ { "from": "human", "value": "We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often... (overflows or bad initializations usually) :-(\nI was reading that Google Chrome uses a process for every tab so if something goes wrong then the p...
Are there any algorithms that can help with hierarchical clustering? Google's map-reduce has only an example of k-clustering. In case of hierarchical clustering, I'm not sure how it's possible to divide the work between nodes. Other resource that I found is: http://issues.apache.org/jira/browse/MAHOUT-19 But it's not a...
Hierarchical clustering is a method of cluster analysis that seeks to build a hierarchy of clusters. It can be divided into two main types: agglomerative (bottom-up) and divisive (top-down). Given the nature of hierarchical clustering, it can be challenging to parallelize effectively due to the dependencies that arise ...
4,454
[ { "from": "human", "value": "Are there any algorithms that can help with hierarchical clustering?\nGoogle's map-reduce has only an example of k-clustering. In case of hierarchical clustering, I'm not sure how it's possible to divide the work between nodes.\nOther resource that I found is: http://issues.apac...
I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for Office (aka VSTO). VSTA is included free as part of the license for InfoPath 2007; VSTO, also free, ...
Choosing between Visual Studio Tools for Applications (VSTA) and Visual Studio Tools for Office (VSTO) for developing forms for Office Forms Server/MOSS 2007 involves considering a few key aspects. Here are some pros and cons of each IDE to help you make your decision: ### Visual Studio Tools for Applications (VSTA) ...
4,976
[ { "from": "human", "value": "I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for Office (aka VSTO). VSTA is included free as part of the lic...
You have an ascending list of numbers, what is the most efficient algorithm you can think of to get the ascending list of sums of every two numbers in that list. Duplicates in the resulting list are irrelevant, you can remove them or avoid them if you like. To be clear, I'm interested in the algorithm. Feel free to p...
To find the ascending list of unique sums of every two numbers in a sorted list, you can use a two-pointer approach. This method efficiently generates the sums without needing to explicitly check for duplicates. Given that the input list is already sorted, we can make use of this order to produce a sorted list of sums....
3,080
[ { "from": "human", "value": "You have an ascending list of numbers, what is the most efficient algorithm you can think of to get the ascending list of sums of every two numbers in that list. Duplicates in the resulting list are irrelevant, you can remove them or avoid them if you like.\nTo be clear, I'm in...
Making a web page display correctly im all major browsers today is a very time consuming task. Is there a easy way to make a CSS style that looks identical in every browser? Or at least do you have some tips to make this work easier?
Achieving consistent styling across all major browsers can be a challenging task due to differences in how browsers render CSS. However, there are strategies and tips you can follow to make the process easier and help ensure more uniformity: ### Tips for Consistent Cross-Browser CSS: 1. **CSS Reset/Normalize**: - ...
4,516
[ { "from": "human", "value": "Making a web page display correctly im all major browsers today is a very time consuming task.\nIs there a easy way to make a CSS style that looks identical in every browser? \nOr at least do you have some tips to make this work easier?\n" }, { "from": "gpt", "value"...
We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience?
For capturing live video on Linux, there are several options for inexpensive capture cards and USB devices that have simple APIs. Here are a few recommendations along with some experiences that users have shared: ### USB Video Capture Devices 1. **Elgato Cam Link 4K**: - **Price**: Generally a bit pricier than som...
3,825
[ { "from": "human", "value": "We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience? \n" }, { "from": "gpt", "value": "For capturing live video on Linux, there are several options for inexpensive captu...
What are the best open source (open source and commercial) reporting tools for ASP.NET similar to Crystal Reports for ASP.NET?
When looking for reporting tools for ASP.NET that are similar to Crystal Reports, you have a variety of options ranging from open-source to commercial solutions. Here’s a list of some of the best tools in both categories: ### Open Source Reporting Tools 1. **FastReport Open Source** - A powerful open-source report...
3,759
[ { "from": "human", "value": "What are the best open source (open source and commercial) reporting tools for ASP.NET similar to Crystal Reports for ASP.NET?\n" }, { "from": "gpt", "value": "When looking for reporting tools for ASP.NET that are similar to Crystal Reports, you have a variety of opt...
Another SSRS question here: We have a development, a QA, a Prod-Backup and a Production SSRS set of servers. On our production and prod-backup, SSRS will go to sleep if not used for a period of time. This does not occur on our development or QA server. In the corporate environment we're in, we don't have physic...
The behavior you're observing, where SQL Server Reporting Services (SSRS) goes to sleep on the production and backup servers but not on the development and QA servers, may be related to several factors. Here are some things to consider and possible solutions: 1. **App Pool Configuration**: - SSRS runs under an appl...
3,994
[ { "from": "human", "value": "Another SSRS question here: \nWe have a development, a QA, a Prod-Backup and a Production SSRS set of servers. \nOn our production and prod-backup, SSRS will go to sleep if not used for a period of time. \nThis does not occur on our development or QA server. \nIn the corpora...
It is generally accepted that the use of cursors in stored procedures should be avoided where possible (replaced with set based logic etc). If you take the cases where you need to iterate over some data, and can do in a read only manner, are fast forward (read only forward) cursor more or less inefficient than say whil...
The debate about the use of cursors versus set-based operations in SQL is a long-standing one in database performance discussions. Let's break down your points and questions regarding cursors, specifically fast-forward (read-only, forward-only) cursors, and while loops in stored procedures. ### Cursors vs. While Loops...
4,753
[ { "from": "human", "value": "It is generally accepted that the use of cursors in stored procedures should be avoided where possible (replaced with set based logic etc). If you take the cases where you need to iterate over some data, and can do in a read only manner, are fast forward (read only forward) curs...
GDI+ DrawLines function has a clipping bug that can be reproduced by running the following c# code. When running the code, two line paths appear, that should be identical, because both of them are inside the clipping region. But when the clipping region is set, one of the line segment is not drawn. protected override...
The issue you're experiencing with the GDI+ `DrawLines` function and clipping is indeed a known problem when dealing with clipping regions and anti-aliasing settings. The behavior is inconsistent and can lead to some lines not being drawn as expected when they are clipped. You mentioned that enabling anti-aliasing res...
3,481
[ { "from": "human", "value": "GDI+ DrawLines function has a clipping bug that can be reproduced by running the following c# code. When running the code, two line paths appear, that should be identical, because both of them are inside the clipping region. But when the clipping region is set, one of the line ...
Is it possible to call a stored procedure from another stored procedure asynchronously? Edit: Specifically I'm working with a DB2 database. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
In DB2, calling a stored procedure asynchronously from another stored procedure is not natively supported in the same way that some other database systems might allow. DB2 does not have a built-in mechanism for truly asynchronous stored procedure calls where the calling procedure would continue executing without waitin...
4,478
[ { "from": "human", "value": "Is it possible to call a stored procedure from another stored procedure asynchronously?\nEdit: Specifically I'm working with a DB2 database.\n­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­\n" }, { "from": "gpt", "value": "In DB2, calling a stored procedure asynchronously from ano...
Can anybody give an example of exporting a ChartFX7 chart to SVG? I've tried: ByteArrayOutputStream baos = new ByteArrayOutputStream(); m_chart.setOutputWriter(new SvgWriter()); m_chart.exportChart(FileFormat.EXTERNAL, baos); and : ByteArrayOutputStream baos = new ByteArrayOutputStream(); ...
When working with ChartFX 7 to export charts to SVG format, you need to ensure that you are correctly configuring the output settings and handling the streams appropriately. The `NullPointerException` you are encountering typically indicates that the chart object or some other resource isn't properly initialized. Here...
4,874
[ { "from": "human", "value": "Can anybody give an example of exporting a ChartFX7 chart to SVG?\nI've tried:\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n m_chart.setOutputWriter(new SvgWriter());\n m_chart.exportChart(FileFormat.EXTERNAL, baos);\n \nand :\n ByteArrayOu...
gnuplot is giving the error: "sh: kpsexpand: not found." I feel like the guy in Office Space when he saw "PC LOAD LETTER". What the heck is kpsexpand? I searched Google, and there were a lot of pages that make reference to kpsexpand, and say not to worry about it, but I can't find anything, anywhere that actually expl...
`kpsexpand` is a utility that comes from the TeX typesetting system, specifically from the Kpathsea library. Kpathsea is a system for path searching for files used by TeX and related programs. ### What is `kpsexpand`? `kpsexpand` is a command-line tool that expands file names and paths based on the TeX directory str...
7,430
[ { "from": "human", "value": "gnuplot is giving the error: \"sh: kpsexpand: not found.\" \nI feel like the guy in Office Space when he saw \"PC LOAD LETTER\". What the heck is kpsexpand?\nI searched Google, and there were a lot of pages that make reference to kpsexpand, and say not to worry about it, but I c...
I'm considering switching to a Dvorak-based keyboard layout, but one optimized for programming (mostly) Java and python (e.g. DDvorak, Programmer Dvorak, etc.). What particular keyboard would be best for such an undertaking? I'd consider either natural or straight keyboards. Thanks.
Switching to a Dvorak-based keyboard optimized for programming is a great way to improve typing efficiency, especially if you're working with programming languages like Java and Python. Here are a few recommendations for keyboards that might suit your needs: ### 1. **Ergonomic Keyboards** - **Kinesis Advantage2**: Thi...
5,611
[ { "from": "human", "value": "I'm considering switching to a Dvorak-based keyboard layout, but one optimized for programming (mostly) Java and python (e.g. DDvorak, Programmer Dvorak, etc.). What particular keyboard would be best for such an undertaking? I'd consider either natural or straight keyboards.\nTh...
Outline OK, I have Google'd this and already expecting a big fat NO!! But I thought I should ask since I know sometimes there can be the odd little gem of knowledge lurking around in peoples heads ^_^ I am working my way through some excercises in a book for study, and this particular exercise is User Controls. I have ...
### Outline for Defining a Default Event in User Controls #### Introduction - Purpose: Exploring the possibility of defining a default event for ASP.NET User Controls (.ascx). - Current understanding: The expectation of a default event generation upon double-clicking the control in an ASPX page. #### Current Code Str...
1,940
[ { "from": "human", "value": "Outline\nOK, I have Google'd this and already expecting a big fat NO!! But I thought I should ask since I know sometimes there can be the odd little gem of knowledge lurking around in peoples heads ^_^\nI am working my way through some excercises in a book for study, and this pa...
I am looking to do this in C/C++. I came across Variable Length Arguments, but this suggests a solution with Python and C using libffi. Now, if I want to wrap the printf function with myprintf. I do it like below: void myprintf(char* fmt, ...) { va_list args; va_start(args, fmt); printf(fmt, args); va_e...
The issue you're experiencing is due to how you're passing the variable arguments (`va_list`) to `printf`. When using variable-length arguments in C/C++, you can't pass a `va_list` directly to a function that expects a variable number of arguments. Instead, you need to use the `vprintf` function, which is designed spec...
6,638
[ { "from": "human", "value": "I am looking to do this in C/C++. I came across Variable Length Arguments, but this suggests a solution with Python and C using libffi.\nNow, if I want to wrap the printf function with myprintf.\nI do it like below:\nvoid myprintf(char* fmt, ...)\n{\n va_list args;\n va_st...
I'm looking for more and better documentation about snapshots, flow repositories, and flow state serialization in Spring Web Flow. Available docs I've found seem pretty sparse. "Spring in Action" doesn't talk about this. The Spring Web Flow Reference Manual does mention a couple flags here: http://static.springframe...
Spring Web Flow can indeed be somewhat complex, and documentation on certain features like snapshots, flow repositories, and flow state serialization may not always provide in-depth explanations. Below are some resources and concepts that might help you get a better understanding of these topics: ### Key Concepts 1. ...
4,344
[ { "from": "human", "value": "I'm looking for more and better documentation about snapshots, flow repositories, and flow state serialization in Spring Web Flow. Available docs I've found seem pretty sparse. \"Spring in Action\" doesn't talk about this. The Spring Web Flow Reference Manual does mention a c...
Did you ever have to choose between WISA or LAMP at the beginning of a web project? While pros and cons are littered around the net, it would be helpful to know about your real experience in coming up w/ criteria, evaluating, deciding, and reflecting upon your decision to go w/ either platform.
Choosing between WISA (Windows, IIS, SQL Server, ASP.NET) and LAMP (Linux, Apache, MySQL, PHP) for a web project involves several considerations, and while I don't have personal experiences, I can guide you through the common evaluation process based on widely accepted practices in the industry. ### Criteria for Evalu...
2,611
[ { "from": "human", "value": "Did you ever have to choose between WISA or LAMP at the beginning of a web project?\nWhile pros and cons are littered around the net, it would be helpful to know about your real experience in coming up w/ criteria, evaluating, deciding, and reflecting upon your decision to go w/...
How do you perform the equivalent of Oracle's DESCRIBE TABLE in PostgreSQL with psql command?
In PostgreSQL, you can use the `\d` command in the `psql` command-line interface to describe a table, which is equivalent to Oracle's `DESCRIBE TABLE`. Here’s how you can do it: 1. Open your `psql` command-line tool. 2. Connect to the database where your table is located. 3. Use the following command to describe the ...
7,613
[ { "from": "human", "value": "How do you perform the equivalent of Oracle's DESCRIBE TABLE in PostgreSQL with psql command?\n" }, { "from": "gpt", "value": "In PostgreSQL, you can use the `\\d` command in the `psql` command-line interface to describe a table, which is equivalent to Oracle's `DESC...
My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error Could not connect to data source 'New Data Source': The network connection was terminated because the host failed to send any dat...
It seems like you're facing a complex issue while trying to connect BizTalk 2006 R2 to a DB2 database on z/OS via the DB2 adapter. Given that the connection works successfully using .NET code and the IBM DB2 ODBC Driver, but fails using the Microsoft ODBC Driver for DB2, here are several areas to investigate further: ...
2,544
[ { "from": "human", "value": "My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error\nCould not connect to data source 'New Data Source':\nThe network connection was termina...
Which OS do you prefer to program on? Client or Server There is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the environment where your app will be running. Update: I should add, this is really dir...
The choice between a client or server operating system for programming, especially in a web development context, often comes down to personal preference, the specific technologies you're using, and the development workflow you prefer. Here’s a breakdown of considerations for both options, particularly focused on the Wi...
5,545
[ { "from": "human", "value": "Which OS do you prefer to program on? Client or Server\nThere is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the environment where your app will be running...
I have a large CSV file and I want to execute a stored procedure for each line. What is the best way to execute a stored procedure from PowerShell?
To execute a stored procedure for each line in a large CSV file using PowerShell, you can follow these steps: 1. **Import the CSV File**: Use the `Import-Csv` cmdlet to load the CSV file into a variable. 2. **Establish a Database Connection**: Use ADO.NET to create a connection to your SQL Server database. 3. **Execut...
3,463
[ { "from": "human", "value": "I have a large CSV file and I want to execute a stored procedure for each line.\nWhat is the best way to execute a stored procedure from PowerShell?\n" }, { "from": "gpt", "value": "To execute a stored procedure for each line in a large CSV file using PowerShell, you...
in JBoss' run.bat, add: set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote - Dcom.sun.management.jmxremote.port=9987 - Dcom.sun.management.jmxremote.ssl=false - Dcom.sun.management.jmxremote.authenticate=false To start jconsole: JDK/bin>jconsole localhost:9987
To modify the `run.bat` file in JBoss and add the specified `JAVA_OPTS` for enabling JMX (Java Management Extensions) monitoring, you can follow these steps: ### Steps to Modify `run.bat`: 1. **Locate the `run.bat` file**: - Navigate to the `bin` directory of your JBoss installation. For example: ``` C:\...
4,741
[ { "from": "human", "value": "in JBoss' run.bat, add:\nset JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote - \nDcom.sun.management.jmxremote.port=9987 - \nDcom.sun.management.jmxremote.ssl=false - \nDcom.sun.management.jmxremote.authenticate=false\n\nTo start jconsole:\nJDK/bin>jconsole localhost:9987\n...
When I try to use an ssh command in a shell script, the command just sits there. Do you have an example of how to use ssh in a shell script?
When using SSH in a shell script, there are several common issues that can cause the command to hang or wait indefinitely. Below are some guidelines and an example to help you successfully use SSH within a shell script. ### Basic Example of Using SSH in a Shell Script Here’s a simple example of how you can use SSH in...
3,738
[ { "from": "human", "value": "When I try to use an ssh command in a shell script, the command just sits there. Do you have an example of how to use ssh in a shell script?\n" }, { "from": "gpt", "value": "When using SSH in a shell script, there are several common issues that can cause the command...
I'd like to be able to see Win32_PhysicalMedia information when logged in as a Limited User in Windows XP (no admin rights). It works ok when logged in as Admin, WMIDiag has just given a clean bill of health, and Win32_DiskDrive class produces information correctly, but Win32_PhysicalMedia produces a count of 0 for thi...
In Windows XP, the `Win32_PhysicalMedia` class requires higher privileges to access certain properties. When running as a Limited User, the access to this WMI class is restricted, which is why you're seeing a count of 0. However, you can use the `Win32_DiskDrive` class, which you mentioned is accessible, to get the se...
5,069
[ { "from": "human", "value": "I'd like to be able to see Win32_PhysicalMedia information when logged in as\na Limited User in Windows XP (no admin rights). It works ok when logged in as Admin,\nWMIDiag has just given a clean bill of health, and Win32_DiskDrive class\nproduces information correctly, but Win32...
I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this.
Printing from a Windows application can be accomplished in various ways depending on the technology stack you are using (e.g., WinForms, WPF, Console applications). Below are examples of how to implement printing in two common frameworks: WinForms and WPF. ### Example 1: Printing in a WinForms Application Here's a si...
2,891
[ { "from": "human", "value": "I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this. \n" }, { "from": "gpt", "value": "Printing from a Windows application can be accomplished in various ways depending on the technolog...
I'm writing some data acquisition software and need a gui plotting library that is fast enough to do realtime updated graphs. I've been using Nplot which is pretty good for a free library, but I'm wondering if there are any better libraries (preferably free or cheap).
There are several GUI plotting libraries available that can handle real-time data updates efficiently. Here are some popular options you might consider, which are both free or reasonably priced: 1. **Matplotlib (with PyQt/PySide)**: - **Language**: Python - **Overview**: Matplotlib is one of the most widely used...
3,580
[ { "from": "human", "value": "I'm writing some data acquisition software and need a gui plotting library that is fast enough to do realtime updated graphs. I've been using Nplot which is pretty good for a free library, but I'm wondering if there are any better libraries (preferably free or cheap).\n" }, ...
I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for testing ASP.Net or Perl web sites. I ...
Both VMware and Hyper-V are mature virtualization platforms, and each has its strengths. Your choice may ultimately depend on your specific needs, preferences, and the existing infrastructure. Here’s a breakdown of both options based on your requirements: ### VMware **Pros:** - **Widely Used:** VMware has a long hist...
5,910
[ { "from": "human", "value": "I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly ...
I have a new database table I need to create... It logically contains an ID, a name, and a "value". That value field could be either numeric or a character string in nature. I don't think I want to just make the field a varchar, because I also want to be able to query with filters like WHERE value > 0.5 and such. Wha...
Given your requirements, the best way to model this concept in SQL Server 2005 while ensuring good query performance is to create separate columns for the numeric and string values. Here’s a suggested schema for your table: ```sql CREATE TABLE MyTable ( ID INT PRIMARY KEY, Name NVARCHAR(255), NumericValue ...
4,576
[ { "from": "human", "value": "I have a new database table I need to create...\nIt logically contains an ID, a name, and a \"value\".\nThat value field could be either numeric or a character string in nature. \nI don't think I want to just make the field a varchar, because I also want to be able to query wit...
Although I'm specifically interested in web application information, I would also be somewhat curious about desktop application development as well. This question is driven by my work on my personal website as well as my job, where I have developed a few features, but left it to others to integrate into the look and fe...
Designing an interface, whether for a web application or a desktop application, can be a complex task that involves balancing functionality, aesthetics, and user experience. Here are some guidelines and rules of thumb you can follow to enhance your design skills: ### General Design Principles 1. **Clarity and Readabi...
2,467
[ { "from": "human", "value": "Although I'm specifically interested in web application information, I would also be somewhat curious about desktop application development as well. This question is driven by my work on my personal website as well as my job, where I have developed a few features, but left it to...
How many possible combinations of the variables a,b,c,d,e are possible if I know that: a+b+c+d+e = 500 and that they are all integers and >= 0, so I know they are finite.
To find the number of possible combinations of the integers \(a\), \(b\), \(c\), \(d\), and \(e\) such that: \[ a + b + c + d + e = 500 \] with the constraints that \(a, b, c, d, e \geq 0\), we can use the combinatorial method known as "stars and bars." The "stars and bars" theorem states that the number of ways to ...
5,323
[ { "from": "human", "value": "How many possible combinations of the variables a,b,c,d,e are possible if I know that:\na+b+c+d+e = 500\n\nand that they are all integers and >= 0, so I know they are finite.\n" }, { "from": "gpt", "value": "To find the number of possible combinations of the integers...
I would like to extract the date a jpg file was created. Java has the lastModified method for the File object, but appears to provide no support for extracting the created date from the file. I believe the information is stored within the file as the date I see when I hover the mouse pointer over the file in Win XP i...
In Java, while the `File` class provides methods to get the last modified date of a file, it does not directly provide a method to retrieve the creation date. However, you can use the `java.nio.file` package which offers more advanced file handling capabilities including the ability to access file attributes. Here’s h...
3,781
[ { "from": "human", "value": "I would like to extract the date a jpg file was created. Java has the lastModified method for the File object, but appears to provide no support for extracting the created date from the file. I believe the information is stored within the file as the date I see when I hover th...
In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables? Will I get a significant performance gain if I used a bitset for 50 flags rather than using 50 separate bool variables?
Using a `std::bitset` to manage a set of flags is often more appropriate in situations where you have a fixed number of boolean flags that you want to treat as a single unit, such as managing state or options. Here are some scenarios where `std::bitset` would be beneficial: 1. **Compact Storage**: A `bitset` uses fewe...
3,317
[ { "from": "human", "value": "In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables?\nWill I get a significant performance gain if I used a bitset for 50 flags rather than using ...
I'm working on a game (C#) that uses a Robocode-like programming model: participants inherit a base Class and add strategic behaviors. The game then loads instances of participants' Classes and the competition begins. Unfortunately, participants can "cheat" by sharing static variables between instances of their competi...
In .NET, the equivalent to Java's ClassLoader concept for isolating class instances and preventing static variable sharing is using separate `AppDomain` instances, but as you've noted, there are certain restrictions. You are correct that only classes derived from `MarshalByRefObject` allow for instances to remain isola...
3,965
[ { "from": "human", "value": "I'm working on a game (C#) that uses a Robocode-like programming model: participants inherit a base Class and add strategic behaviors. The game then loads instances of participants' Classes and the competition begins. Unfortunately, participants can \"cheat\" by sharing static v...
Is there a way of mapping data collected on a stream or array to a data structure or vice-versa? In C++ this would simply be a matter of casting a pointer to the stream as a data type I want to use (or vice-versa for the reverse). e.g in C++: Mystruct * pMyStrct = (Mystruct*)&SomeDataStream; pMyStrct->Item1 = 25; int ...
Yes, mapping data from a stream or an array to a specific data structure is a common requirement in programming, and while the method you mentioned (casting pointers) is specific to C++, other languages and paradigms offer different mechanisms to achieve similar functionality. Here’s an overview of some techniques avai...
2,156
[ { "from": "human", "value": "Is there a way of mapping data collected on a stream or array to a data structure or vice-versa?\nIn C++ this would simply be a matter of casting a pointer to the stream as a data type I want to use (or vice-versa for the reverse).\ne.g in C++:\nMystruct * pMyStrct = (Mystruct*)...
Possible Duplicate: What Ruby IDE do you prefer? I've generally been doing stuff on Microsoft .NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using Notepad++ right now but can I get debugging etc. somehow?
If you're transitioning from .NET to Ruby on Rails, there are several IDEs and text editors that can enhance your development experience beyond Notepad++. Here are some popular options: 1. **RubyMine**: - A powerful commercial IDE specifically for Ruby and Ruby on Rails development. It offers features like intellig...
6,067
[ { "from": "human", "value": "\nPossible Duplicate:\nWhat Ruby IDE do you prefer? \n\nI've generally been doing stuff on Microsoft .NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using Notepad++ right now but can I get debugging etc. somehow?\...
Documentation is severely lacking on anything to do with stored procedures in mysql with PHP. I currently have a stored procedure that I call via PHP, how can I get the value of an out parameter?
To retrieve the value of an OUT parameter from a stored procedure in MySQL using PHP, you'll generally follow these steps: 1. **Create the stored procedure with an OUT parameter**: First, ensure you have a stored procedure defined with an OUT parameter. Example: ```sql DELIMITER // CREATE PROCEDURE GetUs...
4,794
[ { "from": "human", "value": "Documentation is severely lacking on anything to do with stored procedures in mysql with PHP. I currently have a stored procedure that I call via PHP, how can I get the value of an out parameter?\n" }, { "from": "gpt", "value": "To retrieve the value of an OUT parame...
I have a table with a 'filename' column. I recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images. How can I easily update the 'filename' column of these inserted fields (assuming I can select the recent row...
You can easily update the `filename` column to append the '.jpg' extension to the rows you recently inserted by executing an `UPDATE` SQL statement. If you know the IDs of the recently inserted rows, you can use a `WHERE` clause to target only those records. Here's an example of how you can do this: Assuming the table...
6,347
[ { "from": "human", "value": "I have a table with a 'filename' column.\nI recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images.\nHow can I easily update the 'filename' column of these inserted f...
I was reading Joel's book where he was suggesting as interview question: Write a program to reverse the "ON" bits in a given byte. I only can think of a solution using C. Asking here so you can show me how to do in a Non C way (if possible)
Certainly! To reverse the "ON" bits in a given byte (i.e., bits that are set to 1) means to flip those bits to their opposite positions in the byte while maintaining the values of the bits that are set to 0. Let's walk through how to implement this in different programming languages aside from C. ### Python In Python...
3,329
[ { "from": "human", "value": "I was reading Joel's book where he was suggesting as interview question:\n\nWrite a program to reverse the \"ON\" bits in a given byte.\n\nI only can think of a solution using C. \nAsking here so you can show me how to do in a Non C way (if possible)\n" }, { "from": "gpt...
I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood. I have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another class that checks the User's security permissions, and returns eit...
You're on the right track by using Rhino Mocks to create a mock for your `User` class and to stub the `IsAdministrator` property. However, there are a few important concepts to keep in mind when working with property mocking in Rhino Mocks. ### Key Concepts 1. **Mocking Properties**: When you create a strict mock of ...
4,240
[ { "from": "human", "value": "I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood.\nI have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another class that checks the Us...
Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form) I want to know the default font of text areas across all browsers for future reference.
Yes, different web browsers have their own default CSS styles, often referred to as "user agent stylesheets." These styles can vary significantly between browsers, affecting elements like font sizes, margins, padding, and more. While there isn’t a single definitive table published by all browsers, many resources exist...
5,431
[ { "from": "human", "value": "Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form)\nI want to know the default font of text areas across all browsers for future reference.\n" }, { "from": "gpt", "value": "Yes, different web browsers have the...
What do you use to capture webpages, diagram/pictures and code snippets for later reference?
To capture webpages, diagrams, pictures, and code snippets for later reference, various tools and methods can be used. Here are some popular options: 1. **Webpage Capture:** - **Browser Extensions:** Tools like **Evernote Web Clipper**, **Pocket**, and **OneNote Web Clipper** allow you to save webpages directly fro...
6,013
[ { "from": "human", "value": "What do you use to capture webpages, diagram/pictures and code snippets for later reference?\n" }, { "from": "gpt", "value": "To capture webpages, diagrams, pictures, and code snippets for later reference, various tools and methods can be used. Here are some popular ...
In C++ program, I am trying to #import TLB of .NET out-of-proc server. I get errors like: z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType' z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : error C2143: syntax error : miss...
The errors you are encountering when trying to `#import` a COM type library (TLB) related to a .NET out-of-process server are typically due to issues with type definitions and dependencies, especially since .NET types can introduce complexities that traditional COM type libraries do not always handle smoothly. Here ar...
3,908
[ { "from": "human", "value": "In C++ program, I am trying to #import TLB of .NET out-of-proc server.\nI get errors like:\n\nz:\\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType'\nz:\\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers\nz:\\...
in our application we have a Java applet running inside a .NET browser control. It is a know issue from Sun that running an applet this way may crash the control. Has anyone come across the same problem and solved it? Atm we are running the applet in a Webbrowser but we need to run it in a browser control. Thx for any ...
Running Java applets within a .NET WebBrowser control can be challenging due to the inherent compatibility issues between the two technologies. Here are a few strategies that might help mitigate the crashes and improve stability: 1. **Update Java and .NET Framework**: Ensure that you are using the latest versions of b...
4,779
[ { "from": "human", "value": "in our application we have a Java applet running inside a .NET browser control. It is a know issue from Sun that running an applet this way may crash the control.\nHas anyone come across the same problem and solved it?\nAtm we are running the applet in a Webbrowser but we need t...
My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens: The web server determines that although the request included a well-formed Authorization header, the credentials in ...
To avoid the browser's default authentication dialog from appearing when a 401 status code is returned in response to an AJAX call, you will need to work around the HTTP Basic Authentication mechanism, as it inherently relies on the browser's handling of authentication responses. Here are a few potential approaches you...
3,891
[ { "from": "human", "value": "My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens:\n\nThe web server determines that although the request included a well-forme...
I'm looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual machine? Also, this will be an internal app...
Running Redmine on a Windows VPS can indeed be challenging, especially since it is built on Ruby on Rails, which is more commonly run on Linux environments. Here are your options and considerations: ### Option 1: Virtual Machine with Linux 1. **Setting Up a VM:** You can run a virtual machine on your Windows VPS using...
5,201
[ { "from": "human", "value": "I'm looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual ma...
I am starting to work on a hobby project with a Python codebase and I would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fail) similar to CruiseControl or TeamCity. I realize I could do...
Certainly! There are several user-friendly, open-source Continuous Integration (CI) systems that work well with Python projects. Here are some options you can consider: 1. **Jenkins**: - Jenkins is a popular and widely-used CI/CD tool that is highly extensible with plugins. It can be configured to run tests for you...
2,668
[ { "from": "human", "value": "I am starting to work on a hobby project with a Python codebase and I would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fail) similar to Cruise...
I need to do a dump of a table on a remote server, but I can't access the server directly. The only access I have is through PHP scripts. Is there some way in which MySQL will return an INSERT INTO `table_name` (`field1`, `field2`) VALUES ('a', 'b'), ('c', 'd') statement, like what mysqldump will return? I don't have...
If you want to generate an `INSERT` statement like `mysqldump` does using PHP without directly accessing the MySQL server via command-line tools or shell commands, you can manually create the export using a PHP script. Below is a sample PHP script that connects to a MySQL database and generates a series of `INSERT` sta...
2,503
[ { "from": "human", "value": "I need to do a dump of a table on a remote server, but I can't access the server directly. The only access I have is through PHP scripts.\nIs there some way in which MySQL will return an \nINSERT INTO `table_name` (`field1`, `field2`) VALUES ('a', 'b'), ('c', 'd')\n\nstatement, ...
I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this. I'm looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows. I want to be able to whip up an email r...
You can send emails from the command line in both Linux and Windows using various tools and commands. Below are simple methods for each operating system, along with example scripts. ### Linux #### Method 1: Using `sendmail` You can use the `sendmail` command which is commonly available on Linux systems. Here’s a sim...
1,411
[ { "from": "human", "value": "I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this.\nI'm looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows...
On Windows, Ctrl+Right Arrow will move the text cursor from one "word" to the next. While working with Xcode on the Mac, they extended that so that Option+Right Arrow will move the cursor to the beginning of the next subword. For example, if the cursor was at the beginning of the word myCamelCaseVar then hitting Opti...
In older versions of Visual Studio, such as Visual Basic 6.0 and Visual C++, the keyboard shortcuts for cursor movement are pretty basic and don’t include the subword navigation you’re looking for. However, in more modern versions of Visual Studio (like Visual Studio 2010 and later), there are some options available to...
4,437
[ { "from": "human", "value": "On Windows, Ctrl+Right Arrow will move the text cursor from one \"word\" to the next. While working with Xcode on the Mac, they extended that so that Option+Right Arrow will move the cursor to the beginning of the next subword. For example, if the cursor was at the beginning o...