instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
There are many options for editing and writing Stored Procedures in Oracle; what is the best tool for you and why? (one tool per answer.)
One of the best tools for editing and writing Stored Procedures in Oracle is **Oracle SQL Developer**. ### Why Oracle SQL Developer? 1. **User-Friendly Interface**: It offers an intuitive and easy-to-navigate GUI that makes it accessible for both beginners and experienced developers. 2. **Integrated Environment**: S...
8,017
[ { "from": "human", "value": "There are many options for editing and writing Stored Procedures in Oracle; what is the best tool for you and why? (one tool per answer.)\n" }, { "from": "gpt", "value": "One of the best tools for editing and writing Stored Procedures in Oracle is **Oracle SQL Develo...
I have an ExtJS grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. Can I do this with an Ajax request onUnload? If not, what's a better solution?
Using the `onbeforeunload` or `unload` events to send an Ajax request is a common requirement for web applications. However, there are some important considerations and potential issues when using these events. 1. **Ajax Requests on `unload` or `beforeunload`:** - The `unload` event is not reliable for making async...
8,357
[ { "from": "human", "value": "I have an ExtJS grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. \nCan I do this with an Ajax request onUnload? \nIf not, what's a better solution?\n" }, { "from": "gpt", "value": "Using the `onb...
Are there any free, third-party libraries for rendering arbitrarily scaled and rotated text in dot-NET applications? Although native GDI+ allows for text scaling and rotation, its methods for determining the rendered text's dimensions are not sufficiently precise and the differences in kerning as text is added to a ren...
Yes, there are several free, third-party libraries available for rendering scaled and rotated text in .NET applications that can meet your requirements for precise text metrics and consistent kerning. Here are a few options you might consider: ### 1. **SkiaSharp** - **Overview**: SkiaSharp is a cross-platform 2D graph...
4,185
[ { "from": "human", "value": "Are there any free, third-party libraries for rendering arbitrarily scaled and rotated text in dot-NET applications? Although native GDI+ allows for text scaling and rotation, its methods for determining the rendered text's dimensions are not sufficiently precise and the differe...
I'm trying to implement an outdent of the first letter of the first paragraph of the body text. Where I'm stuck is in getting consistent spacing between the first letter and the rest of the paragraph. For example, there is a huge difference in spacing between a "W" and an "I" Anyone have any ideas about how to mitig...
Outdenting the first letter of a paragraph can create a visually appealing effect, often referred to as a "drop cap." The key issue you're facing is ensuring consistent spacing between the first letter and the rest of the paragraph, especially when the first letter varies in size or shape. Here’s a pure CSS solution t...
7,279
[ { "from": "human", "value": "I'm trying to implement an outdent of the first letter of the first paragraph of the body text. Where I'm stuck is in getting consistent spacing between the first letter and the rest of the paragraph. \nFor example, there is a huge difference in spacing between a \"W\" and an \"...
I'm looking for a way of getting a concurrent collection in C# or at least a collection which supports a concurrent enumerator. Right now I'm getting an InvalidOperationException when the collection over which I'm iterating changes. I could just deep copy the collection and work with a private copy but I'm wondering...
In C#, if you're dealing with a collection that might be modified while you're iterating over it, you can use the `Concurrent` collections available in the `System.Collections.Concurrent` namespace. Specifically, the `ConcurrentBag<T>` and `ConcurrentDictionary<TKey, TValue>` can help you manage concurrent access witho...
6,823
[ { "from": "human", "value": "I'm looking for a way of getting a concurrent collection in C# or at least a collection which supports a concurrent enumerator. Right now I'm getting an InvalidOperationException when the collection over which I'm iterating changes. \nI could just deep copy the collection and ...
My understanding is that wxWidgets is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for?
wxWidgets is primarily a C++ library, but it does have bindings for other languages like Python and Perl. C, while a powerful and widely-used programming language, doesn't have as many GUI frameworks as C++ does, primarily because it is considered a lower-level language and is not as commonly used for application devel...
9,153
[ { "from": "human", "value": "My understanding is that wxWidgets is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for?\n" }, { "from": "gpt", ...
We have a rather simple site (minimal JS) with plain html and CSS. It is a simple mobile interface for our main application. We are running into trouble because we have more than one column and several browsers seem to force single columns. Through some searching I ran into 2 meta tags. <meta name="MobileOptimized" co...
Yes, you can control the view of the browser on Blackberry devices using the same meta tags you mentioned, along with a few additional CSS techniques. However, Blackberry devices can behave differently than other mobile browsers, and their interpretation of HTML and CSS may vary based on the model and OS version. Here...
7,265
[ { "from": "human", "value": "We have a rather simple site (minimal JS) with plain html and CSS. It is a simple mobile interface for our main application.\nWe are running into trouble because we have more than one column and several browsers seem to force single columns.\nThrough some searching I ran into 2...
I'm trying to remotely control a Macintosh computer. I know that in the Windows world, you can use Remote Desktop to connect from one Windows computer to another Windows computer. This works relatively well. I know that you can use a VNC server but this isn't always the most secure or give the best performance. Are ...
Yes, there are several options for remotely connecting to a Macintosh computer beyond VNC. Here are some of the most popular methods: 1. **Apple Remote Desktop (ARD)**: - This is Apple's own solution for remote management of Mac computers, suitable for both remote support and system administration. It allows you to...
6,184
[ { "from": "human", "value": "I'm trying to remotely control a Macintosh computer. I know that in the Windows world, you can use Remote Desktop to connect from one Windows computer to another Windows computer. This works relatively well.\nI know that you can use a VNC server but this isn't always the most ...
My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. Is it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked, or do we have to create a button on the h...
In an ActiveX control scenario, you cannot directly assign a JavaScript event handler to a button within the ActiveX control itself. ActiveX controls are designed to be encapsulated components that run in their own context and interact with the host application (in this case, a web browser), but they do not integrate d...
5,186
[ { "from": "human", "value": "My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. \nIs it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked,...
I have table inside a div tab. The table has 40 rows in it and the div's height is set to show 10 rows of that table. CSS's overflow:auto lets me scroll through the 40 rows. All is well there. How can I, with JavaScript cause the table to programatically position to a given row (i.e., programmatically scroll the table...
To programmatically scroll a table within a div to a specific row, you can calculate the vertical position of that row within the scrollable div and then set the scroll position of the div accordingly. Here's a simple example to illustrate how you can achieve this with JavaScript: ### HTML Structure ```html <div id="...
4,977
[ { "from": "human", "value": "I have table inside a div tab. The table has 40 rows in it and the div's height is set to show 10 rows of that table. CSS's overflow:auto lets me scroll through the 40 rows. All is well there. \nHow can I, with JavaScript cause the table to programatically position to a given ro...
I've been successful with writing my own SQL access code with a combination of stored procedures and parameterized queries and a little wrapper library I've written to minimize the ADO.NET grunge. This has all worked very well for me in the past and I've been pretty productive with it. I'm heading into a new project--...
The decision between sticking with your existing ADO.NET setup or moving to an ORM (Object-Relational Mapping) solution like Entity Framework (EF) or NHibernate depends on several factors, including your project requirements, team familiarity with the tools, and long-term maintainability considerations. Here are some ...
7,043
[ { "from": "human", "value": "I've been successful with writing my own SQL access code with a combination of stored procedures and parameterized queries and a little wrapper library I've written to minimize the ADO.NET grunge. This has all worked very well for me in the past and I've been pretty productive w...
Experienced with Rails / ActiveRecord 2.1.1 You create a first version with (for example) ruby script\generate scaffold product title:string description:text image_url:string This create (for example) a migration file called 20080910122415_create_products.rb You apply the migration with rake db:migrate Now, you add a ...
The behavior you are describing is related to how ActiveRecord migrations work in Rails and is somewhat expected, especially in older versions like Rails 2.1.1. In Rails, migrations are designed to be applied in sequence based on their timestamps. When you run `rake db:migrate`, ActiveRecord checks the database schem...
8,207
[ { "from": "human", "value": "Experienced with Rails / ActiveRecord 2.1.1\n\nYou create a first version with (for example) ruby script\\generate scaffold product title:string description:text image_url:string\nThis create (for example) a migration file called 20080910122415_create_products.rb\nYou apply the ...
I have a website that is perfectely centered aligned. The CSS code works fine. The problem doesn't really have to do with CSS. I have headers for each page that perfectely match eachother. However, when the content gets larger, Opera and FireFox show a scrollbar at the left so you can scroll to the content not on the s...
The issue you're experiencing with the scrollbar appearing and disappearing in different browsers is a common one, and it can cause layout shifts if your content is set to be centered. Here's a solution that you can implement to prevent the layout from jumping around when the scrollbar appears. ### Solution 1: Use CSS...
6,952
[ { "from": "human", "value": "I have a website that is perfectely centered aligned. The CSS code works fine. The problem doesn't really have to do with CSS. I have headers for each page that perfectely match eachother.\nHowever, when the content gets larger, Opera and FireFox show a scrollbar at the left so ...
I want to do this so that I can say something like, svn mv *.php php-folder/, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the svn book. Example output of svn mv *.php php-folder/ : svn: Client error in parsing arguments Being able to move a whole file syst...
The issue you're facing with `svn mv *.php php-folder/` is due to how the shell processes wildcards and how `svn mv` expects its arguments. Subversion (SVN) does not handle wildcard expansion in the way you're trying to use it directly in the command. ### Moving Multiple Files with SVN To move multiple files with SVN...
7,977
[ { "from": "human", "value": "I want to do this so that I can say something like, svn mv *.php php-folder/, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the svn book.\nExample output of svn mv *.php php-folder/ :\nsvn: Client error in parsing arg...
I'm trying to create an SSIS package that takes data from an XML data source and for each row inserts another row with some preset values. Any ideas? I'm thinking I could use a DataReader source to generate the preset values by doing the following: SELECT 'foo' as 'attribute1', 'bar' as 'attribute2' The question is,...
To create an SSIS package that takes data from an XML data source and generates an additional row with preset values for each row in the XML data source, you can follow these steps: ### Step 1: Create your SSIS Package 1. Open SQL Server Data Tools (SSDT) or SQL Server Integration Services (SSIS). 2. Create a new SSIS...
7,970
[ { "from": "human", "value": "I'm trying to create an SSIS package that takes data from an XML data source and for each row inserts another row with some preset values. Any ideas? I'm thinking I could use a DataReader source to generate the preset values by doing the following:\nSELECT 'foo' as 'attribute1...
When I do: $ find / It searches the entire system. How do I prevent that? (This question comes from an "answer" to another question.)
When you run the command `find /`, it starts searching from the root directory and traverses the entire filesystem, which can take a long time and consume a lot of resources. To prevent `find` from searching the entire system, you can specify a more limited starting directory, such as your home directory. For example:...
9,521
[ { "from": "human", "value": "When I do:\n$ find / \n\nIt searches the entire system.\nHow do I prevent that?\n(This question comes from an \"answer\" to another question.)\n" }, { "from": "gpt", "value": "When you run the command `find /`, it starts searching from the root directory and traverse...
Say I have an interface IFoo which I am mocking. There are 3 methods on this interface. I need to test that the system under test calls at least one of the three methods. I don't care how many times, or with what arguments it does call, but the case where it ignores all the methods and does not touch the IFoo mock is t...
To ensure that your system under test (SUT) calls at least one of the methods of the mocked `IFoo` interface, you can use a combination of mocking frameworks and assertions. Since you mentioned `Expect.Call`, it seems like you might be using a framework such as Rhino Mocks, Moq, or a similar one. I’ll provide a solutio...
7,367
[ { "from": "human", "value": "Say I have an interface IFoo which I am mocking. There are 3 methods on this interface. I need to test that the system under test calls at least one of the three methods. I don't care how many times, or with what arguments it does call, but the case where it ignores all the meth...
Is there any way to prevent Visual Studio from creating a VSMacros80 folder in my default project directory?
The `VSMacros80` folder is typically created by Visual Studio to store macros and related files for Visual Studio's macro functionality. If you want to prevent this folder from being created in your project directory, you can consider the following approaches: 1. **Disable Macros**: If you do not use macros at all, yo...
8,380
[ { "from": "human", "value": "Is there any way to prevent Visual Studio from creating a VSMacros80 folder in my default project directory?\n" }, { "from": "gpt", "value": "The `VSMacros80` folder is typically created by Visual Studio to store macros and related files for Visual Studio's macro fun...
I've included a mobile web form in my asp.net project, I thought that it could/should be seen just for my mobile users but I realize that it can also be seen from any browser, I don't see problem there cause I could diff the access using HttpBrowserCapabilities.IsMobileDevice=true and transferring to the appropiate asp...
The issue you're encountering likely stems from how the ASP.NET framework detects mobile devices based on their user agent strings. Older mobile devices, like those running Pocket PC 2003, may not be recognized correctly by the default ASP.NET mobile capabilities database, leading to `HttpBrowserCapabilities.IsMobileDe...
6,457
[ { "from": "human", "value": "I've included a mobile web form in my asp.net project, I thought that it could/should be seen just for my mobile users but I realize that it can also be seen from any browser, I don't see problem there cause I could diff the access using HttpBrowserCapabilities.IsMobileDevice=tr...
This is probably a complex solution. I am looking for a simple operator like ">>", but for prepending. I am afraid it does not exist. I'll have to do something like mv myfile tmp cat myheader tmp > myfile Anything smarter?
In Unix-like systems, there isn't a direct operator for prepending text to a file like the `>>` operator for appending. However, you can achieve the same result more concisely using a combination of shell commands without the need for a temporary file. Here's a one-liner that uses process substitution: ```bash cat my...
10,065
[ { "from": "human", "value": "This is probably a complex solution.\nI am looking for a simple operator like \">>\", but for prepending.\nI am afraid it does not exist. I'll have to do something like \n\n mv myfile tmp\n cat myheader tmp > myfile\n\nAnything smarter?\n" }, { "from": "gpt", "value"...
I am trying to use MinGW to compile a C program under Windows XP. The gcc.exe gives the following error: stdio.h : No such file or directory The code (hello.c) looks like this: #include < stdio.h > void main() { printf("\nHello World\n"); } I use a batch file to call gcc. The batch file looks like this: @echo off...
The error you're encountering indicates that the GCC compiler is unable to find the standard library header files, such as `stdio.h`. This may happen for a few reasons, especially if your MinGW installation is not configured correctly or if the environment paths are not set up properly. Here are several steps to troub...
7,527
[ { "from": "human", "value": "I am trying to use MinGW to compile a C program under Windows XP. The gcc.exe gives the following error:\nstdio.h : No such file or directory\nThe code (hello.c) looks like this:\n#include < stdio.h >\n\nvoid main()\n{\n printf(\"\\nHello World\\n\");\n}\n\nI use a batch file...
How can I close a browser window without receiving the Do you want to close this window prompt? The prompt occurs when I use the window.close(); function.
In web browsers, the `window.close()` function can only be executed without a confirmation prompt under certain conditions. Specifically, it will work without prompting only if the window was opened by a script using `window.open()`. If the window was not opened via a script (for instance, if the user navigated to it d...
9,368
[ { "from": "human", "value": "How can I close a browser window without receiving the Do you want to close this window prompt?\nThe prompt occurs when I use the window.close(); function.\n" }, { "from": "gpt", "value": "In web browsers, the `window.close()` function can only be executed without a ...
I have a shortcut on my desktop which opens a command prompt with many arguments that I need. I set the 'start in' field to d:\ and it works as expected (the prompt starts in d:). When I choose Advanced -> run as administrator and then open the shortcut, it starts in C:\Windows\System32, even though I have not change...
When you run a shortcut as an administrator in Windows, it defaults to the `C:\Windows\System32` directory for security reasons. To ensure that the command prompt starts in the desired directory (in your case, `D:\`), you can modify your shortcut in one of the following ways: ### Method 1: Create a Batch File 1. Open ...
8,320
[ { "from": "human", "value": "I have a shortcut on my desktop which opens a command prompt with many arguments that I need. I set the 'start in' field to d:\\ and it works as expected (the prompt starts in d:). When I choose Advanced -> run as administrator and then open the shortcut, it starts in C:\\Wind...
I have 28,000 images I need to convert into a movie. I tried mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi But it seems to crap out at 7500 frames. The files are named webcam_2007-04-16_070804.jpg webcam_2007-04-16_071004.jpg webcam_2007-0...
If `mencoder` is stopping partway through processing your images, there are a few alternative approaches you could consider for creating your movie. Since you're working with a large number of images, using a different tool might provide better results. Below are some suggestions: ### 1. Use `ffmpeg` `ffmpeg` is a pow...
7,062
[ { "from": "human", "value": "I have 28,000 images I need to convert into a movie.\nI tried \nmencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi\n\nBut it seems to crap out at 7500 frames.\nThe files are named\nwebcam_2007-04-16_070804...
I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option to...
It sounds like you were experiencing a complex issue with Continuous Integration (CI) in Team Foundation Server (TFS) 2008. Your updates indicate that you were able to resolve the issue indirectly. For the benefit of others who might encounter a similar situation, here are some common troubleshooting steps and consider...
7,584
[ { "from": "human", "value": "I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service.\nI can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not caus...
Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET pages. How do I change this to 60 seconds in the further instead?
To change the `Expires` HTTP header in an ASP.NET application using IIS, you can configure it either through the web.config file or programmatically in your ASP.NET application. Here are both methods: ### Method 1: Change in web.config You can modify the `web.config` file of your ASP.NET application to set the cache ...
7,777
[ { "from": "human", "value": "Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET pages. How do I change this to 60 seconds in the further instead? \n" }, { "from": "gpt", "value": "To change the `Expires` HTTP header in an ASP.NET application using IIS, you can config...
Is there the way to apply "greedy" behavior to and keys in Visual Studio? By "greedy" I mean such behavior when all whitespace between cursor position and next word bound can be deleted using one keystroke.
In Visual Studio, you can achieve a "greedy" behavior to delete whitespace between the cursor and the next word boundary with a combination of keyboard shortcuts and settings. However, Visual Studio does not have a built-in single keystroke function for this specific action, but you can use the following methods to ach...
8,085
[ { "from": "human", "value": "Is there the way to apply \"greedy\" behavior to and keys in Visual Studio? By \"greedy\" I mean such behavior when all whitespace between cursor position and next word bound can be deleted using one keystroke.\n" }, { "from": "gpt", "value": "In Visual Studio, you...
I'd like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows. It must start in the file's containing directory (e.g. /cygdrive/c/scripts/) so that relative paths work. Anyone gotten this to work? Note: I've just found here, a Cygwin package that manages Windows context menus (Bash Prompt...
Running a long `rsync` command in Cygwin by double-clicking on a `.sh` file in Windows can be accomplished, but there are a few steps you need to take to ensure it runs in the correct directory and processes correctly. Here’s how you can set it up: ### Step 1: Create Your Shell Script 1. Open a text editor (like `nan...
9,143
[ { "from": "human", "value": "I'd like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows. It must start in the file's containing directory (e.g. /cygdrive/c/scripts/) so that relative paths work. Anyone gotten this to work?\nNote: I've just found here, a Cygwin package that ...
I had a discussion with a developer earlier today re identifying TCP packets going out on a particular interface with the same payload. He told me that the probability of finding a TCP packet that has an equal payload (even if the same data is sent out several times) is very low due to the way TCP packets are construct...
When analyzing TCP packets, there are several factors that influence the payloads, which can make it challenging to find packets with identical payloads. Here are some key aspects to consider: ### Factors Influencing TCP Packet Payloads 1. **TCP Header Information**: Each TCP packet includes headers that consist of v...
6,893
[ { "from": "human", "value": "I had a discussion with a developer earlier today re identifying TCP packets going out on a particular interface with the same payload. He told me that the probability of finding a TCP packet that has an equal payload (even if the same data is sent out several times) is very low...
I want to let users specify a date that may or may not include a day and month (but will have at least the year.) The problem is when it is stored as a datetime in the DB; the missing day/month will be saved as default values and I'll lose the original format and meaning of the date. My idea was to store the real forma...
You're facing a common issue when trying to store dates with varying levels of specificity (i.e., year only, year and month, or full date) in a database. Your approach of using both a string column for the original format and a datetime column is one way to handle this, but it does come with drawbacks. Here are a few ...
6,197
[ { "from": "human", "value": "I want to let users specify a date that may or may not include a day and month (but will have at least the year.) The problem is when it is stored as a datetime in the DB; the missing day/month will be saved as default values and I'll lose the original format and meaning of the ...
I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a 1 second timeout. Basically the code works like this: var viewElement = ...
It seems you're encountering a common issue with focusing elements in Internet Explorer, especially when you're dynamically adding input elements to the DOM. Here are some strategies you can use to ensure that the input field gets focused properly in IE: ### 1. Use `setTimeout` to delay focus Although you mentioned t...
8,988
[ { "from": "human", "value": "I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a 1 second timeout.\nBasically th...
If I pass request fields or cookies with a period/dot in their names, PHP auto-replaces them with underscores. For example, if I put this code at https://example.com/test.php?x.y=a.b: <?php echo $_SERVER['REQUEST_URI']; echo $_GET['x.y']; echo $_GET['x_y']; the output is: /test.php?x.y=a.b a.b Is there any way I can...
In PHP, when you pass query string parameters (or cookies) that contain dots (.), PHP automatically replaces dots with underscores (_) in the variable names, which is the default behavior. Unfortunately, there is no built-in configuration option in PHP to change this behavior directly. However, if you absolutely need ...
4,902
[ { "from": "human", "value": "If I pass request fields or cookies with a period/dot in their names, PHP auto-replaces them with underscores. For example, if I put this code at https://example.com/test.php?x.y=a.b:\n<?php\necho $_SERVER['REQUEST_URI'];\necho $_GET['x.y'];\necho $_GET['x_y'];\n\nthe output is:...
In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further: using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) { using (BufferedStream bs = new BufferedStream(fs)) { ...
In C#, you can indeed run into the problem of excessive nesting when using the `using` statement for multiple disposable resources. However, there are a few strategies you can employ to clean up your code and reduce nesting. ### 1. Using a Custom Wrapper Class You can create a custom wrapper class that manages the lif...
7,284
[ { "from": "human", "value": "In C#, if I want to deterministically clean up non-managed resources, I can use the \"using\" keyword. But for multiple dependent objects, this ends up nesting further and further:\nusing (FileStream fs = new FileStream(\"c:\\file.txt\", FileMode.Open))\n{\n using (BufferedS...
How can I create a regular expression that will grab delimited text from a string? For example, given a string like text ###token1### text text ###token2### text text I want a regex that will pull out ###token1###. Yes, I do want the delimiter as well. By adding another group, I can get both: (###(.+?)###)
To create a regular expression that captures delimited text (including the delimiters) from a string, you can use the pattern you provided, but you can simplify it. If you want to match any text that is enclosed within `###`, you can use the following regular expression: ```regex (###.+?###) ``` ### Explanation: - `#...
9,164
[ { "from": "human", "value": "How can I create a regular expression that will grab delimited text from a string? For example, given a string like \ntext ###token1### text text ###token2### text text \n\nI want a regex that will pull out ###token1###. Yes, I do want the delimiter as well. By adding another...
I am currently working on a project that is moving from .NET 2.0 to 3.5 across the board. I am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers. Are there any gotchas that I might hit by simply re-targeting the compiler to 3.5?
When moving a project from .NET Framework 2.0 to 3.5, there are indeed a few potential "gotchas" that you might encounter, even though the change primarily involves additional libraries and functionality. Here are some considerations: 1. **Compiler Changes**: .NET 3.5 introduced changes in the C# language (especially ...
7,507
[ { "from": "human", "value": "I am currently working on a project that is moving from .NET 2.0 to 3.5 across the board.\nI am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers.\nAre there any gotchas that I might hit by simply re-targeting the co...
Where can I find an online interactive console for programming language or api? Ruby Python Groovy PHP? Perl? Scheme Java C?
There are several online interactive consoles and environments where you can run and test code in the programming languages you've mentioned. Here are some popular options for each language: ### Ruby - **Repl.it**: [Replit](https://replit.com/languages/ruby) supports Ruby and allows you to run code in your browser. - ...
6,799
[ { "from": "human", "value": "Where can I find an online interactive console for programming language or api?\n\nRuby\nPython\nGroovy\nPHP?\nPerl?\nScheme\nJava\nC?\n\n" }, { "from": "gpt", "value": "There are several online interactive consoles and environments where you can run and test code in...
The system default polygon fill mode in current device context is ALTERNATE (as I've learned from the Petzold book on Windows programming) and this one is used in Polygon Win32 function unless you change the mode with SetPolyFillMode. My question is: Does the GDI+ Graphics::FillPolygon (without the FillMode parameter i...
In GDI+ (Graphics Device Interface Plus), the `Graphics::FillPolygon` method does not directly use the current device context's fill mode from GDI. Instead, GDI+ has its own default fill mode, which is typically **Winding** (also known as Non-Zero Winding Rule), and it applies this mode when filling polygons. When you...
11,563
[ { "from": "human", "value": "The system default polygon fill mode in current device context is ALTERNATE (as I've learned from the Petzold book on Windows programming) and this one is used in Polygon Win32 function unless you change the mode with SetPolyFillMode.\nMy question is:\nDoes the GDI+ Graphics::Fi...
I've been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the TAB in buffers with the major mode text-mode. I've added the following to my .emacs: (setq-default indent-tabs-mode nil) (setq-default tab-width 4) ;;; And I have tried (setq indent-tabs-mode nil) (setq tab-width 4) ...
To configure Emacs to use 4 spaces when you press TAB in `text-mode`, you need to ensure that several settings are correctly defined. Based on your description, it sounds like some settings might not be applied properly or the major mode settings might be overriding them. Here is a step-by-step approach you can follo...
8,748
[ { "from": "human", "value": "I've been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the TAB in buffers with the major mode text-mode. I've added the following to my .emacs:\n(setq-default indent-tabs-mode nil)\n(setq-default tab-width 4)\n\n;;; And I have tried\n(s...
This seems to be intended behaviour as stated here, but I can't believe the only method of getting the BCCs is to parse Outlook Web Access' HTML code. Has anybody encountered the same limitation and found a workaround? I'd also be fine with getting the BCCs from somewhere via WebDAV and adding the header fields myself....
Yes, it sounds like you're dealing with a limitation in accessing BCC (Blind Carbon Copy) recipients in Outlook or Exchange through standard APIs. As you've noted, BCC addresses are not typically exposed due to privacy concerns, so it can be quite challenging to retrieve them through conventional means. Here are some ...
9,381
[ { "from": "human", "value": "This seems to be intended behaviour as stated here, but I can't believe the only method of getting the BCCs is to parse Outlook Web Access' HTML code.\nHas anybody encountered the same limitation and found a workaround? I'd also be fine with getting the BCCs from somewhere via W...
I downloaded a couple of webapps and placed them in my /webapps folder. Some of them I could open by going to http://localhost:8080/app1 and it would open. However, some others I would do the exact same thing and go to http://localhost:8080/app2 and it will display "HTTP Status 404 - /app2/", even though I am sure it i...
The behavior you're experiencing with the different web applications could be due to several factors related to how the applications are configured. Here are some possible reasons for the HTTP 404 error you're encountering with app2: 1. **Context Path vs. Folder Name**: By default, the context path of a web applicatio...
6,593
[ { "from": "human", "value": "I downloaded a couple of webapps and placed them in my /webapps folder.\nSome of them I could open by going to http://localhost:8080/app1 and it would open.\nHowever, some others I would do the exact same thing and go to http://localhost:8080/app2 and it will display \"HTTP Stat...
I want to get the base 10 logarithm of a Fixnum using Ruby, but found that n.log or n.log10 are not defined. Math::log is defined but uses a different base than 10. What is the easiest way to get the base 10 logarithm of a Fixnum?
In Ruby, you can compute the base 10 logarithm of a number using the `Math.log` method by specifying the base. The `Math.log` method can take two arguments: the number and the base. To get the base 10 logarithm, you can use it like this: ```ruby n = 100 # example Fixnum log_base_10 = Math.log(n, 10) puts log_base_10 #...
11,003
[ { "from": "human", "value": "I want to get the base 10 logarithm of a Fixnum using Ruby, but found that n.log or n.log10 are not defined. Math::log is defined but uses a different base than 10.\nWhat is the easiest way to get the base 10 logarithm of a Fixnum?\n" }, { "from": "gpt", "value": "In...
Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work) Of course I would like a native Mac application, but as I haven't found any, what are the best options to gitk? I know about gitview, but I'm looking forward to evaluate as many alt...
If you're looking for alternatives to `gitk` for viewing Git repositories on Mac OS X Leopard, here are some native Mac applications and other options you might consider: 1. **GitX**: A popular Git GUI client for macOS, GitX offers a simple interface and a good set of features for browsing repositories. It's actively ...
8,786
[ { "from": "human", "value": "Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work)\nOf course I would like a native Mac application, but as I haven't found any, what are the best options to gitk?\nI know about gitview, but ...
My problem is that my XML document contains snippets of XHTML within it and while passing it through an XSLT I would like it to render those snippets without mangling them. I've tried wrapping the snippet in a CDATA but it doesn't work since less than and greater than are translated to < and > as opposed to being echoe...
When you're working with XML and XSLT, and you need to ensure that XHTML snippets are rendered properly without being altered by the XSLT processor, you can use the `disable-output-escaping` attribute in your XSLT to achieve this. This allows you to include the raw XHTML code as is. However, be aware that `disable-out...
5,433
[ { "from": "human", "value": "My problem is that my XML document contains snippets of XHTML within it and while passing it through an XSLT I would like it to render those snippets without mangling them.\nI've tried wrapping the snippet in a CDATA but it doesn't work since less than and greater than are trans...
I have an Apex class (controller) originally developed under Developer Edition and need to upload it to production which is Enterprise Edition. The upload fails with following message classes/RenewalController.cls(RenewalController):An error occurred on your page. package.xml(RenewalController):An object 'RenewalContr...
The issue you're encountering typically occurs due to differences in the environments or potential issues with the metadata deployment. Here are several steps you can take to troubleshoot and resolve the problem: 1. **Check Class Name and Case Sensitivity:** - Ensure that the class name in your `package.xml` matche...
8,374
[ { "from": "human", "value": "I have an Apex class (controller) originally developed under Developer Edition and need to upload it to production which is Enterprise Edition.\nThe upload fails with following message\nclasses/RenewalController.cls(RenewalController):An error occurred on your page.\n\npackage.x...
I have a few sites on a shared host that is running Apache 2. I would like to compress the HTML, CSS and Javascript that is delivered to the browser. The host has disabled mod_deflate and mod_gzip, so these options are out. I do have PHP 5 at my disposal, though, so I could use the gzip component of that. I am currentl...
If you want to compress CSS and JavaScript files in addition to HTML on a shared hosting environment where `mod_deflate` and `mod_gzip` are disabled, you can use PHP to serve these files with gzip compression. Here’s how you can do this without changing every single page: ### Step 1: Create a PHP Handler for CSS and ...
6,733
[ { "from": "human", "value": "I have a few sites on a shared host that is running Apache 2. I would like to compress the HTML, CSS and Javascript that is delivered to the browser. The host has disabled mod_deflate and mod_gzip, so these options are out. I do have PHP 5 at my disposal, though, so I could use ...
Can someone describe what a symbol table is within the context of C and C++?
In the context of C and C++, a **symbol table** is a data structure used by a compiler or interpreter to keep track of information about the symbols (such as variables, functions, classes, etc.) defined in a program. Here’s an overview of how symbol tables function in these languages: ### Purpose of a Symbol Table 1....
6,091
[ { "from": "human", "value": "Can someone describe what a symbol table is within the context of C and C++?\n" }, { "from": "gpt", "value": "In the context of C and C++, a **symbol table** is a data structure used by a compiler or interpreter to keep track of information about the symbols (such as...
I've always felt that my graphic design skills have lacked, but I do have a desire to improve them. Even though I'm not the worlds worst artist, it's discouraging to see the results from a professional designer, who can do an amazing mockup from a simple spec in just a few hours. I always wonder how they came up with...
It's great to hear that you’re motivated to improve your graphic design skills! The journey to becoming a proficient designer is a mix of understanding foundational principles, practicing consistently, and finding your own style. Here’s a structured approach to help you on this path: ### 1. Build a Strong Foundation ...
3,927
[ { "from": "human", "value": "I've always felt that my graphic design skills have lacked, but I do have a desire to improve them. Even though I'm not the worlds worst artist, it's discouraging to see the results from a professional designer, who can do an amazing mockup from a simple spec in just a few hour...
Does anyone have experience using the URL Rewrite Module (see here)? Can it be used to do reverse proxy?
Yes, the URL Rewrite Module in IIS (Internet Information Services) can indeed be used to configure a reverse proxy. While its primary purpose is to rewrite URLs, it can also handle reverse proxy scenarios when combined with the Application Request Routing (ARR) module. Here’s a general outline of how to set up a rever...
6,385
[ { "from": "human", "value": "Does anyone have experience using the URL Rewrite Module (see here)?\nCan it be used to do reverse proxy?\n" }, { "from": "gpt", "value": "Yes, the URL Rewrite Module in IIS (Internet Information Services) can indeed be used to configure a reverse proxy. While its pr...
1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1); (gdb) n 1168 if (!ptr) { (gdb) print ptr $1 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) print &cwd $2 = (char (*)[3500]) 0xbff2d96c (gdb) print strlen(cwd) $3 = 36 (gdb) print "%s",cwd $4 = "/media/MMC-SD/partition1/aaaaaaaaaaa", '\0' <repeats 91...
The issue you are encountering arises from the way `cwd` is being used and how its memory is allocated. Let's break down what you have: 1. **Understanding `ptr` and `cwd`:** - `ptr` is assigned the result of `getcwd`, which is a pointer to the string that represents the current working directory. - `cwd` appears...
8,349
[ { "from": "human", "value": "1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1);\n(gdb) n\n1168 if (!ptr) {\n(gdb) print ptr\n$1 = 0xbff2d96c \"/media/MMC-SD/partition1/aaaaaaaaaaa\"\n(gdb) print &cwd\n$2 = (char (*)[3500]) 0xbff2d96c\n(gdb) print strlen(cwd)\n$3 = 36\n(gdb) print \"%s\",cwd\n$4 = \...
For a particular project I have, no server side code is allowed. How can I create the web site in php (with includes, conditionals, etc) and then have that converted into a static html site that I can give to the client? Update: Thanks to everyone who suggested wget. That's what I used. I should have specified that I w...
If you're looking to convert your PHP-based website into a static HTML site without any server-side processing, using `wget` is a great choice. Since you mentioned you're using a Windows machine and have already downloaded the appropriate version of `wget`, here’s a step-by-step guide on how to proceed: ### Step 1: Pr...
6,934
[ { "from": "human", "value": "For a particular project I have, no server side code is allowed. How can I create the web site in php (with includes, conditionals, etc) and then have that converted into a static html site that I can give to the client?\nUpdate: Thanks to everyone who suggested wget. That's wha...
Looking at the C# project templates in VS2008 and the offerings are WPF User Control Library, WPF Custom Control Library and Windows Forms Control Library. Which of these would you use if you wanted to move a legacy active control written in c++ into the world of C# and .NET?
If you're looking to move a legacy ActiveX control written in C++ into the world of C# and .NET, the best choice from the available options in Visual Studio 2008 would be to use the **WPF Custom Control Library**. Here's why: 1. **Modern User Interface**: WPF (Windows Presentation Foundation) is designed to provide a...
9,423
[ { "from": "human", "value": "Looking at the C# project templates in VS2008 and the offerings are WPF User Control Library, WPF Custom Control Library and Windows Forms Control Library. Which of these would you use if you wanted to move a legacy active control written in c++ into the world of C# and .NET?\n"...
I really should upgrade to Firefox 3, but I'm very dependent on Firebug working properly. I know there is a version of Firebug that is supposed to work with Firefox 3, but last time I looked, there seemed to be problems with it. So, for those that have made the jump, is Firebug on Firefox 3 ready for prime time?
As of my last knowledge update in October 2023, Firebug had been officially discontinued after version 2.0, and its functionality has been integrated into the built-in Developer Tools of Firefox. Starting with Firefox 57 (Quantum), which was released in November 2017, Firebug is no longer supported. The built-in tools ...
11,276
[ { "from": "human", "value": "I really should upgrade to Firefox 3, but I'm very dependent on Firebug working properly.\nI know there is a version of Firebug that is supposed to work with Firefox 3, but last time I looked, there seemed to be problems with it.\nSo, for those that have made the jump, is Firebu...
I'm a single developer looking to get off of Visual Source Safe and move to svn. A quick search brings up several tools, but I don't see a clear winner and I can't afford to spend a lot of time testing different tools. Has anyone done this successfully, and can recommend a method?
Migrating from Visual SourceSafe (VSS) to Subversion (SVN) can be challenging, but many developers have successfully completed this process. Here’s a step-by-step guide to help you migrate smoothly without spending a lot of time testing different tools: ### Recommended Tools 1. **VSS2SVN**: This is a popular tool spe...
8,078
[ { "from": "human", "value": "I'm a single developer looking to get off of Visual Source Safe and move to svn.\nA quick search brings up several tools, but I don't see a clear winner and I can't afford to spend a lot of time testing different tools.\nHas anyone done this successfully, and can recommend a met...
If not, what are the significant differences? Edit: Daren Thomas asks: which ones? I use gvim on Windows and MacVim on the mac. Seem similar enough to be the same to me... By which ones, I'm guessing that you mean a specific implementation of vi and emacs for Windows. I'm not sure as I thought there were only one or...
When it comes to text editors like Vim and Emacs on Windows, there are several implementations and variations that might differ from their Unix counterparts. Here's a breakdown of the significant differences and some options you might consider: ### 1. **Vim (gvim)** - **gvim** is the GUI version of Vim that runs on Wi...
7,013
[ { "from": "human", "value": "If not, what are the significant differences?\n\nEdit: Daren Thomas asks:\n\nwhich ones?\nI use gvim on Windows and MacVim on the mac. Seem similar enough to be the same to me...\n\nBy which ones, I'm guessing that you mean a specific implementation of vi and emacs for Windows. ...
How do you unit test a large MFC UI application? We have a few large MFC applications that have been in development for many years, we use some standard automated QA tools to run basic scripts to check fundamentals, file open etc. These are run by the QA group post the daily build. But we would like to introduce proced...
Unit testing a large MFC (Microsoft Foundation Classes) UI application can be quite challenging due to the complexity and interactivity involved in user interfaces. However, with a well-planned strategy, you can facilitate testing of dialogs, menus, and other visual elements. Here are some techniques and tools that you...
7,611
[ { "from": "human", "value": "How do you unit test a large MFC UI application?\nWe have a few large MFC applications that have been in development for many years, we use some standard automated QA tools to run basic scripts to check fundamentals, file open etc. These are run by the QA group post the daily bu...
Right now I'm working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I am wondering if there is a way to just e...
Yes, you can exclude an entire folder from Visual SourceSafe (VSS) source control. To do this, you will need to follow a few steps. Here's how you can exclude a specific folder from being tracked in VSS: 1. **Open Visual SourceSafe Explorer**: Launch the Visual SourceSafe Explorer application. 2. **Navigate to You...
7,473
[ { "from": "human", "value": "Right now I'm working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I...
THis is a followup to my previous question "Font-dependent control positioning." It's an attempt to solve the real problem behind that question, perhaps in ways different than the one I was asking about. Example of the problem statement: I want a checkbox that says "Adjust prices by <X> <Y> after loading," where <X> is...
To achieve a font-independent layout for your controls in a way that respects dynamic resizing based on the font used, you can utilize a combination of `TableLayoutPanel` and custom event handling in WinForms. Here’s how you can structure it effectively: ### Step 1: Using TableLayoutPanel 1. **Add a `TableLayoutPanel...
5,979
[ { "from": "human", "value": "THis is a followup to my previous question \"Font-dependent control positioning.\" It's an attempt to solve the real problem behind that question, perhaps in ways different than the one I was asking about.\nExample of the problem statement: I want a checkbox that says \"Adjust p...
One thing I really miss about Java is the tool support. FindBugs, Checkstyle and PMD made for a holy trinity of code quality metrics and automatic bug checking. Is there anything that will check for simple bugs and / or style violations of Ruby code? Bonus points if I can adapt it for frameworks such as Rails so th...
Yes, Ruby has several tools that can help with code quality metrics and automatic bug checking, similar to the Java tools you mentioned. Here are some popular options: 1. **RuboCop**: This is a widely-used Ruby static code analyzer and formatter based on the community Ruby style guide. It can enforce style and best pr...
7,592
[ { "from": "human", "value": "One thing I really miss about Java is the tool support. FindBugs, Checkstyle and PMD made for a holy trinity of code quality metrics and automatic bug checking. \nIs there anything that will check for simple bugs and / or style violations of Ruby code? Bonus points if I can a...
How can I get the MAC Address using only the compact framework?
To obtain the MAC address using the .NET Compact Framework, you generally need to access network interfaces. The Compact Framework doesn't provide direct APIs like the full .NET Framework does, but you can still achieve this with some workarounds. Here’s a simple way to get the MAC address in a .NET Compact Framework ...
5,603
[ { "from": "human", "value": "How can I get the MAC Address using only the compact framework?\n" }, { "from": "gpt", "value": "To obtain the MAC address using the .NET Compact Framework, you generally need to access network interfaces. The Compact Framework doesn't provide direct APIs like the fu...
oOo a highly exciting build issue. Compact framework occasionally goes funny when building. Usually when messing with xmta files but this is the first time i've seen it go awry in this scenario. I created a abstract base class with an abstract method. Placed this in one of my core dlls. This was fine. I then, in a "lat...
It sounds like you're encountering a frustrating build issue related to the Compact Framework when using abstract classes. Based on the information you've provided, here are some steps and considerations that may help you troubleshoot and potentially resolve the issue: 1. **Abstract Method Implementation**: Ensure ...
8,777
[ { "from": "human", "value": "oOo a highly exciting build issue. Compact framework occasionally goes funny when building. Usually when messing with xmta files but this is the first time i've seen it go awry in this scenario.\nI created a abstract base class with an abstract method. Placed this in one of my c...
(I don't want to hear about how crazy I am to want that! :) Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse
Certainly! Here are some additional terms and phrases that relate to focus-follows-mouse, which may help improve searchability: 1. **Mouse-driven focus** 2. **Hover focus** 3. **Mouse focus** 4. **Focus follows pointer** 5. **Pointer-driven focus** 6. **Dynamic focus** 7. **Mouse-over focus** 8. **Sloppy mouse focus**...
10,695
[ { "from": "human", "value": "(I don't want to hear about how crazy I am to want that! :)\nFocus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse\n" }, { "from": "gpt", "value"...
I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code: cat tmp.log -encoding UTF8 > new.log The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe this to a new file as UTF8?
The command you attempted to use (`cat tmp.log -encoding UTF8 > new.log`) is incorrect for changing the encoding of the file. The `cat` command does not have an `-encoding` option to change the encoding of the content. If you want to convert a file from UCS-2 Little Endian to UTF-8, you can use a tool like `iconv` or ...
9,281
[ { "from": "human", "value": "I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code:\ncat tmp.log -encoding UTF8 > new.log\n\nThe resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe...
How do I make one? I am kind of a newbie in Windows API. Is there some sort of manual for this sort of thing? I am specifically interested in a Core API. Thank you for any help.
Creating applications using the Windows API (WinAPI) can seem daunting for beginners, but there are plenty of resources to help you get started. The Windows API provides a wide variety of functions for interacting with the operating system and creating user interfaces. Below are steps and resources you can use to get s...
5,078
[ { "from": "human", "value": "How do I make one? I am kind of a newbie in Windows API. Is there some sort of manual for this sort of thing? I am specifically interested in a Core API. Thank you for any help.\n" }, { "from": "gpt", "value": "Creating applications using the Windows API (WinAPI) can...
I recently started work on a personal coding project using C++ and KDevelop. Although I started out by just hacking around, I figure it'll be better in the long run if I set up a proper unit test suite before going too much further. I've created a seperate test-runner executable as a sub project, and the tests I've a...
To run your unit tests automatically after building your project in KDevelop, you will typically need to modify the build process to include your test executables. KDevelop supports custom build steps, so you can configure it to run your test executables as part of the build process. Here’s how you can set this up: 1....
7,370
[ { "from": "human", "value": "I recently started work on a personal coding project using C++ and KDevelop. Although I started out by just hacking around, I figure it'll be better in the long run if I set up a proper unit test suite before going too much further. I've created a seperate test-runner executab...
I'm using a table to design the layout of my web page. I want the table to fill the page even if it doesn't contain much content. Here's the CSS I'm using: html, body { height: 100%; margin: 0; padding: 0; } #container { min-height: 100%; width: 100%; } And I place something like this in the pag...
To ensure that your table fills the entire height of the page across all popular browsers, you can use a combination of CSS rules and possibly some structural adjustments to your HTML. The issue you're encountering is due to the way different browsers calculate heights and handle table elements. Here's a refined appro...
6,047
[ { "from": "human", "value": "I'm using a table to design the layout of my web page. I want the table to fill the page even if it doesn't contain much content. Here's the CSS I'm using:\nhtml, body {\n height: 100%;\n margin: 0;\n padding: 0; \n}\n\n#container {\n min-height: 100%;\n width: 10...
I've run into a few gotchas when doing C# XML serialization that I thought I'd share: You can't serialize items that are read-only (like KeyValuePairs) You can't serialize a generic dictionary. Instead, try this wrapper class (from http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx): using System; using...
You've shared some useful tips regarding XML serialization in C#. Here are a few additional gotchas and best practices that can help when dealing with XML serialization: 1. **Default Constructor Requirement**: - The classes being serialized must have a parameterless constructor. If you create a class without a defa...
7,018
[ { "from": "human", "value": "I've run into a few gotchas when doing C# XML serialization\nthat I thought I'd share:\n\nYou can't serialize items that are read-only (like KeyValuePairs)\nYou can't serialize a generic dictionary. Instead, try this wrapper class (from http://weblogs.asp.net/pwelter34/archive/2...
I have a very specific problem using C# and a Windows MDI Form application. I want to display two (or more) images to the user, a 'left' and a 'right' image. The names of the images are concealed from the user, and then the user selects which image they prefer (this is part of a study involving medical image quality,...
In C# Windows Forms, when you're dealing with MDI (Multiple Document Interface) applications and using the `MDILayout.TileVertical` or `TileHorizontal` methods, the default behavior can indeed be confusing, as you've noticed, especially when it comes to image presentation. If the built-in tiling methods do not work to...
5,770
[ { "from": "human", "value": "I have a very specific problem using C# and a Windows MDI Form application. I want to display two (or more) images to the user, a 'left' and a 'right' image. The names of the images are concealed from the user, and then the user selects which image they prefer (this is part of...
Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance. Is there a way to find points on a bezi...
To obtain equidistant points along a Bezier curve, rather than sampling points at regular parameter intervals (which leads to varying distances due to the nature of the curve), you can use a distance-based approach. Here's how you can achieve this: ### Step 1: Compute the Arc Length 1. **Define the Bezier Curve**: Fo...
5,215
[ { "from": "human", "value": "Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance....
In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be? Besides, my multidimensional array may contain types other than strings.
In C, when you want to pass a multidimensional array to a function but don't know the dimensions at compile time, there are several approaches you can use. However, C does not have built-in support for dynamically-sized multidimensional arrays, so you will typically need to use pointers or dynamically allocated memory....
4,338
[ { "from": "human", "value": "In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be?\nBesides, my multidimensional array may contain types other than strings.\n" }, { "from": "gpt", "value": "In C, when you w...
I have a folder in my web server used for the users to upload photos using an ASP page. Is it safe enough to give IUSR write permissions to the folder? Must I secure something else? I am afraid of hackers bypassing the ASP page and uploading content directly to the folder. I'm using ASP classic and IIS6 on Windows 2003...
Giving the IUSR account (the default anonymous user account for IIS) write permissions to a folder can introduce several security risks, especially if you're allowing file uploads via your ASP page. Here are some recommendations to help you secure your file upload functionality and the server: ### 1. **Limit Permissio...
5,358
[ { "from": "human", "value": "I have a folder in my web server used for the users to upload photos using an ASP page.\nIs it safe enough to give IUSR write permissions to the folder? Must I secure something else?\nI am afraid of hackers bypassing the ASP page and uploading content directly to the folder.\nI'...
I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation?
When using Subversion (SVN) for source control, it's important to have a clear and organized directory structure for your J2EE web application. A well-organized structure not only helps with maintaining the project but also makes collaboration with other developers easier. Here is a recommended directory structure: ``...
6,937
[ { "from": "human", "value": "I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation?\n" }, { "from": "gpt", "value": "When using Subversion (SVN) for source control, it's importa...
I have a console app in which I want to give the user x seconds to respond to the prompt. If no input is made after a certain period of time, program logic should continue. We assume a timeout means empty response. What is the most straightforward way of approaching this?
You can implement a timeout for user input in a console application using multithreading. The general idea is to run a separate thread to wait for user input and use a timer or a countdown mechanism to manage the timeout. Here's a straightforward approach using C# as an example: 1. Start a thread to handle user inpu...
8,111
[ { "from": "human", "value": "I have a console app in which I want to give the user x seconds to respond to the prompt. If no input is made after a certain period of time, program logic should continue. We assume a timeout means empty response.\nWhat is the most straightforward way of approaching this?\n" ...
I'm writing a string containing some XML via System.Xml.XmlWriter. I'm stuck using WriteString(), and from the documentation: WriteString does the following: The characters &, <, and > are replaced with &amp;, &lt;, and &gt;, respectively. I'd like this to stop, but I can't seem to find any XmlWriterSettings prope...
The behavior of the `WriteString()` method in `System.Xml.XmlWriter` is intentional and adheres to XML standards for escaping special characters. This behavior cannot be changed directly through `XmlWriterSettings` or any properties of `XmlWriter`. However, you can consider a few workarounds depending on your use case:...
6,455
[ { "from": "human", "value": "I'm writing a string containing some XML via System.Xml.XmlWriter. I'm stuck using WriteString(), and from the documentation:\n\nWriteString does the following:\n The characters &, <, and > are replaced with &amp;, &lt;, and &gt;, respectively.\n\nI'd like this to stop, but I ...
I am using Microsoft Access 2007 to move and massage some data between two SQL Servers. Yesterday everything was working correctly, I was able to run queries, update data, and delete data. Today I opened up the Access database to finish my data migration and am now receiving the following message when I try to run som...
The error message you're encountering, "The action or event has been blocked by Disabled Mode," typically indicates that Microsoft Access has disabled certain functionality due to security settings or a potential issue with your database file. This can occur for several reasons, including concerns about the safety of m...
7,795
[ { "from": "human", "value": "I am using Microsoft Access 2007 to move and massage some data between two SQL Servers. Yesterday everything was working correctly, I was able to run queries, update data, and delete data.\nToday I opened up the Access database to finish my data migration and am now receiving t...
In ColdFusion, under Request Tuning in the administrator, how do I determine what is an optimal number (or at least a good guess) for the Maximum Number of Simultaneous Template Requests? Environment: CF8 Standard IIS 6 Win2k3 SQL2k5 on a separate box
Determining the optimal number for "Maximum Number of Simultaneous Template Requests" in ColdFusion can greatly depend on several factors specific to your application and server environment. Here are steps and considerations that can help you arrive at a good guess: ### Factors to Consider 1. **Server Resources**: Ch...
6,624
[ { "from": "human", "value": "In ColdFusion, under Request Tuning in the administrator, how do I determine what is an optimal number (or at least a good guess) for the Maximum Number of Simultaneous Template Requests?\nEnvironment:\nCF8 Standard\nIIS 6\nWin2k3\nSQL2k5 on a separate box\n" }, { "from"...
I am curious if anyone have used UnderC, Cint, Cling, Ch, or any other C++ interpreter and could share their experience.
Certainly! Here's a brief overview of some C++ interpreters and their typical use cases based on user experiences and community feedback: ### 1. **UnderC** - **Overview**: UnderC is a C interpreter which is capable of running a subset of C, and it has some support for C++. - **Use Cases**: It's typically used for educ...
7,347
[ { "from": "human", "value": "I am curious if anyone have used UnderC, Cint, Cling, Ch, or any other C++ interpreter and could share their experience.\n" }, { "from": "gpt", "value": "Certainly! Here's a brief overview of some C++ interpreters and their typical use cases based on user experiences...
I'm making a WinForms app with a ListView set to detail so that several columns can be displayed. I'd like for this list to scroll when the mouse is over the control and the user uses the mouse scroll wheel. Right now, scrolling only happens when the ListView has focus. How can I make the ListView scroll even when it d...
To enable scrolling of a `ListView` in a WinForms application with the mouse scroll wheel, even when the `ListView` does not have focus, you'll need to override the `WndProc` method of the `ListView` control. This approach involves handling the `WM_MOUSEWHEEL` message and ensuring that the scroll message is correctly d...
6,968
[ { "from": "human", "value": "I'm making a WinForms app with a ListView set to detail so that several columns can be displayed.\nI'd like for this list to scroll when the mouse is over the control and the user uses the mouse scroll wheel. Right now, scrolling only happens when the ListView has focus.\nHow ca...
In a stored procedure, when is #Temptable created in SQL Server 2005? When creating the query execution plan or when executing the stored procedure? if (@x = 1) begin select 1 as Text into #Temptable end else begin select 2 as Text into #Temptable end
In SQL Server, temporary tables (like `#Temptable` in your example) are created at the time the SQL statement that defines them is executed, not when the query execution plan is created. When you define a temporary table using the `SELECT ... INTO` syntax as you did in your stored procedure, the actual creation of the...
9,213
[ { "from": "human", "value": "In a stored procedure, when is #Temptable created in SQL Server 2005? When creating the query execution plan or when executing the stored procedure?\nif (@x = 1)\n begin\n select 1 as Text into #Temptable\n end\nelse\n begin\n select 2 as Text into #Tempt...
I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML <strong>This is an example of a <pseud-template>fake tag</pseud-template></strong> I need to parse these files. PHP is the only only tool available. The documents don't come c...
You're correct that `DOMDocument::loadHTML` doesn't support non-standard tags, and trying to parse those directly will lead to errors. Since you want to preserve the information in those custom tags while still benefiting from the DOMDocument's ability to clean up the HTML, you can take an intermediate approach. ### ...
7,193
[ { "from": "human", "value": "I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML\n<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>\n\nI need to parse these files. PHP is the only onl...
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable devic...
It sounds like you're facing a classic problem of managing write I/O performance in a real-time system when using a standard Linux filesystem. Let's tackle your questions one by one. ### 1. Preventing Stall in Writing **A. Process Prioritization:** You can adjust the priority of your userland application using `nice`...
3,694
[ { "from": "human", "value": "I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data...
I recently started using Rake to build some of my (non-ruby) packages. Rake is nice, but what I found missing is a way to do hierarchical builds (aggregate Rakefiles in subdirectories). Since this is a common feature in most other build tools, I'm wondering if someone more familiar with Rake has a good solution.
Absolutely! Rake is quite flexible and can be configured to support hierarchical builds. You can achieve this by creating a top-level `Rakefile` that includes other `Rakefiles` from subdirectories. Here’s how you can set it up: 1. **Directory Structure**: Organize your project directory in a way that includes subdirec...
6,322
[ { "from": "human", "value": "I recently started using Rake to build some of my (non-ruby) packages. Rake is nice, but what I found missing is a way to do hierarchical builds (aggregate Rakefiles in subdirectories). Since this is a common feature in most other build tools, I'm wondering if someone more famil...
Why use one over the other?
It seems like you're asking about a comparison between two options, but I need more context to provide a meaningful response. Could you specify what the two options are that you’re considering? For example, are you asking about different technologies, products, methods, or anything else?
12,415
[ { "from": "human", "value": "Why use one over the other?\n" }, { "from": "gpt", "value": "It seems like you're asking about a comparison between two options, but I need more context to provide a meaningful response. Could you specify what the two options are that you’re considering? For example,...
I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them? sirprize=# CREATE DATABASE testdb; CREATE DATABASE sirprize=# GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser; GRANT sirprize=# \c testdb You...
In PostgreSQL, when you grant privileges on a database using the `GRANT` command, it doesn't automatically grant any permissions on the objects within the database itself (like tables, schemas, etc.). From your commands, you created a database named `testdb` and granted all privileges on that database to `testuser`. ...
7,268
[ { "from": "human", "value": "I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to \"flush\" them?\nsirprize=# CREATE DATABASE testdb;\nCREATE DATABASE\nsirprize=# GRANT ALL PRIVILEGES ON DATABASE test...
Has anyone else experienced this error? Sometimes it pops up at the beginning of loading the application with Argument Error 2082. The only way I can solve it is by rebooting my machine. Restarting the browser doesn't even solve it. I have read about some solutions on the web, but I am interested in knowing what others...
The Argument Error 2082 is typically associated with issues in Adobe Flash applications or other related software environments. Here are some common solutions that users have found effective in resolving this error: 1. **Clear Cache and Cookies**: Sometimes, cached data can cause conflicts. Clear your browser's cache ...
9,761
[ { "from": "human", "value": "Has anyone else experienced this error? Sometimes it pops up at the beginning of loading the application with Argument Error 2082. The only way I can solve it is by rebooting my machine. Restarting the browser doesn't even solve it. I have read about some solutions on the web, b...
binary question :)
Sure! Please go ahead and ask your binary question.
13,054
[ { "from": "human", "value": "binary question :)\n" }, { "from": "gpt", "value": "Sure! Please go ahead and ask your binary question." } ]
I'd like to start moving our application business layers into a collection of REST web services. However, most of our Intranet has been built using Classic ASP and most of the developers where I work keep programming in Classic ASP. Ideally, then, for them to benefit from the advantages of a unique set of web APIs, it ...
Transitioning from Classic ASP to using RESTful web services is a great way to modernize your application and allow for better scalability and interoperability. Although Classic ASP is quite dated, it can still communicate with REST APIs. Here’s a step-by-step guide on how to do that: ### 1. **Understanding RESTful Se...
1,923
[ { "from": "human", "value": "I'd like to start moving our application business layers into a collection of REST web services. However, most of our Intranet has been built using Classic ASP and most of the developers where I work keep programming in Classic ASP. Ideally, then, for them to benefit from the ad...
What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time? What are their typical usages? Are they unique to Java? Is there a C++ equivalent?
Annotations in Java are a powerful feature that provide metadata about the program elements (such as classes, methods, variables, etc.) without changing their behavior. You can think of annotations as a form of syntactic metadata that allows developers to add additional information to their code that can be processed a...
5,316
[ { "from": "human", "value": "What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time?\nWhat are their typical usages?\nAre they unique to Java? Is there a C++ equivalent?\n" }, { "from": "gpt...
My Vista application needs to know whether the user has launched it "as administrator" (elevated) or as a standard user (non-elevated). How can I detect that at run time?
In a Windows Vista application (and later versions of Windows), you can check whether the application is running with elevated privileges (as an administrator) or as a standard user by using the Windows API. Here's an example of how to do this using C++: 1. Include the necessary headers: ```cpp #include <windows.h> #...
9,149
[ { "from": "human", "value": "My Vista application needs to know whether the user has launched it \"as administrator\" (elevated) or as a standard user (non-elevated). How can I detect that at run time? \n" }, { "from": "gpt", "value": "In a Windows Vista application (and later versions of Window...
Does anyone have, or know of, a binary patch generation algorithm implementation in C#? Basically, compare two files (designated old and new), and produce a patch file that can be used to upgrade the old file to have the same contents as the new file. The implementation would have to be relatively fast, and work with h...
Creating a binary patch generation algorithm in C# that operates efficiently on large files can be a challenging task. Your initial approach outlines a simple pattern-based method, but let's discuss a more efficient strategy inspired by existing algorithms, including those used in tools like `xdelta` and `bsdiff`. ###...
3,730
[ { "from": "human", "value": "Does anyone have, or know of, a binary patch generation algorithm implementation in C#?\nBasically, compare two files (designated old and new), and produce a patch file that can be used to upgrade the old file to have the same contents as the new file.\nThe implementation would ...
I want to ran the following script on text files that are being committed: # Send the commands H and w to ed # ed will append newline if the file does not end in one printf "%s\n" H w | ed -s $1 # Strip trailing whitespace sed -i 's/[ \t]*$//g' $1 # Convert tabs to 4 spaces sed -i -r "s/\t/ /g" $1 I see subversio...
To implement the provided script for text files being committed to a Subversion (SVN) repository, you will need to create a pre-commit hook script. This script will be executed automatically before a commit occurs, allowing you to process the files as needed. Here’s a step-by-step guide to set up your pre-commit hook:...
6,361
[ { "from": "human", "value": "I want to ran the following script on text files that are being committed:\n# Send the commands H and w to ed\n# ed will append newline if the file does not end in one\nprintf \"%s\\n\" H w | ed -s $1\n\n# Strip trailing whitespace\nsed -i 's/[ \\t]*$//g' $1\n\n# Convert tabs to...
What methods are available for backing up repositories in a Windows environment?
Backing up repositories in a Windows environment can involve various methods and tools, depending on the type of repository you're dealing with (e.g., version control systems, databases, file repositories). Below are some common methods for backing up repositories: ### 1. **Manual Backup** - **File Copy**: Simply c...
6,025
[ { "from": "human", "value": "What methods are available for backing up repositories in a Windows environment?\n" }, { "from": "gpt", "value": "Backing up repositories in a Windows environment can involve various methods and tools, depending on the type of repository you're dealing with (e.g., ve...
I have an existing J2EE enterprise application to which I need to add auditing, i.e. be able to record CRUD operations on several important domain types (Employee, AdministratorRights, etc.). The application has a standard n-tier architecture: Web interface Business operations encapsulated within a mixture of stateles...
Implementing auditing in a J2EE enterprise application can indeed be approached using various patterns and frameworks. Here are some common strategies and tools that can help you effectively add auditing as a cross-cutting concern: ### 1. Aspect-Oriented Programming (AOP) Using AOP is a standard approach to implement ...
5,021
[ { "from": "human", "value": "I have an existing J2EE enterprise application to which I need to add auditing, i.e. be able to record CRUD operations on several important domain types (Employee, AdministratorRights, etc.).\nThe application has a standard n-tier architecture:\n\nWeb interface\nBusiness operati...
I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem. Basically, 3 folders below the website project fail to publish properly. When the PrecompiledWeb is transferred to the host these thr...
The issue you're encountering typically arises in ASP.NET Web Sites rather than Web Applications. In a Web Site project, files are compiled at runtime, and issues can occur if certain files are not correctly included in the publish process. Here are several steps you can take to diagnose and potentially resolve the iss...
5,786
[ { "from": "human", "value": "I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem.\nBasically, 3 folders below the website project fail to publish properly. When the Precompil...
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something li...
To prevent SQL injection vulnerabilities like the one you've described, you can adopt several best practices. Here are the most effective methods: 1. **Use Prepared Statements**: Prepared statements ensure that user input is treated as data rather than executable code. This is the preferred method for most database sy...
9,562
[ { "from": "human", "value": "If user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example:\n$unsafe_variable = $_POST['user_input']; \n\nmysql_query(\"INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')\");\n...
We use a CruiseControl.Net/NAnt/Subversion stack for CI. Doing a fresh checkout for every build is way too time-consuming, so currently we just do an update on a working copy. However, this leaves the possibility that orphaned files may remain in the working copy, after being deleted in source control. We have tried us...
In order to maintain a clean working copy while using CruiseControl.Net, NAnt, and Subversion, you can implement a strategy that involves checking for and removing orphaned files without corrupting your working copy. Here are a few approaches you can take: 1. **Use `svn cleanup`**: Before performing an update, make su...
8,062
[ { "from": "human", "value": "We use a CruiseControl.Net/NAnt/Subversion stack for CI. Doing a fresh checkout for every build is way too time-consuming, so currently we just do an update on a working copy. However, this leaves the possibility that orphaned files may remain in the working copy, after being de...
I want to be able to do this. MyInterface interface = new ServiceProxyHelper<ProxyType>(); Here's the object structure MyTypeThatImplementsMyInterface : MyInterface Will this work? public class ProxyType : MyInterface {} public class ServiceProxyHelper<ProxyType> : IDisposable, MyInterface {}
The code snippet you've provided contains some design issues that will prevent it from compiling and functioning as you might expect. Let's break down the elements involved. 1. **Interface and Class Definitions:** You have an interface `MyInterface`, and a class `MyTypeThatImplementsMyInterface` that implements thi...
6,093
[ { "from": "human", "value": "I want to be able to do this.\nMyInterface interface = new ServiceProxyHelper<ProxyType>();\n\nHere's the object structure\nMyTypeThatImplementsMyInterface : MyInterface\n\nWill this work?\npublic class ProxyType : MyInterface {}\n\npublic class ServiceProxyHelper<ProxyType> : I...
I'll admit that I don't know the inner workings of the unix operating system, so I was hoping someone could shed some light on this topic. Why is the Unix file system better than the windows file system? Would grep work just as well on Windows, or is there something fundamentally different that makes it more powerful o...
The Unix operating system and its file systems have several design principles and features that contribute to their robustness and flexibility. Here’s a breakdown of why many users consider the Unix file system better than the Windows file system: ### 1. **File System Hierarchy:** - **Unix:** Uses a hierarchical fi...
5,794
[ { "from": "human", "value": "I'll admit that I don't know the inner workings of the unix operating system, so I was hoping someone could shed some light on this topic.\nWhy is the Unix file system better than the windows file system?\nWould grep work just as well on Windows, or is there something fundamenta...
How do I check if an index exists on a table field in MySQL? I've needed to Google this multiple times, so I'm sharing my Q/A.
Certainly! Checking if an index exists on a table field in MySQL can be done using a couple of methods. Here's a concise Q&A format that you can use: --- **Q: How do I check if an index exists on a table field in MySQL?** **A:** You can check for the existence of an index on a table field in MySQL using the followin...
10,129
[ { "from": "human", "value": "How do I check if an index exists on a table field in MySQL?\nI've needed to Google this multiple times, so I'm sharing my Q/A.\n" }, { "from": "gpt", "value": "Certainly! Checking if an index exists on a table field in MySQL can be done using a couple of methods. He...
Basically I am trying to restart a service from a php web page. Here is the code: <?php exec ('/usr/bin/sudo /etc/init.d/portmap restart'); ?> But, in /var/log/httpd/error_log, I get unable to change to sudoers gid: Operation not permitted and in /var/log/messages, I get Sep 22 15:01:56 ri kernel: audit(1222063316...
It looks like you're facing a couple of issues when trying to execute a service restart from a PHP script via the web server. Let's address the main problems you're encountering: ### 1. SELinux Denial The errors in `/var/log/messages` indicate that your server is enforcing SELinux policies, which are preventing the A...
7,906
[ { "from": "human", "value": "Basically I am trying to restart a service from a php web page.\nHere is the code:\n<?php\nexec ('/usr/bin/sudo /etc/init.d/portmap restart');\n?>\n\nBut, in /var/log/httpd/error_log, I get \n\nunable to change to sudoers gid: Operation not permitted\n\nand in /var/log/messages,...
I just noticed that the return list for results is limited to 1000. I have more than 1000 groups in my domain (HUGE domain). How can I get more than 1000 records? Can I start at a later record? Can I cut it up into multiple searches? Here is my query: DirectoryEntry dirEnt = new DirectoryEntry("LDAP://dhuba1kwtn004"); ...
When working with `DirectorySearcher` in .NET and LDAP queries, you can indeed hit a limitation when dealing with a large number of results. In your case, the default limit is 1,000, and even if you set `srch.SizeLimit` to a higher number, it won't necessarily extend beyond the server's configured limits. Here are a ...
6,659
[ { "from": "human", "value": "I just noticed that the return list for results is limited to 1000. I have more than 1000 groups in my domain (HUGE domain). How can I get more than 1000 records? Can I start at a later record? Can I cut it up into multiple searches?\nHere is my query:\nDirectoryEntry dirEnt = n...