instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm trying to make a simple blackjack program. Sadly, I'm having problems right off the bat with generating a deck of cards. #include <iostream> #include <vector> using namespace std; int main() { vector<char> deck; char suit[] = {'h','d','c','s'}; char card[] = {'2','3','4','5','6','7','8','9','10','J','...
It looks like you're on the right track, but you are encountering a couple of issues in your code. Let's address them step by step. ### Issues: 1. **Character Type for Cards**: You're correct that a single `char` cannot hold the value "10" because it is not a single character. Instead, you should use a `string` ty...
23,600
[ { "from": "human", "value": "I'm trying to make a simple blackjack program. Sadly, I'm having problems right off the bat with generating a deck of cards.\n#include <iostream>\n#include <vector>\n\nusing namespace std;\n\nint main() {\n vector<char> deck;\n char suit[] = {'h','d','c','s'};\n char ca...
How do I go about making an image or section of the page full screen on the iPhone? I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page. Currently if I drop the image on a blank page and I ...
To display an image in full screen on an iPhone within a webpage while allowing it to be clickable (e.g., linking back to a previous page), you can use HTML, CSS, and a little JavaScript to handle the full-screen functionality. Here's a simple guide on how to achieve that: ### Step 1: HTML Structure Create an HTML fi...
18,166
[ { "from": "human", "value": "How do I go about making an image or section of the page full screen on the iPhone?\nI have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page.\nCurrently...
I'm still kinda new in ASP.NET and recently I found out about SubSonic, which I started to use. Now it seems funny and such a waste of time (and nerves) when I look back into times when I was developing without SubSonic and jQuery. And there probably are a lot of libraries and frameworks that speeds up development. Whi...
It's great to hear that you're exploring ASP.NET and libraries like SubSonic! Indeed, many libraries and frameworks can significantly speed up development, improve code quality, and enhance the overall development experience. Here are some popular ones that you might find useful: ### For ASP.NET Development: 1. **Ent...
24,839
[ { "from": "human", "value": "I'm still kinda new in ASP.NET and recently I found out about SubSonic, which I started to use. Now it seems funny and such a waste of time (and nerves) when I look back into times when I was developing without SubSonic and jQuery. And there probably are a lot of libraries and f...
I imagine there are many of you out there who have developed an application online which automates a lot of processes and saves people at your company time and money. The question is, what are your experiences with developing that application, having it all set in place, then "spicing" it up with some Ajax, so it makes...
Developing an application that automates processes can indeed save time and money while improving user experience. Integrating AJAX (Asynchronous JavaScript and XML) into an existing web application can significantly enhance interactivity and responsiveness, making the application feel more fluid and modern. ### Exper...
22,720
[ { "from": "human", "value": "I imagine there are many of you out there who have developed an application online which automates a lot of processes and saves people at your company time and money.\nThe question is, what are your experiences with developing that application, having it all set in place, then \...
For example: from datetime import <c-x><c-o>{list of modules inside datetime package}
In Python, the `datetime` module contains several classes and functions for manipulating dates and times. Here's a list of the main components inside the `datetime` module that you can access: 1. **Classes:** - `datetime.date`: Represents a date (year, month, and day). - `datetime.time`: Represents a time (hour,...
26,460
[ { "from": "human", "value": "For example:\nfrom datetime import <c-x><c-o>{list of modules inside datetime package}\n\n" }, { "from": "gpt", "value": "In Python, the `datetime` module contains several classes and functions for manipulating dates and times. Here's a list of the main components in...
I am starting to develop an Eclipse plugin (technically, an OSGi plugin) and one of the first problems I've run into is that I can't seem to control the commons-logging output as I normally would. I've included the commons-logging package in the plugin dependencies, and indeed, when I log something (at INFO or higher s...
It seems like you are facing issues with configuring the logging in your Eclipse plugin using Log4j and commons-logging, particularly with controlling the logging levels and outputs. This can sometimes be tricky due to how Eclipse and OSGi handle logging and class loading. Here are some steps and suggestions that may h...
24,258
[ { "from": "human", "value": "I am starting to develop an Eclipse plugin (technically, an OSGi plugin) and one of the first problems I've run into is that I can't seem to control the commons-logging output as I normally would.\nI've included the commons-logging package in the plugin dependencies, and indeed,...
I have a double value f and would like a way to nudge it very slightly larger (or smaller) to get a new value that will be as close as possible to the original but still strictly greater than (or less than) the original. It doesn't have to be close down to the last bit—it's more important that whatever change I make is...
To nudge a double value in a way that ensures it is strictly greater than or strictly less than the original, you can use the concept of the smallest increment for floating-point numbers, often referred to as the "next representable value". In many programming languages, including Python and Java, you can find these v...
21,124
[ { "from": "human", "value": "I have a double value f and would like a way to nudge it very slightly larger (or smaller) to get a new value that will be as close as possible to the original but still strictly greater than (or less than) the original.\nIt doesn't have to be close down to the last bit—it's mor...
I know it is not strictly a programmer question, on the other hand, I would really like to be able to do a simple svn up on the production servers, which would save us a lot of hassle. Or production servers are within a corporate network, and access is only allowed through a gateway server. From that we can access the ...
Setting up an SSH tunnel through a corporate network to facilitate `svn up` on production servers can indeed streamline your deployment process. Below are the steps to create an SSH tunnel and a couple of additional alternatives you might consider: ### Option 1: Setting up an SSH Tunnel 1. **Prerequisites:** - Ens...
22,759
[ { "from": "human", "value": "I know it is not strictly a programmer question, on the other hand, I would really like to be able to do a simple svn up on the production servers, which would save us a lot of hassle.\nOr production servers are within a corporate network, and access is only allowed through a ga...
I've got a DOMNode object that has some attributes. $Node->attributes is a DOMNamedNodeMap, which has no methods for removing one of the entries in the map. The DOMNode class also has no methods for removing attributes from an element. I've looked through a number of the other related classes and none of them seem to ...
To remove an attribute from a DOMNode in PHP, you should use the `removeAttribute` method, which is provided by the `DOMElement` class. The `DOMNamedNodeMap` does not provide a direct way to remove attributes, but `DOMElement` allows you to manipulate the attributes directly. Here’s how you can remove an attribute: ...
27,397
[ { "from": "human", "value": "I've got a DOMNode object that has some attributes. $Node->attributes is a DOMNamedNodeMap, which has no methods for removing one of the entries in the map. The DOMNode class also has no methods for removing attributes from an element. I've looked through a number of the other ...
I have seen recent updates in term of record sets being updated so that we can scroll back and forth through the data it points to. Why they were initially designed for a forward only traversal. Is there any impact using the new version?
Record sets, particularly in the context of data structures and databases, have historically been designed for forward-only traversal for several reasons: 1. **Simplicity**: Forward-only traversal simplifies the implementation of data structures and algorithms. It avoids the complexity of managing the state required f...
25,823
[ { "from": "human", "value": "I have seen recent updates in term of record sets being updated so that we can scroll back and forth through the data it points to.\nWhy they were initially designed for a forward only traversal. Is there any impact using the new version?\n" }, { "from": "gpt", "valu...
This case arises in a real-life situation where invalid data was in (and continuing to come into) an Oracle database which is extracted into a data processing system in Focus. Focus would choke and die on some rows with invalid time portions. The Oracle DBA would then go and copy the datetime into the affected column...
In Oracle databases, date and time data types are typically expected to conform to specific formats and ranges. However, under certain conditions, it is possible for invalid or corrupted data to be inserted into `TIMESTAMP`, `DATE`, or other date-related columns. Here are some scenarios that can lead to invalid data be...
24,251
[ { "from": "human", "value": "This case arises in a real-life situation where invalid data was in (and continuing to come into) an Oracle database which is extracted into a data processing system in Focus. Focus would choke and die on some rows with invalid time portions. The Oracle DBA would then go and c...
As I recall BOOST_MPL_ASSERT was once preferred. Is this still true? Anyone know why?
`BOOST_MPL_ASSERT` was a macro used in the Boost Metaprogramming Library (MPL) for asserting properties at compile-time. However, its usage has generally been superseded by more modern and preferred alternatives, primarily `BOOST_STATIC_ASSERT` or the more recent `static_assert` introduced in C++11. The reasons for mo...
28,415
[ { "from": "human", "value": "As I recall BOOST_MPL_ASSERT was once preferred. Is this still true? Anyone know why?\n" }, { "from": "gpt", "value": "`BOOST_MPL_ASSERT` was a macro used in the Boost Metaprogramming Library (MPL) for asserting properties at compile-time. However, its usage has ge...
I've currently skimming through the Python-bindings for Redland and haven't found a clean way to do transactions on the storage engine via it. I found some model-transactions within the low-level Redland module: import RDF, Redland storage = RDF.Storage(...) model = RDF.Model(storage) Redland.librdf_model_transaction_...
The Redland RDF library provides support for transactions, but it's important to understand how these transactions operate at different layers of the storage engine. In the example you provided, you are starting a transaction on a model (`RDF.Model`) and committing or rolling back based on whether an exception occurs....
26,698
[ { "from": "human", "value": "I've currently skimming through the Python-bindings for Redland and haven't found a clean way to do transactions on the storage engine via it. I found some model-transactions within the low-level Redland module:\nimport RDF, Redland\n\nstorage = RDF.Storage(...)\nmodel = RDF.Mod...
I'm planning to build a USB device that has buttons that some software needs to respond to, and indicators that the software needs to control. I'm new to USB, so I'm looking for any pointers that will get me started.
Building a USB device that incorporates buttons and indicators (like LEDs) is a great project that can help you learn about USB communication, microcontrollers, and hardware interfacing. Here are some pointers to get you started: ### 1. **Choose Your Microcontroller** - **Microcontrollers with USB Support:** Look f...
18,666
[ { "from": "human", "value": "I'm planning to build a USB device that has buttons that some software needs to respond to, and indicators that the software needs to control. I'm new to USB, so I'm looking for any pointers that will get me started.\n" }, { "from": "gpt", "value": "Building a USB de...
I would like to dynamically switch the video source in a streaming video application. However, the different video sources have unique image dimensions. I can generate individual SDP files for each video source, but I would like to combine them into a single SDP file so that the viewing client could automatically resiz...
To combine multiple SDP files into a single SDP file, you can use a "multicast" approach that includes multiple media descriptions within a single SDP file. Each media description can specify its own video source and parameters while maintaining the overall structure of an SDP file. Below is an example of how to merge ...
26,390
[ { "from": "human", "value": "I would like to dynamically switch the video source in a streaming video application. However, the different video sources have unique image dimensions. I can generate individual SDP files for each video source, but I would like to combine them into a single SDP file so that the...
I was looking through a thread dump of a java process, and notice some threads blocked by signal dispatcher. What is signal dispatcher? What does it do?
In the context of Java, a **signal dispatcher** is part of the Java Virtual Machine (JVM) that handles signals received from the operating system. Signals are a form of inter-process communication (IPC) that can notify a process to perform certain actions or to handle exceptional conditions. For instance, signals can b...
23,998
[ { "from": "human", "value": "I was looking through a thread dump of a java process, and notice some threads blocked by signal dispatcher.\nWhat is signal dispatcher? What does it do?\n" }, { "from": "gpt", "value": "In the context of Java, a **signal dispatcher** is part of the Java Virtual Mac...
I have a DataGridView bound to a DataView. The grid can be sorted by the user on any column. I add a row to the grid by calling NewRow on the DataView's underlying DataTable, then adding it to the DataTable's Rows collection. How can I select the newly-added row in the grid? I tried doing it by creating a BindingManage...
To reliably select the newly added row in a `DataGridView` that is bound to a `DataView`, even when the grid is sorted, you need to follow these steps: 1. After adding the new row to the `DataTable`, you should update the `DataView` to reflect the changes. This is important because the `DataView` may not automatically...
21,542
[ { "from": "human", "value": "I have a DataGridView bound to a DataView. The grid can be sorted by the user on any column.\nI add a row to the grid by calling NewRow on the DataView's underlying DataTable, then adding it to the DataTable's Rows collection. How can I select the newly-added row in the grid?\nI...
The situation is as follows: I've got 2 models: 'Action' and 'User'. These models refer to the tables 'actions' and 'users', respectively. My action table contains a column user_id. At this moment, I need an overview of all actions, and the users to which they are assigned to. When i use $action->fetchAll(), I only hav...
To achieve your goal of retrieving a list of actions along with the corresponding user information without breaking the default behavior of your models, you can consider using a database join in your query. Here's a general approach you can follow: 1. **Use a Join in the Query**: Instead of modifying the `fetchAll()` ...
24,057
[ { "from": "human", "value": "The situation is as follows: I've got 2 models: 'Action' and 'User'. These models refer to the tables 'actions' and 'users', respectively.\nMy action table contains a column user_id. At this moment, I need an overview of all actions, and the users to which they are assigned to. ...
I have a table with two fields of interest for this particular exercise: a CHAR(3) ID and a DATETIME. The ID identifies the submitter of the data - several thousand rows. The DATETIME is not necessarily unique, either. (The primary keys are other fields of the table.) Data for this table is submitted every six month...
Certainly! You can achieve this by querying your database to identify submitters who have submitted only half of their expected data. To determine this, you can group by the submitter ID and count the unique submission periods (in this case, July-December and January-June). Here's an SQL script that will help you ide...
25,484
[ { "from": "human", "value": "I have a table with two fields of interest for this particular exercise: a CHAR(3) ID and a DATETIME. The ID identifies the submitter of the data - several thousand rows. The DATETIME is not necessarily unique, either. (The primary keys are other fields of the table.)\nData f...
Does anyone know of a nice (and preferably free) way to integrate Prolog and C#? Im looking to create a Prolog dll or similar to call from my managed code, and retrieve an answer once all the processing has been complete. Im looking for it to be predominantly one sided (c# calls Prolog). I have seen this question which...
Integrating Prolog with C# can be quite a challenge, but there are several approaches you can take to achieve this. Here are a few options that can help you integrate Prolog and C# effectively: ### 1. **SWI-Prolog with .NET Interoperability** SWI-Prolog is a popular Prolog environment that supports interfacing with ot...
20,591
[ { "from": "human", "value": "Does anyone know of a nice (and preferably free) way to integrate Prolog and C#?\nIm looking to create a Prolog dll or similar to call from my managed code, and retrieve an answer once all the processing has been complete. Im looking for it to be predominantly one sided (c# call...
Which sql data type should we use for number bases primary key: int bigint numeric float
When choosing a SQL data type for a primary key that represents numbers, the options you provided (int, bigint, numeric, float) have different characteristics. Here’s a breakdown: 1. **int**: - Typically represents a 32-bit integer. - Can hold values from -2,147,483,648 to 2,147,483,647. - Suitable for most s...
26,949
[ { "from": "human", "value": "Which sql data type should we use for number bases primary key:\n\nint\nbigint\nnumeric\nfloat\n\n" }, { "from": "gpt", "value": "When choosing a SQL data type for a primary key that represents numbers, the options you provided (int, bigint, numeric, float) have diff...
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know of a non-intrusive way to solve what i'm trying to do below (namely, linking objects to each other without triggering infinite loops)? I try to create a asp.net-mvc web application, and get a StackOverFlowException. A controller tr...
It looks like you're facing a classic case of cyclic references or mutual dependencies in your data retrieval logic, which is leading to a `StackOverflowException`. This typically happens when the method calls create a loop, causing the same methods to be executed repeatedly without a base case to terminate the recursi...
24,285
[ { "from": "human", "value": "edit #2: Question solved halfways. Look below\nAs a follow-up question, does anyone know of a non-intrusive way to solve what i'm trying to do below (namely, linking objects to each other without triggering infinite loops)?\n\nI try to create a asp.net-mvc web application, and g...
I'm using MySQL 5.0.45 on CentOS 5.1. SELECT DISTINCT(email) FROM newsletter Returns 217259 rows SELECT COUNT(DISTINCT(email)) FROM newsletter Returns 180698 for the count. SELECT COUNT(*) FROM (SELECT DISTINCT(email) FROM newsletter) AS foo Returns 180698 for the count. Shouldn't all 3 queries return the same value? H...
The behavior you're observing with your MySQL queries might be related to how the `SELECT DISTINCT` statement interacts with the storage engine, particularly with the MyISAM engine and older versions of MySQL, like 5.0.45. Let's analyze the three queries: 1. **Query 1**: ```sql SELECT DISTINCT(email) FROM newsl...
25,132
[ { "from": "human", "value": "I'm using MySQL 5.0.45 on CentOS 5.1.\nSELECT DISTINCT(email) FROM newsletter\nReturns 217259 rows\nSELECT COUNT(DISTINCT(email)) FROM newsletter\nReturns 180698 for the count.\nSELECT COUNT(*) FROM (SELECT DISTINCT(email) FROM newsletter) AS foo\nReturns 180698 for the count.\n...
I want to mount some internal and external NTFS drives in CentOS 5.2, preferably automatically upon boot-up. Doesn't matter if it's read/write or read-only, but read/write would be preferred, if it's safe. Edit: Thanks for all answers, I summarized them below =)
Mounting NTFS drives on CentOS 5.2 (which is quite outdated) can be accomplished using the `ntfs-3g` driver, which provides read and write support for NTFS file systems. Here's how to set it up to automatically mount your internal and external NTFS drives during boot. ### Step 1: Install `ntfs-3g` First, you need to e...
23,999
[ { "from": "human", "value": "I want to mount some internal and external NTFS drives in CentOS 5.2, preferably automatically upon boot-up. Doesn't matter if it's read/write or read-only, but read/write would be preferred, if it's safe.\nEdit: Thanks for all answers, I summarized them below =)\n" }, { ...
We have a database library in C# that we can use like this: DatabaseConnection conn = DatabaseConnection.FromConnectionString("..."); This library hides many of the differences between different database engines, like SQL function names, parameter names and specifications, etc. Internally, the DatabaseConnection class...
In Python, the most "pythonic" way to achieve your desired functionality would typically be to use a class method to handle the logic of constructing the appropriate subclass based on the connection string. While it is possible to implement a constructor that does this directly, it is generally less clear and can lead ...
22,699
[ { "from": "human", "value": "We have a database library in C# that we can use like this:\nDatabaseConnection conn = DatabaseConnection.FromConnectionString(\"...\");\n\nThis library hides many of the differences between different database engines, like SQL function names, parameter names and specifications,...
How can I represent the following in XSD. <price-update> <![CDATA[ arbitrary data goes here ]]> </price-update>
To represent the provided XML structure containing a `CDATA` section in XSD (XML Schema Definition), you can use the `<xs:element>` along with an `<xs:complexType>` that allows for character data content. In this case, `CDATA` is essentially used to denote that the data can include characters that might otherwise be tr...
24,866
[ { "from": "human", "value": "How can I represent the following in XSD.\n<price-update>\n <![CDATA[\n arbitrary data goes here\n ]]>\n</price-update>\n\n" }, { "from": "gpt", "value": "To represent the provided XML structure containing a `CDATA` section in XSD (XML Schema Definition), ...
I'm looking for a regex that can pull out quoted sections in a string, both single and double quotes. IE: "This is 'an example', \"of an input string\"" Matches: an example of an input string I wrote up this: [\"|'][A-Za-z0-9\\W]+[\"|'] It works but does anyone see any flaws with it? EDIT: The main issue I see is ...
Your regex has a good start, but there are a few issues with it that could cause unexpected results: 1. **Character Class Usage**: The character class `A-Za-z0-9\\W` includes `\\W`, which is a bit of a mistake since you don't need the escape backslash before `W`. Additionally, this class currently matches any characte...
22,053
[ { "from": "human", "value": "I'm looking for a regex that can pull out quoted sections in a string, both single and double quotes.\nIE:\n\"This is 'an example', \\\"of an input string\\\"\"\n\nMatches:\n\nan example\nof an input string\n\nI wrote up this:\n [\\\"|'][A-Za-z0-9\\\\W]+[\\\"|']\n\nIt works but ...
The print functionality of Excel (using VBA) is extremely slow. I'm hoping someone has a way of speeding the printing up (without using the Excel 4 Macro trick). Here's how I do it now: Application.ScreenUpdating = False With ActiveSheet.PageSetup -various setup statements which I've already minimized- End With ...
When printing from Excel using VBA, several factors can contribute to the speed of the printing process. You have already implemented some optimizations, such as disabling `ScreenUpdating`. Below are additional techniques to help speed up the printing process while avoiding the Excel 4 Macro trick: ### 1. Disable Othe...
24,104
[ { "from": "human", "value": "The print functionality of Excel (using VBA) is extremely slow. I'm hoping someone has a way of speeding the printing up (without using the Excel 4 Macro trick). Here's how I do it now:\nApplication.ScreenUpdating = False\n\nWith ActiveSheet.PageSetup\n\n -various setup statem...
I am interested in unprecedented, cool, and esoteric ways to use namespaces. I know that many advanced developers "hack" namespaces by, for example, using them as references to string constants. In the string constants example, the idea is to implement DRY (DRY = Do Not Repeat Yourself) and you can keep all your str...
Namespaces are a powerful tool in programming languages like C#, Ruby, and Java, and while their primary function is to organize code and avoid name conflicts, there are indeed several creative and esoteric ways to leverage namespaces beyond their conventional usage. Here are some unique approaches: ### 1. **Static Ex...
16,668
[ { "from": "human", "value": "I am interested in unprecedented, cool, and esoteric ways to use namespaces. I know that many advanced developers \"hack\" namespaces by, for example, using them as references to string constants. In the string constants example, the idea is to implement DRY (DRY = Do Not Rep...
I have to check some code and run it. I have the URL: svn+ssh://myuser@www.myclient.com/home/svn/project/trunk I have a file with their private key. What do I do to get this code?
To check out code from an SVN repository using the URL and a private key, you will need to ensure you have the necessary tools installed and follow these steps: ### Prerequisites 1. **SVN Client**: Make sure you have an SVN client installed on your machine. If you're using Linux or macOS, `svn` might already be instal...
23,741
[ { "from": "human", "value": "I have to check some code and run it. I have the URL:\nsvn+ssh://myuser@www.myclient.com/home/svn/project/trunk\n\nI have a file with their private key. What do I do to get this code?\n" }, { "from": "gpt", "value": "To check out code from an SVN repository using the...
I have an OLD server running DG/UX that will in the near future be unsupported. I have some character based oracle forms that need to be migrated off of this machine. Does anyone know what sort of migration strategy Oralce has for upgrading these Character Based reports. It doesnt have to be the newest version, it does...
Migrating character-based Oracle Forms from an older DG/UX server to a supported environment can be challenging, but there are several strategies you can consider. Here are some steps and recommendations to facilitate the migration process: ### 1. **Assess Current Environment:** - **Identify Dependencies:** Underst...
23,880
[ { "from": "human", "value": "I have an OLD server running DG/UX that will in the near future be unsupported. I have some character based oracle forms that need to be migrated off of this machine. Does anyone know what sort of migration strategy Oralce has for upgrading these Character Based reports. It does...
I want to find an SQL query to find rows where field1 does not contain $x. How can I do this?
To find rows where `field1` does not contain a specific string `$x` in SQL, you can use the `NOT LIKE` operator combined with wildcards. Here is an example SQL query assuming you are using a database that supports SQL syntax, such as MySQL, PostgreSQL, or SQL Server: ```sql SELECT * FROM your_table WHERE field1 NOT LI...
28,725
[ { "from": "human", "value": "I want to find an SQL query to find rows where field1 does not contain $x. How can I do this?\n" }, { "from": "gpt", "value": "To find rows where `field1` does not contain a specific string `$x` in SQL, you can use the `NOT LIKE` operator combined with wildcards. Her...
XAMPP makes configuring a local LAMP stack for windows a breeze. So it's quite disappointing that enabling .htaccess files is such a nightmare. My problem: I've got a PHP application that requires apache/php to search for an /includes/ directory contained within the application. To do this, .htaccess files must be allo...
It looks like you've encountered a few common pitfalls when working with XAMPP and .htaccess files. Let's address your setup and the issues you faced step by step: 1. **Naming the .htaccess file**: It’s critical that the file is named `.htaccess` and not `htaccess.txt`. Apache will only recognize files that are exactl...
25,266
[ { "from": "human", "value": "XAMPP makes configuring a local LAMP stack for windows a breeze. So it's quite disappointing that enabling .htaccess files is such a nightmare.\nMy problem:\nI've got a PHP application that requires apache/php to search for an /includes/ directory contained within the applicatio...
The code ${personRequest.constraints.requestStatus.inList} in my gsp file throws a NullPointerException, but new PersonRequest().constraints.. works. Why? Isn't constraints static?
In Groovy, the behavior you're encountering can be attributed to the way dynamic properties and GORM (Grails Object Relational Mapping) work. Here’s an explanation of why you're experiencing a `NullPointerException` when accessing `personRequest.constraints.requestStatus.inList` directly. ### Understanding Constraints...
24,439
[ { "from": "human", "value": "The code\n${personRequest.constraints.requestStatus.inList}\n\nin my gsp file throws a NullPointerException, but new PersonRequest().constraints.. works. Why? Isn't constraints static?\n" }, { "from": "gpt", "value": "In Groovy, the behavior you're encountering can b...
Nightly, I need to fill a SQL Server 2005 table from an ODBC source with over 8 million records. Currently I am using an insert statement from linked server with syntax select similar to this: Insert Into SQLStagingTable from Select * from OpenQuery(ODBCSource, 'Select * from SourceTable') This is really inefficient a...
To efficiently transfer over 8 million records from an ODBC source to a SQL Server 2005 table while managing memory constraints, you have a few options. The goal is to avoid loading all the data into memory at once, which can lead to performance degradation or application failure due to memory exhaustion. Here are some...
25,074
[ { "from": "human", "value": "Nightly, I need to fill a SQL Server 2005 table from an ODBC source with over 8 million records. Currently I am using an insert statement from linked server with syntax select similar to this:\nInsert Into SQLStagingTable from Select * from OpenQuery(ODBCSource, 'Select * from S...
How do I insert a current_timestamp into an SQL Server 2005 database datable with a timestamp column? It should be simple but I cannot get it to work. Examples would be much appreciated.
In SQL Server, the `timestamp` data type is a special type that is used for versioning purposes and is automatically updated by SQL Server whenever a row is modified. It does not store a date or time, and therefore you cannot insert a `current_timestamp` into a `timestamp` column. If you want to store the current date...
26,115
[ { "from": "human", "value": "How do I insert a current_timestamp into an SQL Server 2005 database datable with a timestamp column?\nIt should be simple but I cannot get it to work. Examples would be much appreciated.\n" }, { "from": "gpt", "value": "In SQL Server, the `timestamp` data type is a...
I have a local svn repository in my PC, I have been using it for a hobby project and it wasn't meant to be accessible to anyone, so I commited files with passwords in them. Now, I'm thinking of making the repository available for other people and I don't want to have that data there. Is there a way to crawl the reposit...
Yes, you can clean your local SVN repository by replacing sensitive information such as passwords and account data with a placeholder (like "xxxxxxxxxx"). However, you should be aware that simply replacing the text in your working copy and committing will not remove the sensitive information from the repository history...
23,878
[ { "from": "human", "value": "I have a local svn repository in my PC, I have been using it for a hobby project and it wasn't meant to be accessible to anyone, so I commited files with passwords in them.\nNow, I'm thinking of making the repository available for other people and I don't want to have that data ...
I want to read line n1->n2 from file foo.c into the current buffer. I tried: 147,227r /path/to/foo/foo.c But I get: "E16: Invalid range", though I am certain that foo.c contains more than 1000 lines.
The error "E16: Invalid range" typically indicates that the specified range of lines is not valid in the context where you are trying to use it. In your case, you are trying to read lines from a file into the current buffer in Vim. The correct command to read lines from another file into your current buffer should be ...
27,493
[ { "from": "human", "value": "I want to read line n1->n2 from file foo.c into the current buffer.\nI tried: 147,227r /path/to/foo/foo.c\nBut I get: \"E16: Invalid range\", though I am certain that foo.c contains more than 1000 lines.\n" }, { "from": "gpt", "value": "The error \"E16: Invalid range...
I have the following query: SELECT c.* FROM companies AS c JOIN users AS u USING(companyid) JOIN jobs AS j USING(userid) JOIN useraccounts AS us USING(userid) WHERE j.jobid = 123; I have the following questions: Is the USING syntax synonymous with ON syntax? Are these joins evaluated left to right? In other words, d...
Let's break down your query and the questions you have. ### 1. Is the `USING` syntax synonymous with `ON` syntax? Yes, the `USING` syntax is a shorthand that simplifies the join condition when both tables have a column with the same name that you want to join on. For example, `USING(column_name)` is equivalent to `ON ...
22,348
[ { "from": "human", "value": "I have the following query:\nSELECT c.*\nFROM companies AS c\nJOIN users AS u USING(companyid)\nJOIN jobs AS j USING(userid)\nJOIN useraccounts AS us USING(userid)\nWHERE j.jobid = 123;\n\nI have the following questions:\n\nIs the USING syntax synonymous with ON syntax?\nAre the...
I'm exploring various options for mapping common C# code constructs to C++ CUDA code for running on a GPU. The structure of the system is as follows (arrows represent method calls): C# program -> C# GPU lib -> C++ CUDA implementation lib A method in the GPU library could look something like this: public static void Map...
Translating C# code constructs directly to C++ code for CUDA execution involves several challenges, especially when dealing with high-level constructs such as `Func<T,T>`. Here are some approaches you might consider for achieving this mapping: ### 1. **Expression Trees and Code Generation:** You can use C#'s Expressio...
20,366
[ { "from": "human", "value": "I'm exploring various options for mapping common C# code constructs to C++ CUDA code for running on a GPU. The structure of the system is as follows (arrows represent method calls):\nC# program -> C# GPU lib -> C++ CUDA implementation lib\nA method in the GPU library could look ...
I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.0 - RUBY VERSION: 1.8...
It looks like you're using a rather old version of Ruby (1.8.6) and RubyGems (1.3.0), which may be contributing to your performance issues. Ruby 1.8 is no longer supported, and many improvements and optimizations have been made in newer versions of Ruby, including performance enhancements in library loading and depende...
25,650
[ { "from": "human", "value": "I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries.\nWhen I run \n$ gem environment\nRubyGems Environment:\n - ...
There are several application systems that pass messages to each other as part of their work process. Due to technical constraints revolving transactional integrity, the application data and message delivery are all committed into a single mainframe DB2 database. The messages are not directly passed to BizTalk server (...
To achieve the mapping of fields from the inner XML content stored in the `MESSAGE_DATA` attribute of your `DB2Message` schema to your target `EAIMessage` schema in BizTalk Server 2006 R2, you will need to perform the following steps. This approach will involve using the BizTalk Mapper and the necessary functoids to ex...
26,972
[ { "from": "human", "value": "There are several application systems that pass messages to each other as part of their work process. Due to technical constraints revolving transactional integrity, the application data and message delivery are all committed into a single mainframe DB2 database. The messages ar...
I am actually new to this forum and I kept trying for a few days to find an easy way to copy an entire LDAP subtree to another tree. Since I couldn't find anything useful, i thought of dropping a question here as well. Does anybody know how to do this programatically ? For normal operations like add, remove, search, I'...
Welcome to the forum! Copying an entire LDAP subtree to another tree can be a bit tricky since LDAP operations do not have a direct "copy" command. However, you can programmatically achieve this by retrieving the entries from the source subtree and then adding them to the target subtree. You can utilize Spring LDAP for...
22,340
[ { "from": "human", "value": "I am actually new to this forum and I kept trying for a few days to find an easy way to copy an entire LDAP subtree to another tree. Since I couldn't find anything useful, i thought of dropping a question here as well. Does anybody know how to do this programatically ?\nFor norm...
I think the options screen in Office 2007 is much preferrable to the "traditional" fixed-size options dialog with multiple tabbed pages. What would be the best way to create a similar options screen for my own .NET application? Is there an existing control I can buy (or use for free) to do this? Would it be easier t...
Creating a user-friendly options screen similar to what you've described in Office 2007 can indeed enhance the user experience in your .NET application. Below are several approaches and considerations for implementing such a design, particularly focusing on WPF, which provides more flexibility for UI customization comp...
24,243
[ { "from": "human", "value": "I think the options screen in Office 2007 is much preferrable to the \"traditional\" fixed-size options dialog with multiple tabbed pages. What would be the best way to create a similar options screen for my own .NET application? Is there an existing control I can buy (or use ...
I got tired of trying Delphi every year hoping that I will find a stable version to upgrade from my good old Delphi 7. Should I bother to try Delphi 2009? Or it is as unstable as the previous versions and should I wait until Delphi 2010? Thanks
If you're considering upgrading from Delphi 7 and are looking at Delphi 2009, there are a few things to keep in mind: 1. **Stability**: Delphi 2009 was a significant upgrade over Delphi 7, particularly with the introduction of Unicode support and generics. However, like many major updates, it had its share of bugs and...
28,697
[ { "from": "human", "value": "I got tired of trying Delphi every year hoping that I will find a stable version to upgrade from my good old Delphi 7.\nShould I bother to try Delphi 2009? Or it is as unstable as the previous versions and should I wait until Delphi 2010?\nThanks\n" }, { "from": "gpt", ...
I'm trying to do a very simple INSERT using VB.NET. For some reason I'm getting a SqlException on every insert though. The data is inserted, but still get the following: Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'dbo.Employee'. The statement has been terminated When I check...
The error you are encountering indicates that there is an attempt to insert a duplicate key into the `Employee` table, specifically violating the primary key constraint defined for the `PK_User`. The fact that this error occurs even when the data is successfully inserted suggests that there might be an issue with the l...
23,461
[ { "from": "human", "value": "I'm trying to do a very simple INSERT using VB.NET. For some reason I'm getting a SqlException on every insert though. The data is inserted, but still get the following: \nViolation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'dbo.Employee'. The ...
I'm not talking about a post build event for a project. Rather, I want to run an executable automatically after the entire solution is built. Is there a way to do a post build event for the solution?
In Visual Studio, there is no built-in feature for running an executable automatically after an entire solution is built, since the post-build events are configured at the project level rather than the solution level. However, you can achieve this through a few different approaches: ### Option 1: Use a Custom MSBuild ...
24,369
[ { "from": "human", "value": "I'm not talking about a post build event for a project. Rather, I want to run an executable automatically after the entire solution is built. Is there a way to do a post build event for the solution?\n" }, { "from": "gpt", "value": "In Visual Studio, there is no buil...
One problem I have with open-source is not often the product or documentation, but the level of community involvement and support. Response time for some questions on official forums can take more than a week, which can honestly make a big difference when choosing a platform for commercial services use. However, I find...
Evaluating community involvement and support in an open-source project can indeed be challenging but is crucial for ensuring that your investment in the platform pays off. Here are some steps and strategies you can use to assess the community support before adopting an open-source solution: ### 1. **Research Community...
22,170
[ { "from": "human", "value": "One problem I have with open-source is not often the product or documentation, but the level of community involvement and support. Response time for some questions on official forums can take more than a week, which can honestly make a big difference when choosing a platform for...
So I need to track changes that happen on a Mysql table. I was thinking of using triggers to log all the changes made to it and then save these changes in another table. Then I will have a cron script get all these changes and propagate the changes into the Mssql database. I really dont expect a lot of information to b...
Your approach of using triggers in MySQL to log changes is a good start for tracking changes in your database. Here are some considerations and suggestions that could improve your implementation and help meet your time sensitivity requirement: ### 1. Use MySQL Triggers for Change Logging Using triggers is a straightf...
25,334
[ { "from": "human", "value": "So I need to track changes that happen on a Mysql table. I was thinking of using triggers to log all the changes made to it and then save these changes in another table. Then I will have a cron script get all these changes and propagate the changes into the Mssql database.\nI re...
I was playing a bit with Windows Vista (still using XP) and I liked how the standard Control Panel worked. Do you think this design is good also for normal applications? I like the idea of showing main topics with large fonts + icons. Details within each main topic are displayed using a small font and are immediatelly ...
The design of the Windows Vista Control Panel indeed offered a user-friendly approach by presenting main topics in a clear and visually appealing manner with large fonts and icons, while allowing easy access to more detailed options. This kind of layout can be effective for applications, particularly in the following s...
25,319
[ { "from": "human", "value": "I was playing a bit with Windows Vista (still using XP) and I liked how the standard Control Panel worked. Do you think this design is good also for normal applications?\nI like the idea of showing main topics with large fonts + icons. Details within each main topic are displaye...
A quick search gives me tawbaware wc, but it does not accept stdout as input stream, meaning I can not use pipe within a DOS session. Note: I can not install cygwin or use powershell (which would have allowed a '|foreach-object {(get-content $_).count}') unxutils and and gnuwin32 Packages might have this feature...
If you're looking for a way to count lines of input from stdout in a Windows command prompt (DOS session) without using PowerShell or installing Cygwin, you can consider using some available utilities like those from UnxUtils or GnuWin32. However, if you have access to standard Windows commands, you can achieve line co...
29,557
[ { "from": "human", "value": "A quick search gives me tawbaware wc, but it does not accept stdout as input stream, meaning I can not use pipe within a DOS session.\nNote: \nI can not install cygwin or use powershell (which would have allowed a '|foreach-object {(get-content $_).count}')\nunxutils and and gn...
I'm using the current version of restful_authentication that is found on github and I'm having a bunch of strange session issues. The server seems to be somehow assigning sessions to users it shouldn't be. This only happens when crossing the logged out/logged in barrier. Here's an example. With no sessions active on th...
It sounds like you're experiencing a rather tricky issue with session management in your Rails application, particularly when using the `restful_authentication` plugin. Here are some suggestions and considerations that might help you resolve the problem: ### Possible Causes and Solutions: 1. **Session Store Configura...
23,378
[ { "from": "human", "value": "I'm using the current version of restful_authentication that is found on github and I'm having a bunch of strange session issues. The server seems to be somehow assigning sessions to users it shouldn't be. This only happens when crossing the logged out/logged in barrier.\nHere's...
In xp 32bit this line compiles with not problem however in vista 64bit this line: m_FuncAddr = ::GetProcAddress (somthing); gives the following error error C2440: '=' : cannot convert from 'FARPROC' to 'int (__cdecl *)(void)' GetProcAddress is defined as WINBASEAPI FARPROC WINAPI GetProcAddress (somthing) And m_F...
The confusion here stems from the use of calling conventions and the way they are applied to function pointers and function calls in C/C++. Let's clarify a few things regarding calling conventions and your specific case. ### Understanding Calling Conventions 1. **Calling Convention**: This specifies how functions rec...
23,246
[ { "from": "human", "value": "In xp 32bit this line compiles with not problem however in vista 64bit this line:\nm_FuncAddr = ::GetProcAddress (somthing);\n\ngives the following error\n\nerror C2440: '=' : cannot convert from\n 'FARPROC' to 'int (__cdecl *)(void)'\n\nGetProcAddress is defined as\nWINBASEAPI...
How are the UDP and TCP protocols used in MMORPG client/server communication? For example: Does the client broadcast (player position, etc) via UDP to the server? or vice versa? Or is it more like using TCP where the Client requests that the server move the player. The server receives the request, moves the player and...
In MMORPGs (Massively Multiplayer Online Role-Playing Games), both UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) play critical roles in client/server communication, but they are used in different contexts due to their inherent characteristics. ### UDP vs. TCP in MMORPGs 1. **UDP (User Datagram ...
21,210
[ { "from": "human", "value": "How are the UDP and TCP protocols used in MMORPG client/server communication?\nFor example:\nDoes the client broadcast (player position, etc) via UDP to the server? or vice versa?\nOr is it more like using TCP where the Client requests that the server move the player. The serve...
I know VS2008 has the remove and sort function for cleaning up using directives, as does Resharper. Apart from your code being "clean" and removing the problem of referencing namespaces which might not exist in the future, what are the benefits of maintaining a "clean" list of using directives? Less code? Faster compil...
Maintaining a clean list of using directives in your code can provide several benefits beyond just aesthetics. Here are some key advantages: 1. **Readability**: A clean list of using directives improves code readability. It allows developers to quickly understand which namespaces are being used, making it easier to na...
24,508
[ { "from": "human", "value": "I know VS2008 has the remove and sort function for cleaning up using directives, as does Resharper. Apart from your code being \"clean\" and removing the problem of referencing namespaces which might not exist in the future, what are the benefits of maintaining a \"clean\" list ...
So, I've started to create some Ruby unit tests that use Selenium RC to test my web app directly in the browser. I'm using the Selenum-Client for ruby. I've created a base class for all my other selenium tests to inherit from. This creates numerous SeleniumDriver instances and all the methods that are missing are cal...
Your current implementation is indeed a simple way to run tests against multiple browsers using Selenium RC in Ruby. However, as you've noted, when one test fails, it causes the entire test suite to fail, making it difficult to identify which specific browser caused the issue. To address this, you can modify your app...
21,274
[ { "from": "human", "value": "So, I've started to create some Ruby unit tests that use Selenium RC to test my web app directly in the browser. I'm using the Selenum-Client for ruby. I've created a base class for all my other selenium tests to inherit from.\nThis creates numerous SeleniumDriver instances an...
How can I tell if SP1 has been installed on VS2008? e.g. If I'm working on a co-worker's machine - how can I tell if he/she has installed SP1 for VS2008?
To determine if Service Pack 1 (SP1) for Visual Studio 2008 has been installed on a machine, you can check the version of the Visual Studio 2008 installation. Here are a couple of methods to verify this: ### Method 1: Check via the Visual Studio Interface 1. **Open Visual Studio 2008.** 2. **Go to the Help Menu:** Cli...
21,662
[ { "from": "human", "value": "How can I tell if SP1 has been installed on VS2008? e.g. If I'm working on a co-worker's machine - how can I tell if he/she has installed SP1 for VS2008?\n" }, { "from": "gpt", "value": "To determine if Service Pack 1 (SP1) for Visual Studio 2008 has been installed o...
I am just learning about app.config in respect of creating custom sections. I have that part working, it compiles and gets the information out as required but I get warnings about it could not find the schema information. I have done a bit of googling and could not find a simple explanation of this situation. The appr...
Hi Jon, You're correct that creating custom sections in the `app.config` file is a common practice in .NET applications for managing configuration settings. When it comes to schema files (XSD files) for these custom sections, they're essential for validation, and it's good that you want to ensure they're included prop...
22,881
[ { "from": "human", "value": "I am just learning about app.config in respect of creating custom sections. I have that part working, it compiles and gets the information out as required but I get warnings about it could not find the schema information.\nI have done a bit of googling and could not find a simp...
Spending thousand of hours in front of my computer, ergonomics became quickly a main issue. For the monitor or the keyboard, technical solutions exist. But for the mouse, I never get used to the trackball and putting a little pillow under my wrist made me feel uncomfortable. So I started to swap the hand that holds the...
It's great to hear that you've found a solution that works for you by switching hands for your mouse usage! This kind of adaptability can be beneficial not only for ergonomics but also for developing ambidexterity. However, as you've noted, it might not be feasible for everyone. Here are some alternative suggestions th...
25,978
[ { "from": "human", "value": "Spending thousand of hours in front of my computer, ergonomics became quickly a main issue.\nFor the monitor or the keyboard, technical solutions exist. But for the mouse, I never get used to the trackball and putting a little pillow under my wrist made me feel uncomfortable.\nS...
The default chart object in the SQL Server (2005) Business Intelligence Development Studio doesn't seem to some have formatting options like : specifying the text direction of labels in the x and y axis adding a trendline to a bar chart arbitrarily resizing items in a chart - for example, if I resize the chart object,...
The default charting capabilities in SQL Server 2005 Business Intelligence Development Studio (BIDS) can be somewhat limited, and you might encounter challenges like those you mentioned. Here are some suggestions and resources to help you with these formatting issues: ### 1. Workarounds for Formatting Problems **Text...
21,387
[ { "from": "human", "value": "The default chart object in the SQL Server (2005) Business Intelligence Development Studio doesn't seem to some have formatting options like :\n\nspecifying the text direction of labels in the x and y axis\nadding a trendline to a bar chart\narbitrarily resizing items in a chart...
As far as I know ON_WM_MEASUREITEM does not get called in Custom Draw list control. It is only used if control is Owner Drawn. I have found a way to do that, but it is somewhat a HACK and I still can not control gaps between items they are set up somehow automatically. The trick is that you can create CImageList with t...
To achieve custom item sizes and spacing in a list control, using the Owner Draw mechanism is indeed one of the best approaches, particularly when it comes to fine-tuning the appearance of items. Below are a couple of options you can consider, each with its advantages and disadvantages. ### 1. Fully Owner Drawn Contro...
24,200
[ { "from": "human", "value": "As far as I know ON_WM_MEASUREITEM does not get called in Custom Draw list control. It is only used if control is Owner Drawn.\nI have found a way to do that, but it is somewhat a HACK and I still can not control gaps between items they are set up somehow automatically.\nThe tri...
When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit: > git commit --amend Unfortunately the commit can't be pushed back to the re...
The issue you're encountering is because when you use `git commit --amend`, it changes the commit history by creating a new commit that replaces the old one. Since your local branch now has a different history from the remote branch, Git prevents you from pushing it to avoid losing commits that may exist on the remote....
27,040
[ { "from": "human", "value": "When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit:\n> git commit --amend\n\nUnfortunate...
How do I properly represent a different timezone using the datetime module? The following example using myTimeZone() only works because I know that EDT is one hour ahead of me. What is the replacement for that commented part of the code? import datetime, re from datetime import tzinfo class myTimeZone(tzinfo): """...
To properly represent different time zones in Python using the `datetime` module, you should use the `pytz` library or Python's built-in `zoneinfo` module (available in Python 3.9 and above) for time zone support. This approach allows you to handle different time zones more effectively than trying to manually calculate...
18,863
[ { "from": "human", "value": "How do I properly represent a different timezone using the datetime module? The following example using myTimeZone() only works because I know that EDT is one hour ahead of me. What is the replacement for that commented part of the code?\nimport datetime, re\nfrom datetime impor...
I'm using an istream which could be stringstream, ifstream or a user-defined stream type and I need to know if, in the case of an ifstream, it was not opened in binary mode (so I can throw an exception). I have tried the following method: if ((_is.flags() & ios::binary) == 0) throw exception(...) but no exception ...
The `std::ios::flags()` method returns a bitmask that contains several flags, including the `ios::binary` flag. When you check if a stream is not opened in binary mode, you need to check if the `ios::binary` flag is not set in the flags. However, the behavior you're observing (that `flags()` returns 0x201 instead of ...
25,020
[ { "from": "human", "value": "I'm using an istream which could be stringstream, ifstream or a user-defined stream type and I need to know if, in the case of an ifstream, it was not opened in binary mode (so I can throw an exception). I have tried the following method:\nif ((_is.flags() & ios::binary) == 0)\n...
I have the following class which uses BinaryReader internally and implements IDisposable. class DisposableClass : IDisposable { private BinaryReader reader; public DisposableClass(Stream stream) { reader = new BinaryReader(stream); } protected virtual void Dispo...
In C#, the `Dispose` method is defined in the `IDisposable` interface, and the `BinaryReader` class implements this interface. However, the `Dispose` method of `BinaryReader` is not a public method that can be called directly on the `BinaryReader` instance; it's an explicit interface implementation. This means that `Di...
21,979
[ { "from": "human", "value": "I have the following class which uses BinaryReader internally and implements IDisposable.\n\nclass DisposableClass : IDisposable\n {\n private BinaryReader reader;\n public DisposableClass(Stream stream)\n {\n reader = new BinaryReader(stream);...
I have an single threaded, embedded application that allocates and deallocates lots and lots of small blocks (32-64b). The perfect scenario for a cache based allocator. And although I could TRY to write one it'll likely be a waste of time, and not as well tested and tuned as some solution that's already been on the fro...
For your embedded application that requires efficient memory allocation for small blocks (32-64 bytes) while working with the Lua Virtual Machine, using a specialized memory allocator designed for such patterns is indeed a good approach. Here are some options you might consider, each with its strengths: ### 1. **jemal...
24,465
[ { "from": "human", "value": "I have an single threaded, embedded application that allocates and deallocates lots and lots of small blocks (32-64b). The perfect scenario for a cache based allocator. And although I could TRY to write one it'll likely be a waste of time, and not as well tested and tuned as som...
I have several stored procedures in my database that are used to load data from a datamart that is housed in a separate database. These procedures are, generally, in the form: CREATE PROCEDURE load_stuff WITH EXECUTE AS OWNER AS INSERT INTO my_db.dbo.report_table ( column_a ) SELECT column_b FROM data_mart.dbo.so...
The issue you're encountering is indeed related to SQL Server's security model, specifically how it handles cross-database access and ownership chaining. Let's break down the situation and your solution. ### Understanding the Issue 1. **Cross-Database Ownership Chaining**: SQL Server does allow ownership chaining wit...
21,753
[ { "from": "human", "value": "I have several stored procedures in my database that are used to load data from a datamart that is housed in a separate database. These procedures are, generally, in the form:\n\nCREATE PROCEDURE load_stuff\nWITH EXECUTE AS OWNER AS\nINSERT INTO my_db.dbo.report_table\n(\n col...
I have a setup where there are two Cocoa processes, communicating with Distributed Objects (DO). The client is using garbage collection, the server is not. It seems that the client hangs on to the distant objects outside of my direct references to them. This means that even after I don't have references to the objects,...
In a situation where you're using Distributed Objects (DO) with garbage collection (GC) on the client and traditional reference counting on the server, it can be tricky to manage the lifecycle of distant objects, especially since the GC system may hold on to references longer than expected. ### Suggestions to Release ...
24,975
[ { "from": "human", "value": "I have a setup where there are two Cocoa processes, communicating with Distributed Objects (DO). The client is using garbage collection, the server is not.\nIt seems that the client hangs on to the distant objects outside of my direct references to them. This means that even aft...
I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it. What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time.
Scanning uploaded files for viruses on a Linux server can be accomplished using several different tools and approaches. Here are some popular options, along with considerations for performance when handling multiple users and files: ### Options for Virus Scanning: 1. **ClamAV**: - **Overview**: ClamAV is an open-s...
20,132
[ { "from": "human", "value": "I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it.\nWhat are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time.\n" }, { "from": "gpt", "value": "...
In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key to either Option or Command key on my Mac...
To configure your MacBook Pro to use the Option key as the Meta key for bash in iTerm, you can follow these steps: 1. **Open iTerm Preferences:** - Open iTerm2. - Press `Cmd + ,` to open Preferences. 2. **Configure the Option Key:** - Navigate to the "Profiles" tab. - Select the profile you are using (usu...
24,630
[ { "from": "human", "value": "In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key ...
I cannot correctly position the div form in my layout. By looking at my div placement and css below, does anyone have an idea what I could be doing wrong? #floorplans { float: left; height: 165px; width: 203px; border-right: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; position: relative; ...
The issue you're experiencing with the `#form` div dropping down is likely due to the float behavior of the previous divs in your layout. Since the `#projects` div has a `clear: left` property, it forces the `#form` div to start on a new line. To resolve this and have the `#form` div positioned correctly without drop...
21,968
[ { "from": "human", "value": "I cannot correctly position the div form in my layout.\nBy looking at my div placement and css below, does anyone have an idea what I could be doing wrong?\n\n\n#floorplans {\r\n float: left;\r\n height: 165px;\r\n width: 203px;\r\n border-right: 1px solid #FFFFFF;\r\n bord...
i use the maven-buildnumber-plugin to generate my version number for JAR/WAR/EAR packages. So when doing a compile i'll get for example ${project.version}-${buildNumber}, because is set to this value. But when using mvn deploy just ${project.version} is the filename, samen when i set in pom.xml to XX ${buildNumber} t...
It seems like you're encountering issues with how the Maven `buildnumber-maven-plugin` is integrating with your project versioning and how it's being reflected in the output filenames during the build and deploy phases. Here's a breakdown of how to correctly set up your `pom.xml` to ensure that the versioning reflects...
24,150
[ { "from": "human", "value": "i use the maven-buildnumber-plugin to generate my version number for JAR/WAR/EAR packages. So when doing a compile i'll get for example ${project.version}-${buildNumber}, because is set to this value. But when using mvn deploy just ${project.version} is the filename, samen when...
There are many scenarios where it would be useful to call a Win32 function or some other DLL from a PowerShell script. to Given the following function signature: bool MyFunction( char* buffer, int* bufferSize ) I hear there is something that makes this easier in PowerShell CTP 2, but I'm curious how this is best done ...
In PowerShell 1.0, calling a Win32 function that involves pointers and complex data types can be a bit challenging because PowerShell 1.0 does not support the use of `Add-Type` or .NET interop features that are available in later versions. However, you can still achieve this by using the `DllImport` from a C# assembly ...
18,988
[ { "from": "human", "value": "There are many scenarios where it would be useful to call a Win32 function or some other DLL from a PowerShell script. to Given the following function signature:\nbool MyFunction( char* buffer, int* bufferSize )\n\nI hear there is something that makes this easier in PowerShell C...
I want to check the login status of a user through an ajax request. Depending wether the user is logged in I want to display either the username/password input or the username. Currently the request is sent on body.onload and a prgoress indicator is shown until the response arrives. Is there a better way? Let's assume...
Yes, there are several improvements you can make to the way you check the login status of a user and display the corresponding input fields or username. Here are some suggestions: ### 1. Use a Deferred or Promise-Based Approach Instead of displaying a progress indicator while the AJAX request is pending, you can lever...
22,007
[ { "from": "human", "value": "I want to check the login status of a user through an ajax request. Depending wether the user is logged in I want to display either the username/password input or the username. Currently the request is sent on body.onload and a prgoress indicator is shown until the response arri...
I have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and I get the following when I click on the program options: a problem occurred when executing the command. make sure u are using the correct programming method. current mode is ISP verify that the ...
It sounds like you're running into a common issue while trying to program the ATmega8 with your AVR USB programmer. Here are some steps and troubleshooting tips that might help you resolve the issue: 1. **Check Connections:** - Ensure that your ISP cable is connected correctly, paying attention to the pinout. The M...
26,057
[ { "from": "human", "value": "I have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and I get the following when I click on the program options:\n\na problem occurred when executing the command. make sure u are using\n the correct programming met...
I've been trying to code a Perl script to substitute some text on all source files of my project. I'm in need of something like: perl -p -i.bak -e "s/thisgoesout/thisgoesin/gi" *.{cs,aspx,ascx} But that parses all the files of a directory recursively. I just started a script: use File::Find::Rule; use strict; my @fil...
To modify files in place using Perl while searching recursively through directories, you can use the `File::Find` module, which will allow you to traverse directories without worrying about command-line argument limits. Here’s how you can adapt your script to achieve the desired behavior: 1. Read each file. 2. Perfor...
25,756
[ { "from": "human", "value": "I've been trying to code a Perl script to substitute some text on all source files of my project. I'm in need of something like:\nperl -p -i.bak -e \"s/thisgoesout/thisgoesin/gi\" *.{cs,aspx,ascx}\n\nBut that parses all the files of a directory recursively.\nI just started a scr...
You must have heard the archetypical story of a failing/failed project: A team of inexperienced programmers work 24x7 Bugs are fixed only to introduce new bugs Customer is screaming that he could not even do the basic stuff (Saving/Querying) etc. Programmers used to having the spec handed down struggle to improvise No...
Taking on the role of a project leader in such a challenging situation is daunting, but with a strategic approach, it's possible to turn things around. Here’s a structured plan you can follow: ### Initial Assessment 1. **Understand the Current State**: - Conduct one-on-one meetings with team members to understand ...
23,893
[ { "from": "human", "value": "You must have heard the archetypical story of a failing/failed project:\n\nA team of inexperienced programmers work 24x7\nBugs are fixed only to introduce new bugs\nCustomer is screaming that he could not even do the basic stuff (Saving/Querying) etc.\nProgrammers used to having...
I have the following var id='123'; newDiv.innerHTML = "<a href=\"#\" onclick=\" TestFunction('"+id+"', false);\"></a>"; Which renders <a href="#" onclick="return Testfunction('123',false);"></a> in my HTML. The problem I have is that I wish to take the call to the method TestFunction, and use as a string parameter i...
You're on the right track, but the issue arises from the use of nested quotes. When you are building the HTML string, you need to ensure that the quotes are properly escaped so that they don't interfere with each other. You can use single quotes for the outer string and double quotes for the inner function calls. Here...
28,523
[ { "from": "human", "value": "I have the following \nvar id='123';\n\nnewDiv.innerHTML = \"<a href=\\\"#\\\" onclick=\\\" TestFunction('\"+id+\"', false);\\\"></a>\";\n\nWhich renders <a href=\"#\" onclick=\"return Testfunction('123',false);\"></a> in my HTML.\nThe problem I have is that I wish to take the c...
I have a (from what I can tell) perfectly working Linux setup (Ubuntu 8.04) where all tools (nslookup, curl, wget, firefox, etc) are able to resolve addresses. Yet, the following code fails: $s = new IO::Socket::INET( PeerAddr => 'stackoverflow.com', PeerPort => 80, Proto => 'tcp', ); die "Error: $!\n" unl...
The issue you are experiencing with `IO::Socket::INET` in Perl on your Ubuntu 8.04 setup seems to be related to name resolution rather than DNS itself, given that other tools on the same system can resolve DNS names without issues. Here are some steps you can take to troubleshoot and potentially resolve the problem: ...
21,004
[ { "from": "human", "value": "I have a (from what I can tell) perfectly working Linux setup (Ubuntu 8.04) where all tools (nslookup, curl, wget, firefox, etc) are able to resolve addresses. Yet, the following code fails:\n$s = new IO::Socket::INET(\n PeerAddr => 'stackoverflow.com',\n PeerPort => 80,\n...
I am a new to the prefuse visualization toolkit and have a couple of general questions. For my purpose, I would like to perform an initial visualization using prefuse (graphview / graphml). Once rendered, upon a user click of a node, I would like to completely reload a new xml file for a new visualization. I want to...
Hi John, It sounds like you're looking to implement an interactive graph visualization using the Prefuse visualization toolkit, with the capability to dynamically load new XML files based on user interactions. This approach makes sense, especially if you're concerned about performance with large datasets. Here are som...
22,898
[ { "from": "human", "value": "I am a new to the prefuse visualization toolkit and have a couple of general questions. For my purpose, I would like to perform an initial visualization using prefuse (graphview / graphml). Once rendered, upon a user click of a node, I would like to completely reload a new xml...
I have an application where I have a main.m that returns NSApplicationMain(argc, (const char **) argv);. I want to run code on -applicationDidFinishLaunching:, but I just dont see how to do it. Can anyone help or have an example? Thanks! -Jason
Certainly! To run code when your application finishes launching in a macOS application using Cocoa, you'll want to implement the `NSApplicationDelegate` protocol and specifically use the `applicationDidFinishLaunching:` method. Here's a step-by-step guide along with an example: ### Step 1: Set Up the App Delegate Fi...
26,843
[ { "from": "human", "value": "I have an application where I have a main.m that returns NSApplicationMain(argc, (const char **) argv);.\nI want to run code on -applicationDidFinishLaunching:, but I just dont see how to do it. \nCan anyone help or have an example? \nThanks!\n-Jason\n" }, { "from": "gp...
What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm?
"Constant Amortized Time" refers to an average-case analysis of the time complexity of an operation over a sequence of operations, rather than analyzing the worst-case time of a single operation. In particular, it is used in data structures that may occasionally require expensive operations that, when averaged out ov...
26,313
[ { "from": "human", "value": "What is meant by \"Constant Amortized Time\" when talking about time complexity of an algorithm?\n" }, { "from": "gpt", "value": "\"Constant Amortized Time\" refers to an average-case analysis of the time complexity of an operation over a sequence of operations, rath...
37 Signal's Getting Real convinced me that wireframing and writing functional specification documents are middleman steps unnecessary for building web applications and dynamic websites. Is the overhead for these steps worth its weight? Is prototyping in HTML/CSS or even PhotoShop documents (so designers can work on th...
The debate over the necessity of wireframing and functional specification documents in the web development process often hinges on the specific context of a project, the team's workflows, and the end goals. Here are some points to consider when weighing the benefits and drawbacks of wireframing and prototyping in HTML/...
26,753
[ { "from": "human", "value": "37 Signal's Getting Real convinced me that wireframing and writing functional specification documents are middleman steps unnecessary for building web applications and dynamic websites. \nIs the overhead for these steps worth its weight? Is prototyping in HTML/CSS or even PhotoS...
I've been playing with DWR and converters for a while and I really wanted to map my Java classes to JavaScript classes. Using DWR converters, I have the option to point out what is the name of my JS constructor given a Java class. So far so good... The problem arises when my JS constructor is within a JS package-like n...
The issue you're encountering with DWR (Direct Web Remoting) not being able to handle JavaScript classes defined within a package-like structure (e.g., `my.beautiful.package.MyClass`) is a known limitation, as JavaScript does not natively support namespaces or packages in the same way Java does. Instead, JavaScript rel...
24,329
[ { "from": "human", "value": "I've been playing with DWR and converters for a while and I really wanted to map my Java classes to JavaScript classes. Using DWR converters, I have the option to point out what is the name of my JS constructor given a Java class. So far so good... The problem arises when my JS ...
I've been profiling some queries in an application I'm working on, and I came across a query that was retrieving more rows than necessary, the result set being trimmed down in the application code. Changing a LEFT JOIN to an INNER JOIN trimmed the result set to just what was needed, and presumably would also be more pe...
The situation you're encountering with the performance of LEFT JOIN vs INNER JOIN can be puzzling, especially when intuition would suggest that filtering down the result set would usually yield better performance. However, there are several factors that can contribute to the observed behavior. ### Potential Reasons fo...
19,417
[ { "from": "human", "value": "I've been profiling some queries in an application I'm working on, and I came across a query that was retrieving more rows than necessary, the result set being trimmed down in the application code.\nChanging a LEFT JOIN to an INNER JOIN trimmed the result set to just what was ne...
I have an ASP.NET website and when I press F5 it automatically attaches to the ASP.NET Development Server, how do I attach to IIS worker process instead when I press F5?
To configure your ASP.NET website to attach to the IIS worker process instead of the ASP.NET Development Server (also known as the ASP.NET Development Server or Cassini) when you press F5, you need to follow these steps: ### 1. Change the Project Settings 1. **Open Visual Studio**: Launch Visual Studio and open your ...
22,730
[ { "from": "human", "value": "I have an ASP.NET website and when I press F5 it automatically attaches to the ASP.NET Development Server, how do I attach to IIS worker process instead when I press F5?\n" }, { "from": "gpt", "value": "To configure your ASP.NET website to attach to the IIS worker pr...
When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed? I can specify the main class using <mainClass>. I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (example -Xmx500m). Here's my assembly plugin: ...
You're correct in noting that JVM arguments cannot be directly specified within the JAR file's manifest. The `maven-assembly-plugin`, which you are using to create your executable JAR, allows you to specify the main class, but it does not have a built-in mechanism to set JVM arguments like `-Xmx500m`. When you execute...
28,436
[ { "from": "human", "value": "When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed?\nI can specify the main class using <mainClass>. I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (examp...
Can some one post an example of using syslog outputter for log4r, I am currently using stdout but want to log to syslog. mylog = Logger.new 'mylog' mylog.outputters = Outputter.stdout mylog.info "Starting up." raj Thanks also to the following blog posts. Angrez's blog: Log4r - Usage and Examples ProgrammingStuff: Lo...
To use the Syslog outputter in Log4r, you'll first need to install the Log4r gem if you haven't already. You can do this by running: ```bash gem install log4r ``` Once you have the gem installed, you can set up the Syslog outputter in your code. Here is an example of how to configure Log4r to log messages to syslog i...
26,717
[ { "from": "human", "value": "Can some one post an example of using syslog outputter for log4r, I am currently using stdout but want to log to syslog.\nmylog = Logger.new 'mylog'\nmylog.outputters = Outputter.stdout\nmylog.info \"Starting up.\"\n\nraj\n\nThanks also to the following blog posts. \nAngrez's bl...
Is there a website/list of problems which can be used to practice OOP design skills? Let's say if I am a colleague graduate familiar with object-oriented-design theory, these problems should give me a chance to exercise the theory and improve my software design skills.
Yes, there are several websites and resources where you can find problems specifically designed to practice object-oriented design (OOD) skills. Here are some popular options: 1. **LeetCode**: While primarily known for algorithm and data structure problems, LeetCode also has a section dedicated to system design interv...
20,632
[ { "from": "human", "value": "Is there a website/list of problems which can be used to practice OOP design skills? Let's say if I am a colleague graduate familiar with object-oriented-design theory, these problems should give me a chance to exercise the theory and improve my software design skills. \n" },...
Why don't we see C-like languages that allow for callables with polymorphism in the return type? I could see how the additional type inference would be a hurdle, but we have plenty of languages with full-fledged type inference systems (that work for varying levels of "work"). Edit: By return type polymorphism I mean ov...
The idea of allowing polymorphism based solely on the return type of functions is intriguing, but there are several reasons why languages like C, C++, and Java do not support this feature. Here are a few key considerations: ### 1. Ambiguity and Type Safety Allowing functions to be overloaded solely by their return ty...
26,401
[ { "from": "human", "value": "Why don't we see C-like languages that allow for callables with polymorphism in the return type? I could see how the additional type inference would be a hurdle, but we have plenty of languages with full-fledged type inference systems (that work for varying levels of \"work\").\...
My company is just starting to look at using WPF for migrating all of our 10 year old business applications. These applications will most of the time be running on computers that have limited/old hardware. We are now a little worried that the hardware might be too limited for using WPF. We have installed Family.Show (...
WPF (Windows Presentation Foundation) is a powerful UI framework that provides rich features and modern UI capabilities compared to older technologies like WinForms. However, it is also more resource-intensive, which can be a concern when deploying applications on older hardware. Here are some key considerations and e...
26,587
[ { "from": "human", "value": "My company is just starting to look at using WPF for migrating all of our 10 year old business applications. These applications will most of the time be running on computers that have limited/old hardware. We are now a little worried that the hardware might be too limited for us...
I was wondering if there is a way for a network of N participants to agree that a number from 1 to M was chosen at random. (e.g. not influenced by any of the participants) This has been solved for values of n=2 and m=2 by the coin tossing protocol. Does anyone know of any solutions that can work for arbitrary values of...
Yes, the problem of having a network of \( N \) participants agree on a randomly chosen number from the set \( \{1, 2, \ldots, M\} \) in a way that ensures the number is not influenced by any of the participants is an interesting one in the context of distributed systems and secure multiparty computation. One general ...
24,705
[ { "from": "human", "value": "I was wondering if there is a way for a network of N participants to agree that a number from 1 to M was chosen at random. (e.g. not influenced by any of the participants) This has been solved for values of n=2 and m=2 by the coin tossing protocol. Does anyone know of any soluti...
In this class for example, I want to force a limit of characters the first/last name can allow. public class Person { public string FirstName { get; set; } public string LastName { get; set; } } Is there a way to force the string limit restriction for the first or last name, so when the client serializes thi...
To enforce character limits for properties in a WSDL and ensure that clients are aware of these constraints before sending data, you can use XML Schema (XSD) to define the data types. The XSD can specify the length restrictions for string types, which will be included in the WSDL. Clients generating code from the WSDL ...
20,789
[ { "from": "human", "value": "In this class for example, I want to force a limit of characters the first/last name can allow.\npublic class Person\n{\n public string FirstName { get; set; }\n public string LastName { get; set; }\n}\n\nIs there a way to force the string limit restriction for the first...
I develop a number of desktop Java applications using Swing, and while Swing is quite powerful (once you get the hang of it), there are still a lot of cases where I wish some advanced component was available right out of the box. For example, I'd really like to see easy-to-use components (without writing them myself, w...
If you're looking for advanced Swing components beyond what is included in the standard Java library, there are several third-party libraries and resources you can explore. Here are some popular options: 1. **JIDE Software**: JIDE provides a comprehensive suite of Java Swing components including various advanced compo...
21,253
[ { "from": "human", "value": "I develop a number of desktop Java applications using Swing, and while Swing is quite powerful (once you get the hang of it), there are still a lot of cases where I wish some advanced component was available right out of the box.\nFor example, I'd really like to see easy-to-use ...
In the filesystem I have /file.aspx /directory/default.aspx I want to configure IIS so that it returns the appropriate file (add the aspx extension) or directory (default content page) as follows: /file -> /file.aspx /directory -> /directory/default.aspx /directory/ -> /directory/default.aspx I...
To achieve the desired behavior of serving both `.aspx` files directly and default pages for directories in IIS, you can use a combination of the following steps: 1. **Use a Custom HTTP Module or Global.asax**: Since you want to serve both static `.aspx` files and default pages based on the request URL, creating a cus...
24,009
[ { "from": "human", "value": "In the filesystem I have\n\n /file.aspx\n /directory/default.aspx\n\nI want to configure IIS so that it returns the appropriate file (add the aspx extension) or directory (default content page) as follows:\n\n /file -> /file.aspx\n /directory -> /directory/default.as...
What choices do I have for creating stateful dynamic content in an ASP.Net web site? Here's my scenario. I have a site that has multiple, nested content regions. The top level are actions tied to a functional area Catalog, Subscriptions, Settings. When you click on the functional action, I want to dynamically add con...
Creating stateful dynamic content in an ASP.NET web application involves a range of choices that you can make based on your needs and constraints. Your current exploration of UserControls and IFrames is a good start, and you can consider other approaches like AJAX, Single Page Applications (SPA), or even using modern f...
21,745
[ { "from": "human", "value": "What choices do I have for creating stateful dynamic content in an ASP.Net web site?\nHere's my scenario. I have a site that has multiple, nested content regions. The top level are actions tied to a functional area Catalog, Subscriptions, Settings.\nWhen you click on the funct...
Is there a component available list FileUpload which shows files on the server, not the client? I am basically looking for a clean dialog box to select server side files, like the one used in FileUpload.
In standard web development practices, a `FileUpload` component typically allows users to select files from their local file system. It does not inherently provide a user interface for browsing files stored on the server. However, you can implement a solution that combines server-side file management with a file upload...
17,241
[ { "from": "human", "value": "Is there a component available list FileUpload which shows files on the server, not the client? \nI am basically looking for a clean dialog box to select server side files, like the one used in FileUpload.\n" }, { "from": "gpt", "value": "In standard web development...
The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as: http://example.com/items/search.xhtml?term=Text+to+find&page=2 Do you have to use a catch all parameter with a validation?
In ASP.NET, particularly with ASP.NET Core routing, you can handle URLs with query parameters such as `http://example.com/items/search.xhtml?term=Text+to+find&page=2` without necessarily using a catch-all parameter. The routing mechanism in ASP.NET Core can be designed to manage complex URLs and extract the necessary q...
26,047
[ { "from": "human", "value": "The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as:\nhttp://example.com/items/search.xhtml?term=Text+to+find&page=2\nDo you have to use a catch all parameter with a validation?\n" }, { "from": "gpt", "value": "In ASP.NET...
I have visual studio 2008 installed on my PC. Can anyone tell me what should I get installed so that I can start with the MVC architecture. I am very much confused about the .NET versions required for MVC architecture.
To start working with MVC architecture in ASP.NET using Visual Studio 2008, you will need to install a few specific components. Here’s a guide to help you get started: ### .NET Framework 1. **ASP.NET MVC Framework**: The first thing you will need is the ASP.NET MVC Framework. For Visual Studio 2008, you can use **ASP....
23,282
[ { "from": "human", "value": "I have visual studio 2008 installed on my PC. Can anyone tell me what should I get installed so that I can start with the MVC architecture. I am very much confused about the .NET versions required for MVC architecture.\n" }, { "from": "gpt", "value": "To start workin...
When overriding the MembershipProvider and calling it directly, is there a way to fill the NameValueCollection config parameter of the Initialize method without manually looking through the config file for the settings? Obviously this Initialize is being called by asp.net and the config is being filled somewhere. I h...
In ASP.NET, when you create a custom `MembershipProvider`, the `Initialize` method is typically called by the ASP.NET infrastructure when the application starts, and the `NameValueCollection` configuration parameter is automatically filled with the settings defined in your `web.config` or `app.config`. However, if you ...
23,529
[ { "from": "human", "value": "When overriding the MembershipProvider and calling it directly, is there a way to fill the NameValueCollection config parameter of the Initialize method without manually looking through the config file for the settings? \nObviously this Initialize is being called by asp.net and...