instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
All my applications are developed in Native Code. I am hesitant to move to .Net because of all the negatives that I hear, such as: Slow response time Lock-In into Windows Dependance on huge .Net run-time that makes installation a pain and slow as well. etc. etc. Your advice will be much appreciated.
It's understandable to be cautious about transitioning from native code to .NET, especially when there are concerns about performance, platform lock-in, and deployment complexities. Here are some points to consider that might help you make a more informed decision: ### Pros of .NET 1. **Cross-Platform Development**: ...
36,579
[ { "from": "human", "value": "All my applications are developed in Native Code. I am hesitant to move to .Net because of all the negatives that I hear, such as:\n\nSlow response time\nLock-In into Windows\nDependance on huge .Net run-time that makes installation a pain and slow as well.\n\netc. etc.\nYour ad...
I am using the following code to set a tray icon in Windows and Linux. It works wonderful in Windows and works okay in Linux. In Linux (Ubuntu) I have my panel set to be (somewhat) transparent and when I add a GIF (with a transparent background) the background of the icon shows up all grey and ugly (see image, green di...
It seems that you're encountering an issue with transparency in the tray icon on Linux when using a GIF image. The behavior of transparency in images can vary between different operating systems and environments. In your case, it's likely that the Linux desktop environment you're using does not handle the transparency ...
38,705
[ { "from": "human", "value": "I am using the following code to set a tray icon in Windows and Linux. It works wonderful in Windows and works okay in Linux. In Linux (Ubuntu) I have my panel set to be (somewhat) transparent and when I add a GIF (with a transparent background) the background of the icon shows ...
I can't seem to grok the concept of "loose coupling." I suppose it doesn't help that the word "loose" usually has a negative connotation, so I always forget that loose coupling is a good thing. Will somebody please show some "before" and "after" code (or pseudocode) that illustrates this concept?
Absolutely! "Loose coupling" is a software design principle aimed at reducing the dependencies between components in a system. This allows components to be changed, replaced, or reused with minimal impact on other components. While "loose" can imply a lack of control in other contexts, in software design, it refers to ...
40,122
[ { "from": "human", "value": "I can't seem to grok the concept of \"loose coupling.\" I suppose it doesn't help that the word \"loose\" usually has a negative connotation, so I always forget that loose coupling is a good thing.\nWill somebody please show some \"before\" and \"after\" code (or pseudocode) tha...
I'd like to setup a build server for unmanaged C++ code developed in Visual Studio 2005. The build server should be able to do the following: Monitor a Subversion repository for code changes and schedule a build Checkout code from Subversion and run unit tests Provide some sort of report on build success and changes f...
Setting up a build server for unmanaged C++ code in Visual Studio 2005 can be effectively achieved with a combination of tools. You're on the right track by considering CruiseControl. Here are some suggestions for setting up your build server along with the pros and cons of the different tools you mentioned: ### 1. Cr...
36,295
[ { "from": "human", "value": "I'd like to setup a build server for unmanaged C++ code developed in Visual Studio 2005. The build server should be able to do the following:\n\nMonitor a Subversion repository for code changes and schedule a build\nCheckout code from Subversion and run unit tests\nProvide some ...
I am grouping on a date field. The tree explorer for the report when data is displayed shows the date as 3 days before the date that is in the records. The detail in the report lists the correct date. I have verified the field shown in the report and the Group field are pointing to the same database-table-field. I have...
It sounds like you're encountering a challenging issue with the date grouping in your report, where the dates in the tree explorer are being displayed incorrectly, even though the detail section of the report shows the correct dates. Here are some steps you can take to troubleshoot and potentially resolve the issue: 1...
37,404
[ { "from": "human", "value": "I am grouping on a date field. The tree explorer for the report when data is displayed shows the date as 3 days before the date that is in the records. The detail in the report lists the correct date. I have verified the field shown in the report and the Group field are pointing...
This might be a bit difficult to explain in writing, so please bear with me here. Whenever I wanted to customize the style of the status bar to the "dark" one, I simply add the following line to my AppDelegate's -applicationDidFinishLaunching: method: [application setStatusBarStyle:UIStatusBarStyleBlackOpaque]; This w...
To achieve an instant change of the status bar style when your application launches, you need to ensure that the status bar appearance is set as early as possible in the application lifecycle. The line you provided, `[application setStatusBarStyle:UIStatusBarStyleBlackOpaque];`, should ideally be placed in a location w...
39,037
[ { "from": "human", "value": "This might be a bit difficult to explain in writing, so please bear with me here.\nWhenever I wanted to customize the style of the status bar to the \"dark\" one, I simply add the following line to my AppDelegate's -applicationDidFinishLaunching: method:\n[application setStatusB...
I have a site that creates images for some bit of content after the content is created. I'm trying to figure out what to do in between the time the content is created and the image is created. My thought is that I might be able to set a custom image to display on a 404 error on the original image. However, I'm not s...
It sounds like you're looking for a way to handle the gap between product creation and image generation without disrupting the user experience. Here are a few approaches you could consider, including setting up a custom 404 error image with Lighttpd and alternatives: ### Option 1: Custom 404 Error Image with Lighttpd ...
36,504
[ { "from": "human", "value": "I have a site that creates images for some bit of content after the content is created. I'm trying to figure out what to do in between the time the content is created and the image is created. My thought is that I might be able to set a custom image to display on a 404 error o...
Should practical quantum computing become a reality, I am wondering if there are any public key cryptographic algorithms that are based on NP-complete problems, rather than integer factorization or discrete logarithms. Edit: Please check out the "Quantum computing in computational complexity theory" section of the wiki...
Your question touches on an interesting area of research regarding post-quantum cryptography and the complexity of public-key cryptographic systems. You're correct in noting that most widely used public-key cryptosystems, such as RSA and ECC, rely on problems like integer factorization and discrete logarithms, which ar...
37,585
[ { "from": "human", "value": "Should practical quantum computing become a reality, I am wondering if there are any public key cryptographic algorithms that are based on NP-complete problems, rather than integer factorization or discrete logarithms.\nEdit:\nPlease check out the \"Quantum computing in computat...
After upgrading a project from Delphi 2007 to Delphi 2009 I'm getting an Unknown memory leak, so far I've been tryin to track it down using fastMM, here is what fastMM stack trace reports: A memory block has been leaked. The size is: 20 This block was allocated by thread 0x111C, and the stack trace (return addresses) ...
Tracking down memory leaks in Delphi applications, especially after an upgrade like from Delphi 2007 to Delphi 2009, can be challenging. The information provided by FastMM is a great start, but it may require additional steps to identify the specific source of the leak. Here are some strategies and tips to help you loc...
36,706
[ { "from": "human", "value": "After upgrading a project from Delphi 2007 to Delphi 2009 I'm getting an Unknown memory leak, so far I've been tryin to track it down using fastMM, here is what fastMM stack trace reports:\nA memory block has been leaked. The size is: 20\n\nThis block was allocated by thread 0x1...
I mean a tool that can extract certain contents from old .NET 1.1 WinForm code and put it in .designer file (make it looks like .net 2.0 WinForm code). This also involves an update to the project file (.csproj/.vbproj).. If no existing tool yet, any tip or pointer on how to do this by programming?
As of my last knowledge update in October 2023, there isn't a specific off-the-shelf tool that converts .NET 1.1 WinForms code to the .NET 2.0 style with separate `.designer` files. However, you can create a custom tool or script to help you with this process. Here are some pointers and steps you can follow to achieve ...
37,605
[ { "from": "human", "value": "I mean a tool that can extract certain contents from old .NET 1.1 WinForm code and put it in .designer file (make it looks like .net 2.0 WinForm code). This also involves an update to the project file (.csproj/.vbproj)..\nIf no existing tool yet, any tip or pointer on how to do ...
I want have to have a single imageList used by multiple forms in a project. That is to say, multiple controls use the same image list. Note: Ideally multiple projects in a single solution will use the same image list - but I don't want to ask too much of Microsoft at once. Some controls are listview, some are treeviews...
In a Windows Forms application using Visual Studio, it is indeed possible to share a single `ImageList` among multiple controls across different forms. Here’s how you can achieve that: ### 1. Create a Singleton ImageList To make an `ImageList` accessible from different forms, you can use a singleton pattern. This wil...
39,386
[ { "from": "human", "value": "I want have to have a single imageList used by multiple forms in a project. That is to say, multiple controls use the same image list.\nNote: Ideally multiple projects in a single solution will use the same image list - but I don't want to ask too much of Microsoft at once.\nSom...
I have a problem with a Winforms application written in Visual Studio 2005 (C#). It has a MDI main form with one maximized mdi child form. In Windows XP the child form is perfectly resized and maximized with the MDI Parent. With Windows Vista (Enterprise and Business) resizing works great, but when you maximize the MDI...
This issue with the MDI child form not resizing correctly in Windows Vista compared to Windows XP is a known problem that arises due to differences in how these operating systems handle window management and rendering. Here are some solutions and workarounds you can consider to resolve the gap issue when maximizing the...
39,473
[ { "from": "human", "value": "I have a problem with a Winforms application written in Visual Studio 2005 (C#). It has a MDI main form with one maximized mdi child form. In Windows XP the child form is perfectly resized and maximized with the MDI Parent.\nWith Windows Vista (Enterprise and Business) resizing ...
Is it possible to share a single 'god' instance among everyone that links to this code, to be placed in a shared object? god* _god = NULL; extern "C" { int set_log_level(int level) { if(_god == NULL) return -1; _stb->log_level(level); return 0; } int god_init(){ if(_god == NULL){ _god = new g...
To share a single instance of the `god` object among multiple programs that link to the shared library, you will need to use shared memory and synchronization mechanisms suitable for your operating environment. The general approach includes: 1. **Shared Memory**: Use a shared memory segment to hold the `god` instance ...
36,670
[ { "from": "human", "value": "Is it possible to share a single 'god' instance among everyone that links to this code, to be placed in a shared object?\ngod* _god = NULL;\nextern \"C\" \n{\n\nint set_log_level(int level)\n{\n if(_god == NULL) return -1;\n _stb->log_level(level);\n return 0;\n}\n\nint...
Can I setup a custom MIME type through ASP.NET or some .NET code? I need to register the Silverlight XAML and XAP MIME types in IIS 6.
Yes, you can set up custom MIME types for your application in IIS 6, but you would typically do this through the IIS Management console rather than directly in ASP.NET code. However, you can also automate the process programmatically using .NET. To register the MIME types for Silverlight XAML and XAP files, you need t...
23,726
[ { "from": "human", "value": "Can I setup a custom MIME type through ASP.NET or some .NET code? I need to register the Silverlight XAML and XAP MIME types in IIS 6.\n" }, { "from": "gpt", "value": "Yes, you can set up custom MIME types for your application in IIS 6, but you would typically do th...
I am mulling over a web-app in Perl that will allow users to create bug monitors. So essentially each "bug watch" will be a bug ID that will be passed to a sub routine along with the "sleep" time, and once the "sleep time" is over it must recur without blocking the parent process or the peer processes. I tried Schedu...
Hi Matt, It sounds like you want to implement a non-blocking periodic monitoring system for bug IDs in Perl. Since you're considering `POE` and `Coro`, let's go over both options briefly to help you make a more informed decision. ### POE (Perl Object Environment) **Pros:** - **Event-driven model**: POE is designed f...
36,430
[ { "from": "human", "value": "I am mulling over a web-app in Perl that will allow users to create bug monitors. So essentially each \"bug watch\" will be a bug ID that will be passed to a sub routine along with the \"sleep\" time, and once the \"sleep time\" is over it must recur without blocking the parent...
I am using the Ajax Control Toolkit Calendar Extender control. In some fields though I want to display the time along with the date. I have tried just setting the Format to "dd/MM/yyyy hh:mm:ss" but the time section gets wiped off. If the user wants to change the time section they can do it manually, the calendar drop ...
The Ajax Control Toolkit Calendar Extender is primarily designed for date selection and does not natively support time selection alongside the date. When you try to set a custom format like `"dd/MM/yyyy hh:mm:ss"`, the control may only handle the date part properly and disregard the time portion altogether. However, yo...
35,399
[ { "from": "human", "value": "I am using the Ajax Control Toolkit Calendar Extender control. In some fields though I want to display the time along with the date. I have tried just setting the Format to \"dd/MM/yyyy hh:mm:ss\" but the time section gets wiped off. If the user wants to change the time section ...
since JTree & TreeModel don't provide tooltips straight out-of-the-box, what do you think, what would be the best way to have item-specific tooltips for JTree? Edit: (Answering my own question afterwards.) @Zarkonnen: Thanks for the getTooltipText idea. I found out another (maybe still a bit nicer) way with overridin...
Your approach using a custom renderer by extending `DefaultTreeCellRenderer` is an effective way to achieve item-specific tooltips for a `JTree`. By overriding the `getTreeCellRendererComponent` method, you can set the tooltip text based on the value of the tree node or any other criteria you choose. Here’s a breakdow...
39,392
[ { "from": "human", "value": "since JTree & TreeModel don't provide tooltips straight out-of-the-box, what do you think, what would be the best way to have item-specific tooltips for JTree?\nEdit: (Answering my own question afterwards.) \n@Zarkonnen: Thanks for the getTooltipText idea. \nI found out another ...
We have some integer arithmetic which for historical reasons has to work the same on PHP as it does in a few statically typed languages. Since we last upgraded PHP the behavior for overflowing integers has changed. Basically we are using following formula: function f($x1, $x2, $x3, $x4) { return (($x1 + $x2) ^ $x3...
The behavior you're observing stems from the way integers are represented and overflow is handled in different programming languages, particularly in PHP and C#. ### 1. **Integer Representation** In C#, integers are typically represented as 32-bit signed integers (Int32), where the range is from `-2147483648` to `21...
36,003
[ { "from": "human", "value": "We have some integer arithmetic which for historical reasons has to work the same on PHP as it does in a few statically typed languages. Since we last upgraded PHP the behavior for overflowing integers has changed. Basically we are using following formula:\nfunction f($x1, $x2...
I would like to create an application that downloads a PDF document from the Internet, and displays it to the user. I would like to re-use the iPhone's builtin PDF viewer that is used throughout the core apps to view a PDF document. Is there a way to do that?
Yes, you can create an iOS application that downloads a PDF document from the Internet and then displays it using the built-in PDF viewer provided by Apple's iOS framework. The iOS SDK includes a class called `PDFView` from the `PDFKit` framework that allows you to easily display PDF documents. Here's a basic outline o...
39,516
[ { "from": "human", "value": "I would like to create an application that downloads a PDF document from the Internet, and displays it to the user. I would like to re-use the iPhone's builtin PDF viewer that is used throughout the core apps to view a PDF document.\nIs there a way to do that?\n" }, { "f...
Here's my table: CREATE TABLE `alums_alumphoto` ( `id` int(11) NOT NULL auto_increment, `alum_id` int(11) NOT NULL, `photo_id` int(11) default NULL, `media_id` int(11) default NULL, `updated` datetime NOT NULL, PRIMARY KEY (`id`), KEY `alums_alumphoto_alum_id` (`alum_id`), KEY `alums_...
To remove the `photo_id` column from your `alums_alumphoto` table, you will need to drop the foreign key constraint associated with that column, followed by dropping the index related to it, and finally dropping the column itself. The error messages you are encountering suggest that the steps might not have been follow...
40,237
[ { "from": "human", "value": "Here's my table: \nCREATE TABLE `alums_alumphoto` ( \n `id` int(11) NOT NULL auto_increment, \n `alum_id` int(11) NOT NULL, \n `photo_id` int(11) default NULL, \n `media_id` int(11) default NULL, \n `updated` datetime NOT NULL, \n PRIMARY KEY (`id`), \n KEY `alum...
okee, I followed all instructions I could find here and i could display all kinds of multilingual characters on my pages... The problem is in phpmyadmin the japanese characters are replaced by question marks, as in a bunch of ???? ??? pieced together. I think there's a problem with my database's collation but I just wa...
The issue you're encountering with Japanese characters being displayed as question marks (????) in phpMyAdmin indicates that there is a problem with character encoding and collation in your MySQL database. Let's address your concerns step by step. ### 1. Collation and Character Set **Current Collation**: The default ...
39,840
[ { "from": "human", "value": "okee, I followed all instructions I could find here\nand i could display all kinds of multilingual characters on my pages...\nThe problem is in phpmyadmin the japanese characters are replaced by question marks, as in a bunch of ???? ??? pieced together. I think there's a problem...
(EDIT: This question is now outdated for my particular issue, as Google Code supports git now and I've converted Protocol Buffers to Mercurial anyway. However, it's still of general interest, IMO.) My C# Protocol Buffers Port uses github for its source control, and I'm beginning to really enjoy using git. However, as f...
It's great to see your enthusiasm for using Git and considering various options for project management tools! There are definitely several aspects to think about when choosing the right setup for an open-source project. Below are some considerations and suggestions based on your needs: ### Project Management Features ...
36,572
[ { "from": "human", "value": "(EDIT: This question is now outdated for my particular issue, as Google Code supports git now and I've converted Protocol Buffers to Mercurial anyway. However, it's still of general interest, IMO.)\nMy C# Protocol Buffers Port uses github for its source control, and I'm beginnin...
This line: strcat(query,*it); (where *it is an iterator to a string) Keeps giving me this error: no matching function for call to ``strcat(char[200], const std::basic_string, std::allocator >&)`' I guess it's because strcat takes in a char* while *it is a string. How do I convert it from a string to a char* to make...
The issue you're encountering is indeed due to the fact that `strcat` expects a `char*` (or `const char*`) for both its parameters, and `*it`, being an iterator to a `std::string`, must be converted to a C-style string using the `c_str()` method. Your code snippet `strcat(query, (*it).c_str());` is almost correct, bu...
34,897
[ { "from": "human", "value": "This line:\nstrcat(query,*it);\n\n(where *it is an iterator to a string)\nKeeps giving me this error:\n\nno matching function for call to ``strcat(char[200], const std::basic_string, std::allocator >&)`' \n\nI guess it's because strcat takes in a char* while *it is a string.\nHo...
When you start thinking about a programming project what do you do first? Do you pull out a piece of paper and start sketching out the architecture? Do you have a notebook for ideas? Do you start coding something? Or do you model the software in a fancy package. Come, come, elucidate your thoughts...
When starting a programming project, I typically follow a structured approach that can vary depending on the project's complexity and nature. Here’s a breakdown of the steps I might take: 1. **Define the Problem**: Before jumping into code or design, I take some time to clearly define what problem I’m trying to solve....
39,998
[ { "from": "human", "value": "When you start thinking about a programming project what do you do first? Do you pull out a piece of paper and start sketching out the architecture? Do you have a notebook for ideas? Do you start coding something? Or do you model the software in a fancy package. Come, come, eluc...
I am using the Out-Of-The-Box preview viewstyle for displaying a list. My requirement is to display and extra column on the left side of the the view, along with the title column. How can I do this?
To add an extra column on the left side of a list when using an Out-Of-The-Box (OOTB) preview viewstyle (which could refer to a web framework or a platform like SharePoint, for example), you'll generally follow these steps. However, please note that specific implementations can vary based on the platform you are using....
36,115
[ { "from": "human", "value": "I am using the Out-Of-The-Box preview viewstyle for displaying a list. My requirement is to display and extra column on the left side of the the view, along with the title column. How can I do this?\n" }, { "from": "gpt", "value": "To add an extra column on the left ...
I don't even know where to go with this. Google wasn't very helpful. As with my previous question. I'm using TextMate's Command+R to compile the project. game.h:16:error: declaration of ‘Player* HalfSet::Player() const’ players.h:11:error: changes meaning of ‘Player’ from ‘class Player’ game.h:21:error: ‘Player’ is no...
The issue you are encountering stems from a naming conflict in your code, particularly regarding the `Player` class and the method named `Player()` in the `HalfSet` class. Here’s a breakdown of the error messages and what might be causing them: ### Problem Breakdown: 1. **Declaration of `Player* HalfSet::Player() con...
39,204
[ { "from": "human", "value": "I don't even know where to go with this. Google wasn't very helpful. As with my previous question. I'm using TextMate's Command+R to compile the project.\n\ngame.h:16:error: declaration of ‘Player* HalfSet::Player() const’\nplayers.h:11:error: changes meaning of ‘Player’ from ‘c...
I have a checkbox in GridViewColumn which i use for show/change database value. The click event for the checkbox is used for change value in the database. For handling the state of property "IsChecked" I'm using datatrigger and a setter, se xaml code below: <Style TargetType="CheckBox"> <Setter Property="IsEnabled"...
The issue you're facing is likely due to the default behavior of `CheckBox` when the `IsChecked` property is modified manually. When you change the `IsChecked` property in response to a click, the binding essentially becomes "one-way" and the `DataTrigger` will no longer update the visual state based on changes to the ...
39,661
[ { "from": "human", "value": "I have a checkbox in GridViewColumn which i use for show/change database value. The click event for the checkbox is used for change value in the database. For handling the state of property \"IsChecked\" I'm using datatrigger and a setter, se xaml code below:\n<Style TargetType=...
I've got a Subversion repository, and there are a number of users checking things in and out. However, I also need to frequently check in work for other people. I need to track the original author of the work. I was considering creating a property in SVN, like "originalauthor", which could track this. In cases where...
It sounds like you have a complex need for tracking the original authorship of changes in your Subversion (SVN) repository, especially when you're checking in changes on behalf of others. Here are some approaches you could consider that may help you achieve your goal without resorting to the more clunky solutions you m...
37,011
[ { "from": "human", "value": "I've got a Subversion repository, and there are a number of users checking things in and out. However, I also need to frequently check in work for other people. I need to track the original author of the work.\nI was considering creating a property in SVN, like \"originalautho...
I've been trying with the idea of taking an existing ASP.NET Webforms application and converting it to a hybrid so that going forward, we can do ASP.NET MVC. In order to do this, I created an ASP.NET MVC application and started copying some of the folders from the ASP.NET webforms projects that contain webforms. I'm h...
Converting an ASP.NET Web Forms application to a hybrid with ASP.NET MVC can indeed be challenging, particularly due to the differences in how both frameworks handle page lifecycle, controls, and event handling. The errors you're encountering suggest that the ASP.NET compiler isn't recognizing the server controls defin...
37,480
[ { "from": "human", "value": "I've been trying with the idea of taking an existing ASP.NET Webforms application and converting it to a hybrid so that going forward, we can do ASP.NET MVC.\nIn order to do this, I created an ASP.NET MVC application and started copying some of the folders from the ASP.NET webfo...
I design a class which derives from CScrollBar in a dialog-based MFC application. In the dialog class (MyScrollbarDlg), I set the ON_WM_VSCROLL message and declare the OnVSCroll method in the header file. I also Implement the OnVScroll() method in the corresponding .cpp file. But to my surprise, when I click the arrow ...
The behavior you're experiencing with your custom scrollbar derived from `CScrollBar` in an MFC dialog-based application is unusual, but let's break down the various points you've raised and see if we can identify the underlying issue. ### Scrollbar Messages 1. **Scroll Messages**: The `OnVScroll` method is indeed ca...
37,509
[ { "from": "human", "value": "I design a class which derives from CScrollBar in a dialog-based MFC application. In the dialog class (MyScrollbarDlg), I set the ON_WM_VSCROLL message and declare the OnVSCroll method in the header file. I also Implement the OnVScroll() method in the corresponding .cpp file. Bu...
I'm trying to get a class memeber variable list at run time. I know this probably using typeof and reflections. but can't find an example. Please someone shed light for me. Here is pseudo code example: Class Test01 { public string str01; public string str02; public int myint01; } I want something like this (pseudo...
To achieve this in C#, you can use reflection to get the member variables of a class at runtime. Here's a full example based on your pseudo code. This example demonstrates how to retrieve public fields of a class using reflection: ```csharp using System; using System.Reflection; public class Test01 { public strin...
41,052
[ { "from": "human", "value": "I'm trying to get a class memeber variable list at run time. I know this probably using typeof and reflections. but can't find an example. Please someone shed light for me.\nHere is pseudo code example:\nClass Test01\n{ \n public string str01;\n public string str02;\n public int...
I have a page P1 loading from site S1 which contains an iframe. That iframe loads a page P2 from another site S2. At some point P2 would like to close the browser window, which contains P1 loaded from S1. Of course, since P2 is loaded from another site, it can't just do parent.close(). I have full control over P1 and P...
To allow the page P2 (loaded in the iframe) to close the browser window containing the page P1, you'll need to implement a communication mechanism between P2 and P1. Since you have full control over both pages, you can use the `postMessage` API to send a message from P2 to P1. Here's a simple way to achieve that: ### ...
38,217
[ { "from": "human", "value": "I have a page P1 loading from site S1 which contains an iframe. That iframe loads a page P2 from another site S2. At some point P2 would like to close the browser window, which contains P1 loaded from S1. Of course, since P2 is loaded from another site, it can't just do parent.c...
In the following code, both the INPUT and TEXTAREA elements render wider than they should. How can I limit them to 100% of the usable area within the div? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
The issue you're encountering stems from how browsers render the default styles of certain elements, especially form controls like `<input>` and `<textarea>`, which can include their own padding, borders, and other styles. When you set `width: 100%`, it doesn't account for these additional styles, causing the elements ...
36,711
[ { "from": "human", "value": "In the following code, both the INPUT and TEXTAREA elements render wider than they should. How can I limit them to 100% of the usable area within the div?\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt...
I just came over this syntax in some of the questions in this forum, but Google and any other searchengine tends to block out anything but letters and number in the search so it is impossible to search out "=>". So can anyone tell me what it is and how it is used?
The syntax "=>" is commonly used in programming and mathematical contexts, and its meaning can vary depending on the language or framework in question. Here are a few common usages: 1. **Arrow Functions (JavaScript)**: In JavaScript, `=>` is used to define arrow functions, which provide a concise way to write function...
40,552
[ { "from": "human", "value": "I just came over this syntax in some of the questions in this forum, but Google and any other searchengine tends to block out anything but letters and number in the search so it is impossible to search out \"=>\".\nSo can anyone tell me what it is and how it is used? \n" }, ...
I need to include a copyright statement at the top of every Python source file I produce: # Copyright: © 2008 etc. However, when I then run such a file I get this message: SyntaxError: Non-ASCII character '\xa9' in file MyFile.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for d...
Yes, there is a more elegant solution that allows you to keep the copyright symbol and avoids the `SyntaxError`. You can specify the encoding at the top of your Python source file, which will let you use the copyright symbol (©) directly without any issues. To do this, simply add an encoding declaration at the top of ...
43,124
[ { "from": "human", "value": "I need to include a copyright statement at the top of every Python source file I produce:\n# Copyright: © 2008 etc.\n\nHowever, when I then run such a file I get this message:\nSyntaxError: Non-ASCII character '\\xa9' in file MyFile.py on line 3, but no encoding declared; see ...
I' trying to use a Linq query to find and set the selected value in a drop down list control. Dim qry = From i In ddlOutcome.Items _ Where i.Text.Contains(value) Dim selectedItem As ListItem = qry.First ddlOutcome.SelectedValue = selectedItem.Value Even though the documentation says that the DropDownL...
The error you're encountering is due to the fact that the `DropDownList.Items` collection is not a collection of objects that are directly compatible with LINQ's querying capabilities when `Option Strict` is set to `On`. This is because the `Items` collection contains `ListItem` objects, and you need to cast them expli...
41,063
[ { "from": "human", "value": "I' trying to use a Linq query to find and set the selected value in a drop down list control.\n Dim qry = From i In ddlOutcome.Items _\n Where i.Text.Contains(value)\n\n\n Dim selectedItem As ListItem = qry.First\n\n ddlOutcome.SelectedValue = selectedItem.Value\n\nEve...
Why when I save a value of say 40.54 in SQL Server to a column of type Real does it return to me a value that is more like 40.53999878999 instead of 40.54? I've seen this a few times but have never figured out quite why it happens. Has anyone else experienced this issue and if so causes it?
What you're encountering is a common issue related to how floating-point numbers are represented in computer systems, including SQL Server. ### Understanding Floating-Point Representation 1. **Binary Representation**: In SQL Server, the `REAL` data type (which is equivalent to `FLOAT(24)`) uses a binary representatio...
39,575
[ { "from": "human", "value": "Why when I save a value of say 40.54 in SQL Server to a column of type Real does it return to me a value that is more like 40.53999878999 instead of 40.54? I've seen this a few times but have never figured out quite why it happens. Has anyone else experienced this issue and if...
We have a traditional UV account. Data files in one directory, application programs & subroutines in another directory. Our latest projects is implementing JDBC and in order to fully access the subroutines from java, I belive I need to create a schema on the existing uv account. How can I do this? I tried logging in as...
Creating a schema in a UniVerse (UV) database is a bit different from traditional databases, and it seems like you are running into issues with user permissions. Here's how you can go about it: 1. **User Privileges**: The error message indicates that the user `uvadm` does not have the required privileges to create a s...
39,944
[ { "from": "human", "value": "We have a traditional UV account. Data files in one directory, application programs & subroutines in another directory. Our latest projects is implementing JDBC and in order to fully access the subroutines from java, I belive I need to create a schema on the existing uv account....
I have an abstract base class and derived class: type TInterfaceMethod = class public destructor Destroy; virtual; abstract; procedure Calculate; virtual; abstract; procedure PrepareForWork; virtual; abstract; end; type ConcreteMethod = class(TInterfaceMethod) private matrix: TMinMatrix; public ...
In Delphi, you should make the base class destructor virtual if you want derived classes to be correctly destructed when an instance of the derived class is deleted through a base class pointer. This is similar to the behavior in C++. If you do not declare the destructor as virtual in the base class, only the base clas...
40,607
[ { "from": "human", "value": "I have an abstract base class and derived class:\ntype TInterfaceMethod = class\n public\n destructor Destroy; virtual; abstract;\n procedure Calculate; virtual; abstract;\n procedure PrepareForWork; virtual; abstract;\nend;\ntype ConcreteMethod = class(TInterfaceMetho...
I am using Castle Windsor for IoC and I want to use Binsor to define my configuration. I want to let my internals be visible to Boo. I have tried to mark my assembly with InternalsVisibleTo("Boo.Lang") but that didn't do the job. I have tried InternalsVisibleTo("Rhino.Commons") because I have noticed that the exceptio...
When you want to make your internals visible to a specific assembly using the `InternalsVisibleTo` attribute in C#, it is essential to provide the exact name of the assembly, including the public key if the assembly is strong-named. If `Boo` or any other assembly you are trying to make your internals visible to is stro...
40,194
[ { "from": "human", "value": "I am using Castle Windsor for IoC and I want to use Binsor to define my configuration.\nI want to let my internals be visible to Boo. I have tried to mark my assembly with \nInternalsVisibleTo(\"Boo.Lang\") but that didn't do the job. I have tried InternalsVisibleTo(\"Rhino.Comm...
With common lisp and I am assuming the introspection properties. How can I add code to common lisp code that will tell me when a function is called and when has finished executing. I want to take any lisp code and this particular modification to the code. I figure with lisp's AST analysis, this should be possible.
In Common Lisp, you can achieve the ability to monitor when functions are called and when they finish executing by wrapping functions with additional logging or tracking code. This can be done using a combination of macros and function instrumentation. Here's a simple approach to instrument functions by creating a mac...
37,887
[ { "from": "human", "value": "With common lisp and I am assuming the introspection properties. How can I add code to common lisp code that will tell me when a function is called and when has finished executing. I want to take any lisp code and this particular modification to the code. I figure with lisp's...
Can I write to the end of a 5GB file in Java? This question came up in my office and no one is sure what the answer is.
Yes, you can write to the end of a 5GB file in Java. The Java I/O classes are capable of handling large files, as long as you have sufficient system memory and disk space available. Here are a few important points to consider: 1. **File Size Limitation**: In Java, file sizes can be larger than 2GB, and you can work wi...
40,092
[ { "from": "human", "value": "Can I write to the end of a 5GB file in Java? This question came up in my office and no one is sure what the answer is.\n" }, { "from": "gpt", "value": "Yes, you can write to the end of a 5GB file in Java. The Java I/O classes are capable of handling large files, as...
I want to do this using the Math.Round function
Certainly! The `Math.Round` function is commonly used in programming languages to round a decimal number to the nearest whole number or to a specified number of decimal places. The implementation can vary slightly between different programming languages, so I'll provide examples in C#, Python, and JavaScript. ### C# ...
39,060
[ { "from": "human", "value": "I want to do this using the Math.Round function\n" }, { "from": "gpt", "value": "Certainly! The `Math.Round` function is commonly used in programming languages to round a decimal number to the nearest whole number or to a specified number of decimal places. The imple...
for a server based j2ee application, I need to retrieve the number of pages from word documents.. any ideas what works?
To retrieve the number of pages from Word documents in a server-based J2EE application, you can use libraries that support the manipulation and extraction of information from Word documents. Here are a couple of popular libraries you can consider: ### 1. Apache POI Apache POI is a widely used Java library for reading ...
35,151
[ { "from": "human", "value": "for a server based j2ee application, I need to retrieve the number of pages from word documents.. any ideas what works?\n" }, { "from": "gpt", "value": "To retrieve the number of pages from Word documents in a server-based J2EE application, you can use libraries that...
In my Python app, I have an XML document that I'd like to transform using my XSL file. I'm currently using xml.etree to generate the XML document, but I haven't found anything within Python 2.5 that will allow me to natively transform my XML document. I've already found one library (libxslt) which can execute the tran...
In Python 2.5, the built-in `xml.etree.ElementTree` module does not include support for XSLT transformations. Unfortunately, Python's standard library does not provide a native way to transform XML using XSLT, and libraries such as `libxslt` or `lxml` are commonly used for this purpose. If you want to proceed with XSL...
39,580
[ { "from": "human", "value": "In my Python app, I have an XML document that I'd like to transform using my XSL file. I'm currently using xml.etree to generate the XML document, but I haven't found anything within Python 2.5 that will allow me to natively transform my XML document.\nI've already found one li...
With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?
To define a function in a Python class that prints every instance of that class in a specific format, you can use a class variable to keep track of all instances. Whenever a new instance is created, it can be added to this list. You can then define a method that iterates through this list and prints each instance in th...
41,027
[ { "from": "human", "value": "With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?\n" }, { "from": "gpt", "value": "To define a function in a Python class that prints every instance of that class in a specific format, ...
I have two tables, movies and categories, and I want to get an ordered list by categoryID first and then by Name. The movie table has three columns ID, Name and CategoryID. The category table has two columns ID and Name. I tried something like the following, but it didn't work. var movies = _db.Movies.OrderBy( m => { m...
It looks like you're trying to order the movies by `CategoryID` first and then by `Name`, but your syntax for `OrderBy` is incorrect. In C#, you can't use a tuple in the way you've shown inside the lambda expression directly. Instead, you can chain multiple `OrderBy` calls or use `ThenBy` for the second ordering. Here...
41,702
[ { "from": "human", "value": "I have two tables, movies and categories, and I want to get an ordered list by categoryID first and then by Name.\nThe movie table has three columns ID, Name and CategoryID.\nThe category table has two columns ID and Name.\nI tried something like the following, but it didn't wor...
I am currently teaching myself about various data strutures and am a little frustrated with the various types of trees. I can understand the purpose of organizing something into binary search trees but don't see any practical application of multiway search trees. Can someone please give some examples of problems they'v...
Multiway search trees, like B-trees and B+ trees, are particularly useful in applications where data needs to be organized in a way that optimizes for disk I/O and is efficient for large datasets. Here are some practical applications and problems where multiway search trees are commonly used: 1. **Databases**: Multiwa...
37,037
[ { "from": "human", "value": "I am currently teaching myself about various data strutures and am a little frustrated with the various types of trees. I can understand the purpose of organizing something into binary search trees but don't see any practical application of multiway search trees. Can someone ple...
Is there a way to view the list of recent documents you've opened in Vim? I realize I could view the cursor jump list, :ju, and then go to a cursor position in the list but this is not ideal because there will be multiple listings of the same document in the list. Is there another command which would do what I'm lookin...
Yes, in Vim, there is a way to view the list of recently opened files that is more suitable for your needs than the jump list. You can use the `:history` command or the `:args` command depending on what you're looking for. 1. **Using the `:history` command**: The `:history` command displays a list of command-line c...
36,218
[ { "from": "human", "value": "Is there a way to view the list of recent documents you've opened in Vim?\nI realize I could view the cursor jump list, :ju, and then go to a cursor position in the list but this is not ideal because there will be multiple listings of the same document in the list.\nIs there ano...
This is Crystal Reports 9 in Visual Studio 2003 by the way Simple question about crystal reports formula syntax: How do I build the formula's result using if then clauses? Specifically I would like something like this: dim val as string val = {table.level} if {table.uom_id} = 5 then val = val & ' feet' else val =...
In Crystal Reports, especially in versions like Crystal Reports 9, you can utilize the formula syntax to create conditions using `If...Then...Else` statements. However, the way you expressed your pseudocode won't directly translate into a Crystal Reports formula due to syntax differences. Here's how you can construct ...
40,782
[ { "from": "human", "value": "This is Crystal Reports 9 in Visual Studio 2003 by the way\nSimple question about crystal reports formula syntax: How do I build the formula's result using if then clauses?\nSpecifically I would like something like this:\ndim val as string\nval = {table.level}\nif {table.uom_id...
I am trying to use this in my page class. I only just started using objects in PHP so I'm still a little clueless (but learning as much as I can). This is in my page() function (so called when there is a new instance of page) set_error_handler('$this->appendError'); This is causing an error Warning: set_error_handler...
When using `set_error_handler()` in PHP, you need to provide a valid callback that PHP can call when an error occurs. In your case, you're trying to pass a method of a class as a string, but the way you're doing it is not correct. In PHP, you can specify a method of a class as a callback using an array where the firs...
37,995
[ { "from": "human", "value": "I am trying to use this in my page class. I only just started using objects in PHP so I'm still a little clueless (but learning as much as I can). This is in my page() function (so called when there is a new instance of page)\nset_error_handler('$this->appendError');\n\nThis is ...
I have been trying out the NameValueDeserializer from MVCContrib, which will take a IList as a parameter to a controller and bind a form and its elements to it, but I was just wondering if MVC Beta had any way of doing this?? I know you can bind a strongly typed Object but I want to bind a List of these Objects for som...
In ASP.NET MVC, even in the Beta versions, you can bind a list of objects directly to an action method parameter. The framework is designed to handle model binding for collections quite well. When you submit a form containing multiple items, you can structure the names of your input fields in such a way that MVC can un...
39,895
[ { "from": "human", "value": "I have been trying out the NameValueDeserializer from MVCContrib, which will take a IList as a parameter to a controller and bind a form and its elements to it, but I was just wondering if MVC Beta had any way of doing this??\nI know you can bind a strongly typed Object but I wa...
I'm looking for something like OnClientClick for a button, but I want it to happen after the postback (instead of before). I'm currently using the following, which works, but it adds the script block over and over again, which is not what I want. I simply want to execute an existing client script function. ScriptManage...
If you want to execute a JavaScript function after a postback in ASP.NET without adding duplicate script blocks on each postback, you can use the `Page.ClientScript.RegisterStartupScript` method instead of `RegisterClientScriptBlock`. This approach allows you to register a script that will run after the page has been l...
37,991
[ { "from": "human", "value": "I'm looking for something like OnClientClick for a button, but I want it to happen after the postback (instead of before). I'm currently using the following, which works, but it adds the script block over and over again, which is not what I want. I simply want to execute an exis...
Does anyone have an example AUTORUN.INF which can launch an MSI installer automatically when the user inserts the CD. I'm sure this can be done but I've been Googling around for ages and have not found any working solution. UPDATE: I have an AUTORUN.INF similar to this but it won't launch the installer: [autorun] open=...
Creating an `AUTORUN.INF` file to launch an MSI installer automatically when a CD is inserted is somewhat tricky due to security restrictions in newer versions of Windows. In many cases, automatic execution of installers is blocked by default to prevent malware. However, if you are testing in a controlled environment (...
38,048
[ { "from": "human", "value": "Does anyone have an example AUTORUN.INF which can launch an MSI installer automatically when the user inserts the CD.\nI'm sure this can be done but I've been Googling around for ages and have not found any working solution.\nUPDATE: I have an AUTORUN.INF similar to this but it ...
If so, does it effectively deprecate the visibility property? (I realize that Internet Explorer does not yet support this CSS2 property.) Comparisons of layout engines See also: What is the difference between visibility:hidden and display:none
The CSS properties `visibility` and `display` serve different purposes in terms of element visibility and layout behavior, and one does not necessarily deprecate the other. 1. **`visibility: hidden;`**: When you set an element's visibility to hidden, it will not be visible on the page, but it still occupies space in t...
42,108
[ { "from": "human", "value": "If so, does it effectively deprecate the visibility property?\n(I realize that Internet Explorer does not yet support this CSS2 property.)\n\nComparisons of layout engines\nSee also: What is the difference between visibility:hidden and display:none\n" }, { "from": "gpt",...
I'm getting a strange error from g++ 3.3 in the following code: #include <bitset> #include <string> using namespace std; template <int N, int M> bitset<N> slice_bitset(const bitset<M> &original, size_t start) { string str = original.to_string<char, char_traits<char>, allocator<char> >(); string newstr = str.s...
The error you are encountering is likely due to the specific version of `g++` you are using, which is quite old (3.3). This version does not fully support the C++ standard library features that you're trying to use. In the line where you create a string from a bitset using `to_string`, you're using the form: ```cpp ...
39,859
[ { "from": "human", "value": "I'm getting a strange error from g++ 3.3 in the following code:\n#include <bitset>\n#include <string>\n\nusing namespace std;\n\ntemplate <int N, int M>\nbitset<N> slice_bitset(const bitset<M> &original, size_t start) {\n string str = original.to_string<char, char_traits<char...
How do you deal with lambdas in boo? Is "callable" the same thing? How do you define a method that takes a lambda as a parameter?
In Boo, a language that runs on the .NET framework, lambdas are indeed a key concept, and they can be treated similarly to delegates in other .NET languages. A lambda expression allows you to define an anonymous function that can be passed around as if it were a first-class object. The term "callable" in Boo does refe...
40,715
[ { "from": "human", "value": "How do you deal with lambdas in boo? Is \"callable\" the same thing? How do you define a method that takes a lambda as a parameter?\n" }, { "from": "gpt", "value": "In Boo, a language that runs on the .NET framework, lambdas are indeed a key concept, and they can be ...
In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); In jailbroken phones, you used to be able to use the MeCCA.framework to do this: http://pastie.org/94481 MeCCA_Vibrator *v = new MeCCA_Vibrator; v->activate(1);...
In the iPhone 2.x firmware, there are limited options for controlling the vibration functionality, especially if you're not using any jailbroken or third-party frameworks like MeCCA. The standard `AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)` method is the primary way to trigger vibrations, and it does not all...
41,720
[ { "from": "human", "value": "In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined:\nAudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\n\nIn jailbroken phones, you used to be able to use the MeCCA.framework to do this:\nhttp://pastie.org/94481\nMeCCA_Vib...
This might be a stupid question but I just wanted to make sure... If I incorporate code generated by the IDE (Visual Studio in this case) in my software, can I apply my own license to that code or is it subject to its own license?
This is a good question, and it's important to understand the licensing implications of any code you use in your software. When you generate code using an Integrated Development Environment (IDE) like Visual Studio, the code itself is typically not subject to any specific license just because it was generated by the I...
41,583
[ { "from": "human", "value": "This might be a stupid question but I just wanted to make sure...\nIf I incorporate code generated by the IDE (Visual Studio in this case) in my software, can I apply my own license to that code or is it subject to its own license? \n" }, { "from": "gpt", "value": "T...
I'm switching between different Java SDKs (1.4.2, 1.5.0 and 1.6.0) for various projects. I would like to set the JAVA_HOME environment variable on my Windows XP machine without going through the tedious My Computer -> Advanced -> [Select System Variable] -> Edit -> Ok -> Ok Is it possible to do this from the command l...
Yes, you can set the `JAVA_HOME` environment variable globally from the command line in Windows XP by using the `setx` command, which allows you to set environment variables permanently. Here’s how to do it: 1. **Open Command Prompt**: Go to `Start` -> `Run`, type `cmd`, and press `Enter`. 2. **Use the setx command*...
38,971
[ { "from": "human", "value": "I'm switching between different Java SDKs (1.4.2, 1.5.0 and 1.6.0) for various projects. I would like to set the JAVA_HOME environment variable on my Windows XP machine without going through the tedious My Computer -> Advanced -> [Select System Variable] -> Edit -> Ok -> Ok\nIs...
I'm administering a svn repo for a project where the source wasn't imported with a single top level directory. As a result, there are about 15 separate 'projects' instead of one. How can I merge these into one folder while maintaining the change history? *hint: svn move doesn't work in this case. [edit] whoops, dupe of...
To merge multiple projects in a Subversion (SVN) repository into a single top-level directory while preserving the change history, you'll need to use the `svn copy` command along with some structured steps. Here's a general approach you can follow: ### Step-by-Step Guide to Combine SVN Projects 1. **Backup Your Repos...
39,971
[ { "from": "human", "value": "I'm administering a svn repo for a project where the source wasn't imported with a single top level directory. As a result, there are about 15 separate 'projects' instead of one. How can I merge these into one folder while maintaining the change history?\n*hint: svn move doesn't...
Some programs read the company name that you entered when Windows was installed and display it in the program. How is this done? Are they simply reading the name from the registry?
Yes, programs that display the company name entered during the Windows installation typically read this information from the Windows Registry. Specifically, the company name and other relevant information can be found in the following registry key: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion ``...
42,900
[ { "from": "human", "value": "Some programs read the company name that you entered when Windows was installed and display it in the program. How is this done? Are they simply reading the name from the registry?\n" }, { "from": "gpt", "value": "Yes, programs that display the company name entered d...
I'm pre-compiling a C program containing Pro*C code with Oracle 10.2 and AIX 5.2 The Oracle precompiler reads the $ORACLE_HOME/precomp/admin/pcscfg.cfg file which contains the definition of the sys_include variable (set to /usr/include). The Pro*C compiler complains that it doesn't know what the size_t type is and the ...
The issue you're encountering with the Pro*C compiler not recognizing the `size_t` type is likely related to the order of header file inclusions and the way the Pro*C precompiler handles C data types. Here are several steps to help troubleshoot and potentially resolve the issue: ### 1. Ensure Proper Include Order Make...
38,584
[ { "from": "human", "value": "I'm pre-compiling a C program containing Pro*C code with Oracle 10.2 and AIX 5.2\nThe Oracle precompiler reads the $ORACLE_HOME/precomp/admin/pcscfg.cfg file which contains the definition of the sys_include variable (set to /usr/include).\nThe Pro*C compiler complains that it do...
Is there a way to use XMLHttpRequest in combination with other domains? I would like to parse some xml from Google without having to use a server so it is minimalistically complex to run. var req = getXmlHttpRequestObject(); ... req.open('GET', 'http://www.google.de/ig/api?weather=Braunschweig', true); req.setR...
Using `XMLHttpRequest` to make requests to other domains is subject to the Same-Origin Policy, which is a security feature implemented in web browsers. This policy prevents JavaScript code from making requests to a different domain than the one that served the web page. This means that if you're trying to request data ...
39,417
[ { "from": "human", "value": "Is there a way to use XMLHttpRequest in combination with other domains?\nI would like to parse some xml from Google without having to use a server so it is minimalistically complex to run.\nvar req = getXmlHttpRequestObject();\n...\nreq.open('GET', 'http://www.google.de/ig/api?w...
I am building a web app where I need to get all the images and any flash videos that are embedded (e.g. youtube) on a given URL. I'm using Python. I've googled, but have not found any good information about this (probably because I don't know what this is called to search for), does anyone have any experience with this...
To extract images and embedded videos (like YouTube videos) from a given URL, you can use Python libraries such as `requests` to fetch the webpage and `BeautifulSoup` from the `bs4` package to parse the HTML content. Below, I've provided a simple example demonstrating how to achieve this. ### Step 1: Install Required ...
36,738
[ { "from": "human", "value": "I am building a web app where I need to get all the images and any flash videos that are embedded (e.g. youtube) on a given URL. I'm using Python.\nI've googled, but have not found any good information about this (probably because I don't know what this is called to search for),...
I want to redirect from an action in one controller to an action in a second controller. Normally I would use RedirectToAction("actionName", "controllerName", objects); The method I want to redirect to has two overloads: One for HttpVerbs.Get that is used for direct linking One for HttpVerbs.Post accepting reference t...
In ASP.NET MVC, when you want to redirect from one action to another and need to call the action that specifically accepts a `POST` request, you have a couple of options since `RedirectToAction` will always perform a `GET` redirect. ### Options 1. **Use a Form Submission (POST) Instead of Redirect:** If you need t...
36,453
[ { "from": "human", "value": "I want to redirect from an action in one controller to an action in a second controller. Normally I would use RedirectToAction(\"actionName\", \"controllerName\", objects);\nThe method I want to redirect to has two overloads:\n\nOne for HttpVerbs.Get that is used for direct link...
A design question. I have developed an online test engine web app earlier this year. I have used Java servlets and Freemarker templates and done it entirely following the MVC paradigm. One big missing feature in the application is that it provides no reporting. The initial design of the application did not consider re...
It's great that you are looking to enhance your application with a reporting service while keeping your core application intact. Here are some ideas on how you can approach this: ### 1. **Decouple Reporting from Core Application:** - **Service-Oriented Architecture (SOA)**: Consider creating a separate reporting serv...
38,882
[ { "from": "human", "value": "A design question.\nI have developed an online test engine web app earlier this year. I have used Java servlets and Freemarker templates and done it entirely following the MVC paradigm. \nOne big missing feature in the application is that it provides no reporting. The initial de...
NDoc has an XML element inheritdoc which allows you to inherit documentation of a member from the parent class (or an implemented interface). However, Visual Studio (i.e. the C# compiler) does not understand this tag and complains about the documentation not being present or complete. So does StyleCop and some other to...
When working with XML documentation in C#, especially in cases where you want to inherit documentation from a base class or interface method, you have to navigate some limitations since the C# compiler and tools like StyleCop do not support the `<inheritdoc>` tag that NDoc provides. Here are some alternative approaches...
37,865
[ { "from": "human", "value": "NDoc has an XML element inheritdoc which allows you to inherit documentation of a member from the parent class (or an implemented interface). However, Visual Studio (i.e. the C# compiler) does not understand this tag and complains about the documentation not being present or com...
What are the advantages/disadvantages to running time based jobs using: windows services Application_BeginRequest to start seperate threads / timers. One disadvantage of running the jobs in the context of a asp.net web appplication is during .net recycling things will have to be setup again, any others?
Running time-based jobs using Windows Services and the `Application_BeginRequest` method in an ASP.NET application each come with their own set of advantages and disadvantages. Here's a breakdown: ### Running Time-Based Jobs Using Windows Services **Advantages:** 1. **Reliability and Stability:** - Windows Servic...
37,626
[ { "from": "human", "value": "What are the advantages/disadvantages to running time based jobs using:\n\nwindows services\nApplication_BeginRequest to start seperate threads / timers.\n\nOne disadvantage of running the jobs in the context of a asp.net web appplication is during .net recycling things will hav...
I'm trying to read a Paradox 5 table into a dataset or simular data structure with the view to putting it into an SQL server 2005 table. I've trawled google and SO but with not much luck. I've tried ODBC: public void ParadoxGet() { string ConnectionString = @"Driver={Microsoft Paradox Driver (*.db )};DriverID=538;F...
The error message you’re encountering, `ERROR [HY000] [Microsoft][ODBC Paradox Driver] External table is not in the expected format`, typically indicates that there is an issue with the way your Paradox database files are being accessed, or that the file format may not be compatible with the driver you’re using. Here ...
36,332
[ { "from": "human", "value": "I'm trying to read a Paradox 5 table into a dataset or simular data structure with the view to putting it into an SQL server 2005 table. I've trawled google and SO but with not much luck. I've tried ODBC:\npublic void ParadoxGet()\n{\n string ConnectionString = @\"Driver={Mic...
i get this error {"Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL."} when i try to execute this linq to sql var query = from p in db.Posts let categories = GetCategoriesByPostId(p.PostId) let comments = GetCommentsByPostI...
The error you're encountering, `{"Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL."}`, indicates that the LINQ to SQL provider doesn't know how to translate the `ConvertTimeFromUtc` method to SQL. When you're working with LINQ to SQL (or Entity Fram...
39,506
[ { "from": "human", "value": "i get this error \n{\"Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.\"} \n\nwhen i try to execute this linq to sql\nvar query = from p in db.Posts\n let categories = GetCategoriesByPostId(p.PostI...
I have SSRS Reports created and rendering in Excel format. I used a custom color(mentioned in excel spec R23, G123, B87) in SSRS. But it shows a different color with the same combination in SSRS. And once I render the report to Excel it shows the color different though I used the same color combination. Why the color d...
The issue you are encountering with color rendering in SSRS (SQL Server Reporting Services) when exporting to Excel can be attributed to differences in how colors are interpreted and rendered by these two applications. Here are several reasons why this might occur and suggestions on how to resolve it: ### Reasons for ...
39,555
[ { "from": "human", "value": "I have SSRS Reports created and rendering in Excel format. I used a custom color(mentioned in excel spec R23, G123, B87) in SSRS. But it shows a different color with the same combination in SSRS. And once I render the report to Excel it shows the color different though I used th...
I am looking for an inverse version of "RunOnceEx". RunOnceEx does run some program, before the user's shell(desktop&taskbar) start. The login progress will not continue before the runonceex complete. I want to do exact the same but on user logout. When she/he logout, all running program shutdown, leaving shell(desktop...
To create an equivalent of "RunOnceEx" that executes a program during user logout, you can leverage the built-in Windows Task Scheduler or Windows Group Policy. Here are a couple of methods to achieve this behavior: ### Method 1: Using a Logoff Script You can configure a logoff script that will run your desired progr...
39,109
[ { "from": "human", "value": "I am looking for an inverse version of \"RunOnceEx\".\nRunOnceEx does run some program, before the user's shell(desktop&taskbar) start. The login progress will not continue before the runonceex complete.\nI want to do exact the same but on user logout.\nWhen she/he logout, all r...
First off, here are the constraints: Must run on XP Must notify of both drive letter assignments and mounting a volume to a folder Must not 'wake' a drive if it is sleeping. I'd really rather not polling the drive. What I've tried: Google I've looked at WMI and the Win32_LogicalDisk class. I can determine which driv...
Given your specific constraints and requirements for monitoring drive letter assignments and mounted volumes on Windows XP without waking up sleeping drives or relying on polling, you face a challenging task. Here are a few suggestions that might help you achieve your goals: ### 1. **Use Device Notification Messages**...
38,379
[ { "from": "human", "value": "First off, here are the constraints:\n\nMust run on XP\nMust notify of both drive letter assignments and mounting a volume to a folder\nMust not 'wake' a drive if it is sleeping.\nI'd really rather not polling the drive.\n\nWhat I've tried:\n\nGoogle\nI've looked at WMI and the ...
Is there any library that would simplify the task of connecting to a server with JDBC? Something that can take a string like mysql://username:password@host/db, similar to what PHP MDB2 do as in here. I'm not interested in any ORM or complex library such as Spring as I'm not even doing this from the Java language (but s...
Yes, there are several libraries that can simplify the process of connecting to a database using JDBC with a URI-style connection string, similar to what you described. Here are a couple of options that you might find useful: ### 1. **JDBC URL Parser Library** You can create a utility that parses your connection strin...
36,265
[ { "from": "human", "value": "Is there any library that would simplify the task of connecting to a server with JDBC? Something that can take a string like mysql://username:password@host/db, similar to what PHP MDB2 do as in here.\nI'm not interested in any ORM or complex library such as Spring as I'm not eve...
Duplicate question - see: How do you dynamically load a javascript file? (Think C’s #include) Is there a javascript equivalent of @import? Because using the following way of including another javascript file from within a javascript file doesn't seem very nice and clean. document.write("<script type='text/javascript'...
To dynamically load a JavaScript file in a clean and modern way, you can create a function that adds a `<script>` element to the document. Using `document.write` is generally discouraged, especially after the page has fully loaded, as it can cause issues with the page rendering. Instead, here’s a method that leverages ...
35,661
[ { "from": "human", "value": "Duplicate question - see: How do you dynamically load a javascript file? (Think C’s #include)\n\nIs there a javascript equivalent of @import? Because using the following way of including another javascript file from within a javascript file doesn't seem very nice and clean.\n do...
In short: I want to monitor selected calls from an application to a DLL. We have an old VB6 application for which we lost the source code (the company wasn't using source control back then..). This application uses a 3rd party DLL. I want to use this DLL in a new C++ application. Unfortunately the DLL API is only parti...
To monitor DLL calls from an application without having to write extensive code for each function, you might consider using the following tools that can help you achieve your goal in a more automated way: ### 1. **Detours** Microsoft's Detours is a powerful library that allows you to intercept and log API calls in a r...
37,763
[ { "from": "human", "value": "In short: I want to monitor selected calls from an application to a DLL.\nWe have an old VB6 application for which we lost the source code (the company wasn't using source control back then..). This application uses a 3rd party DLL.\nI want to use this DLL in a new C++ applicati...
Currently I have a custom tool which generates vanilla-SQL (only using standard SQL), from our Data-models that sets up database schemas and initial data for our new databases, and do version patches, etc... This part is all fine and dandy right now. However running these SQL scripts against all the different databases...
It sounds like you have a solid foundation with your current setup, but there are definitely ways to streamline the process of executing SQL scripts across multiple database vendors. Here are some approaches and tools you might consider to make your workflow more efficient: ### 1. **Database Migration Tools** - **Liqu...
38,401
[ { "from": "human", "value": "Currently I have a custom tool which generates vanilla-SQL (only using standard SQL), from our Data-models that sets up database schemas and initial data for our new databases, and do version patches, etc... This part is all fine and dandy right now.\nHowever running these SQL s...
I have a DataGridView with its datasource set to a generic list of custom objects. As the user changes values (in this case checks/unchecks a check box) the underlying boolean field in the object changes. Should I be creating a "copy" of the List for binding, then updating manually if the user commits, (if so how do yo...
In a typical scenario where a `DataGridView` is bound to a list of custom objects and the user interacts with it (like checking/unchecking a checkbox), the changes are reflected directly in the underlying data source. If you want to allow users to roll back changes before committing them, you can implement a couple of ...
37,420
[ { "from": "human", "value": "I have a DataGridView with its datasource set to a generic list of custom objects. As the user changes values (in this case checks/unchecks a check box) the underlying boolean field in the object changes.\nShould I be creating a \"copy\" of the List for binding, then updating ma...
I'm using VB .NET 2005 and Exchange Server 2003 installed I have found some code which gives me the ability to connect in an Exchange Server and create an appointment. The thing is that I cannot find the CDO. Appointment. Where can I find it and make the below code to work ? I have tried all the examples with CDO and ...
To use CDO (Collaboration Data Objects) with Exchange Server 2003 in VB .NET, you'll need to ensure you have the correct libraries referenced in your project. The specific library you need for creating appointments is **CDOEX.DLL**. Here are the steps you should follow to set up your project properly and modify your c...
38,693
[ { "from": "human", "value": "I'm using VB .NET 2005 and Exchange Server 2003 installed\nI have found some code which gives me the ability to connect in an Exchange Server and create an appointment.\nThe thing is that I cannot find the CDO. Appointment.\nWhere can I find it and make the below code to work ?...
Is it possible to pass a query string to Namescape's rDirectory? I'd like to build a web-app that can do a search and display the results in rDirectory, rather than first launching rDirectory and doing said search.
As of my last update in October 2023, rDirectory by Namescape does not provide direct support for passing query strings to pre-populate or automate searches via a URL. However, there are some approaches you could consider for integrating rDirectory into your web application: 1. **API Integration**: Check if rDirectory...
41,127
[ { "from": "human", "value": "Is it possible to pass a query string to Namescape's rDirectory? I'd like to build a web-app that can do a search and display the results in rDirectory, rather than first launching rDirectory and doing said search.\n" }, { "from": "gpt", "value": "As of my last updat...
I'm currently monitoring a large network with Hobbit and have been tasked with lowering the amount of false (or at least irrelevant) alarms. At the top of my list are the tests "http" and "conn", initiated by bbtest-net. This command checks ping, ssh, etc, and if for instance a ping times out, it immediately sets the s...
To mitigate the issue of false alarms from your Hobbit monitoring setup, you can implement a configuration change to delay the reporting of a red status until after the `bbretest` has run for the first time. The idea is to introduce a grace period during which the service will not immediately go into a red state upon a...
38,565
[ { "from": "human", "value": "I'm currently monitoring a large network with Hobbit and have been tasked with lowering the amount of false (or at least irrelevant) alarms. At the top of my list are the tests \"http\" and \"conn\", initiated by bbtest-net. This command checks ping, ssh, etc, and if for instanc...
I have recently started looking into Google Charts API for possible use within the product I'm working on. When constructing the URL for a given chart, the data points can be specified in three different formats, unencoded, using simple encoding and using extended encoding (http://code.google.com/apis/chart/formats.htm...
You're correct that the Google Charts API has limits on the values that can be represented in the chart data points, particularly with the use of extended encoding. In the case of extended encoding, the maximum value you can represent is indeed 4095 (encoded as ".."). This limitation is inherent to the way that the d...
40,345
[ { "from": "human", "value": "I have recently started looking into Google Charts API for possible use within the product I'm working on. When constructing the URL for a given chart, the data points can be specified in three different formats, unencoded, using simple encoding and using extended encoding (http...
I'm making a twitter client, and I'm evaluating the various ways of protecting the user's login information. Hashing apparently doesn't do it Obfuscating in a reversable way is like trying to hide behind my finger Plain text sounds and propably is promiscuous Requiring the user to type in his password every time would...
When designing a Twitter client or any application that requires user authentication, it's critical to implement security measures to protect users' login information effectively. Here are some ideas and best practices to consider: 1. **OAuth Authentication**: Instead of handling user passwords directly, use OAuth for...
37,363
[ { "from": "human", "value": "I'm making a twitter client, and I'm evaluating the various ways of protecting the user's login information.\n\nHashing apparently doesn't do it\nObfuscating in a reversable way is like trying to hide behind my finger\nPlain text sounds and propably is promiscuous\nRequiring the...
Is there any reason to use a varchar field instead of a date field in MySQL? I'm looking at an existing site and I see the developer has done this. Is there any reason to?
Using a `VARCHAR` field instead of a `DATE` field in MySQL is generally not recommended for storing date values, as it can lead to several issues related to data integrity, performance, and ease of use. However, there are a few reasons why a developer might choose to use `VARCHAR` for dates, even if they are not ideal:...
38,284
[ { "from": "human", "value": "Is there any reason to use a varchar field instead of a date field in MySQL? I'm looking at an existing site and I see the developer has done this. Is there any reason to?\n" }, { "from": "gpt", "value": "Using a `VARCHAR` field instead of a `DATE` field in MySQL is ...
I can get simple examples to work fine as long as there's no master page involved. All I want to do is click a button and have it say "hello world" with the javascript in a .js file, using a master page. Any help very much appreciated :)
Certainly! Here's a simple example of how to use JavaScript from an external .js file to show a message like "Hello, World!" when a button is clicked, all within an ASP.NET Web Forms application using a master page. ### Step 1: Create Your Master Page First, create a master page (e.g., `Site.master`). Here's an examp...
39,126
[ { "from": "human", "value": "I can get simple examples to work fine as long as there's no master page involved. All I want to do is click a button and have it say \"hello world\" with the javascript in a .js file, using a master page. Any help very much appreciated :)\n" }, { "from": "gpt", "val...
I need to disable windows-update service from my installation. I already use vbscript to do some stuff so I would like to do it in vbscript. My knowledge of vbscript (or any other script language) is very limited so...can anybody help me out with that? I'll really appreciate it! Thanks.
Certainly! To disable the Windows Update service using VBScript, you can utilize the `WScript.Shell` object to execute command-line instructions. Below is an example VBScript that will disable the Windows Update service. ### VBScript to Disable Windows Update Service ```vbscript Option Explicit Dim objShell Set objS...
38,755
[ { "from": "human", "value": "I need to disable windows-update service from my installation. I already use vbscript to do some stuff so I would like to do it in vbscript.\nMy knowledge of vbscript (or any other script language) is very limited so...can anybody help me out with that? I'll really appreciate it...
Maybe it's just me, but I cannot understand the documentation regarding Junit test integration in Intellij Idea. What I am looking for is a simple tutorial example, such as: Here is a method calculating 2+2, and here is a test class testing it to be 4. This is the checkbox you set to make it go. If there is already suc...
Sure! Let's create a simple example to demonstrate how to write a method that calculates 2 + 2, and then write a JUnit test to verify that it correctly returns 4. I'll guide you through the steps to set this up in IntelliJ IDEA. Since you mentioned using version 7.0.4, the instructions may slightly differ in newer vers...
38,197
[ { "from": "human", "value": "Maybe it's just me, but I cannot understand the documentation regarding Junit test integration in Intellij Idea. What I am looking for is a simple tutorial example, such as:\nHere is a method calculating 2+2, and here is a test class testing it to be 4. This is the checkbox you ...
Possible Duplicate: ICalendar and event updates not working in Outlook Help updating an event in Outlook 2007 with an iCalendar file How do I update calendar events that were imported by iCalendar file? I need to re-import events but I want to make sure that the existing events are updated. Currently if I do an imp...
Updating calendar events in Outlook using iCalendar files can be a bit tricky, especially with older versions like Outlook 2007. The behavior you're seeing, where the events are added as new rather than being updated, is due to how Outlook handles the `UID` and `METHOD` properties in the iCalendar specification. To en...
37,497
[ { "from": "human", "value": "\nPossible Duplicate:\nICalendar and event updates not working in Outlook\nHelp updating an event in Outlook 2007 with an iCalendar file \n\nHow do I update calendar events that were imported by iCalendar file? \nI need to re-import events but I want to make sure that the existi...
I'm looking for a small C library to handle utf8 strings. Specifically, splitting based on unicode delimiters for use with stemming algorithms. Related posts have suggested: ICU http://www.icu-project.org/ (I found it too bulky for my purposes on embedded devices) UTF8-CPP: http://utfcpp.sourceforge.net/ (Excellent, bu...
If you're looking for a lightweight C library for handling UTF-8 strings, especially for tasks like splitting based on Unicode delimiters, here are a few options that may suit your needs: 1. **utf8.h**: - **Repository**: https://github.com/danielmiessler/utf8.h - This is a single-header library that provides uti...
36,199
[ { "from": "human", "value": "I'm looking for a small C library to handle utf8 strings.\nSpecifically, splitting based on unicode delimiters for use with stemming algorithms.\nRelated posts have suggested:\nICU http://www.icu-project.org/ (I found it too bulky for my purposes on embedded devices)\nUTF8-CPP: ...
I've been using a 3G wireless card for a while and every time I connect, my anti-virus fires up the updates. I'm wondering what is the Win32 API set of functions that I can use to, either, get notified or query about the event of an Internet Connection coming up? And is there already a set of ported headers for Delphi?...
To get notifications or query about Internet connection events in a Windows environment, you can use the **Windows Sockets (Winsock) API** or **Windows Management Instrumentation (WMI)**. Additionally, you can use the **Network Change Notification** API to listen for changes in network connectivity. ### 1. Network Cha...
38,645
[ { "from": "human", "value": "I've been using a 3G wireless card for a while and every time I connect, my anti-virus fires up the updates.\nI'm wondering what is the Win32 API set of functions that I can use to, either, get notified or query about the event of an Internet Connection coming up?\nAnd is there ...
Is there anything "out there", similar to Dependency Walker, which walks and reports the dependencies of an ActiveX/COM object?
Yes, there are several tools available that can help analyze the dependencies of ActiveX/COM objects, similar to how Dependency Walker analyzes DLLs and executables. Here are a few options you might consider: 1. **OLE/COM Object Viewer**: This is a tool that comes with Visual Studio and can be used to inspect COM obje...
39,333
[ { "from": "human", "value": "Is there anything \"out there\", similar to Dependency Walker, which walks and reports the dependencies of an ActiveX/COM object? \n" }, { "from": "gpt", "value": "Yes, there are several tools available that can help analyze the dependencies of ActiveX/COM objects, s...
I'm assigned to a project where my code is supposed to perform uploads and downloads of some files on the same FTP or HTTP server simultaneously. The speed is measured and some conclusions are being made out of this. Now, the problem is that on high-speed connections we're getting pretty much expected results in terms ...
The situation you're dealing with can be challenging, especially when there are expectations about symmetric throughput on a connection like CDMA 1xRTT. Let’s break down the aspects involved: ### Understanding CDMA 1xRTT 1. **Symmetric vs. Asymmetric**: CDMA 1xRTT can technically support symmetric data rates (around ...
37,870
[ { "from": "human", "value": "I'm assigned to a project where my code is supposed to perform uploads and downloads of some files on the same FTP or HTTP server simultaneously. The speed is measured and some conclusions are being made out of this.\nNow, the problem is that on high-speed connections we're gett...
How do I use XPathNavigator.Evaluate ( or other methods in XPathNavigator) to obtain the ISBN value for the following xml input? <?xml version="1.0"?> <!-- a fragment of a book store inventory database --> <bookstore xmlns:bk="urn:samples"> <book genre="novel" publicationdate="1997" bk:ISBN="1-861001-57-8"> <titl...
To obtain the ISBN values from the given XML input using the `XPathNavigator` in C#, you can follow these steps: 1. Load the XML data into an `XPathDocument`. 2. Create an `XPathNavigator` from the document. 3. Use the `Evaluate` method or `Select` method to navigate to the desired ISBN attributes. Here’s a sample im...
36,062
[ { "from": "human", "value": "How do I use XPathNavigator.Evaluate ( or other methods in XPathNavigator) to obtain the ISBN value for the following xml input?\n<?xml version=\"1.0\"?>\n<!-- a fragment of a book store inventory database -->\n<bookstore xmlns:bk=\"urn:samples\">\n <book genre=\"novel\" public...
I am looking for database-caching framework for C++ providing the following: Generate object/table representations via some pseudo-language (macros/templates) Retrieve objects from DB by key when needed LRU caching Immediate and delayed update of DB on object update (via getter/setter methods)
For a C++ application requiring a database-caching framework with the features you mentioned, there are a few options you might consider. While no single framework may meet all your needs out-of-the-box, you can combine existing libraries or customize them to fulfill your requirements. Here are some suggestions: ### 1...
35,765
[ { "from": "human", "value": "I am looking for database-caching framework for C++ providing the following:\n\nGenerate object/table representations via some pseudo-language (macros/templates)\nRetrieve objects from DB by key when needed\nLRU caching\nImmediate and delayed update of DB on object update (via g...
I have an ASP.NET webpage running under IIS that uses a common assembly that contains a singleton class. Should I implement a locking mechanism on the singleton to make it thread-safe? Or, will any connection to the webserver use the same instance of the singleton? Hopefully I'm asking this coherently.
Your question is quite coherent, and it raises an important point about singleton instances in a web application context, especially when running under IIS. ### Understanding Singleton in Web Applications In a typical singleton implementation, there is only one instance of a class that is shared across the applicatio...
39,409
[ { "from": "human", "value": "I have an ASP.NET webpage running under IIS that uses a common assembly that contains a singleton class. Should I implement a locking mechanism on the singleton to make it thread-safe? Or, will any connection to the webserver use the same instance of the singleton?\nHopefully ...
What is the simplest way to send mail using Ruby on Rails? Is there a way to send mail directly via ruby and skip all the rails models and complexity, just like php's mail() function? Thanks for your help.
Yes, you can send emails in a simple way using Ruby, even outside the Rails models, by utilizing the `Net::SMTP` library from Ruby's standard library. This allows you to send emails without the overhead of Rails' Action Mailer or models. Below, I'll show you how to do this: ### Sending Mail with `Net::SMTP` Here's a ...
34,754
[ { "from": "human", "value": "What is the simplest way to send mail using Ruby on Rails? Is there a way to send mail directly via ruby and skip all the rails models and complexity, just like php's mail() function?\nThanks for your help.\n" }, { "from": "gpt", "value": "Yes, you can send emails in...
How do I get the GridView control to render the <thead> <tbody> tags? I know .UseAccessibleHeaders makes it put <th> instead of <td>, but I cant get the <thead> to appear.
In ASP.NET Web Forms, the `GridView` control does not automatically generate the `<thead>` and `<tbody>` tags in its HTML output. However, you can customize the rendering of the GridView to achieve that. To make the `GridView` render the `<thead>` and `<tbody>` tags, you can handle the `RowCreated` event and wrap your...
35,877
[ { "from": "human", "value": "How do I get the GridView control to render the <thead> <tbody> tags? I know .UseAccessibleHeaders makes it put <th> instead of <td>, but I cant get the <thead> to appear.\n" }, { "from": "gpt", "value": "In ASP.NET Web Forms, the `GridView` control does not automati...
I have seen this syntax in MSDN: yield break, but I don't know what it does. Does anyone know?
In C#, the `yield` keyword is used to define an iterator, which allows you to iterate through a collection without needing to create a separate collection. The `yield break` statement is specifically used within an iterator block to signal that the iteration should be terminated prematurely. When you use `yield break`...
40,081
[ { "from": "human", "value": "I have seen this syntax in MSDN: yield break, but I don't know what it does. Does anyone know?\n" }, { "from": "gpt", "value": "In C#, the `yield` keyword is used to define an iterator, which allows you to iterate through a collection without needing to create a sep...
I have a GridView that allows editing the values in every column, in every row, all the time. The user enters in all their changes, clicks Save once and all changes are commited. The user must also be able to click the New button, have a new row appear in the GridView (yep, it has to show up in the actual GridView), e...
There are several approaches you can consider for adding a new empty row to a `GridView` without losing changes made by the user to existing rows. Here are some strategies you can use: ### 1. Use a Temporary Data Structure Instead of directly binding the `GridView` to a database or a fixed data source, use a temporary...
38,704
[ { "from": "human", "value": "I have a GridView that allows editing the values in every column, in every row, all the time. The user enters in all their changes, clicks Save once and all changes are commited.\nThe user must also be able to click the New button, have a new row appear in the GridView (yep, it...