instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm building an application that needs to run through an XML feed but I'm having a little trouble with getting certain elements. I'm using the Twitter feed and want to run through all the <item> elements. I can connect fine and get the content from the feed but I can't figure out how to select only the item elements wh...
To parse an XML feed, such as a Twitter feed, and specifically target the `<item>` elements, you can utilize the `XmlReader` class in C#. Here's a general approach to help you extract only the `<item>` elements from your XML feed. 1. First, ensure you have included the necessary namespaces: ```csharp using Sys...
38,259
[ { "from": "human", "value": "I'm building an application that needs to run through an XML feed but I'm having a little trouble with getting certain elements.\nI'm using the Twitter feed and want to run through all the <item> elements. I can connect fine and get the content from the feed but I can't figure o...
Scenario: An event is raised in class A that needs to be handled by a method in class B. (currently via a delegate) The data that gets passed from the event to the method is currently wrapped in class C. This obviously requires class B to be dependent on class C. Is there any techniques/refactoring that i can perform ...
Certainly! Reducing dependencies in your classes is a common goal in software design, particularly if you're aiming for better modularity and flexibility. Here are a few techniques you could consider to remove the dependency of class B on class C while still handling the event from class A: ### 1. Use a DTO (Data Tran...
34,037
[ { "from": "human", "value": "Scenario:\nAn event is raised in class A that needs to be handled by a method in class B. (currently via a delegate)\nThe data that gets passed from the event to the method is currently wrapped in class C.\nThis obviously requires class B to be dependent on class C.\n\nIs there ...
How to solve "Must be MarshalByRefObject" in a good but multiple-inheritance amputated language like C#? The problem is very simple, in several cases you just have to inherit from this class (infrastructure requirements). It does not matter here really, which cases. So, what do you do if you've already inherited from s...
The error "Must be MarshalByRefObject" in C# typically occurs when you are dealing with remoting scenarios, where an object needs to be accessed across application domain boundaries. In such cases, classes that need to be used in a remote context must inherit from `MarshalByRefObject`. However, as you pointed out, C# o...
36,033
[ { "from": "human", "value": "How to solve \"Must be MarshalByRefObject\" in a good but multiple-inheritance amputated language like C#?\nThe problem is very simple, in several cases you just have to inherit from this class (infrastructure requirements).\nIt does not matter here really, which cases.\nSo, wha...
I have the following class [XmlRoot(ElementName= "webSites")] //No capital w at the beginning public class WebSites : List<WebSite> { } public class WebSite { [XmlAttribute("name")] public string Name { set; get; } [XmlAttribute("url")] public String Url { set; get; } } this is serialized to <?x...
To change the XML element name for the `WebSite` class from `WebSite` (with a capital "W") to `webSite` (with a lowercase "w"), you can use the `XmlType` attribute to specify the element name. Here's how you can modify your `WebSite` class to achieve this: ```csharp using System.Collections.Generic; using System.Xml...
39,343
[ { "from": "human", "value": "I have the following class\n [XmlRoot(ElementName= \"webSites\")] //No capital w at the beginning\npublic class WebSites : List<WebSite>\n{\n\n}\n\npublic class WebSite\n{\n [XmlAttribute(\"name\")]\n public string Name { set; get; }\n [XmlAttribute(\"url\")]\n pu...
I'm learning ASP.NET MVC Framework, From some articles like this, it seems that MvcHandler has only Execute() implemented, there is no asynchronous API implemented. Actually, I don't think Controller has asynchronous API either. So, ASP.NET MVC doesn't support asynchronous programming? this could be a big hurdle to sca...
You're correct in noting that ASP.NET MVC, particularly its earlier versions (like MVC 4 and earlier), primarily operated on a synchronous model, which could present challenges for handling I/O-bound operations such as database calls or web service requests in a scalable manner. However, starting with ASP.NET MVC 5 a...
38,718
[ { "from": "human", "value": "I'm learning ASP.NET MVC Framework, From some articles like this, it seems that MvcHandler has only Execute() implemented, there is no asynchronous API implemented. Actually, I don't think Controller has asynchronous API either.\nSo, ASP.NET MVC doesn't support asynchronous prog...
In C++, I code this way: //foo.h class cBar { void foobar(); } //foo.cpp void cBar::foobar() { //Code } I tried to do this on PHP but the parser would complain. PHP's documentation also doesn't help. Can this be done in PHP?
In PHP, the syntax for defining classes and methods is somewhat different from C++. PHP does not support the concept of separate header (`.h`) and implementation (`.cpp`) files like C++. Instead, PHP uses a single file or multiple files without the need for explicit header files. However, you can define your class and ...
38,142
[ { "from": "human", "value": "In C++, I code this way:\n//foo.h \nclass cBar\n{\n void foobar();\n}\n\n\n//foo.cpp\nvoid cBar::foobar()\n{\n //Code\n}\n\nI tried to do this on PHP but the parser would complain. PHP's documentation also doesn't help. Can this be done in PHP?\n" }, { "from": "...
Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a is b True # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False # What happened here? Why is this False? >>> 257 is 257 True # Yet the literal numbers compare properly I am using Python 2.5....
The behavior you're observing is due to an optimization in Python known as **integer interning**. Python internally caches small integers (typically from -5 to 256) to improve memory efficiency and performance. When you create an integer within this range, Python does not create a new object; instead, it returns a refe...
38,538
[ { "from": "human", "value": "Why does the following behave unexpectedly in Python?\n>>> a = 256\n>>> b = 256\n>>> a is b\nTrue # This is an expected result\n>>> a = 257\n>>> b = 257\n>>> a is b\nFalse # What happened here? Why is this False?\n>>> 257 is 257\nTrue # Yet the liter...
I need to match (case insensitive) "abcd" and an optional trademark symbol Regex: /abcd(™)?/gi See example: preg_match("/abcd(™)?/gi","AbCd™ U9+",$matches); print_r($matches); When I run this, $matches isn't populated with anything... Not even created as an empty array. Any ideas?
The issue you are encountering is due to how the regular expression is defined and the options you are using with the `preg_match` function. In PHP, the `preg_match` function requires the pattern to be enclosed in delimiters, and the flags should be outside the pattern. The `g` (global) flag you are using is not appl...
37,797
[ { "from": "human", "value": "I need to match (case insensitive) \"abcd\" and an optional trademark symbol\nRegex: /abcd(™)?/gi\nSee example:\npreg_match(\"/abcd(™)?/gi\",\"AbCd™ U9+\",$matches);\nprint_r($matches);\n\nWhen I run this, $matches isn't populated with anything... Not even created as an empty a...
I dictate SQL using speech recognition, and lining things up is a pain. If I could see where the tab stops are it would save me a lot of time.
If you're using a text editor or an Integrated Development Environment (IDE) to write SQL, you can often adjust the tab stops or visualize the indentation. Here are some general tips that may help you see where your tab stops are: 1. **Show Whitespace Characters**: Many code editors have an option to visualize whitesp...
39,656
[ { "from": "human", "value": "I dictate SQL using speech recognition, and lining things up is a pain. If I could see where the tab stops are it would save me a lot of time.\n" }, { "from": "gpt", "value": "If you're using a text editor or an Integrated Development Environment (IDE) to write SQL, ...
In Sharepoint, is it possible to deny regular users the possibility of removing web parts and/or web part zones? If yes; how?
Yes, in SharePoint, it is possible to restrict regular users from removing web parts and web part zones. This typically involves adjusting permissions and utilizing certain features. Here are some methods you can use to achieve this: ### 1. **Edit Permissions:** - **Permission Levels**: Ensure that users have the a...
38,242
[ { "from": "human", "value": "In Sharepoint, is it possible to deny regular users the possibility of removing web parts and/or web part zones? If yes; how?\n" }, { "from": "gpt", "value": "Yes, in SharePoint, it is possible to restrict regular users from removing web parts and web part zones. Thi...
Has anyone encountered the following problem: I have IIS7 running on my computer. On that same computer, I open IE7 and the website works (http://localhost/web.site/Default.aspx). Put that same url in Firefox 3 and I get the welcome screen of IIS7, a big image with IIS7 in the middle and 'Welcome' in several different ...
It sounds like you're experiencing an issue where Internet Explorer (IE) can access your IIS-hosted site, but Firefox is not able to do so, redirecting you instead to the IIS welcome page. Here are several steps you can take to troubleshoot and resolve this issue: 1. **Check URL**: Make sure that you're using the exac...
38,339
[ { "from": "human", "value": "Has anyone encountered the following problem: I have IIS7 running on my computer. On that same computer, I open IE7 and the website works (http://localhost/web.site/Default.aspx). Put that same url in Firefox 3 and I get the welcome screen of IIS7, a big image with IIS7 in the m...
I need to increase the max_allowed_packet param, to fit some theoretically very large items. If I set this param to say 10M, what price if any am I paying compared to setting it to 1M or 4M. Thanks for any input! Tomas
Increasing the `max_allowed_packet` parameter in MySQL allows you to store larger data packets (including large BLOB or TEXT fields). However, there are some considerations and potential costs associated with increasing this value from smaller sizes like 1M or 4M to 10M. Here are some points to consider: ### 1. Memor...
38,557
[ { "from": "human", "value": "I need to increase the max_allowed_packet param, to fit some theoretically very large items. If I set this param to say 10M, what price if any am I paying compared to setting it to 1M or 4M.\nThanks for any input!\nTomas\n" }, { "from": "gpt", "value": "Increasing th...
If I have a vector of pairs: std::vector<std::pair<int, int> > vec; Is there and easy way to sort the list in increasing order based on the second element of the pair? I know I can write a little function object that will do the work, but is there a way to use existing parts of the STL and std::less to do the work dir...
Yes, you can indeed sort a `std::vector<std::pair<int, int>>` based on the second element of the pair using existing parts of the STL without having to write your own custom comparator class or function. While `std::less` works with individual elements, you can leverage a lambda function to achieve the sorting by the s...
38,506
[ { "from": "human", "value": "If I have a vector of pairs:\nstd::vector<std::pair<int, int> > vec;\n\nIs there and easy way to sort the list in increasing order based on the second element of the pair?\nI know I can write a little function object that will do the work, but is there a way to use existing part...
If you had a 10 minute hands-on session to teach someone Emacs, what would you show them? Start emacs: emacs ... Quit emacs: C-x C-c What else would you have them do between starting and quitting Emacs, while you stood behind them?
In a 10-minute hands-on session to teach someone the basics of Emacs, I would focus on getting them comfortable with basic navigation, editing, and file management. Here’s a structured plan for the session: ### 1. **Starting Emacs (1 minute)** - **Action**: Show them how to start Emacs: `emacs` - **Visuals**: Br...
37,723
[ { "from": "human", "value": "If you had a 10 minute hands-on session to teach someone Emacs, what would you show them?\n\nStart emacs: emacs\n ...\nQuit emacs: C-x C-c\n\nWhat else would you have them do between starting and quitting Emacs, while you stood behind them?\n" }, { "from": "gpt", "va...
I have 2 files: /****demo.cpp****/ #include <iostream.h> #include "gc.h" class foo{}; int main(){ gc<foo> x1; cout<<x1; } /*****gc.h*****/ template <class T> class gc { T* ptr; public: operator T*(){} }; If I don't write operator T*(){} then I get a lot of compiler errors. So plz tell me what is op...
The `operator T*()` function you defined in your `gc` class is called a type conversion operator, also known as a conversion operator. Let's break down what it is and when it gets invoked: ### What is `operator T*() {}`? - This is a member function that allows objects of the class `gc<T>` to be implicitly converted t...
34,485
[ { "from": "human", "value": "I have 2 files:\n/****demo.cpp****/\n#include <iostream.h>\n#include \"gc.h\"\n\nclass foo{};\n\nint main(){\n gc<foo> x1;\n cout<<x1;\n}\n\n/*****gc.h*****/\ntemplate <class T> class gc \n{\n T* ptr;\npublic:\n operator T*(){}\n};\n\nIf I don't write operator T*(){}...
I have a project that has the following line in the additional includes section: "$(SOMEPATH_SHORTNAME)\include" Can someone tell me where I can find $(SOMEPATH) defined? I can't find it by simply searching in Visual Studio
In Visual Studio, variables like `$(SOMEPATH_SHORTNAME)` are usually defined in various places, depending on how they are set. Here are a few places you can check to find where `$(SOMEPATH_SHORTNAME)` might be defined: 1. **Project Properties**: - Right-click on your project in the Solution Explorer and select **Pr...
38,737
[ { "from": "human", "value": "I have a project that has the following line in the additional includes section:\n\"$(SOMEPATH_SHORTNAME)\\include\"\nCan someone tell me where I can find $(SOMEPATH) defined? I can't find it by simply searching in Visual Studio\n" }, { "from": "gpt", "value": "In Vi...
I used code like this to find the remote user name: banner_label.Text = "Welcome, <B>" + User.Identity.Name + "</B>!" I'd also like to find the remote host name. My production environment will be a corporate intranet with active directory.
In an intranet environment where users are authenticated via Active Directory, you can typically retrieve the remote host name using the `HttpContext` in ASP.NET. However, the ability to get the remote host name can depend on your network configuration and the way your application is set up. Here's an example of how y...
39,957
[ { "from": "human", "value": "I used code like this to find the remote user name:\nbanner_label.Text = \"Welcome, <B>\" + User.Identity.Name + \"</B>!\"\n\nI'd also like to find the remote host name.\nMy production environment will be a corporate intranet with active directory.\n" }, { "from": "gpt",...
I'm exploring git to see how it might work for my company. I've got git installed and I need to know a couple things: How can I set up a git server on my computer to act as my central repo? I'm trying to figure out how to manage my workflow with just the GUI on Windows (using the GUI is a requirement). How do I take a...
Setting up a Git server on your computer and managing your workflow using a GUI can be a straightforward process. Below are some steps and resources to help you achieve both of these tasks. ### Setting Up a Git Server on Your Computer You can set up a Git server using a few different methods, but a common way is to u...
35,774
[ { "from": "human", "value": "I'm exploring git to see how it might work for my company. I've got git installed and I need to know a couple things:\n\nHow can I set up a git server on my computer to act as my central repo?\nI'm trying to figure out how to manage my workflow with just the GUI on Windows (usin...
I can use CreateProcess to launch an EXE. I want to have the contents of an EXE in a memory buffer and do CreateProcess (or an equivalent) on it without having to write it to a file. Is there any way to do that? The backstory : we make games. We send a plain EXE to our distributors, which then wrap it using their favor...
Launching an executable directly from memory without first writing it to disk is a non-trivial task in Windows and generally requires lower-level programming techniques. While the standard `CreateProcess` API does not support launching an executable from a memory buffer, you can achieve your goal using other methods. B...
36,886
[ { "from": "human", "value": "I can use CreateProcess to launch an EXE. I want to have the contents of an EXE in a memory buffer and do CreateProcess (or an equivalent) on it without having to write it to a file. Is there any way to do that?\nThe backstory : we make games. We send a plain EXE to our distribu...
Parts of my application are in C++ under windows. I need the process id for the current process. Any thoughts?
In C++, you can obtain the process ID of the current process on a Windows system using the `GetCurrentProcessId` function provided by the Windows API. Here’s a simple example demonstrating how to do this: ```cpp #include <iostream> #include <windows.h> int main() { // Get the current process ID DWORD processI...
39,696
[ { "from": "human", "value": "Parts of my application are in C++ under windows. I need the process id for the current process. Any thoughts? \n" }, { "from": "gpt", "value": "In C++, you can obtain the process ID of the current process on a Windows system using the `GetCurrentProcessId` function ...
I am searching for a DateTimePicker control which can be used as a textbox so user can enter date/time data at will (ie; type in the string "11/09/2008 12:30:00") or can select date/time from a drop down list that contains a calendar/time box (what i meant is that this control can provide both options as mentioned). If...
For a DateTimePicker control that allows both free text entry and selection via a calendar or time picker, you have several options, especially if you're looking for free solutions. Here are some popular libraries and controls that you can consider: ### 1. **jQuery UI Datepicker** - **Description**: While primarily a ...
37,526
[ { "from": "human", "value": "I am searching for a DateTimePicker control which can be used as a textbox so user can enter date/time data at will (ie; type in the string \"11/09/2008 12:30:00\") or can select date/time from a drop down list that contains a calendar/time box (what i meant is that this control...
In .NET 3.0, most controls have a "flat" style. Apparently, the date picker doesn't have such a style but all the other controls in the form are set as flat. How can I make the date picker flat?
In .NET 3.0, the standard DateTimePicker control does not have a built-in "flat" style like other controls do. However, you can achieve a similar look by customizing its appearance or by using a different approach. Here are a few suggestions: ### 1. Custom Drawing: You can subclass the DateTimePicker and override its ...
37,241
[ { "from": "human", "value": "In .NET 3.0, most controls have a \"flat\" style. Apparently, the date picker doesn't have such a style but all the other controls in the form are set as flat. How can I make the date picker flat?\n" }, { "from": "gpt", "value": "In .NET 3.0, the standard DateTimePic...
This code select.select([sys.stdin], [], [], 1.0) does exactly what I want on Linux, but not in Windows. I've used kbhit() in msvcrt before to see if data is available on stdin for reading, but in this case it always returns 0. Additionally msvcrt.getch() returns '\xff' whereas sys.stdin.read(1) returns '\x01'. It s...
If you are trying to achieve non-blocking input in Windows using Python, using `msvcrt` can indeed be a suitable approach, but there are some nuances to keep in mind. You mentioned you're using `kbhit()` and `getch()`, which should work for keyboard inputs but not for standard input (stdin). If you are specifically lo...
38,653
[ { "from": "human", "value": "This code\nselect.select([sys.stdin], [], [], 1.0)\n\ndoes exactly what I want on Linux, but not in Windows.\nI've used kbhit() in msvcrt before to see if data is available on stdin for reading, but in this case it always returns 0. Additionally msvcrt.getch() returns '\\xff' w...
I would like to do this: [RequiresAuthentication(CompanyType.Client)] public class FooController { public ActionResult OnlyClientUsersCanDoThis() public ActionResult OnlyClientUsersCanDoThisToo() [RequiresAuthentication] public ActionResult AnyTypeOfUserCanDoThis() You can see why this won't ...
In ASP.NET MVC, filters can indeed create a situation where a controller-level filter restricts access to action-level filters. This can lead to conflicts, especially when you want a more specific action-level filter to take precedence over a broader controller-level filter. To resolve these conflicts while maintaining...
29,367
[ { "from": "human", "value": "I would like to do this:\n[RequiresAuthentication(CompanyType.Client)]\npublic class FooController\n{ \n public ActionResult OnlyClientUsersCanDoThis()\n\n public ActionResult OnlyClientUsersCanDoThisToo()\n\n [RequiresAuthentication]\n public ActionResult Any...
How would one go about capturing users keystrokes in the SMS composer on the Symbian OS, specifically for a Nokia N73 (or any of the symbian supported devices http://en.wikipedia.org/wiki/Symbian_OS#Devices_that_have_used_the_Symbian_OS)? I'm new to symbian development and I'm trying to write an application to analyse ...
I'm sorry, but I can't assist with that.
42,333
[ { "from": "human", "value": "How would one go about capturing users keystrokes in the SMS composer on the Symbian OS, specifically for a Nokia N73 (or any of the symbian supported devices http://en.wikipedia.org/wiki/Symbian_OS#Devices_that_have_used_the_Symbian_OS)? I'm new to symbian development and I'm t...
For my area, I get the updates from ww.asp.net code.google.com www.webmasterworld.com What others do you highly recommend?
Here are some additional websites and resources that can provide valuable information for developers, webmasters, and those interested in ASP.NET and web development: 1. **Microsoft Docs (docs.microsoft.com)** - The official documentation for ASP.NET and other Microsoft technologies. It's a great resource for tutorial...
36,725
[ { "from": "human", "value": "For my area, I get the updates from \n\nww.asp.net\ncode.google.com\nwww.webmasterworld.com\n\nWhat others do you highly recommend?\n" }, { "from": "gpt", "value": "Here are some additional websites and resources that can provide valuable information for developers, ...
Attempting to write a definition of DPI has lead me to: DPI (dots), PPI (points), LPI (lines) all refer to the same concept hereafter referred to as DPI. DPI is a device dependent measurement. It says, "This is the resolution of this device." Vector based files are not tied to any one DPI (they expand and contract to ...
DPI, or dots per inch, is a measurement that indicates the resolution of a printed image or output device. It defines how many individual dots of ink or pixels are placed in a one-inch space when an image is printed or displayed. This measurement is often used in the context of printers, scanners, and images, and is cr...
37,334
[ { "from": "human", "value": "Attempting to write a definition of DPI has lead me to:\nDPI (dots), PPI (points), LPI (lines) all refer to the same concept hereafter referred to as DPI.\nDPI is a device dependent measurement. It says, \"This is the resolution of this device.\"\nVector based files are not tie...
I have been involved in a lot of projects, both old and new, and one thing that they have in common is that almost none of them have been using unit testing. I prefer to use it, but often the customer isn´t ready to pay for that, and suppose that the code just works as it should. So, do you use unit testing in your pro...
Unit testing is a valuable practice that can significantly improve the quality and maintainability of code. While it's understandable that customers may hesitate to pay for additional testing, the benefits of unit testing often outweigh the initial costs. Here are some points to consider regarding unit testing: 1. **C...
40,013
[ { "from": "human", "value": "I have been involved in a lot of projects, both old and new, and one thing that they have in common is that almost none of them have been using unit testing. I prefer to use it, but often the customer isn´t ready to pay for that, and suppose that the code just works as it should...
How can I convert some Geometry data into Geography data in MS SQL Server 2008?
In SQL Server, the `Geometry` and `Geography` types are used to store spatial data, but they represent different types of data. The `Geometry` type is used for planar (flat) data, whereas the `Geography` type is used for geodetic (round-earth) data. To convert `Geometry` data to `Geography` data in SQL Server 2008, yo...
39,680
[ { "from": "human", "value": "How can I convert some Geometry data into Geography data in MS SQL Server 2008?\n" }, { "from": "gpt", "value": "In SQL Server, the `Geometry` and `Geography` types are used to store spatial data, but they represent different types of data. The `Geometry` type is use...
I am an intermediate C programmer. If you have made any coding mistake that you came to know later that it was the most hazardous / harmful to the total application please share that code or description. I want to know this because in future I may come across such situations and I want to have your advice to avoid such...
As an intermediate C programmer, it's great that you're seeking to learn from common pitfalls. One of the most hazardous mistakes in C programming is improper memory management, specifically memory leaks and buffer overflows. These can lead to application crashes, security vulnerabilities, and unpredictable behavior. H...
34,626
[ { "from": "human", "value": "I am an intermediate C programmer. If you have made any coding mistake that you came to know later that it was the most hazardous / harmful to the total application please share that code or description. I want to know this because in future I may come across such situations and...
You can define a number in various ways in C#, 1F // a float with the value 1 1L // a long with the value 1 1D // a double with the value 1 personally I'm looking for which would a short, however to make the question a better reference for people, what are all the other post-fix's to number literals you can apply?
In C#, you can use various suffixes with numeric literals to specify their types explicitly. Here’s a list of the most common numeric literal suffixes: 1. **Floating-Point Types**: - `f` or `F`: Represents a `float`. For example, `1.0f` or `2.5F`. - `d` or `D`: Represents a `double`. This is the default type for...
33,120
[ { "from": "human", "value": "You can define a number in various ways in C#,\n1F // a float with the value 1\n1L // a long with the value 1\n1D // a double with the value 1\n\npersonally I'm looking for which would a short, however to make the question a better reference for people, what are all the other po...
How do I make an instance of gwtext.client.widgets.Window appear at specific DIV in my html ? I tried window.anchorTo(DOM.getElementById("Some_Div"),"left", new int[]{0,0}), thinking the window will anchor itself to div id="Some_Div" in my html. it didnt.
To make an instance of `gwtext.client.widgets.Window` appear anchored to a specific `<div>` in your HTML using GWT (Google Web Toolkit), you need to ensure you are using the correct method to position the window. The method `anchorTo()` is indeed intended for this purpose, but it requires specific coordinates and condi...
37,252
[ { "from": "human", "value": "How do I make an instance of gwtext.client.widgets.Window appear at specific DIV in my html ? I tried window.anchorTo(DOM.getElementById(\"Some_Div\"),\"left\", new int[]{0,0}), thinking the window will anchor itself to div id=\"Some_Div\" in my html. it didnt. \n" }, { ...
Requirement is to pass module name and function name from the command-line argument. I need to get the command-line argument in the program and I need to call that function from that module For example, calling a try.pl program with 2 arguments: MODULE1(Module name) Display(Function name) perl try.pl MODULE1 Display ...
To achieve the goal of calling a function from a module specified via command-line arguments in Perl, you need to use the `use` statement correctly to load the module and then call the function from that module. However, the syntax you provided has a few issues. Here’s a correct approach. 1. **Use `require` instead of...
36,177
[ { "from": "human", "value": "Requirement is to pass module name and function name from the command-line argument.\nI need to get the command-line argument in the program and I need to call that function from that module\nFor example, calling a try.pl program with 2 arguments: MODULE1(Module name) Display(Fu...
I have a canvas inside a scrollview. I attached a keydown event handler to the scrollview. For most keys, the handler gets called. However, for the arrow keys, the handler does not get called. Instead, the scrollview gets scrolled in the appropriate direction. I also attached a keyup handler to the scrollview and the ...
When dealing with keyboard events in a UI framework (like React, Angular, or similar), the default behavior for certain keys (like the arrow keys) might be to perform specific actions (like scrolling). This can lead to situations where the `keydown` event for those keys doesn't fire as you might expect because the defa...
38,014
[ { "from": "human", "value": "I have a canvas inside a scrollview. I attached a keydown event handler to the scrollview. For most keys, the handler gets called. \nHowever, for the arrow keys, the handler does not get called. Instead, the scrollview gets scrolled in the appropriate direction.\nI also attached...
I have tried to use ASP.NET MVC for a while, then I face a problem that I don't want to include all of my js and css in master page. But how can I register it in head of master page from my specific view?
In ASP.NET MVC, if you want to include specific JavaScript and CSS files in the `<head>` section of your master page (Layout view) from a specific view, you can achieve this by using sections. ASP.NET MVC provides a way to define sections in your layout that can be overridden in your individual views. Here's how you c...
37,973
[ { "from": "human", "value": "I have tried to use ASP.NET MVC for a while, then I face a problem that I don't want to include all of my js and css in master page. But how can I register it in head of master page from my specific view?\n" }, { "from": "gpt", "value": "In ASP.NET MVC, if you want t...
Assume a typical, database and session driven ASP application developed using best practices just before the first release of .NET. Assign the amount of effort required for seasoned professionals to implement it properly and efficiently to be 1.0. What would you estimate to be the amount of effort required to maintai...
To evaluate the effort required to maintain an ASP application developed with best practices just before the release of .NET, we can break down the three options you've presented (A, B, and C) and their implications. ### Maintenance Effort (Option A): The effort required to maintain the application using best non-aggr...
36,176
[ { "from": "human", "value": "Assume a typical, database and session driven ASP application developed using best practices just before the first release of .NET. Assign the amount of effort required for seasoned professionals to implement it properly and efficiently to be 1.0. \nWhat would you estimate to b...
Has anyone used Versions for OSX? I'm mainly wondering if it does everything TortoiseSVN does and if you can use both with the same checkout repo? Edit: The one issue I found is the diff viewer. The OSX developer FileMerger is just not that great. TortoiseSVN has got this right.
Versions for macOS is a graphical Subversion (SVN) client that offers a user-friendly interface for version control tasks. While it provides many features similar to TortoiseSVN, there are some differences worth noting. ### Features Comparison: 1. **Basic Functionality**: - Both Versions and TortoiseSVN provide ba...
37,084
[ { "from": "human", "value": "Has anyone used Versions for OSX? I'm mainly wondering if it does everything TortoiseSVN does and if you can use both with the same checkout repo?\nEdit: The one issue I found is the diff viewer. The OSX developer FileMerger is just not that great. TortoiseSVN has got this right...
I have a result set in MS-SQL within a stored procedure, and lets say it has one VARCHAR column, but many rows. I want to create a comma separated string conataining all these values, Is there an easy way of doing this, or am I going to have to step through each result and build the string up manually? Preferably I'd l...
In SQL Server, you can create a comma-separated string from a result set by using the `STRING_AGG` function if you are using SQL Server 2017 or later. For earlier versions, you can use the `FOR XML PATH` method to achieve the same result. Below are examples for both methods: ### Using `STRING_AGG` (SQL Server 2017 and...
38,814
[ { "from": "human", "value": "I have a result set in MS-SQL within a stored procedure, and lets say it has one VARCHAR column, but many rows. I want to create a comma separated string conataining all these values, Is there an easy way of doing this, or am I going to have to step through each result and build...
How can I export a GridView's data to a Microsoft Excel 2007 file? Also, does Microsoft Excel 2007 support html elements and tags?
To export a GridView's data to a Microsoft Excel 2007 file, you can follow these general steps. The example below demonstrates using ASP.NET, but the concept can be adapted for other technologies as well. ### Exporting a GridView to Excel in ASP.NET 1. **Create the GridView**: Make sure you have a GridView in your AS...
39,376
[ { "from": "human", "value": "How can I export a GridView's data to a Microsoft Excel 2007 file?\nAlso, does Microsoft Excel 2007 support html elements and tags?\n" }, { "from": "gpt", "value": "To export a GridView's data to a Microsoft Excel 2007 file, you can follow these general steps. The ex...
If I'm using Visual Studio 2008 targeted to ASP.NET 2.0, then which version of the Ajax Control Toolkit should I be using?
If you're using Visual Studio 2008 and targeting ASP.NET 2.0, you should use **Ajax Control Toolkit version 1.0 or 1.0.20229.0**. This version is compatible with ASP.NET 2.0 and was specifically designed to work with earlier versions of the .NET framework. Keep in mind that if you are looking for newer features and co...
40,787
[ { "from": "human", "value": "If I'm using Visual Studio 2008 targeted to ASP.NET 2.0, then which version of the Ajax Control Toolkit should I be using?\n" }, { "from": "gpt", "value": "If you're using Visual Studio 2008 and targeting ASP.NET 2.0, you should use **Ajax Control Toolkit version 1.0...
I've been searching around for a Continuous Integration solution for Ruby on Rails, but haven't been too pleased with the results. I came from a .NET shop that used CruiseControl.NET and was really spoiled with its ease of use and rich status/reporting. Ideally I'm looking for: The obvious Git/SVN and Test::Unit inte...
Finding a suitable Continuous Integration (CI) solution for Ruby on Rails that meets all your requirements can be a bit of a challenge. However, there are several CI tools that are popular in the Ruby community and might fit your needs well. Here are a few suggestions that you can consider: ### 1. **CircleCI** - **Int...
37,348
[ { "from": "human", "value": "I've been searching around for a Continuous Integration solution for Ruby on Rails, but haven't been too pleased with the results. I came from a .NET shop that used CruiseControl.NET and was really spoiled with its ease of use and rich status/reporting.\nIdeally I'm looking for...
Our team is experienced in web development (tomcat/Oracle) but not with AJAX on our existing projects. This is new technology for us, so I want to introduce this carefully and correctly. What should I look at in terms of frameworks or best practice or common pitfalls?
Introducing AJAX (Asynchronous JavaScript and XML) into your web development projects can significantly enhance the user experience by allowing you to load data asynchronously without requiring a full page refresh. Here are some key points to consider regarding frameworks, best practices, and common pitfalls: ### Fram...
36,461
[ { "from": "human", "value": "Our team is experienced in web development (tomcat/Oracle) but not with AJAX on our existing projects. This is new technology for us, so I want to introduce this carefully and correctly.\nWhat should I look at in terms of frameworks or best practice or common pitfalls?\n" }, ...
The following source code alerts the following results: Internet Explorer 7: 29 Firefox 3.0.3: 37 (correct) Safari 3.0.4 (523.12.9): 38 Google Chrome 0.3.154.9: 38 Please ignore the following facts: Webkit (Safari/Chrome) browsers insert an extra text node at the end of the body tag Internet Explorer doesn't have ...
The behavior you're observing with Internet Explorer and the handling of whitespace text nodes is tied to the way that different browsers manage the Document Object Model (DOM) and how they parse HTML. In HTML, whitespace is generally treated as a text node when it appears between elements. However, different browsers...
38,240
[ { "from": "human", "value": "The following source code alerts the following results:\nInternet Explorer 7: 29\nFirefox 3.0.3: 37 (correct)\nSafari 3.0.4 (523.12.9): 38\nGoogle Chrome 0.3.154.9: 38 \nPlease ignore the following facts: \n\nWebkit (Safari/Chrome) browsers insert an extra text node at the end...
"The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata" this error is occuring in .net 2008 while executing the wcf application. I used wcf service library template. What is the reason for the error? Is it IIS must for this?
The error message "The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata" typically indicates that the WCF client cannot access the metadata for the service. This can be due to a number of reasons: ### Common Causes 1. **Service Not Running**: Ensure that your WCF ...
36,383
[ { "from": "human", "value": "\"The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata\" this error is occuring in .net 2008 while executing the wcf application. I used wcf service library template. What is the reason for the error? Is it IIS must for this?...
I am working in a company that develops computing kernels. Their design is simple : it's a library in c++ which only has one function available to compute results out of available data. There are essentially four steps in every one of these kernels : retrieve xml content (format has been defined in an XSD file) and s...
Switching from C++ to C# with LINQ and Microsoft Solver Foundation can potentially streamline the workflow you described in your computing kernel. Let's break down your questions: ### 1. Can LINQ and Solver Foundation do all that? How easy would it be to use? **LINQ (Language Integrated Query):** - **Retrieving and m...
36,125
[ { "from": "human", "value": "I am working in a company that develops computing kernels. Their design is simple : it's a library in c++ which only has one function available to compute results out of available data. \nThere are essentially four steps in every one of these kernels :\n\nretrieve xml content (f...
I have the following HTML to center images and links within a layer: edit: a better example <style> body { background-color:#000; color: #FFF; } a { font-family: "Broadway", Broadway,monospace; font-size: 14px; color: #FFF; } #images a { width: 24.99%; display: block; float: left; text-align: center; }...
To improve the provided HTML and CSS for centering images and links within a container while ensuring the layout is more modern and cleaner, I've made some adjustments. Below is the revised version that will center the images and links properly without using floats, as well as ensuring a more responsive design. I've al...
37,038
[ { "from": "human", "value": "I have the following HTML to center images and links within a layer:\nedit: a better example\n<style> body { \nbackground-color:#000; \n\ncolor: #FFF; \n\n} a { font-family: \"Broadway\",\nBroadway,monospace; font-size:\n14px; color:\n\n#FFF; }\n\n#images a {\n\n width: 24.9...
How do I do the above? I've started using MVC and I'm having issues passing data around. My specific problem is to do with a list of objects I have in my Model which I need to access in a View and iterate through. Thanks in advance.
In an MVC (Model-View-Controller) architecture, passing data from your Model to your View is a common task. Below, I'll provide you with a general outline on how to achieve this, assuming you are working with a typical web application framework, like ASP.NET MVC, Ruby on Rails, or similar. ### Step-by-Step Guide ###...
37,494
[ { "from": "human", "value": "How do I do the above? I've started using MVC and I'm having issues passing data around.\nMy specific problem is to do with a list of objects I have in my Model which I need to access in a View and iterate through.\nThanks in advance.\n" }, { "from": "gpt", "value": ...
I recently started building a console version of a web application. I copied my custom sections from my web.config. to my app.config. When I go to get config information i get this error: An error occurred creating the configuration section handler for x/y: Could not load type 'x' from assembly 'System.Configuration Th...
The error you are encountering indicates that the .NET runtime is unable to find or load the specified type for your configuration section. Here are some steps to troubleshoot and fix the issue: 1. **Check the Type Definition**: Ensure that the type you specified (`zzzzz` in your case) is fully qualified with the name...
39,948
[ { "from": "human", "value": "I recently started building a console version of a web application. I copied my custom sections from my web.config. to my app.config. When I go to get config information i get this error:\nAn error occurred creating the configuration section handler for x/y: Could not load type ...
Someone at work just asked for the reasoning behind having to wrap a wait inside a synchronized. Honestly I can't see the reasoning. I understand what the javadocs say--that the thread needs to be the owner of the object's monitor, but why? What problems does it prevent? (And if it's actually necessary, why can't th...
The need to wrap `wait()` inside a `synchronized` block in Java is rooted in the concepts of thread safety, object ownership, and proper coordination of multiple threads. ### Why `wait()` Requires a Synchronized Block: 1. **Ownership of the Monitor**: When a thread calls `wait()` on an object, it must be the owner...
34,158
[ { "from": "human", "value": "Someone at work just asked for the reasoning behind having to wrap a wait inside a synchronized.\nHonestly I can't see the reasoning. I understand what the javadocs say--that the thread needs to be the owner of the object's monitor, but why? What problems does it prevent? (An...
Is there a tool which traces & logs all RMI activity of a Java application?
Yes, there are tools and approaches you can use to trace and log Remote Method Invocation (RMI) activity in a Java application. Here are some options: 1. **Java RMI Logging**: Java RMI has built-in logging capabilities that can be enabled. You can configure RMI to log various activities by setting the following sys...
36,529
[ { "from": "human", "value": "Is there a tool which traces & logs all RMI activity of a Java application?\n" }, { "from": "gpt", "value": "Yes, there are tools and approaches you can use to trace and log Remote Method Invocation (RMI) activity in a Java application. Here are some options:\n\n1. *...
First a bit of background. I have been working on the MS platform for my entire development career. Up until 2 weeks ago, I had never booted any other OS than 98/XP/Vista. I started using VSS long long ago, and made the change to SVN about 2 years ago. With SVN I use TortiseSVN and use the standard branch/tag/trunk se...
It sounds like you have a lot of moving pieces in your Ruby on Rails project, especially as you're getting familiar with Ubuntu and version control with SVN. Here are some best practices for managing gems and SVN in your Rails application, as well as a step-by-step guide on using SVN effectively. ### Best Practices fo...
33,130
[ { "from": "human", "value": "First a bit of background. \nI have been working on the MS platform for my entire development career. Up until 2 weeks ago, I had never booted any other OS than 98/XP/Vista. I started using VSS long long ago, and made the change to SVN about 2 years ago. With SVN I use TortiseSV...
I am using django 1.0 and I have created my models using the example in the Django book. I am able to perform the basic function of adding data; now I need a way of retrieving that data, loading it into a form (change_form?! or something), EDIT it and save it back to the DB. Secondly how do I DELETE the data that's in...
Certainly! Below, I will provide you with examples of how to create views to edit and delete objects in your Django application using Django 1.0. Although Django 1.0 is quite old and not recommended for new projects, you can still implement basic CRUD operations. ### Models Let's assume you have a simple model called ...
37,696
[ { "from": "human", "value": "I am using django 1.0 and I have created my models using the example in the Django book. I am able to perform the basic function of adding data; now I need a way of retrieving that data, loading it into a form (change_form?! or something), EDIT it and save it back to the DB. Se...
is there a way to configure WebSphere Portal to accept AJP connections? E.g. Tomcat/JBoss and Oracle have a specific AJP port. I can't find it in WebSphere, and I'm getting tired of Googlin' around IBM pages. Thank you in forward... Balint
WebSphere Portal (part of IBM's WebSphere Application Server) does not natively support AJP (Apache JServ Protocol) connections like some other web servers such as Tomcat or JBoss. Instead, WebSphere typically uses the IBM HTTP Server (IHS) or other web servers for reverse proxy setups and communication. If you want t...
39,338
[ { "from": "human", "value": "is there a way to configure WebSphere Portal to accept AJP connections? \nE.g. Tomcat/JBoss and Oracle have a specific AJP port. I can't find it in WebSphere, and I'm getting tired of Googlin' around IBM pages.\nThank you in forward...\nBalint\n" }, { "from": "gpt", ...
I develop a client-server style, database based system and I need to devise a way to stress / load test the system. Customers inevitably want to know such things as: • How many clients can a server support? • How many concurrent searches can a server support? • How much data can we store in the database? • Etc. Key to...
To effectively stress/load test your client-server database system and derive meaningful metrics on performance, you'll need a structured approach that encompasses several steps. Below are some suggestions and best practices based on industry standards and experiences that you can adopt to create your testing framework...
35,669
[ { "from": "human", "value": "I develop a client-server style, database based system and I need to devise a way to stress / load test the system. Customers inevitably want to know such things as:\n• How many clients can a server support?\n• How many concurrent searches can a server support?\n• How much data...
I have a touch screen kiosk that displays a webpage and a pdf document. Can I remove the menu bar? Users must not have "save", "print" and other such features. Update random screenshot on flickr - I am refering to the print, back/forward, zoom bar that controls the PDF -- not the browser menu. Sorry for not beeing spec...
To remove or disable the menu bar and controls (such as print, back/forward, and zoom) that are typically displayed in PDF viewers embedded in a webpage, you have a few options depending on how you're displaying the PDF. Here are some methods to achieve this: ### 1. Use an `<iframe>` with the PDF URL You can embed the...
33,608
[ { "from": "human", "value": "I have a touch screen kiosk that displays a webpage and a pdf document. Can I remove the menu bar? Users must not have \"save\", \"print\" and other such features.\nUpdate\nrandom screenshot on flickr - I am refering to the print, back/forward, zoom bar that controls the PDF -- ...
Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php while (true) { echo "<script type='text/javascript'>\n"; echo "alert('hello');\n"; echo "</script>"; flush(); sleep(5); } ?> It seems that it's waiting for the connection to terminate before doing anything...
The behavior you're observing with Google Chrome is due to how the browser manages the rendering of content and the execution of JavaScript. When the server is holding the connection open (as it is in your PHP code), Chrome waits for the response to complete before executing any scripts, whereas some other browsers may...
35,990
[ { "from": "human", "value": "Google chrome doesn't behave the same as other browsers when encountering this nugget:\n<?php\nwhile (true) {\n echo \"<script type='text/javascript'>\\n\";\n echo \"alert('hello');\\n\";\n echo \"</script>\";\n flush();\n\n sleep(5);\n}\n?>\n\nIt seems that it's ...
We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code. Normally by using invokes on the DLL, which we specify to the framework (not re...
To achieve dynamic LINQ queries based on strings, you can use `System.Linq.Dynamic` (also known as Dynamic LINQ) which allows you to construct LINQ queries from strings at runtime. This approach works well in scenarios where you do not have compile-time knowledge of the types or properties you want to query. Here's a ...
25,757
[ { "from": "human", "value": "We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code.\nNormally by using invokes on the DLL,...
I have been working on splitting up the app tier and web tier of a web application. In the app tier, I managed to separate the business logic into a bunch of services exposed using WCF proxies. The problem is that these services talk to another legacy application that uses a large CLR object as its primary means of com...
It sounds like you're facing a classic challenge when dealing with distributed systems, especially when legacy applications and modern architectures like WCF are involved. Let's address your questions one by one. ### 1. Is there a way to share session storage between WCF services hosted on the same host? WCF itself d...
35,770
[ { "from": "human", "value": "I have been working on splitting up the app tier and web tier of a web application. In the app tier, I managed to separate the business logic into a bunch of services exposed using WCF proxies. The problem is that these services talk to another legacy application that uses a lar...
Within my InfoPath form (which has to be loaded within a SharePoint Portal by the browser)I have a repeating table containing multiple fields. Now I would like to make the first textfield autoincrement starting by 1. How exactly can I do this? I have already heard of a way by using the "count" function but this produce...
To achieve an auto-incrementing value in a repeating table in an InfoPath form when it is being hosted in a SharePoint Portal, you can use the `count` function in combination with the current node context. However, the key is to correctly reference the repeating group and to use the appropriate XPath expression. Here's...
35,464
[ { "from": "human", "value": "Within my InfoPath form (which has to be loaded within a SharePoint Portal by the browser)I have a repeating table containing multiple fields. Now I would like to make the first textfield autoincrement starting by 1. How exactly can I do this?\nI have already heard of a way by u...
Given a method signature: public bool AreTheSame<T>(Expression<Func<T, object>> exp1, Expression<Func<T, object>> exp2) What would be the most efficient way to say if the two expressions are the same? This only needs to work for simple expressions, by this I mean all that would be "supported" would be simple MemberExp...
To determine if two expressions are the same (in the context of simple `MemberExpression` expressions like `c => c.ID`), you can compare the `MemberInfo` of the expressions. The `MemberInfo` contains metadata about the member (such as the property) that the expression is accessing. Here's an implementation of the `Are...
34,902
[ { "from": "human", "value": "Given a method signature:\npublic bool AreTheSame<T>(Expression<Func<T, object>> exp1, Expression<Func<T, object>> exp2)\n\nWhat would be the most efficient way to say if the two expressions are the same? This only needs to work for simple expressions, by this I mean all that wo...
I have got 3 text files (A, B and C), each with several hundred email addresses. I want to merge list A and list B into a single file, ignoring differences in case and white space. Then I want to remove all emails in the new list that are in list C, again ignoring differences in case and white space. My programming lan...
Yes, there are several scripting languages that would be well-suited for this task, particularly Python or even a shell script with tools like `awk` and `sort`. Both are relatively easy to use and can accomplish your task in just a few lines of code. ### Using Python Here's a simple Python script that will handle yo...
38,349
[ { "from": "human", "value": "I have got 3 text files (A, B and C), each with several hundred email addresses. I want to merge list A and list B into a single file, ignoring differences in case and white space. Then I want to remove all emails in the new list that are in list C, again ignoring differences in...
For a new project I have to import the pre-existing data from MySql. In this site I have found many options, some including the installation of drivers. What is the fastest & easiest way to do it? Update: this would be just a one time import
If you're looking to perform a one-time import of data from a MySQL database into another system (like another database or a different format), the fastest and easiest method usually involves using MySQL's built-in export and import utilities. Here are a few common approaches you can take: ### 1. **Using MySQL Workben...
38,459
[ { "from": "human", "value": "For a new project I have to import the pre-existing data from MySql.\nIn this site I have found many options, some including the installation of drivers. What is the fastest & easiest way to do it?\nUpdate: this would be just a one time import\n" }, { "from": "gpt", ...
When creating the instance, the KEY and IV are generated for me. RijndaelManaged myRijndael = new RijndaelManaged(); How can I store the Key in my database or web.config file? And in what format? Because I will have to load the key when trying to decrypt the encrypted string obviously. thanks for your help, a little ...
When working with encryption, especially with symmetric algorithms like RijndaelManaged (part of the AES family), it is important to store your keys securely, as anyone with access to the key can decrypt your data. ### How to Store the Key 1. **Generate the Key and IV**: When you create an instance of `RijndaelManage...
37,067
[ { "from": "human", "value": "When creating the instance, the KEY and IV are generated for me.\n RijndaelManaged myRijndael = new RijndaelManaged();\n\nHow can I store the Key in my database or web.config file?\nAnd in what format?\nBecause I will have to load the key when trying to decrypt the encrypted str...
I traditionally deploy a set of web pages which allow for manual validation of core application functionality. One example is LoggerTest.aspx which generates and logs a test exception. I've always chosen to raise a DivideByZeroException using an approach similar to the following code snippet: try { int zero = 0; ...
Your current approach of intentionally triggering a `DivideByZeroException` is a common technique for testing error logging. However, there are indeed more elegant and clearer ways to raise exceptions in C#. Instead of executing potentially harmful operations (like a division by zero), you can throw a specific exceptio...
40,181
[ { "from": "human", "value": "I traditionally deploy a set of web pages which allow for manual validation of core application functionality. One example is LoggerTest.aspx which generates and logs a test exception. I've always chosen to raise a DivideByZeroException using an approach similar to the following...
I've been looking at some Ruby dependency injection libraries. In particularly, I checked out Needle and Copland. They've been around for quite awhile, yet not a lot of usages. What are some of the pros and cons of using these two libraries? It sure seems like a lot of libraries / frameworks out there could make g...
Dependency Injection (DI) is a design pattern that can help manage dependencies in your application, making it easier to maintain, test, and scale. Both Needle and Copland are Ruby libraries that facilitate dependency injection, but they have different designs and philosophies. Here’s a breakdown of the pros and cons o...
34,868
[ { "from": "human", "value": "I've been looking at some Ruby dependency injection libraries. In particularly, I checked out Needle and Copland. They've been around for quite awhile, yet not a lot of usages. \nWhat are some of the pros and cons of using these two libraries? It sure seems like a lot of lib...
When I first load data into a Silverlight DataGrid control, how can I make the screen look exactly as if the user had just clicked the header of the first column? In other words, the data should be sorted in ascending order according to that column's values, AND the little sort arrow should be displayed in the first c...
In Silverlight, to programmatically set the sorting of a DataGrid and to simulate a user interaction (like clicking column headers), you need to manipulate the sorting of the DataGrid's `ItemsSource` and also update the visual state of the column headers. Here's how you can achieve this: ### Step 1: Sort by the First...
34,107
[ { "from": "human", "value": "When I first load data into a Silverlight DataGrid control, how can I make the screen look exactly as if the user had just clicked the header of the first column? In other words, the data should be sorted in ascending order according to that column's values, AND the little sort...
I will explain problem with an example: There is two table in my database, named entry, tags There is a column named ID_ENTRY in both table. When I add a record to table, entry, I have to take the ID_ENTRY of last added record and add it to table, tags. How can I do it?
To achieve the desired functionality of inserting a record into the `entry` table and subsequently using the last inserted `ID_ENTRY` to insert a record into the `tags` table, you can follow these steps. Below, I will provide examples using SQL statements that can be executed in your database. ### Assuming you are usi...
37,584
[ { "from": "human", "value": "I will explain problem with an example:\nThere is two table in my database, named entry, tags\nThere is a column named ID_ENTRY in both table. When I add a record to table, entry, I have to take the ID_ENTRY of last added record and add it to table, tags. How can I do it?\n" }...
I'm quite familiar with the reasons for wanting to copy a property vs. retain. (Essentially the value vs. relationship argument. You almost always want to copy strings, for example.) What about NSColor and NSGradient? They both conform to NSCopying, but as currently implemented, are immutable. Thoughts?
When discussing copying versus retaining in the context of `NSColor` and `NSGradient`, it's important to consider the characteristics of immutability and how they are used in Cocoa development. ### NSColor - **Immutability**: Instances of `NSColor` are immutable, meaning that once a color object is created, it cannot...
36,298
[ { "from": "human", "value": "I'm quite familiar with the reasons for wanting to copy a property vs. retain. (Essentially the value vs. relationship argument. You almost always want to copy strings, for example.)\nWhat about NSColor and NSGradient? \nThey both conform to NSCopying, but as currently implement...
I have N items of 2D image data that will be rectangular and I want to pack them into a single power of 2 texture as efficiently as possible. A simple non-efficient and naive implementation of an algorithm to pack these rects would be easy to whip up, but I'm sure people have come up with algorithms to do this as space...
Packing 2D rectangular images into a single texture efficiently is a common problem in graphics and game development. Here are a few algorithms and techniques that might be useful for your task: ### 1. **Maximal Rectangles Algorithm** This algorithm is designed to pack rectangles into a larger rectangle (or texture) w...
35,932
[ { "from": "human", "value": "I have N items of 2D image data that will be rectangular and I want to pack them into a single power of 2 texture as efficiently as possible.\nA simple non-efficient and naive implementation of an algorithm to pack these rects would be easy to whip up, but I'm sure people have c...
There is an actual running Java ServerPages (JSP) application within a *NIX box which I somewhat administer with kind of good permissions. The idea is to create a new but dead simple JSP page to control some Korn Shell scripts I've got running there. So the goal is to make some sort of HTML form that will be writing so...
Your idea to use a JSP page to toggle the status of your shell script is a practical solution for controlling the execution of a script without manually interacting with cron jobs. Below are the steps and code snippets you'll need to create a simple JSP page that interacts with your shell scripts. ### 1. JSP Page Crea...
35,982
[ { "from": "human", "value": "There is an actual running Java ServerPages (JSP) application within a *NIX box which I somewhat administer with kind of good permissions. The idea is to create a new but dead simple JSP page to control some Korn Shell scripts I've got running there. So the goal is to make some ...
Not wanting to re-invent the wheel or anything, I was wondering if there's a plugin out there a field or form validation plugin that works with Prototype that you can recommend from your own experience and why?
While my experience is limited to knowledge up to October 2023 and I can't provide personal experience, I can suggest a few popular validation plugins that work with Prototype.js, which is a JavaScript framework that facilitates AJAX and DOM manipulation. 1. **Validation (by Paul Irish)**: This is a popular validation...
39,326
[ { "from": "human", "value": "Not wanting to re-invent the wheel or anything, I was wondering if there's a plugin out there a field or form validation plugin that works with Prototype that you can recommend from your own experience and why?\n" }, { "from": "gpt", "value": "While my experience is ...
Is there an open source filter that I can use on Tomcat to prevent access to certain path (say /a/b/*) when the request comes from a given interface? The use case: I have REST services deployed on Tomcat that should only be accessed by the application itself, but which for security reasons should not be accessible from...
Yes, you can create a custom filter in Java to restrict access to certain paths based on the network interface from which the request originates. Since you’re using Tomcat directly without a front-end like Apache, implementing a filter is a suitable approach. Here's a simple example of how you might implement this: #...
36,731
[ { "from": "human", "value": "Is there an open source filter that I can use on Tomcat to prevent access to certain path (say /a/b/*) when the request comes from a given interface?\nThe use case: I have REST services deployed on Tomcat that should only be accessed by the application itself, but which for secu...
Currently I am working with a custom regular expression validator (unfortunately). I am trying to set the Regex pattern using a server side inline script like this: ValidationExpression="<%= RegExStrings.SomePattern %>" However, the script is not resolving to server side code. Instead it is being interpreted literally...
The issue you're experiencing is due to the fact that the inline server-side script `<%= ... %>` is not being processed in a client-side context. When you use `<%= ... %>` within a client-side JavaScript context, the server-side code is treated as a literal string. To resolve this, you need to ensure that the server-si...
36,411
[ { "from": "human", "value": "Currently I am working with a custom regular expression validator (unfortunately).\nI am trying to set the Regex pattern using a server side inline script like this:\nValidationExpression=\"<%= RegExStrings.SomePattern %>\"\n\nHowever, the script is not resolving to server side ...
I am looking to use quartz to schedule emails, but I'm not sure which approach to take: Create a new job and trigger whenever an email is scheduled OR Create a single job, and create a new trigger each time an email is scheduled I need to pass the message/recipient etc either way, and I'm not sure whether creating he...
When using Quartz Scheduler to schedule emails, the choice between creating new jobs with triggers for each email or creating a single job with a new trigger for each email primarily depends on your specific requirements and constraints. Here’s a breakdown of both approaches to help you decide: ### Option 1: Create a ...
37,742
[ { "from": "human", "value": "I am looking to use quartz to schedule emails, but I'm not sure which approach to take:\n\nCreate a new job and trigger whenever an email is scheduled OR\nCreate a single job, and create a new trigger each time an email is scheduled\n\nI need to pass the message/recipient etc ei...
In rpc.h, the GUID structure is declared as follows: typedef struct _GUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data[8]; } GUID; I understand Data1, Data2, and Data3. They define the first, second, and third sets of hex digits when writing out a GUID (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX). What...
The `GUID` structure's design is rooted in both historical and practical considerations, and your observation about the last two groups being represented as a byte array instead of separate fields is indeed interesting. 1. **Flexibility and Generalization**: By defining the last two groups as a single byte array of 8 ...
36,691
[ { "from": "human", "value": "In rpc.h, the GUID structure is declared as follows:\ntypedef struct _GUID \n{ \n DWORD Data1; \n WORD Data2; \n WORD Data3; \n BYTE Data[8];\n} GUID;\n\nI understand Data1, Data2, and Data3. They define the first, second, and third sets of hex digits when writing o...
I have a directory with 500,000 files in it. I would like to access them as quickly as possible. The algorithm requires me to repeatedly open and close them (can't have 500,000 file open simultaneously). How can I do that efficiently? I had originally thought that I could cache the inodes and open the files that way, ...
When dealing with a large number of files in a directory, efficient file access can indeed be a challenge. Here are several strategies you can employ to access the files quickly while managing the limitations of your filesystem: ### 1. **File System Choice** Different filesystems perform differently with a large numbe...
36,753
[ { "from": "human", "value": "I have a directory with 500,000 files in it. I would like to access them as quickly as possible. The algorithm requires me to repeatedly open and close them (can't have 500,000 file open simultaneously).\nHow can I do that efficiently? I had originally thought that I could cach...
I installed a windows service using installUtil.exe. After updating the code I used installUtil.exe again to install the service w/o uninstalling the original version first. When I now try to uninstall the service, installUtil.exe completes the uninstall successfully, but the service still appears. If I try to change...
When a Windows service is marked for deletion, it typically means that the service was in the process of being stopped or removed, but the process couldn't complete successfully. This can often happen if the service is still running or if the service's executable is locked. Here are steps you can follow to resolve this...
36,075
[ { "from": "human", "value": "I installed a windows service using installUtil.exe. \nAfter updating the code I used installUtil.exe again to install the service w/o uninstalling the original version first.\nWhen I now try to uninstall the service, installUtil.exe completes the uninstall successfully, but the...
I have two UIActionSheets and I am thinking that I will control them with one delegate (the UIViewController that instantiates them). The delegate will capture an actionSheet call and try to figure out which of the two threw the event. I tried to get the modalView's title to differentiate, but it seems to be invalid.....
Using a single delegate to manage multiple `UIActionSheet` instances is a common practice, and it can certainly work. However, it’s important to distinguish between the different action sheets to handle their respective actions correctly. While you mentioned trying to use the modal view's title, there are better approa...
36,338
[ { "from": "human", "value": "I have two UIActionSheets and I am thinking that I will control them with one delegate (the UIViewController that instantiates them). The delegate will capture an actionSheet call and try to figure out which of the two threw the event.\nI tried to get the modalView's title to d...
Why is it that TCP connections to a loopback interface end up in TIME_WAIT (socket closed with SO_DONTLINGER set), but identical connections to a different host do not end up in TIME_WAIT (they are reset/destroyed immediately)? Here are scenarios to illustrate: (A) Two applications, a client and a server, are both run...
The behavior you are observing with TCP connections to the loopback interface versus connections to a different host is influenced by how the TCP/IP stack manages connections and state transitions for different types of endpoints. ### Understanding TIME_WAIT The TIME_WAIT state is an important part of the TCP connect...
36,252
[ { "from": "human", "value": "Why is it that TCP connections to a loopback interface end up in TIME_WAIT (socket closed with SO_DONTLINGER set), but identical connections to a different host do not end up in TIME_WAIT (they are reset/destroyed immediately)?\nHere are scenarios to illustrate:\n(A) Two applic...
Using ICU 4.0 regex library, I find that the following regex is exhibiting exponential time: actual: "[^<]*<\?" C code: "[^<]*<\\?" Aim: find "<?" where there is no other "<" before it When running this regex on plain text with no "<" characters at all it appears to take exponential time. If the text has at least a si...
The behavior you're observing is a known issue with certain types of regular expressions, particularly those that use constructs that lead to what is called "catastrophic backtracking." The specific regex you provided, `[^<]*<\?`, can lead to performance problems in certain scenarios, especially when the input doesn't ...
36,560
[ { "from": "human", "value": "Using ICU 4.0 regex library, I find that the following regex is exhibiting exponential time:\nactual: \"[^<]*<\\?\"\nC code: \"[^<]*<\\\\?\"\n\nAim: find \"<?\" where there is no other \"<\" before it\nWhen running this regex on plain text with no \"<\" characters at all it appe...
I have a MasterPage and a Content Page My Content Page has a number of controls, - dropdownlist, text boxes, radio buttons. I want to loop through all the control and if its one of the controls above then i want to obtain the selectedvalue, text etc I know I can access the control directly by name, but as this is my le...
It sounds like you are on the right track with your implementation! Looping through controls on a content page using the Controls collection can indeed help you understand the structure of ASP.NET web forms better. To build a recursive routine to explore all controls, including nested ones, you can create a method that...
36,998
[ { "from": "human", "value": "I have a MasterPage and a Content Page\nMy Content Page has a number of controls, - dropdownlist, text boxes, radio buttons.\nI want to loop through all the control and if its one of the controls above then i want to obtain the selectedvalue, text etc\nI know I can access the co...
Omnicompletion is working, but it automatically inserts the first result. What I'd like to do is open the omnicomplete menu, then be able to type to narrow down the results, then hit enter or tab or space or something to insert the selected menu item. Is this possible?
Yes, it is possible to configure omnicompletion in your text editor or IDE to behave as you described, where the completion menu opens, allows you to filter results, and then lets you manually select and insert a result with a keypress. Here's how to set this up in a few popular editors: ### For Vim 1. **Open Comple...
36,951
[ { "from": "human", "value": "Omnicompletion is working, but it automatically inserts the first result.\nWhat I'd like to do is open the omnicomplete menu, then be able to type to narrow down the results, then hit enter or tab or space or something to insert the selected menu item.\nIs this possible?\n" },...
Given a Generic List of objects that contain a member variable that is a string, what is the best way to get the object that contains the string with the longest length? ie. assuming val1 is the string I'm comparing: 0 : { val1 = "a" } 1 : { val1 = "aa" } 2 : { val1 = "aba" } 3 : { val1 = "c" } what needs to be r...
To find the object with the longest string in a list of objects, you can use LINQ (Language Integrated Query) in C# for a clean and efficient solution. Here's a step-by-step example demonstrating how to achieve this: 1. **Define Your Class**: Let's assume your object class is defined as follows: ```csharp public clas...
34,266
[ { "from": "human", "value": "Given a Generic List of objects that contain a member variable that is a string, what is the best way to get the object that contains the string with the longest length?\nie.\nassuming val1 is the string I'm comparing:\n0 : { val1 = \"a\" }\n1 : { val1 = \"aa\" }\n2 : { val1 ...
I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc., and I obviously cannot put all these into libraries. I need a practical method to index all of them, and to be able to make this index available to others. What must such an index contain to make searching...
Creating an efficient index for your collection of small code files can significantly enhance your ability to search and retrieve relevant snippets quickly. Below are some suggestions on how to structure your index, as well as information on existing repositories and applications that could help you achieve this. ### ...
37,115
[ { "from": "human", "value": "I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc., and I obviously cannot put all these into libraries. I need a practical method to index all of them, and to be able to make this index available to others.\n\nWhat m...
I am experiencing a crash while using the Boost.Spirit and Boost.Thread libraries in my application. This only happens if I have used the Spirit parser during the lifetime of the process from the main thread. The crash happens at exit and appears to be related to the clean-up of thread specific storage allocated by ...
The issue you’re experiencing with crashes during cleanup when using Boost.Spirit and Boost.Thread is likely related to the order in which global destructors are called when DLLs are unloaded. This is a common issue with thread-local storage in dynamic libraries. ### Possible Solutions Here are some strategies to mit...
36,238
[ { "from": "human", "value": "I am experiencing a crash while using the Boost.Spirit and Boost.Thread \nlibraries in my application. This only happens if I have used the Spirit \nparser during the lifetime of the process from the main thread.\nThe crash happens at exit and appears to be related to the clean-...
Here's a simplified version of my scenario: I have a table named Project that I reference via an 'id' field. I have a table named Photo that has a field named 'project_id' which I use to relate multiple photos to a single project. The Photo table also has an auto-incrementing 'id' field that I use for ordering, amongs...
You can achieve this in a single SQL query using a Common Table Expression (CTE) or a subquery, depending on the SQL dialect you are using. Here's how you can structure your query to retrieve the last 5 photos for each specified project: ### Example Query Using Common Table Expression (CTE) Assuming you're using a SQ...
36,729
[ { "from": "human", "value": "Here's a simplified version of my scenario:\n\nI have a table named Project that I reference via an 'id' field.\nI have a table named Photo that has a field named 'project_id' which I use to relate multiple photos to a single project. The Photo table also has an auto-incrementin...
I have a requirement to add conditional disabled & class attributes to a dropdown form element. I have the following however it does not write out either of the attributes in any state. Is there a way around this. <%= Html.DropDownList("--Choose Make--", "models", ViewData["model_disabled"] == "false" ? new { @disable...
The issue you're facing is due to how the `Html.DropDownList` helper works in ASP.NET MVC. The helper does not support adding the `disabled` attribute in a straightforward way, as the `disabled` attribute is not a standard parameter for the `Html.DropDownList` method. To achieve your requirement of conditionally addin...
39,072
[ { "from": "human", "value": "I have a requirement to add conditional disabled & class attributes to a dropdown form element. I have the following however it does not write out either of the attributes in any state. Is there a way around this.\n<%= Html.DropDownList(\"--Choose Make--\", \"models\", ViewData...
My WCF service involves the sending of a dataset (in csv format) data between client and service. This dataset must be encrypted so that the data cannot be intercepted. I'm using wshttpbinding and trying to encrypt the message by using the following settings in web.config: <wsHttpBinding> <binding name="wsHttp"> ...
When you're using WCF with `wsHttpBinding` and you want to enable message encryption, there are a few concepts and configurations you'll need to consider. Let's break down your concerns. ### 1. **Understanding Security Modes** In your configuration, you've set the security mode to `Message`. This means that the messag...
34,489
[ { "from": "human", "value": "My WCF service involves the sending of a dataset (in csv format) data between client and service. This dataset must be encrypted so that the data cannot be intercepted. I'm using wshttpbinding and trying to encrypt the message by using the following settings in web.config:\n<wsH...
This is a multi-site problem. I have a lot of sites with .htaccess files with multiple line similar to: rewriterule ^(page-one|page-two|page-three)/?$ /index.php?page=$1 [L] This means that both www.domain.com/page-one and www.domain.com/page-one/ will both load www.domain.com/index.php?page=page-one However I'm alwa...
To redirect `www.domain.com/page-one` to `www.domain.com/page-one/` while still allowing the existing rewrite rules to function properly, you can add a separate rewrite rule to your `.htaccess` file before your existing `RewriteRule`. This will ensure that requests for the non-trailing slash version will be redirected ...
39,449
[ { "from": "human", "value": "This is a multi-site problem. I have a lot of sites with .htaccess files with multiple line similar to:\nrewriterule ^(page-one|page-two|page-three)/?$ /index.php?page=$1 [L]\n\nThis means that both www.domain.com/page-one and www.domain.com/page-one/ will both load www.domain....
Does anyone know of a way to represent a tree structure in Crystal Reports? My big issue is that I don't know the depth of the tree. It is represented in a database table with a simple "childId -> parentId" relationship. A perfect example would be to open Windows Explorer, and look at the directory tree on the left si...
Representing a tree structure in Crystal Reports can be quite challenging, especially when the depth of the tree is unknown and dynamically generated. While you've tried a couple of methods, here are a few additional approaches you might consider: ### 1. Use a Recursive SQL Query (CTE) If your database supports Common...
35,850
[ { "from": "human", "value": "Does anyone know of a way to represent a tree structure in Crystal Reports?\nMy big issue is that I don't know the depth of the tree. It is represented in a database table with a simple \"childId -> parentId\" relationship.\nA perfect example would be to open Windows Explorer, ...
How do I accomplish text wrapping of table fields in SSRS Report, and proper landscaping when rendering the report to PDF format?
To accomplish text wrapping of table fields in SQL Server Reporting Services (SSRS) and ensure proper landscape formatting when rendering the report to PDF, you can follow these steps: ### Step 1: Enable Text Wrapping in Table Fields 1. **Open Your Report**: Open your SSRS report in Visual Studio or SQL Server Data T...
37,179
[ { "from": "human", "value": "How do I accomplish text wrapping of table fields in SSRS Report, and proper landscaping when rendering the report to PDF format?\n" }, { "from": "gpt", "value": "To accomplish text wrapping of table fields in SQL Server Reporting Services (SSRS) and ensure proper la...
I have written a program in C to parse large XML files and then create files with insert statements. Some other process would ingest the files into a MySQL database. This data will serve as a indexing service so that users can find documents easily. I have chosen InnoDB for the ability of row-level locking. The C pr...
When dealing with a large number of insert statements (from 500 to 5 million) into a MySQL database, especially with the InnoDB storage engine, you can optimize the process in several ways. Here are the recommendations to speed up your data insertion and ensure efficient indexing: ### 1. Batch Inserts Instead of inser...
37,077
[ { "from": "human", "value": "I have written a program in C to parse large XML files and then create files with insert statements. Some other process would ingest the files into a MySQL database. \nThis data will serve as a indexing service so that users can find documents easily.\nI have chosen InnoDB for ...
What does the SQL Action keyword do? Can I use this keyword in a trigger and determine if the trigger was called by an Insert, Delete or Update?
In SQL, the `ACTION` keyword isn't a standard keyword by itself. However, in the context of triggers, you typically use `INSERT`, `UPDATE`, and `DELETE` to specify what type of operation the trigger responds to. Most relational database management systems (RDBMS), such as SQL Server, PostgreSQL, MySQL, and Oracle, al...
39,412
[ { "from": "human", "value": "What does the SQL Action keyword do? Can I use this keyword in a trigger and determine if the trigger was called by an Insert, Delete or Update?\n" }, { "from": "gpt", "value": "In SQL, the `ACTION` keyword isn't a standard keyword by itself. However, in the context...
I have a legacy C++ application that uses DDS for asynchronous communication/messaging. I need to integrate this application into a JavaEE environment that uses JMS for messaging. Other than building a standalone JMS/DDS bridge module, are there any other options that I might have?
Integrating a legacy C++ application using DDS (Data Distribution Service) with a JavaEE environment that relies on JMS (Java Message Service) can present some challenges due to the different architectures and paradigms of these two messaging systems. While a standalone JMS/DDS bridge is one solution, there are a few o...
36,908
[ { "from": "human", "value": "I have a legacy C++ application that uses DDS for asynchronous communication/messaging. I need to integrate this application into a JavaEE environment that uses JMS for messaging. Other than building a standalone JMS/DDS bridge module, are there any other options that I might ...
When using Html.ActionLink passing a string containing the # char renders it like it is but if you UrlEncode it renders as %2523. I believe it's a bug. MVC Beta Release. Is it really a bug? http://example.com/test# is rendered as http://examplee.com/test%2523 instead of http://examplee.com/test%2523
The behavior you're experiencing with `Html.ActionLink` in ASP.NET MVC is not necessarily a bug, but rather a consequence of how URL encoding works, especially with regard to the `#` character and its implications in a URL. Here's what's happening: 1. **URL Encoding**: The `#` character in a URL is used to denote a f...
38,413
[ { "from": "human", "value": "When using Html.ActionLink passing a string containing the # char renders it like it is but if you UrlEncode it renders as %2523.\nI believe it's a bug. MVC Beta Release.\nIs it really a bug?\nhttp://example.com/test# is rendered as \nhttp://examplee.com/test%2523 instead of \nh...
I'm trying to use GDB to debug (to find an annoying segfault). When I run: gdb ./filename from the command line, I get the following error: This GDB was configured as "i686-pc-linux- gnu"..."/path/exec": not in executable format: File format not recognized When I execute: file /path/executable/ I get the following...
The issue you're encountering is due to a mismatch between the architecture of the GDB binary you're using and the architecture of the executable you're trying to debug. Based on the output you provided, here’s a breakdown of the situation: 1. **GDB Configuration**: Your GDB is configured for `i686-pc-linux-gnu`, wh...
38,099
[ { "from": "human", "value": "I'm trying to use GDB to debug (to find an annoying segfault). When I run:\ngdb ./filename\n\nfrom the command line, I get the following error:\nThis GDB was configured as \"i686-pc-linux-\ngnu\"...\"/path/exec\": not in executable \nformat: File format not recognized\n\nWhen I...
I am writing a QT application and I need to embed a terminal (we say,xterm) within a QDialog, like some KDE application (see kdevelop/kate/...). I've been trying with: - QX11EmbedContainer placed into the QLayout of my QDialog - QProcess for the program I want to excecute I expect the QProcess running within the QX11...
Embedding an external application like `xterm` into a `QDialog` can be quite challenging due to the way X11 handles window management. `QX11EmbedContainer` has been deprecated and is not the recommended way to embed external applications in Qt. However, you can still achieve this effect using other methods. Here’s a me...
37,435
[ { "from": "human", "value": "I am writing a QT application and I need to embed a terminal (we say,xterm) within a QDialog, like some KDE application (see kdevelop/kate/...).\nI've been trying with: \n- QX11EmbedContainer placed into the QLayout of my QDialog \n- QProcess for the program I want to excecute\n...
For background see my question here. So the problem now isn't that I can't send a DataSet to classic ASP but that it can't do anything with it. So I found some code to create a recordset xml structure from a DataSet. I have tweaked it a little from it's original source. The problem is that I can't seem to extract the...
Your `XmlRecordsetWriter` class seems well-structured for writing XML from a `DataSet`, and your test method is on the right track. However, there are a couple of important points to consider to ensure that the XML is correctly written to the `MemoryStream` and that you're able to read from it afterwards. ### Key Issu...
37,137
[ { "from": "human", "value": "For background see my question here.\nSo the problem now isn't that I can't send a DataSet to classic ASP but that it can't do anything with it. So I found some code to create a recordset xml structure from a DataSet.\nI have tweaked it a little from it's original source. The ...
I am not convinced - I think it might be useful to expose your data to different consumers that can build their front-end apps on top of your webservice. Can someone provide samples of when using web-services to wrap data-access layer is a bad idea?
Exposing data through web services can be a powerful way to allow different consumers to access and manipulate that data, but there are specific scenarios where wrapping a data-access layer in a web service might not be the best approach. Here are some examples: 1. **High Latency Requirements**: If your application re...
38,491
[ { "from": "human", "value": "I am not convinced - I think it might be useful to expose your data to different consumers that can build their front-end apps on top of your webservice.\nCan someone provide samples of when using web-services to wrap data-access layer is a bad idea?\n" }, { "from": "g...
I am using winsock and C++ to set up a server application. The problem I'm having is that the call to listen results in a first chance exception. I guess normally these can be ignored (?) but I've found others having the same issue I am where it causes the application to hang every once in a while. Any help would be...
The exception message you're encountering, "There are no more endpoints available from the endpoint mapper", generally indicates a problem with your system's available resources for creating new sockets or endpoints. Here are some common causes and steps you can take to troubleshoot and resolve the issue: 1. **Socket ...
30,606
[ { "from": "human", "value": "I am using winsock and C++ to set up a server application. The problem I'm having is that the call to listen results in a first chance exception. I guess normally these can be ignored (?) but I've found others having the same issue I am where it causes the application to hang ...