instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Is anybody using JSON.NET with nHibernate? I notice that I am getting errors when I try to load a class with child collections.
| Yes, JSON.NET (also known as Newtonsoft.Json) can be used with NHibernate to serialize and deserialize objects, including those with child collections. However, you might encounter some issues due to the way NHibernate manages object states, lazy loading, and collection handling. Here are some common reasons for errors... | 42,263 | [
{
"from": "human",
"value": "Is anybody using JSON.NET with nHibernate? I notice that I am getting errors when I try to load a class with child collections.\n"
},
{
"from": "gpt",
"value": "Yes, JSON.NET (also known as Newtonsoft.Json) can be used with NHibernate to serialize and deserialize ob... |
I've learned that static scoping is the only sane way to do things, and that dynamic scoping is the tool of the devil, and results only from poor implementations of interpreters/compilers.
Then I saw this snippet from a Common Lisp vs. Scheme article:
Both Lexically and Dynamically Lexical scope only, per the stan... | Dynamic scoping can indeed be a controversial topic, and many programmers prefer lexical scoping (or static scoping) because it provides a clearer structure of variable bindings and helps with reasoning about code. However, there are certain use cases where dynamic scoping can be beneficial or even simpler to implement... | 49,468 | [
{
"from": "human",
"value": "I've learned that static scoping is the only sane way to do things, and that dynamic scoping is the tool of the devil, and results only from poor implementations of interpreters/compilers. \nThen I saw this snippet from a Common Lisp vs. Scheme article:\n\nBoth Lexically and Dyn... |
I'm want to parse a custom string format that is persisting an object graphs state. This is ASP.NET scenario and I wanted something easy to use on the client (JavaScript) and server (C#).
I have a format something like
{Name1|Value1|Value2|...|ValueN}{Name2|Value1|...}{...}{NameN|...}
In this format I have 3 delimit... | Parsing a custom string format with escape sequences can indeed be complex, especially when trying to use regular expressions. A more straightforward approach is to manually parse the string in a controlled manner, which allows you to handle the escape sequences gracefully without the pitfalls of regex.
Here’s a simpl... | 47,930 | [
{
"from": "human",
"value": "I'm want to parse a custom string format that is persisting an object graphs state. This is ASP.NET scenario and I wanted something easy to use on the client (JavaScript) and server (C#).\nI have a format something like \n{Name1|Value1|Value2|...|ValueN}{Name2|Value1|...}{...}{... |
Say I want to design a database for a community site with blogs, photos, forums etc., one way to do this is to single out the concept of a "post", as a blog entry, a blog comment, a photo, a photo comment, a forum post all can be thought as a post. So, I could potentially have one table named Post [PostID, PostType, T... | When designing your database for a community site that includes blogs, photos, and forums, you have several approaches to consider. Each has implications for performance, manageability, and code cleanliness. Let's explore the three approaches you mentioned and their pros and cons:
### 1. Single Post Table with PostTyp... | 45,831 | [
{
"from": "human",
"value": "Say I want to design a database for a community site with blogs, photos, forums etc., one way to do this is to single out the concept of a \"post\", as a blog entry, a blog comment, a photo, a photo comment, a forum post all can be thought as a post. So, I could potentially hav... |
Imagine we were doing this StackOverflow site in ASP.NET MVC (funny that, 'cause it is...). We have to develop the views:
About this site
Faq
Privacy policy
404 page
Error page
etc...
Now, because we want to keep this RESTful because we're trying to grow our RESTafarian Geek-fro's, do we throw them into one controlle... | When deciding how to structure your controllers in an ASP.NET MVC application, especially for views like "About", "FAQ", "Privacy Policy", and error pages, it's crucial to consider the principles of RESTful design, maintainability, and readability of your code.
### Options and Recommendations
1. **Single Controller A... | 49,956 | [
{
"from": "human",
"value": "Imagine we were doing this StackOverflow site in ASP.NET MVC (funny that, 'cause it is...). We have to develop the views:\n\nAbout this site\nFaq\nPrivacy policy\n404 page\nError page\netc...\n\nNow, because we want to keep this RESTful because we're trying to grow our RESTafari... |
I'm looking for help getting started working programmatically with audio.
Specifically, the platform I'm working with exposes APIs to extract audio data from a resource (like an MP3), or to play back arbitrary data as audio. In both cases the actual data is byte arrays of 32bit floats representing 44.1 KHz stereo. What... | Working with audio at the level of raw data representation can be quite interesting and allows for a lot of flexibility in terms of audio processing, analysis, and generation. Here are the key concepts and topics you should explore to effectively work with audio byte arrays of 32-bit floats representing 44.1 kHz stereo... | 46,605 | [
{
"from": "human",
"value": "I'm looking for help getting started working programmatically with audio.\nSpecifically, the platform I'm working with exposes APIs to extract audio data from a resource (like an MP3), or to play back arbitrary data as audio. In both cases the actual data is byte arrays of 32bit... |
In short, I'd like to learn/develop an elegant method to save a binary tree to disk (a general tree, not necessarily a BST). Here is the description of my problem:
I'm implementing a game of "20-questions". I've written a binary tree whose internal nodes are questions and leaves are answers. The left child of a node... | To save a sparse binary tree to disk elegantly, you can use a serialization technique that captures the structure and contents of the tree in a more space-efficient way than an array representation. Here are a few common methods for serializing binary trees, focusing on clarity and ease of use.
### Method 1: Pre-order... | 47,790 | [
{
"from": "human",
"value": "In short, I'd like to learn/develop an elegant method to save a binary tree to disk (a general tree, not necessarily a BST). Here is the description of my problem:\nI'm implementing a game of \"20-questions\". I've written a binary tree whose internal nodes are questions and l... |
I'm writing a simple IDictionary abstraction in C# that wraps a
Dictionary<K, ICollection<V>>. Basically, it maps multiple values to one key. I can't decide whether to remove a key and its empty list when the last item in a values list is removed, or leave it (to avoid instantiating a new collection if the key is reu... | When designing your `IDictionary` abstraction that maps multiple values to a single key, you have a couple of considerations regarding how to handle the presence of keys with empty collections of values. Let's break down the pros and cons of each approach:
### Option 1: Remove the Key When Its List Is Empty
**Pros:**... | 48,179 | [
{
"from": "human",
"value": "I'm writing a simple IDictionary abstraction in C# that wraps a \nDictionary<K, ICollection<V>>. Basically, it maps multiple values to one key. I can't decide whether to remove a key and its empty list when the last item in a values list is removed, or leave it (to avoid instan... |
This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year.
Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too... | Certainly! Here’s a curated list of highly regarded C++ books, along with their skill levels and brief descriptions. Each book has been chosen for its quality content and clarity, making it a valuable resource for C++ programmers at various skill levels.
### Recommended C++ Books
1. **"C++ Primer" by Stanley B. Lipp... | 49,076 | [
{
"from": "human",
"value": "This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year.\nUnlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without study... |
I have a domain that will be accessed by a small, private group of people. So I want to control access via authentication.
The domain has a collection of applications installed that each have their own sub-domain. Eg: domain.com, app1.domain.com, app2.domain.com, app3.domain.com
I'd love to have a single sign-on soluti... | The issue you are facing with your Apache configuration for digest authentication across multiple subdomains is quite common. When using digest authentication, the browser typically stores the credentials based on the realm and the domain. Here are a few considerations to ensure proper single sign-on functionality acro... | 46,660 | [
{
"from": "human",
"value": "I have a domain that will be accessed by a small, private group of people. So I want to control access via authentication.\nThe domain has a collection of applications installed that each have their own sub-domain. Eg: domain.com, app1.domain.com, app2.domain.com, app3.domain.co... |
I would like to ask if there are any other alternatives, aside from DocumentViewer, for displaying an XPS document in a WPF application? A ready-to-use control or class in .NET if possible.
This is because DocumentViewer is a little slow when you are scrolling through the pages.
Thanks!
| If you're finding that the `DocumentViewer` control in WPF is not meeting your performance needs for displaying XPS documents, there are several alternatives you can explore:
1. **Third-Party Libraries**: There are a few third-party libraries that can help you display XPS documents more efficiently:
- **GemBox.Docu... | 48,327 | [
{
"from": "human",
"value": "I would like to ask if there are any other alternatives, aside from DocumentViewer, for displaying an XPS document in a WPF application? A ready-to-use control or class in .NET if possible. \nThis is because DocumentViewer is a little slow when you are scrolling through the page... |
I have a flash movie that loads images dynamically from an xml file. I want to re-use this .swf file on different pages, however the images on page1 are all 400 x 200 and the images on page2 are all 745 x 422. When i try to reuse this on another page, the loaded images are shrunken (resized) - i would like them to ma... | To achieve the desired behavior for dynamically loading images into your SWF file without them being resized relative to the stage dimensions, you will need to ensure that your image loader is correctly setting the dimensions of the image container to match the dimensions of the loaded images.
Here’s a general outline... | 48,960 | [
{
"from": "human",
"value": "I have a flash movie that loads images dynamically from an xml file. I want to re-use this .swf file on different pages, however the images on page1 are all 400 x 200 and the images on page2 are all 745 x 422. When i try to reuse this on another page, the loaded images are shr... |
I have an action method that that returns a PagedList<> after a form's POST request.
I would like to add paging to this page, but all paging scenarios only seem to work with GET requests.
Currently the only way of adding paging controls is adding a bunch of forms with one button for navigating the page. This will look ... | In order to add paging to your application in a clean and efficient way while still allowing for the optional parameters in your GET request, you can consider the following approaches:
### Option 1: Use Query Parameters for Pagination
Instead of using POST requests for filtering and pagination, you can handle the fil... | 49,309 | [
{
"from": "human",
"value": "I have an action method that that returns a PagedList<> after a form's POST request.\nI would like to add paging to this page, but all paging scenarios only seem to work with GET requests.\nCurrently the only way of adding paging controls is adding a bunch of forms with one butt... |
This is a followup to this question.
I seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the standard degree system OR by measuring a distance north from the south pole along the international date line, and then a distance east starting from that po... | It looks like you are on the right track, but there may still be some issues related to how you calculate the longitude offset (`dlon`) and how you handle the wrapping of longitude values. Let's take a closer look at these parts of your code to see how we can fix the calculation and ensure that the results you get for ... | 49,670 | [
{
"from": "human",
"value": "This is a followup to this question.\nI seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the standard degree system OR by measuring a distance north from the south pole along the international date line, and ... |
I want to write a program in C/C++ that will dynamically read a web page and extract information from it. As an example imagine if you wanted to write an application to follow and log an ebay auction. Is there an easy way to grab the web page? A library which provides this functionality? And is there an easy way to par... | To accomplish your goal of dynamically reading a web page and extracting information from it in C/C++, you'll need to use libraries that handle HTTP requests and HTML parsing. Here's a step-by-step guide to help you set up such an application.
### Step 1: Fetching the Web Page
For making HTTP requests, you can use th... | 49,583 | [
{
"from": "human",
"value": "I want to write a program in C/C++ that will dynamically read a web page and extract information from it. As an example imagine if you wanted to write an application to follow and log an ebay auction. Is there an easy way to grab the web page? A library which provides this funct... |
Using C#, when a user types a text in a normal textbox, how can you see the Hebrew equivalent of that text?
I want to use this feature on a data entry form, when the secretary puts in the customer name using English characters to have it converted automatically in another textbox to the hebrew representation.
Maybe som... | To achieve the functionality of converting English text input to its Hebrew equivalent in a C# WinForms application, you can utilize a transliteration approach since there is no direct mapping from English characters to Hebrew characters.
Here is an example of how you could implement this feature:
1. **Create a Wind... | 49,121 | [
{
"from": "human",
"value": "Using C#, when a user types a text in a normal textbox, how can you see the Hebrew equivalent of that text?\nI want to use this feature on a data entry form, when the secretary puts in the customer name using English characters to have it converted automatically in another textb... |
Somewhat unclear to me are references (pointers?) to classes in VB.NET. The question I am about to ask can be answered by a little bit of testing, but I was wondering if anybody could post a decent explanation (or links, too).
If you create a class:
Public Class ReferenceClass
Private myBooleanValue As Boolean = F... | In VB.NET, as well as in other .NET languages, it's important to understand how references to objects work in the context of object-oriented programming.
### Explanation of References
1. **Reference Types vs Value Types**:
- In .NET, types are classified into two categories: value types and reference types.
-... | 49,804 | [
{
"from": "human",
"value": "Somewhat unclear to me are references (pointers?) to classes in VB.NET. The question I am about to ask can be answered by a little bit of testing, but I was wondering if anybody could post a decent explanation (or links, too).\nIf you create a class:\nPublic Class ReferenceClass... |
I let user enter some code in my Flex3 (Flash 10) app and I want to do syntax highlighting.
Is there any open-source library that would help me?
I'll need a Lua syntax support, but I can add it myself if library has a resonable interface to do this.
| For syntax highlighting in a Flex3 (Flash 10) application, you might consider using the following open-source libraries or approaches:
1. **FlexSyntaxHighlighter**: This is a simple Flex component that provides syntax highlighting for various languages, including JavaScript, HTML, and CSS. It may require some work to ... | 48,305 | [
{
"from": "human",
"value": "I let user enter some code in my Flex3 (Flash 10) app and I want to do syntax highlighting.\nIs there any open-source library that would help me?\nI'll need a Lua syntax support, but I can add it myself if library has a resonable interface to do this.\n"
},
{
"from": "gp... |
I have some Python code that works correctly when I use python.exe to run it, but fails if I use pythonw.exe.
def runStuff(commandLine):
outputFileName = 'somefile.txt'
outputFile = open(outputFileName, "w")
try:
result = subprocess.call(commandLine, shell=True, stdout=outputFi... | The issue you're encountering with `pythonw.exe` and the `subprocess.call` function relates to how `pythonw.exe` interacts with the console and standard input/output streams.
### Explanation
1. **`pythonw.exe` vs `python.exe`**:
- `pythonw.exe` is a version of Python designed for running GUI applications. It does... | 47,791 | [
{
"from": "human",
"value": "I have some Python code that works correctly when I use python.exe to run it, but fails if I use pythonw.exe.\n\n def runStuff(commandLine):\n outputFileName = 'somefile.txt'\n outputFile = open(outputFileName, \"w\")\n\n try:\n result = subpro... |
I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling.
I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearVie... | It sounds like you are trying to create a layout that contains multiple lists (or `ListViews`) that can scroll together. Unfortunately, placing multiple `ListViews` inside a `ScrollView` does not work properly because both `ScrollView` and `ListView` implement their own scrolling mechanism, which leads to the behavior ... | 39,977 | [
{
"from": "human",
"value": "I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling.\nI've tried using a ScrollView with a LinearLayout child,... |
I'm working on a .NET web application and I'm using a CalendarExtender control within it to have the user specify a date. For some reason, when I click the icon to display the calendar, the background seems to be transparent.
I'm using the extender on other pages and do not run into this issue.
I'm not sure if it is wo... | It sounds like you're experiencing a CSS issue that could be affecting the rendering of the CalendarExtender control in your .NET web application. Here are some steps to troubleshoot and potentially resolve the issue with the calendar's background transparency:
### Steps to Troubleshoot
1. **Inspect Element**: Use th... | 49,010 | [
{
"from": "human",
"value": "I'm working on a .NET web application and I'm using a CalendarExtender control within it to have the user specify a date. For some reason, when I click the icon to display the calendar, the background seems to be transparent.\nI'm using the extender on other pages and do not run... |
I have the following REST Host in a silverlight application. I'm getting a NotSupportedException on the EndGetResponse() call of the Save Method. In this sample I'm using the default config for a REST Singleton Service from the WCF REST Starter Kit, with the exception of some changes to the OnAddItem method to accept... | The `NotSupportedException` you're encountering on the `EndGetResponse()` call in your `Save` method is likely related to how the asynchronous pattern is being used when making the POST request. In Silverlight, network calls are subject to certain restrictions, and if not set up properly, you can run into exceptions li... | 49,631 | [
{
"from": "human",
"value": "I have the following REST Host in a silverlight application. I'm getting a NotSupportedException on the EndGetResponse() call of the Save Method. In this sample I'm using the default config for a REST Singleton Service from the WCF REST Starter Kit, with the exception of some ... |
How can I go about with writing a shell extension to display online files in a virtual drive like the Gmail Drive does?
| Writing a shell extension to display online files as if they were on a virtual drive is a complex task that involves several components. The Gmail Drive you referenced acts like a virtual file system that interacts with the Gmail API to show files stored in a user's Google Drive account. To create something similar, he... | 48,561 | [
{
"from": "human",
"value": "How can I go about with writing a shell extension to display online files in a virtual drive like the Gmail Drive does?\n"
},
{
"from": "gpt",
"value": "Writing a shell extension to display online files as if they were on a virtual drive is a complex task that involv... |
I really love the way Ajax makes a web app perform more like a desktop app, but I'm worried about the hits on a high volume site. I'm developing a database app right now that's intranet based, that no more then 2-4 people are going to be accessing at one time. I'm Ajaxing the hell out of it, but it got me to wonderin... | Ajax (Asynchronous JavaScript and XML) can definitely enhance the user experience by allowing web applications to function more like desktop applications. It enables partial page updates, reducing the need for full page refreshes, which can lead to a more fluid and responsive user experience. However, there are some co... | 46,381 | [
{
"from": "human",
"value": "I really love the way Ajax makes a web app perform more like a desktop app, but I'm worried about the hits on a high volume site. I'm developing a database app right now that's intranet based, that no more then 2-4 people are going to be accessing at one time. I'm Ajaxing the ... |
I've just installed Ocaml on Mac OS X, and when I run the ocaml program I get a "Bus Error" with no other clues to what might be going on. Can anyone offer suggestions on where to go from here?
EDIT:
I installed via the package:
http://caml.inria.fr/pub/distrib/ocaml-3.10/ocaml-3.10.2-ppc.dmg
(I have an iBook G4, s... | A "Bus Error" in OCaml typically indicates a problem at a low level, such as an issue with memory access. Since you've installed OCaml on an older iBook G4 running PPC architecture, there are a few steps you can take to troubleshoot and resolve the problem:
1. **Check for Corrupted Installation**: It's possible that t... | 46,268 | [
{
"from": "human",
"value": "I've just installed Ocaml on Mac OS X, and when I run the ocaml program I get a \"Bus Error\" with no other clues to what might be going on. Can anyone offer suggestions on where to go from here?\nEDIT:\nI installed via the package: \nhttp://caml.inria.fr/pub/distrib/ocaml-3.1... |
I am working on an application that involves some gis stuff. There would be some .shp files to be read and plotted onto an opengl screen. The current opengl screen is using the orthographic projection as set from glOrtho() and is already displaying a map using coordinates from a simple text file..
Now the map to be pl... | Working with shapefiles and integrating them into an OpenGL application can be challenging, particularly when it comes to coordinate systems and projections. Here’s a structured approach to tackle the issues you mentioned.
### Understanding Projections
1. **WGS84 vs. OpenGL Coordinate System**:
- WGS84 (World Geod... | 45,858 | [
{
"from": "human",
"value": "I am working on an application that involves some gis stuff. There would be some .shp files to be read and plotted onto an opengl screen. The current opengl screen is using the orthographic projection as set from glOrtho() and is already displaying a map using coordinates from ... |
I have a program that needs to do a compile time checkable map from one known set of values to another known set of values:
in out
------------
8 37
10 61
12 92
13 1/4 109
15 1/4 151
etc
This would be easy if the inputs were either integers or evenly spaced. I'm going to be iterating over the r... | For your use case, it sounds like you want to ensure that only valid inputs can be used at compile time while also maintaining readability and usability for both iteration and lookups. Using enums is a good approach, but let's explore a more structured way to achieve your goals, especially given your context of non-int... | 42,183 | [
{
"from": "human",
"value": "I have a program that needs to do a compile time checkable map from one known set of values to another known set of values:\n\nin out\n------------\n8 37\n10 61\n12 92\n13 1/4 109\n15 1/4 151\netc\n\nThis would be easy if the inputs were either integers or... |
I would like to create a visual effect when an item in a listbox is double clicked. So far I have drag and drop functionality where the item is visually attached to the mouse and can be moved to a drop target. From that functionality I am able to animate the item using the same logic of getting the item container, howe... | It sounds like you're on the right track in terms of wanting to create a visual effect for the item moving from one ListBox to another with animation. Your idea about cloning the visual element is valid, but as you mentioned, it might be more efficient to use the Adorner layer or visual effects directly to achieve your... | 49,333 | [
{
"from": "human",
"value": "I would like to create a visual effect when an item in a listbox is double clicked. So far I have drag and drop functionality where the item is visually attached to the mouse and can be moved to a drop target. From that functionality I am able to animate the item using the same ... |
Is there a best practice for instantiating / calling business logic layer service in a web app? I've got a large number services that I keep instantiating and then disposing for just one method call.
Should these be implemented as providers? Or maybe accessed from a singleton?
Example code:
void ShipProduct(){
Pro... | When designing a web application, particularly in the context of the business logic layer, it's essential to carefully consider how you instantiate and manage service classes. Creating new instances of services repeatedly, especially for stateless operations, can lead to unnecessary overhead. Here are some best practic... | 47,747 | [
{
"from": "human",
"value": "Is there a best practice for instantiating / calling business logic layer service in a web app? I've got a large number services that I keep instantiating and then disposing for just one method call. \nShould these be implemented as providers? Or maybe accessed from a singleto... |
I would like to use the JTable row sorter new in Java 6. But also I need it to be compatible in Mac OSX with Java 5.
Is it possible to find out the JVM version during runtime and use different code for the JTable with and without row sorter?
| Yes, it is possible to check the JVM version at runtime and conditionally use different code based on whether the environment supports the `JTable` row sorter (introduced in Java 6). Here's how you can achieve that:
1. You can retrieve the Java version using `System.getProperty("java.version")`.
2. You can then parse ... | 46,557 | [
{
"from": "human",
"value": "I would like to use the JTable row sorter new in Java 6. But also I need it to be compatible in Mac OSX with Java 5. \nIs it possible to find out the JVM version during runtime and use different code for the JTable with and without row sorter?\n"
},
{
"from": "gpt",
... |
If I have a form-backing object that has a complicated object tree -- say a Person that has a Contact Info object that has an Address object that has a bunch of Strings -- it seems that the object needs to be fully populated with component objects before I can bind to it. So if I'm creating a new Person, I need to mak... | Your understanding of the problem is largely correct, and you are facing a common challenge when dealing with complex object trees in Java or other object-oriented programming languages. Let’s break it down and explore potential solutions.
### Your Assumptions
1. **Binding and Null Pointer Exception**: Yes, if you tr... | 49,563 | [
{
"from": "human",
"value": "If I have a form-backing object that has a complicated object tree -- say a Person that has a Contact Info object that has an Address object that has a bunch of Strings -- it seems that the object needs to be fully populated with component objects before I can bind to it. So if... |
Background:
I'm writing a data provider that SSAS will use to get data from a third-party system.
I wrote a tool that will build cubes, dimensions, measure groups and measures based on the configuration of the third-party system using AMO.
Now, in the Cube Browser, I am able to pull the members of the dimensions, how... | Diagnosing an issue with measure data not being queried in SQL Server Analysis Services (SSAS) can be approached methodically. Since you're already logging the SQL queries from your data provider and you've confirmed that dimension members are working, here are several steps and considerations to help identify and fix ... | 45,744 | [
{
"from": "human",
"value": "Background: \nI'm writing a data provider that SSAS will use to get data from a third-party system.\nI wrote a tool that will build cubes, dimensions, measure groups and measures based on the configuration of the third-party system using AMO.\n\nNow, in the Cube Browser, I am ab... |
I know that codeIgniter turns off GET parameters by default.
But by having everything done in POST, don't you get annoyed by the re-send data requests if ever you press back after a form submission?
It annoys me, but I'm not sure if I want to allow GET purely for this reason.
Is it such a big security issue to allow ... | Using GET and POST methods in web applications comes with their own sets of advantages and disadvantages, and each has its appropriate use cases.
### GET vs. POST
1. **GET Method**:
- **Use Case**: Generally used for retrieving data. It appends parameters to the URL, making it bookmarkable and shareable.
- **Ca... | 45,817 | [
{
"from": "human",
"value": "I know that codeIgniter turns off GET parameters by default. \nBut by having everything done in POST, don't you get annoyed by the re-send data requests if ever you press back after a form submission?\nIt annoys me, but I'm not sure if I want to allow GET purely for this reason... |
I am having trouble retrieving results from my datareader in visual studio 2008. I have several stored Procs in the same database. I am able to retrieve values from those that dont receive input parameters. However, when i use the executreReader() method on a stored proc with input parameters i get an empty datareader.... | It sounds like you're having trouble retrieving results from a stored procedure that takes input parameters. Since you mentioned that you can execute the stored procedure successfully in SQL Server but not from your application, let’s go through a few troubleshooting steps to help you resolve the issue.
### 1. Ensure ... | 48,865 | [
{
"from": "human",
"value": "I am having trouble retrieving results from my datareader in visual studio 2008. I have several stored Procs in the same database. I am able to retrieve values from those that dont receive input parameters. However, when i use the executreReader() method on a stored proc with in... |
So, I'm working on some network programming in C, and it would seem that I am missing a bunch of standard C/C++ header files. For example, sys/socket.h is not there. A few otheres are missing too like netdb.h, and unistd.h. Is there a pack I need to install to get these on windows?
Thanks
| When programming in C/C++ for networking on Windows, you'll notice that some standard POSIX headers like `sys/socket.h`, `netdb.h`, and `unistd.h` are not available. This is because these headers and their corresponding functionalities are specific to Unix-like systems (such as Linux). On Windows, the networking model ... | 49,992 | [
{
"from": "human",
"value": "So, I'm working on some network programming in C, and it would seem that I am missing a bunch of standard C/C++ header files. For example, sys/socket.h is not there. A few otheres are missing too like netdb.h, and unistd.h. Is there a pack I need to install to get these on windo... |
I've been watching Douglas Crockford's talks at YUI Theater, and I have a question about JavaScript inheritance...
Douglas gives this example to show that "Hoozit" inherits from "Gizmo":
function Hoozit(id) {
this.id = id;
}
Hoozit.prototype = new Gizmo();
Hoozit.prototype.test = function (id) {
return this.id ... | Yes, there is a significant difference between `Hoozit.prototype = new Gizmo();` and `Hoozit.prototype = Gizmo.prototype;` in terms of inheritance behavior in JavaScript.
### Explanation of the two approaches:
1. **Using `Hoozit.prototype = new Gizmo();`**:
- When you write `Hoozit.prototype = new Gizmo();`, you a... | 49,754 | [
{
"from": "human",
"value": "I've been watching Douglas Crockford's talks at YUI Theater, and I have a question about JavaScript inheritance...\nDouglas gives this example to show that \"Hoozit\" inherits from \"Gizmo\":\nfunction Hoozit(id) {\n this.id = id;\n}\nHoozit.prototype = new Gizmo();\nHoozit.p... |
This should be easy, but I'm not sure how to best go about it. I have a WinForms app that lets the user type in long descriptions. Occaisionally, they would type in URLs, and the RichTextBox would recognize them and make them clickable when displayed.
I'm moving the app to the web, and I'm not sure how to make those sa... | To make URLs clickable in your web application, you have a few options. Here’s a summary of the approach you can take, including using regular expressions (RegEx) for automatic URL detection:
### 1. Using Regular Expressions
You can use RegEx to find URLs in the user’s input and convert them into clickable links. Her... | 44,521 | [
{
"from": "human",
"value": "This should be easy, but I'm not sure how to best go about it. I have a WinForms app that lets the user type in long descriptions. Occaisionally, they would type in URLs, and the RichTextBox would recognize them and make them clickable when displayed.\nI'm moving the app to the ... |
I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube).
I am doing something like:
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal);
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, ... | When you use GLUT's `glutSolidCube`, it draws a cube with its vertex normals but does not automatically provide texture coordinates. Consequently, you need to manually specify texture coordinates to ensure that the texture is mapped correctly onto the cube's surfaces. Here’s how you can do it:
1. **Disable the solid c... | 42,311 | [
{
"from": "human",
"value": "I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube).\nI am doing something like:\nglTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal);\nglTexPa... |
I have a Data View Web Part in Sharepoint that is being fed from an RSS Feed. I have the Data Source configured properly to read the RSS Feed and I have added several runtime parameters. My question is, how do I supply these values at runtime? For example, one of the parameters is startDate and this should be populated... | To supply runtime parameters to a Data View Web Part in SharePoint, especially when it is being fed from an RSS feed, you can follow these steps. Here’s how you can supply the `startDate` parameter with the current date:
### 1. **Use the Query String Parameter**
If you want to pass the parameter through a URL query s... | 49,645 | [
{
"from": "human",
"value": "I have a Data View Web Part in Sharepoint that is being fed from an RSS Feed. I have the Data Source configured properly to read the RSS Feed and I have added several runtime parameters. My question is, how do I supply these values at runtime? For example, one of the parameters ... |
I have a sequence of SQL calls, which I want to use to detect loops (and hence unnecessary duplicate sql calls), but it got me thinking of this more general problem.
Given a list, say
[a,b,c,b,c,a,b,c,b,c,a,b,b]
Is there some way I can turn that into
a,[[b,c]*2,a]*2,b*2
or, [a,[b,c]*2]*2,a,b*2
That is, detect repetitio... | Detecting repetitions in a sequence and representing them in a compressed format like you've shown can be accomplished through a form of recursive analysis. Essentially, you can break the problem into the following steps:
1. **Identify Repetitions**: Scan through the sequence and identify contiguous repeated segments.... | 49,691 | [
{
"from": "human",
"value": "I have a sequence of SQL calls, which I want to use to detect loops (and hence unnecessary duplicate sql calls), but it got me thinking of this more general problem.\nGiven a list, say\n[a,b,c,b,c,a,b,c,b,c,a,b,b]\nIs there some way I can turn that into\na,[[b,c]*2,a]*2,b*2\nor,... |
What is the best way to password protect folder using php without a database or user name but using. Basically I have a page that will list contacts for organization and need to password protect that folder without having account for every user . Just one password that gets changes every so often and distributed to th... | If you want to implement simple password protection for a folder using PHP without a database or user accounts, you can achieve this by creating a basic authentication system with a hardcoded password. Below is a step-by-step guide, including an option for session management to keep the password remembered for a limite... | 45,645 | [
{
"from": "human",
"value": "What is the best way to password protect folder using php without a database or user name but using. Basically I have a page that will list contacts for organization and need to password protect that folder without having account for every user . Just one password that gets cha... |
I'm looking for a little help on programmatically passing parameters to a SSRS report via VB.NET and ASP.NET. This seems like it should be a relatively simple thing to do, but I haven't had much luck finding help on this.
Does anyone have any suggestions on where to go to get help with this, or perhaps even some sampl... | Sure! Passing parameters to a SQL Server Reporting Services (SSRS) report programmatically using VB.NET and ASP.NET is quite feasible. Below is a basic example of how you can do this.
### Setting Up the Environment
Before diving into the code, ensure you have:
1. A deployed SSRS report on your report server.
2. A re... | 45,558 | [
{
"from": "human",
"value": "I'm looking for a little help on programmatically passing parameters to a SSRS report via VB.NET and ASP.NET. This seems like it should be a relatively simple thing to do, but I haven't had much luck finding help on this.\nDoes anyone have any suggestions on where to go to get ... |
I need to extract the icon from a windows shortcut (.lnk) file (or find the icon file, if it's just pointed to by the shortcut).
I'm not asking about extracting icons from exe's, dll's, etc. The shortcut in question is created when I run a installation program. And the icon displayed by the shortcut is not contained ... | To extract the icon from a Windows shortcut (.lnk) file, or to identify where the icon is stored if it’s not embedded in the shortcut, you can use a couple of methods. Here's a breakdown of some tools and techniques you can try:
### Method 1: Using a Hex Editor
1. **Open the .lnk file in a hex editor**: Download and i... | 47,022 | [
{
"from": "human",
"value": "I need to extract the icon from a windows shortcut (.lnk) file (or find the icon file, if it's just pointed to by the shortcut).\nI'm not asking about extracting icons from exe's, dll's, etc. The shortcut in question is created when I run a installation program. And the icon d... |
I have the SOAP request in an XML file. I want to post the request to the web service in .net
How to implement?
| To post a SOAP request to a web service in a .NET application, you can use the `HttpClient` class available in .NET. Below are the steps to read the XML from a file and send it as a SOAP request:
### Step 1: Create a .NET Project
You can create a new .NET Console Application, ASP.NET Application, or any other type of ... | 47,680 | [
{
"from": "human",
"value": "I have the SOAP request in an XML file. I want to post the request to the web service in .net \nHow to implement?\n"
},
{
"from": "gpt",
"value": "To post a SOAP request to a web service in a .NET application, you can use the `HttpClient` class available in .NET. Bel... |
I want to use function ReadDirectoryChangesW() in asynchronous mode with I/O completion routine supplied.
The question is I don't know how to retrieve the exact information about the change in the completion routine (a CALLBACK function). Completion routine is defined like this:
VOID CALLBACK FileIOCompletionRoutine(
... | To use the `ReadDirectoryChangesW` function in asynchronous mode with an I/O completion routine, you need to provide an `OVERLAPPED` structure that contains the necessary information to retrieve the changes that occurred in the directory. Here’s a general outline of how to set it up and retrieve the change information ... | 49,519 | [
{
"from": "human",
"value": "I want to use function ReadDirectoryChangesW() in asynchronous mode with I/O completion routine supplied. \nThe question is I don't know how to retrieve the exact information about the change in the completion routine (a CALLBACK function). Completion routine is defined like thi... |
If php code like below how it's like as mysql stored procedure equivalent. If any links tutorial on advance stored procedure mysql please put.
$sql = " SELECT a,b FROM j ";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0) {
while($row = mysql_fetch_array($result)) {
$sql_update = "UPDATE b set... | To convert the provided PHP code into a MySQL stored procedure, we will create a procedure that performs the same logic: selecting records from table `j` and updating records in table `b`.
Here’s how you might write the equivalent MySQL stored procedure:
```sql
DELIMITER //
CREATE PROCEDURE UpdateBFromJ()
BEGIN
... | 49,825 | [
{
"from": "human",
"value": "If php code like below how it's like as mysql stored procedure equivalent. If any links tutorial on advance stored procedure mysql please put.\n$sql = \" SELECT a,b FROM j \";\n$result = mysql_query($sql);\nif(mysql_num_rows($result) > 0) {\n while($row = mysql_fetch_array(... |
I have a javascript heavy app which has widgets like autocomplete dropdowns and tabs and so forth. Sometimes when dropdowns appear and disappear, or when you switch between tabs, it changes the height of the document. This can cause annoyances if the scrollbar appears and disappears rapidly, because it shifts the page.... | To handle changes in the height of your document and avoid layout shifts when scrollbars appear or disappear, you can monitor the document's height and set a fixed height if it changes. Here's a solution that works across various browsers without using deprecated features like `watch`. Instead, we can use `MutationObse... | 47,550 | [
{
"from": "human",
"value": "I have a javascript heavy app which has widgets like autocomplete dropdowns and tabs and so forth. Sometimes when dropdowns appear and disappear, or when you switch between tabs, it changes the height of the document. This can cause annoyances if the scrollbar appears and disapp... |
I'm interested in using a Reed-Solomon error correction [http://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction as a reference] to try to rebuild files from partial bits of a file. I'm doing this as a personal interest.
I recently read about WuaLa [http://www.wua.la/] and I'm interested in how they leverage... | Reed-Solomon error correction codes are a type of block code that can correct multiple symbol errors in data. They are widely used in various applications like data storage, digital communications, and are notably employed in QR codes and DVDs. To get started with using Reed-Solomon for file recovery, you can refer to ... | 49,470 | [
{
"from": "human",
"value": "I'm interested in using a Reed-Solomon error correction [http://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction as a reference] to try to rebuild files from partial bits of a file. I'm doing this as a personal interest.\nI recently read about WuaLa [http://www.wua.la... |
I need to create reports in a C# .NET Windows app. I've got an SQL Server 2005 .I want to display two more field to report(not available in data base table. I want to create these field by adding some data from existing field of data base table)
| Creating reports in a C# .NET Windows application using data from an SQL Server 2005 database and adding derived fields can be accomplished using several reporting tools. Common reporting tools for .NET include Microsoft Report Viewer, Crystal Reports, or third-party libraries like FastReport or Telerik Reporting.
Her... | 45,184 | [
{
"from": "human",
"value": "I need to create reports in a C# .NET Windows app. I've got an SQL Server 2005 .I want to display two more field to report(not available in data base table. I want to create these field by adding some data from existing field of data base table)\n"
},
{
"from": "gpt",
... |
I'm using the following logon trigger on an Oracle 10.2 database:
CREATE OR REPLACE TRIGGER AlterSession_trg
AFTER LOGON ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_COMP=LINGUISTIC';
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT=BINARY_AI';
END AlterSession_trg;
This is intended to make case sensiti... | The trigger you've set up in your Oracle database is indeed intended to alter session parameters when a user logs on, which should enforce the specified NLS settings to handle case sensitivity in queries. However, there are a few reasons why you might still be experiencing case sensitivity when connecting through SQL D... | 48,783 | [
{
"from": "human",
"value": "I'm using the following logon trigger on an Oracle 10.2 database:\nCREATE OR REPLACE TRIGGER AlterSession_trg\nAFTER LOGON ON DATABASE\nBEGIN\n EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_COMP=LINGUISTIC';\n EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT=BINARY_AI';\nEND AlterSess... |
I have a web application (ASP.net 2.0) that has a database (SQL Server) at the background. I'm considering ways how to handle database concurrency if two users insert the same data to the same table at the same time. Are there any way to handle this case? Thanks in advance.
Jimmy
| Handling database concurrency in an ASP.NET application with a SQL Server database is an important consideration, especially when dealing with situations where multiple users may attempt to insert the same data at the same time. Below are several approaches you can take to manage concurrency effectively:
### 1. **Data... | 48,211 | [
{
"from": "human",
"value": "I have a web application (ASP.net 2.0) that has a database (SQL Server) at the background. I'm considering ways how to handle database concurrency if two users insert the same data to the same table at the same time. Are there any way to handle this case? Thanks in advance.\nJim... |
I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings.
How can I do this?
| In Python, you can convert strings to various data types, including signed and unsigned integers, floats, and doubles using the built-in functions and the `struct` module for more complex conversions like fixed sizes. Below are some examples of how to perform these conversions.
### Converting Strings to Integers
1. *... | 48,121 | [
{
"from": "human",
"value": "I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings.\nHow can I do this?\n"
},
{
"from": "gpt",
"value": "In Python, you can convert strings to various data types, including signed an... |
I am trying to wire up dependency injection with Windsor to standard asp.net web forms. I think I have achieved this using a HttpModule and a CustomAttribute (code shown below), although the solution seems a little clunky and was wondering if there is a better supported solution out of the box with Windsor?
There are s... | Your implementation of dependency injection using Castle Windsor in an ASP.NET Web Forms application is certainly a viable approach, especially if you prefer using attributes for injecting dependencies. However, there are indeed ways to refine the solution and make it cleaner or more straightforward. Here are a few sug... | 49,679 | [
{
"from": "human",
"value": "I am trying to wire up dependency injection with Windsor to standard asp.net web forms. I think I have achieved this using a HttpModule and a CustomAttribute (code shown below), although the solution seems a little clunky and was wondering if there is a better supported solution... |
I read the Wikipedia article on scenario testing, but I am sad to say it is very short. I am left wondering: are scenario tests a collection of sequential unit tests? Or, perhaps, like a single multi-step unit test? Do many frameworks support scenario tests, or are they covered by unit testing?
If they have nothing ... | Scenario testing is a software testing technique that focuses on validating specific user scenarios or use cases within the application. Here’s a breakdown of what scenario testing entails and how it relates to unit tests and automation:
### Understanding Scenario Tests
1. **Nature of Scenario Tests**:
- **User-Ce... | 46,355 | [
{
"from": "human",
"value": "I read the Wikipedia article on scenario testing, but I am sad to say it is very short. I am left wondering: are scenario tests a collection of sequential unit tests? Or, perhaps, like a single multi-step unit test? Do many frameworks support scenario tests, or are they cover... |
Right now I'm developing a small canvas oriented 2D graphics engine for a game, and have been looking into several sources for hints to apply to my system's design. But obviously the most battle proven solution out there is flash, so I was wondering how is Flash architectured. I found some sources about Flash's working... | It's great to hear that you're working on a 2D graphics engine and are interested in the architecture behind Flash. While Flash has been a significant player in web graphics, especially before the rise of HTML5 and JavaScript, understanding its architecture can indeed provide valuable insights for your project.
Here a... | 49,160 | [
{
"from": "human",
"value": "Right now I'm developing a small canvas oriented 2D graphics engine for a game, and have been looking into several sources for hints to apply to my system's design. But obviously the most battle proven solution out there is flash, so I was wondering how is Flash architectured. I... |
Currently, I'm working on a project to manage maintenance windows on a database of servers, etc. Basically, I only need to be accurate down to the hour, but allow for them to be set to allow, or disallow, for each day of the week.
I've had a few ideas on how to do this, but since I work by myself, I'm not wanting to co... | It sounds like you are trying to design a flexible system for managing maintenance windows for multiple servers, with specific rules for each hour of the week. Here are a few ideas to help you structure your data for storage and retrieval, considering your requirements:
### Data Representation
Given your requirements... | 49,723 | [
{
"from": "human",
"value": "Currently, I'm working on a project to manage maintenance windows on a database of servers, etc. Basically, I only need to be accurate down to the hour, but allow for them to be set to allow, or disallow, for each day of the week.\nI've had a few ideas on how to do this, but sin... |
Is there a way in SWT to get a monospaced font simply, that works across various operating systems?
For example. this works on Linux, but not Windows:
Font mono = new Font(parent.getDisplay(), "Mono", 10, SWT.NONE);
or do I need to have a method that tries loading varying fonts (Consolas, Terminal, Monaco, Mono) un... | In SWT (Standard Widget Toolkit), there isn't a built-in, cross-platform way to ensure that you get a monospaced font that works across all operating systems, as different systems have different installed fonts. However, you can implement a solution that attempts to load a series of commonly available monospaced fonts,... | 43,895 | [
{
"from": "human",
"value": "Is there a way in SWT to get a monospaced font simply, that works across various operating systems?\nFor example. this works on Linux, but not Windows:\n\n\nFont mono = new Font(parent.getDisplay(), \"Mono\", 10, SWT.NONE);\n\n\nor do I need to have a method that tries loading v... |
How could you send a bitmap over winsock without saving it to a file then sending that? It would also be helpful if you knew how to convert the data after being recieved back into a bitmap.
| Sending a bitmap over Winsock without saving it to a file involves serializing the bitmap data into a byte array and then sending that array over a socket. Here’s how you can achieve this in C++ using the Win32 API for bitmap manipulation and the Winsock API for networking.
### Step 1: Prepare the Bitmap Data
To send... | 45,224 | [
{
"from": "human",
"value": "How could you send a bitmap over winsock without saving it to a file then sending that? It would also be helpful if you knew how to convert the data after being recieved back into a bitmap.\n"
},
{
"from": "gpt",
"value": "Sending a bitmap over Winsock without saving... |
I'm currently in the process of implementing a number of different assignment algorithms for a SalesLead <--> SalesPerson situation. The general idea is quite simple:
A SalesLead signs up on a public website
The code automatically assigns the SalesLead to a SalesPerson using round-robin scheduling (Leads are assigned ... | It sounds like you're on the right track with your idea for implementing a round-robin assignment for sales leads. The basic concept you've described — maintaining a list of salespeople, assigning leads in a round-robin fashion, and possibly storing some state to track assignments — is a solid approach.
Here's a step-... | 48,953 | [
{
"from": "human",
"value": "I'm currently in the process of implementing a number of different assignment algorithms for a SalesLead <--> SalesPerson situation. The general idea is quite simple:\n\nA SalesLead signs up on a public website\nThe code automatically assigns the SalesLead to a SalesPerson using... |
I am looking for some guideline for my new application while choosing ORM. I want to evaluate EF over NHibernate and LINQ to SQL. I need some expert voice from this wonderful community.
You can evaluate on following point.
Scalability
Learning curve
Easy to use
Performance
ETC.
| When evaluating Object-Relational Mappers (ORMs) like Entity Framework (EF), NHibernate, and LINQ to SQL, it’s important to consider several factors including scalability, learning curve, ease of use, performance, and other relevant characteristics. Here’s a comparison based on those criteria:
### 1. Scalability
- **E... | 48,163 | [
{
"from": "human",
"value": "I am looking for some guideline for my new application while choosing ORM. I want to evaluate EF over NHibernate and LINQ to SQL. I need some expert voice from this wonderful community.\nYou can evaluate on following point.\n\nScalability\nLearning curve\nEasy to use\nPerformanc... |
What does it mean that a Transaction Log is Full? I have it the file set to grow 20% when needed. I have 4GBs left on the drive. How do I solve this issue permanently?
Running these commands solves the issue temporarily:
DBCC SHRINKFILE('MyDatabase_log', 1)
BACKUP LOG MyDatabase WITH TRUNCATE_ONLY
DBCC SHRINKFILE('MyD... | When a transaction log is full, it indicates that the log file has reached its maximum capacity and cannot accommodate any more transactions until it is either cleared or space is created within the log file. This can occur when the database's recovery model is set to "Full" or "Bulk-Logged," which means that SQL Serve... | 49,495 | [
{
"from": "human",
"value": "What does it mean that a Transaction Log is Full? I have it the file set to grow 20% when needed. I have 4GBs left on the drive. How do I solve this issue permanently?\nRunning these commands solves the issue temporarily:\n\nDBCC SHRINKFILE('MyDatabase_log', 1)\nBACKUP LOG MyDat... |
I have a DataGrid with RadioButtons in one column using itemRenderer. The DataGrid resides on a TitleWindow which is created and popped-up everytime the user clicks a button. The dataProvider for the DataGrid is an ArrayCollection, and the RadioButtons are selected or not based on a boolean value in each ArrayCollectio... | It seems like you're encountering a complex issue related to how the DataGrid's itemRenderer interacts with the RadioButton's selected state and the underlying data model in your ArrayCollection. The behavior you're observing—particularly the multiple `valueCommit` events for the first row's RadioButton—could be due to... | 49,824 | [
{
"from": "human",
"value": "I have a DataGrid with RadioButtons in one column using itemRenderer. The DataGrid resides on a TitleWindow which is created and popped-up everytime the user clicks a button. The dataProvider for the DataGrid is an ArrayCollection, and the RadioButtons are selected or not based ... |
I am asking about the common techniques which are used in c# to support multilingual interface in windows forms
| Creating a multilingual interface in a Windows Forms application using C# involves several techniques to manage and display different languages based on user preferences. Here are some common techniques used to support multilingual interfaces:
### 1. **Resource Files (.resx)**
- **What**: Use resource files to store ... | 49,959 | [
{
"from": "human",
"value": "I am asking about the common techniques which are used in c# to support multilingual interface in windows forms\n"
},
{
"from": "gpt",
"value": "Creating a multilingual interface in a Windows Forms application using C# involves several techniques to manage and displa... |
I am using an instance of ManualResetEvent to control thread access to a resource but I'm running into problems with it. Does anyone know how I can find out during debugging what the state of the object is?
That is to say I would like to know if the ManualResetEvent is currently blocking any threads and maybe even how... | In .NET, `ManualResetEvent` does not expose its internal state or the number of threads it's blocking directly. However, you can determine whether it is set or not through its `WaitOne()` method. If the event is not set, then threads that call `WaitOne()` will be blocked until it is set. Unfortunately, `ManualResetEven... | 49,665 | [
{
"from": "human",
"value": "I am using an instance of ManualResetEvent to control thread access to a resource but I'm running into problems with it. Does anyone know how I can find out during debugging what the state of the object is?\nThat is to say I would like to know if the ManualResetEvent is current... |
I'm getting the following error when I try to use the JSTL XML taglib:
/server-side-transform.jsp(51,0)
According to TLD or attribute directive in tag file,
attribute xml does not accept any expressions
I'm looking into the tlds etc, but if anyone knows what this is an can save me some time, it'd be appreciated!
If i... | The error you're encountering is due to the fact that the JSTL XML tag library does not accept EL expressions (like `${xml}` and `${xsl}`) for the `xml` and `xslt` attributes of the `<x:transform>` tag. This is a known limitation when working with the JSTL XML tags.
In order to work around this, you need to use a diff... | 48,790 | [
{
"from": "human",
"value": "I'm getting the following error when I try to use the JSTL XML taglib:\n/server-side-transform.jsp(51,0) \nAccording to TLD or attribute directive in tag file,\nattribute xml does not accept any expressions\n\nI'm looking into the tlds etc, but if anyone knows what this is an ca... |
We are building a "configurator" application for conveyors. Basically user comes in and picks a model, then start picking the parts they want. Some components have dependencies on other components. E.g. if I pick Part A, then I am required to select 1 or more Part B's. It is somewhat similar to configuring a PC at Dell... | Creating a configurator application with dependencies and rules between components can indeed benefit from established design patterns and best practices. Below are some suggestions and ideas to help you build a maintainable and scalable application:
### Design Patterns
1. **Chain of Responsibility Pattern**: This pa... | 46,450 | [
{
"from": "human",
"value": "We are building a \"configurator\" application for conveyors. Basically user comes in and picks a model, then start picking the parts they want. Some components have dependencies on other components. E.g. if I pick Part A, then I am required to select 1 or more Part B's. It is s... |
If I click on a package and do control-shift-F10 it only looks for and runs JUnit tests in that package - but I really want it to recurse down into subpackages and run them.
UPDATE: looks like its something else wrong. When I run it on a package that has tests, it still complains there are none (yet if I open a JUnit ... | It seems like you're encountering an issue with running JUnit tests in a package hierarchy from your IDE. Here are some troubleshooting steps and potential solutions to address the problem:
1. **Check the Configuration**:
- Ensure that your test classes are properly annotated with `@Test` and located in a directory... | 48,637 | [
{
"from": "human",
"value": "If I click on a package and do control-shift-F10 it only looks for and runs JUnit tests in that package - but I really want it to recurse down into subpackages and run them. \nUPDATE: looks like its something else wrong. When I run it on a package that has tests, it still compla... |
I'm using Microsoft Visual C# 2008 Express Edition. (And I apologize - this is more of a MS Vis C# usability question than a strict programming question...)
I wrote a little program. when I run it in MS VC# with the debugger, all is well. When I use the "click Once" to generate something to deploy (I'm using the "fr... | Hi Adeena,
I can understand the challenges you're facing, especially if you're transitioning from command-line programming in C++ to a GUI-based environment like Visual C#. Let's dive into your issue.
1. **Debugger vs. Standalone Behavior**: When you run your application in a debugger, it runs in a different context ... | 45,906 | [
{
"from": "human",
"value": "I'm using Microsoft Visual C# 2008 Express Edition. (And I apologize - this is more of a MS Vis C# usability question than a strict programming question...)\nI wrote a little program. when I run it in MS VC# with the debugger, all is well. When I use the \"click Once\" to gen... |
I was planning to implememt owner-drawn of CListCtrl. I thought that drawing an item is after the item is inserted into the control. So my method is declare a class which is derived from CListCtrl and override its DrawItem() method. The problem is DrawItem is never invoked after inserting an item. Is there anything wro... | When implementing owner-drawn features in a `CListCtrl` in MFC, there are specific steps and considerations you must take into account to ensure that your custom drawing code is called appropriately. The `DrawItem` method is indeed the right place for custom drawing of items, but there are a few key things to check and... | 42,211 | [
{
"from": "human",
"value": "I was planning to implememt owner-drawn of CListCtrl. I thought that drawing an item is after the item is inserted into the control. So my method is declare a class which is derived from CListCtrl and override its DrawItem() method. The problem is DrawItem is never invoked after... |
I have a string to tokenize. It's form is HHmmssff where H, m, s, f are digits.
It's supposed to be tokenized into four 2-digit numbers, but I need it to also accept short-hand forms, like sff so it interprets it as 00000sff.
I wanted to use boost::tokenizer's offset_separator but it seems to work only with positive o... | Certainly! Given your requirements for tokenizing a time string formatted as `HHmmssff` or its shorthand forms, we can implement a function that processes the string while accounting for varying lengths. Below is a step-by-step solution in C++ that addresses these specifications without the need for Boost's offset sepa... | 44,624 | [
{
"from": "human",
"value": "I have a string to tokenize. It's form is HHmmssff where H, m, s, f are digits. \nIt's supposed to be tokenized into four 2-digit numbers, but I need it to also accept short-hand forms, like sff so it interprets it as 00000sff.\nI wanted to use boost::tokenizer's offset_separato... |
Are there any object similar to ms-access forms in VB, .NET or other microsoft technologies?
We have been now using Access for developping client interfaces with some success for the last 2 years. We are using a serie of development tools making the best use of a metamodel (we have tables for forms, local queries, menu... | If you are considering transitioning from Microsoft Access forms to other Microsoft technologies, there are a few options that can provide similar functionality for building client interfaces. Below are some alternatives that might fit your needs:
### 1. **Windows Forms (WinForms)**
- **Description**: A part of the... | 49,358 | [
{
"from": "human",
"value": "Are there any object similar to ms-access forms in VB, .NET or other microsoft technologies?\nWe have been now using Access for developping client interfaces with some success for the last 2 years. We are using a serie of development tools making the best use of a metamodel (we ... |
I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall.
I understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough to recursively delete an entire folder that has content created after the installation.
I noticed the similar Stack Overf... | To delete an entire directory, including any contents that were created after the installation, using a custom action in WiX, you can indeed invoke a batch script during the uninstall process. Below is a basic example to help you set this up.
### Steps to Create a Custom Action to Run a Batch Script
1. **Create the B... | 48,008 | [
{
"from": "human",
"value": "I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall.\nI understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough to recursively delete an entire folder that has content created after the insta... |
I'm trying to code what I think is a fairly routine AJAX pattern using TreeViews and UpdatePanels. My situation is this:
I have a TreeView within an UpdatePanel. I have a Literal within another UpdatePanel. When the user clicks on a node within the TreeView, the contents of the Literal are updated. Now, since the whole... | You can definitely achieve what you're looking for without having to resort to client-side callbacks. Instead, you can utilize the `ClientClick` event of the TreeView nodes combined with a bit of JavaScript to clear the contents of the Literal. Here’s a general approach to how you can implement this:
### Step 1: Creat... | 49,171 | [
{
"from": "human",
"value": "I'm trying to code what I think is a fairly routine AJAX pattern using TreeViews and UpdatePanels. My situation is this:\nI have a TreeView within an UpdatePanel. I have a Literal within another UpdatePanel. When the user clicks on a node within the TreeView, the contents of the... |
I've been working with Swing for a while now but the whole model/structure of JFrames, paint(), super, etc is all murky in my mind.
I need a clear explanation or link that will explain how the whole GUI system is organized.
| Understanding the Swing framework in Java can be challenging at first due to its structure and the numerous components it includes. Let's break it down and clarify how the Swing GUI system is organized.
### Key Concepts of Swing
1. **Components**: In Swing, the GUI is built using components such as `JFrame`, `JPanel`... | 49,090 | [
{
"from": "human",
"value": "I've been working with Swing for a while now but the whole model/structure of JFrames, paint(), super, etc is all murky in my mind.\nI need a clear explanation or link that will explain how the whole GUI system is organized.\n"
},
{
"from": "gpt",
"value": "Understan... |
Backstory
I'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible).
On my local windows machine I've put the following my environment.rb
config.gem "capistrano", :version => "2.5.2"
config.gem "net-... | It looks like you're experiencing a `LoadError` when trying to run Capistrano after freezing it in your `vendor` directory. The error message indicates that the `capistrano/cli` file could not be found, which suggests that there may be an issue with the gem structure or the way it's being required.
Here are a few pote... | 47,862 | [
{
"from": "human",
"value": "Backstory\nI'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible).\nOn my local windows machine I've put the following my environment.rb\nconfig.gem \"capi... |
I am currently using the UltraWebGrid control of Infragistics and I am displaying the sum of values of a column in the footer.
The problem is that, since I am using paging, the total displayed in the footer is being calculated by the values of the current page only, but I want the sum of all the elements in the sour... | In the case of using the UltraWebGrid control from Infragistics, when you are working with paging, the footer calculations can indeed be limited to just the items currently visible on the page. To achieve the total sum of a column across all records in the data source (not just the current page), you have a couple of o... | 46,936 | [
{
"from": "human",
"value": "I am currently using the UltraWebGrid control of Infragistics and I am displaying the sum of values of a column in the footer. \nThe problem is that, since I am using paging, the total displayed in the footer is being calculated by the values of the current page only, but I wa... |
Is tight looping in a program bad?
I have an application that has two threads for a game-physics simulator. An updateGame thread and a render thread. The render thread is throttled by causing the thread to sleep for some milliseconds (to achieve the frame-rate I want) and the updateGame thread (that updates my in game... | Tight looping, or busy-waiting, can be problematic in certain scenarios, particularly when it leads to high CPU usage and inefficiency. However, whether it's "bad" depends on the specific requirements and constraints of your application.
### Pros and Cons of Tight Looping
#### Pros:
1. **Responsiveness**: In scenario... | 47,355 | [
{
"from": "human",
"value": "Is tight looping in a program bad?\nI have an application that has two threads for a game-physics simulator. An updateGame thread and a render thread. The render thread is throttled by causing the thread to sleep for some milliseconds (to achieve the frame-rate I want) and the ... |
How can I continuously capture images from a webcam?
I want to experiment with object recognition (by maybe using java media framework).
I was thinking of creating two threads
one thread:
Node 1: capture live image
Node 2: save image as "1.jpg"
Node 3: wait 5 seconds
Node 4: repeat...
other thread:
Node 1: wait unt... | To continuously capture images from a webcam and process them using Java, you can utilize Java Media Framework (JMF) or other libraries like OpenCV, which provides more modern functionality and flexibility. Below, I outline a basic structure for capturing images and processing them using threads, specifically tailored ... | 46,794 | [
{
"from": "human",
"value": "How can I continuously capture images from a webcam?\nI want to experiment with object recognition (by maybe using java media framework). \nI was thinking of creating two threads\none thread:\n\nNode 1: capture live image\nNode 2: save image as \"1.jpg\"\nNode 3: wait 5 seconds\... |
I'm building a caching system and I want it to be ready for distributed caching a la memcached. What I'm looking to do is to convert a traditional Hashtable/Dictionary of (string -> object) and to allow per-item expiration to be handled by the Cache itself, in the way that the System.Web.Caching.Cache can do.
I'm awar... | Building a caching system that is compatible with distributed caches like memcached is an interesting project. Here are some key considerations and resources to help you with your goals:
### Key Concepts for Distributed Caching
1. **Key-Value Store**: Distributed caches like memcached operate using a simple key-value... | 49,342 | [
{
"from": "human",
"value": "I'm building a caching system and I want it to be ready for distributed caching a la memcached. What I'm looking to do is to convert a traditional Hashtable/Dictionary of (string -> object) and to allow per-item expiration to be handled by the Cache itself, in the way that the ... |
We are contracting an external consultant out to generate XHTML (Transitional) and CSS for most of the major pages of a new project we are currently working on.
I've been asked to put together a list of guidelines for them so that we can be sure that a certain level of quality can be expected. As a bit of technical bac... | Absolutely, creating a set of guidelines for external consultants is a smart approach to ensure that the output meets your expectations. Below is a comprehensive set of guidelines that you can customize to fit your project's specific needs. This list covers XHTML, CSS, and other best practices relevant to integrating w... | 39,002 | [
{
"from": "human",
"value": "We are contracting an external consultant out to generate XHTML (Transitional) and CSS for most of the major pages of a new project we are currently working on.\nI've been asked to put together a list of guidelines for them so that we can be sure that a certain level of quality ... |
I'll phrase this in the form of an example to make it more clear.
Say I have a vector of animals and I want to go through the array and see if the elements are either dogs or cats?
class Dog: public Animal{/*...*/};
class Cat: public Animal{/*...*/};
int main()
{
vector<Animal*> stuff;
//cramming the dogs and cats in.... | Yes, you can determine the type of an object at runtime in C++ without creating a new object by using `dynamic_cast` or the `typeid` operator. Both methods can help you identify whether an `Animal*` pointer is pointing to a `Dog` or a `Cat`. Here's how you can do it using both approaches:
### Using `dynamic_cast`
`dy... | 47,535 | [
{
"from": "human",
"value": "I'll phrase this in the form of an example to make it more clear.\nSay I have a vector of animals and I want to go through the array and see if the elements are either dogs or cats?\nclass Dog: public Animal{/*...*/};\nclass Cat: public Animal{/*...*/};\n\nint main()\n{\nvector<... |
I would like to use a timeframe selector in a web page, that is optimized for touchscreen usage. (e.g. large buttons).
I am actualy looking for a control that mimics iPhone UI for selecting a time frame or a time interval, say from 10:30 AM to 15:00 PM.
| Creating a touchscreen-friendly timeframe selector that mimics the iPhone UI can be achieved by using HTML, CSS, and JavaScript. The key elements to focus on are large touch-friendly buttons, a clean layout, and easy date and time selection. Below is a simple implementation of a time frame selector that meets these req... | 47,388 | [
{
"from": "human",
"value": "I would like to use a timeframe selector in a web page, that is optimized for touchscreen usage. (e.g. large buttons).\nI am actualy looking for a control that mimics iPhone UI for selecting a time frame or a time interval, say from 10:30 AM to 15:00 PM.\n"
},
{
"from": ... |
I'm working in two different Oracle schemas on two different instances of Oracle. I've defined several types and type collections to transfer data between these schemas. The problem I'm running into is that even though the type have exactly the same definitions (same scripts used to create both sets in the schemas) O... | When dealing with object types across database links in Oracle, it's important to understand that Oracle treats object types defined in different schemas or databases as distinct types even if their definitions are identical. This can be a significant challenge when trying to pass object types across database links.
H... | 49,851 | [
{
"from": "human",
"value": "I'm working in two different Oracle schemas on two different instances of Oracle. I've defined several types and type collections to transfer data between these schemas. The problem I'm running into is that even though the type have exactly the same definitions (same scripts u... |
When programming C++ we used to create copy constructors when needed (or so we were taught). When switching to Java a few years ago, I noticed that the Cloneable interface is now being used instead. C# followed the same route defining the ICloneable interface. It seems to me that cloning is part of the definition of OO... | The distinction between copy constructors in C++ and cloning interfaces like `Cloneable` in Java and `ICloneable` in C# arises from a combination of design philosophies, memory management considerations, and the goals of encapsulation in object-oriented programming (OOP). Here are some of the key reasons for favoring c... | 49,170 | [
{
"from": "human",
"value": "When programming C++ we used to create copy constructors when needed (or so we were taught). When switching to Java a few years ago, I noticed that the Cloneable interface is now being used instead. C# followed the same route defining the ICloneable interface. It seems to me tha... |
I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence:
int Fibonacci(int n)
{
if (n <= 1)
return n;
else
return Fibonacci(n - 1) + Fibonacci(n... | To analyze the computational complexity of the naive recursive implementation of the Fibonacci sequence, we need to look at how many times the function is called as `n` increases.
The given Fibonacci function can be expressed as follows:
```c
int Fibonacci(int n) {
if (n <= 1)
return n;
else
r... | 47,072 | [
{
"from": "human",
"value": "I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence:\nint Fibonacci(int n)\n{\n if (n <= 1)\n return n;\n else... |
I am using an ASP.NET ModalPopupExtender on a page and would like to prevent the dialog from hiding when the user presses the ok button in certain conditions. But I can't seem to find a way.
What I am looking for is something like this
ajax:ModalPopupExtender
...
OnOkScript="return confirm('You sure?')"
...
if confir... | In ASP.NET Web Forms, the `ModalPopupExtender` from the Ajax Control Toolkit does not provide a direct way to prevent it from closing based on the result of an `OnOkScript`. However, you can achieve the desired behavior by leveraging JavaScript to control the closing of the modal.
You can handle the click event of the... | 47,048 | [
{
"from": "human",
"value": "I am using an ASP.NET ModalPopupExtender on a page and would like to prevent the dialog from hiding when the user presses the ok button in certain conditions. But I can't seem to find a way.\nWhat I am looking for is something like this\najax:ModalPopupExtender\n...\nOnOkScript... |
I was wondering if anyone had a better idea how to do this. atm returning IQueryable<Member> as ObjectQuery<Member> seems dirty to me.
namespace Falcon.Business.Repositories
{
using System;
using System.Data.Objects;
using System.Linq;
using Falcon.Business.Criteria;
using Falcon.Business.Entities;
... | The design of your `MemberRepository` could be improved by adhering to the principles of clean code and proper use of IQueryable<T> instead of ObjectQuery<T>. The use of IQueryable<T> is more idiomatic in modern LINQ and Entity Framework usage. Here are several suggestions to improve your code:
1. **Use IQueryable<Mem... | 45,776 | [
{
"from": "human",
"value": "I was wondering if anyone had a better idea how to do this. atm returning IQueryable<Member> as ObjectQuery<Member> seems dirty to me.\nnamespace Falcon.Business.Repositories\n{\n using System;\n using System.Data.Objects;\n using System.Linq;\n using Falcon.Business... |
I have 3 tables in database shown below. And I want to make a report just like shown link below. How can I do it with datagrid or datalist? Which one is the best chois? I have tried to do it for a week.
COMPANY: ID_COMPANY, COMPANY_NAME
PRODUCT: ID_PRODUCT, PRODUCT_NAME
PRODUCT_SALE: ID_COMPANY, ID_PRODUCT, SALE_COU... | To create the report you're looking for with your database structure involving the tables `COMPANY`, `PRODUCT`, and `PRODUCT_SALE`, you can indeed use either a DataGrid or a DataList in your application. The choice between the two primarily depends on your specific requirements for displaying and manipulating the data.... | 49,211 | [
{
"from": "human",
"value": "I have 3 tables in database shown below. And I want to make a report just like shown link below. How can I do it with datagrid or datalist? Which one is the best chois? I have tried to do it for a week. \n\n\nCOMPANY: ID_COMPANY, COMPANY_NAME\nPRODUCT: ID_PRODUCT, PRODUCT_NAME\n... |
How can I do Exp and Imp by using PL/SQL?
| In PL/SQL, the terms "Exp" and "Imp" often refer to exporting and importing data from and to a database, respectively. To achieve these tasks, you typically use Oracle's Data Pump (which replaces the older export/import utilities) or the traditional `EXP` and `IMP` utilities. Below, I will explain both methods, althoug... | 45,683 | [
{
"from": "human",
"value": "How can I do Exp and Imp by using PL/SQL?\n"
},
{
"from": "gpt",
"value": "In PL/SQL, the terms \"Exp\" and \"Imp\" often refer to exporting and importing data from and to a database, respectively. To achieve these tasks, you typically use Oracle's Data Pump (which r... |
I have created a form to add a user to a database and make user available for login.
Now I have two password fields (the second is for validation of the first). How can I add a validator for this kind of validation to zend_form?
This is my code for the two password fields:
$password = new Zend_Form_Element_Password... | To add a validator that ensures the two password fields match in a Zend Form, you'll need to add a custom validator or use an existing `Zend_Validate_Identical` validator. This validator checks that the value of one field matches the value of another field.
In your case, you'll want to define the validation for the se... | 44,839 | [
{
"from": "human",
"value": "I have created a form to add a user to a database and make user available for login.\nNow I have two password fields (the second is for validation of the first). How can I add a validator for this kind of validation to zend_form?\nThis is my code for the two password fields:\n ... |
What techniques are available for sending an email via a webpage or a form on a webpage?
I've got some background idea that you POST the form data to a script but I've don't really know what a cgi script is (I'd love to learn if this is the suggested method!) or what the current practice is.
This is just to provide so... | Sending emails via a webpage or form is a common task in web development. You’re correct that the typical approach involves submitting form data to a server-side script. Here are some common techniques and best practices, as well as an explanation of CGI and alternatives:
### Techniques for Sending Email from a Web Fo... | 46,191 | [
{
"from": "human",
"value": "What techniques are available for sending an email via a webpage or a form on a webpage? \nI've got some background idea that you POST the form data to a script but I've don't really know what a cgi script is (I'd love to learn if this is the suggested method!) or what the curre... |
Background
I'm researching the efficiency of messaging within contemporary web applications, examining the use of alternatives to XML. This is a university project whose results will be released publicly - the greater the participation of the community, the greater the value of the results that are given back.
I need a... | Here are some real-life examples of how XML is used in HTTP responses across different web applications, along with some context and explanations:
### Example 1: Weather Data API
**URL**: `http://api.weatherapi.com/v1/current.xml?key=YOUR_API_KEY&q=London`
**Response**:
```xml
<current>
<location>
<name>... | 45,835 | [
{
"from": "human",
"value": "Background\nI'm researching the efficiency of messaging within contemporary web applications, examining the use of alternatives to XML. This is a university project whose results will be released publicly - the greater the participation of the community, the greater the value of... |
I want to create extra rules in FXCop. Custom Rules to help ensure specific best practices like checking against inline sql.
I'm really looking for good resources and examples. Thanks!
| Creating custom rules in FxCop (now succeeded by .NET Analyzer and other tools) can help enforce coding standards and best practices in your .NET applications. Below are resources and guidance for creating custom FxCop rules, specifically aimed at checking for practices like inline SQL.
### Resources
1. **Microsoft D... | 46,167 | [
{
"from": "human",
"value": "I want to create extra rules in FXCop. Custom Rules to help ensure specific best practices like checking against inline sql. \nI'm really looking for good resources and examples. Thanks! \n"
},
{
"from": "gpt",
"value": "Creating custom rules in FxCop (now succeeded ... |
The building (a museum) has 7 levels (+3 to -3), each divided into different rooms/areas. Hovering over an area will reveal a popup describing that area.
I'm looking for some markup that will accurately represent the 7 levels and their areas.
The plan should make sense and be 'navigable' without any CSS/JS.
Edit: Some... | To create a semantic representation of a museum with 7 levels (from +3 to -3), each containing different rooms or areas, we can use a combination of HTML elements to convey the structure. We can utilize `<section>` elements to represent each level, and within each level, we can use `<article>` or `<div>` elements to re... | 49,421 | [
{
"from": "human",
"value": "The building (a museum) has 7 levels (+3 to -3), each divided into different rooms/areas. Hovering over an area will reveal a popup describing that area.\nI'm looking for some markup that will accurately represent the 7 levels and their areas.\nThe plan should make sense and be ... |
I'm developing my first ASP.NET MVC application. This application tracks events, users, donors, etc. for a charitable organization. In my events controller I support standard CRUD operations with New/Edit/Show views (delete is done via a button on Show view). But I also want to list all of the events.
Is it better ... | When designing your ASP.NET MVC application, it's important to maintain clarity and intuitiveness in your user interface. Let's break down your options and considerations for the Index view.
### Option 1: Keep Index and List Separate
**Pros:**
- **Clarity**: Keeping the Index view and the List view separate can provi... | 49,254 | [
{
"from": "human",
"value": "I'm developing my first ASP.NET MVC application. This application tracks events, users, donors, etc. for a charitable organization. In my events controller I support standard CRUD operations with New/Edit/Show views (delete is done via a button on Show view). But I also want... |
I want to build into mt ASP.NET application the ability for users to fill up forms, but the forms are not something I can hard-code into my (Enterprise) software.
So I need one screen that lets end users create the forms. Doing it the 2.0 way, I just love what PollDaddy did in their survey editor (great job guys!). How... | To replicate a form builder similar to the one used by PollDaddy, you'll need to create an application that allows users to dynamically create forms through a user-friendly interface. Here are the components you'll need to consider, as well as tools and libraries that can help you achieve this:
### 1. **Framework and ... | 46,000 | [
{
"from": "human",
"value": "I want to build into mt ASP.NET application the ability for users to fill up forms, but the forms are not something I can hard-code into my (Enterprise) software.\nSo I need one screen that lets end users create the forms. Doing it the 2.0 way, I just love what PollDaddy did in ... |
What is the best way to deal with XML documents, XSD etc in C# 2.0?
Which classes to use etc. What are the best practices of parsing and making XML documents etc.
EDIT: .Net 3.5 suggestions are also welcome.
| Dealing with XML documents in C# (both in .NET 2.0 and .NET 3.5) involves using several built-in classes that are part of the `System.Xml` namespace. Here’s a rundown of common approaches, classes, and best practices for working with XML and XSD in these versions of .NET.
### XML Parsing and Manipulation in C# 2.0
1.... | 40,479 | [
{
"from": "human",
"value": "What is the best way to deal with XML documents, XSD etc in C# 2.0? \nWhich classes to use etc. What are the best practices of parsing and making XML documents etc. \nEDIT: .Net 3.5 suggestions are also welcome.\n"
},
{
"from": "gpt",
"value": "Dealing with XML docum... |
I'm working with a client to plan the topology for a public facing SharePoint internet site.
The SharePoint installation will live in the client's DMZ and the plan is to use an existing SQL Server machine to host the SharePoint databases.
The problem is that there is no domain in the DMZ - and the client doesn't want... | Setting up a SharePoint farm in a DMZ without a domain can certainly present challenges, particularly regarding authentication and security. Let's explore your options in more detail.
### Understanding the Challenges
1. **Domain Membership**: SharePoint is designed to work within an Active Directory domain environmen... | 49,043 | [
{
"from": "human",
"value": "I'm working with a client to plan the topology for a public facing SharePoint internet site. \nThe SharePoint installation will live in the client's DMZ and the plan is to use an existing SQL Server machine to host the SharePoint databases. \nThe problem is that there is no doma... |
My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security module to determine if it's something we can/should use.
Our security requirements are pretty basic; a user just needs to be able ... | Your observations about Spring Security are valid, and it's good that you're exploring how to integrate it into your application. Indeed, Spring Security provides a way to manage authentication and authorization in a more structured way than using custom logic.
### Accessing Authentication in Spring Security
To acces... | 45,632 | [
{
"from": "human",
"value": "My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security module to determine if it's something we can/should use. \nOur security requirements are p... |
I just answered a question where I said that while string interning is good it can be a security problem since a strings value can be easily accessed later on.
And while I'm quite sure this is true :-) I am not sure how easy it really is. I tried googling the topic but I got no relevant results (the google-fu is weak ... | String interning in .NET is a memory optimization technique that allows multiple instances of the same string literal to reference the same memory allocation, which can save memory and improve performance. However, it does raise some potential security concerns, especially when sensitive information (such as passwords ... | 49,417 | [
{
"from": "human",
"value": "I just answered a question where I said that while string interning is good it can be a security problem since a strings value can be easily accessed later on. \nAnd while I'm quite sure this is true :-) I am not sure how easy it really is. I tried googling the topic but I got n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.