instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm looking for an LDAP libracy in C or C++ that allows me to specify a list of LDAP hostnames instead of a single hostname. The library should then use the first one it can connect to in case one or more of the servers is/are down. I'm sure it'd be easy to wrap an existing library to create this, but why reinvent the ...
There are a few LDAP libraries for C and C++ that you can consider for your requirement of specifying multiple LDAP hostnames. While not all of them may directly support a list of hostnames out of the box, many allow for custom implementations or can be adapted to achieve this functionality. Here are a few options: 1....
6,378
[ { "from": "human", "value": "I'm looking for an LDAP libracy in C or C++ that allows me to specify a list of LDAP hostnames instead of a single hostname. The library should then use the first one it can connect to in case one or more of the servers is/are down. I'm sure it'd be easy to wrap an existing libr...
I'm working an a very large scale projects, where the compilation time is very long. What tools can I use (preferably open source) on Linux, to find the most heavily included files and that optimize their useages? Just to be clearer, I need a tool which will, given the dependencies, show me which headers are the most i...
To analyze header file inclusion in large C/C++ projects and optimize their usage, you can use a few open-source tools available on Linux. Here are some recommendations: ### 1. **Include What You Use (IWYU)** - **Description**: IWYU analyzes your C/C++ source files and provides suggestions on which header files should...
12,566
[ { "from": "human", "value": "I'm working an a very large scale projects, where the compilation time is very long. What tools can I use (preferably open source) on Linux, to find the most heavily included files and that optimize their useages?\nJust to be clearer, I need a tool which will, given the dependen...
I keep getting asked about AppDomains in interviews, and I know the basics: they are an isolation level within an application (making them different from applications) they can have threads (making them different from threads) exceptions in one appdomain do not affect another appdomains cannot access each other's mem...
You've captured several key points about AppDomains and their benefits quite well. Here are some additional scenarios and considerations where AppDomains can be particularly useful: ### Additional Scenarios: 1. **Dynamic Loading of Assemblies**: - **Reason**: If you need to load and unload assemblies dynamically a...
9,638
[ { "from": "human", "value": "I keep getting asked about AppDomains in interviews, and I know the basics: \nthey are an isolation level within an application (making them different from applications)\nthey can have threads (making them different from threads)\nexceptions in one appdomain do not affect anoth...
I wondered if anyone had successfully managed, or knew how to automate the Safari web browser on the Windows platform. Ideally I would like to automate Safari in a similar way to using mshtml for Internet Explorer. Failing that a way to inject JavaScript into the running process would also be fine. I've used the JavaSc...
Automating Safari on Windows is indeed quite challenging, especially since Safari has limited support on that platform compared to other browsers. Here's a brief overview of the options you can explore for automating Safari or similar functionality: ### 1. **Selenium WebDriver** Selenium is the most popular framework ...
13,628
[ { "from": "human", "value": "I wondered if anyone had successfully managed, or knew how to automate the Safari web browser on the Windows platform.\nIdeally I would like to automate Safari in a similar way to using mshtml for Internet Explorer. Failing that a way to inject JavaScript into the running proces...
If I want to bind a collection to a some form of listing control in Silverlight. Is the only way to do it so make the underlying objects in the collection implement INotifyPropertyChanged and for the collection to be an Observablecollection? If I was using some sort of third party object, for example that returned by a...
In Silverlight (as well as in WPF and other XAML-based technologies), the preferred way to bind collections to controls is indeed to use an `ObservableCollection<T>` for the collection. This is because `ObservableCollection<T>` automatically notifies the UI when items are added, removed, or when the entire list is refr...
11,197
[ { "from": "human", "value": "If I want to bind a collection to a some form of listing control in Silverlight. Is the only way to do it so make the underlying objects in the collection implement INotifyPropertyChanged and for the collection to be an Observablecollection?\nIf I was using some sort of third pa...
I am currently in the process of restructuring my local Subversion repository by adding some new projects and merging legacy code and data from a couple of older repositories into it. When I have done this in the past I have usually put the legacy code in a dedicated "legacy" folder, as not to "disturb" the new and "w...
The way you handle legacy code in your repository can significantly impact your workflow, future refactoring efforts, and overall repository organization. Here are a few approaches to consider, each with its pros and cons: ### 1. **Dedicated Legacy Folder** - **Pros:** - Keeps the repository clean and organize...
12,033
[ { "from": "human", "value": "I am currently in the process of restructuring my local Subversion repository by adding some new projects and merging legacy code and data from a couple of older repositories into it. \nWhen I have done this in the past I have usually put the legacy code in a dedicated \"legacy\...
I have a function, parseQuery, that parses a SQL query into an abstract representation of that query. I'm about to write a function that takes an abstract representation of a query and returns a SQL query string. What should I call the second function?
You could consider naming the second function `buildQuery`, `generateQuery`, or `renderQuery`, as these names convey the idea of constructing or producing a SQL query string from an abstract representation. Other options might include `compileQuery` or `toSql`, which also suggest transforming an abstract structure into...
17,268
[ { "from": "human", "value": "I have a function, parseQuery, that parses a SQL query into an abstract representation of that query.\nI'm about to write a function that takes an abstract representation of a query and returns a SQL query string.\nWhat should I call the second function?\n" }, { "from": ...
Is there a way to debug or trace every JavaScript event in Internet Explorer 7? I have a bug that prevents scrolling after text-selecting, and I have no idea which event or action creates the bug. I really want to see which events are being triggered when I move the mouse for example. It's too much work to rewire the ...
Debugging JavaScript events in Internet Explorer 7 can be quite challenging due to the limited development tools available in that version. However, you can use a few techniques to help trace JavaScript events without having to rewire the entire source code. Here are some strategies you can use: 1. **Using `console.l...
11,114
[ { "from": "human", "value": "Is there a way to debug or trace every JavaScript event in Internet Explorer 7?\nI have a bug that prevents scrolling after text-selecting, and I have no idea which event or action creates the bug. I really want to see which events are being triggered when I move the mouse for e...
I'm using the following in the web page but can't get a response from the server while it's processing <script type="text/javascript"> <!-- function updateProgress() { //alert('Hello'); new Ajax.Request('/fmfiles/progress_monitor', { parameters: 'authenticity_token=' + encodeURIComponent(AUTH_TO...
The issue you're facing seems to be related to how you're initiating the AJAX calls in conjunction with the form submission. When you submit the form with the `submit_tag`, the form submission will navigate away from the current page, which means the `setInterval` won't continue executing after the page is redirected o...
10,784
[ { "from": "human", "value": "I'm using the following in the web page but can't get a response from the server while it's processing\n<script type=\"text/javascript\">\n<!--\n function updateProgress() {\n //alert('Hello');\n new Ajax.Request('/fmfiles/progress_monitor', {\n parameters: '...
I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms out of the box, and I haven't been able ...
To upload a file from your web application server to a remote server after receiving it from a user, you can indeed use Ruby's `Net::HTTP`, but you'll need to manually handle the multipart form data. Alternatively, you can use the `rest-client` gem, which simplifies the process of sending multipart requests. Here’s a ...
10,127
[ { "from": "human", "value": "I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms...
Why is it bad to name a variable id in Python?
Naming a variable `id` in Python can lead to several issues: 1. **Shadowing Built-in Functions**: `id` is a built-in function in Python that returns the identity of an object (a unique integer that serves as its address in memory). By naming your variable `id`, you overshadow this built-in function within its scope, m...
15,835
[ { "from": "human", "value": "Why is it bad to name a variable id in Python?\n" }, { "from": "gpt", "value": "Naming a variable `id` in Python can lead to several issues:\n\n1. **Shadowing Built-in Functions**: `id` is a built-in function in Python that returns the identity of an object (a unique...
I have created a webservice in .net 2.0, C#. I need to log some information to a file whenever different methods are called by the web service clients. The problem comes when one user process is writing to a file and another process tries to write to it. I get the following error: The process cannot access the file b...
File I/O concurrency issues in a web service environment can indeed be tricky to manage, especially when multiple users can trigger logging at the same time. Here are a few approaches that could help you manage file writing in a concurrent environment, given that you're using .NET 2.0: ### 1. **Use a Dedicated Logging...
12,022
[ { "from": "human", "value": "I have created a webservice in .net 2.0, C#. I need to log some information to a file whenever different methods are called by the web service clients. \nThe problem comes when one user process is writing to a file and another process tries to write to it. I get the following er...
I have a .z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour?
Reverse engineering a .z80 memory dump involves understanding the Z80 microprocessor architecture, the memory layout of the program, and possibly some knowledge of assembly language programming. Here’s a guide on how to approach this task, including minimizing manual labor. ### 1. Understand the Z80 Architecture: - **...
9,367
[ { "from": "human", "value": "I have a .z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour?\n" }, { "from": "gpt", "value": "Reverse engineering a .z80 memory dump involves understanding the Z80 microprocessor architecture, the memory layout of...
How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call?
To return a serialized JSON object to the client side in an ASP.NET MVC application using an AJAX call, you can follow these steps: ### Step 1: Create the Controller Action First, you need to create a controller action that will return the JSON data. You can use the `Json` method provided by ASP.NET MVC to serialize ...
11,458
[ { "from": "human", "value": "How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call?\n" }, { "from": "gpt", "value": "To return a serialized JSON object to the client side in an ASP.NET MVC application using an AJAX call, you can follow these steps:\n\n#...
My side question is there really any difference between tinyblob & tinytext? Buy my real question is what reason, if any, would I choose varchar(255) over tinyblob or tinytext?
Yes, there are key differences between `TINYBLOB` and `TINYTEXT` in MySQL, as well as considerations for choosing `VARCHAR(255)` over these types. ### Differences between `TINYBLOB` and `TINYTEXT`: 1. **Storage Type**: - `TINYBLOB`: This data type is used to store binary data (such as images, files, etc.). It can ...
12,013
[ { "from": "human", "value": "My side question is there really any difference between tinyblob & tinytext? \nBuy my real question is what reason, if any, would I choose varchar(255) over tinyblob or tinytext? \n" }, { "from": "gpt", "value": "Yes, there are key differences between `TINYBLOB` and...
Any good ones? So far I have found IZWebFileManager, OXFileManager and AWS File Picker. The file manager should be able to delete, copy, rename, download & upload files.
Here are some additional file manager options that offer features like delete, copy, rename, download, and upload files: 1. **FileBrowser for iOS**: A powerful file management library that allows users to browse, upload, and manage files easily. It supports multiple file operations. 2. **Kiva File Manager**: A simple...
15,133
[ { "from": "human", "value": "Any good ones?\nSo far I have found IZWebFileManager, OXFileManager and AWS File Picker. The file manager should be able to delete, copy, rename, download & upload files.\n" }, { "from": "gpt", "value": "Here are some additional file manager options that offer featur...
Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code (i.e. without using javascript trickery to submit a form)?
In ASP.NET Web Forms, a postback is a mechanism where the server-side code handles a request coming from a form submission on the client side, causing the entire page to reload and the server to process the data. However, if you want to trigger a postback programmatically from the server side without using client-side...
13,876
[ { "from": "human", "value": "Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code (i.e. without using java...
Is it any compilator option of flag?
It seems you might be asking about compiler options or flags, which are used in various programming languages to control the behavior of the compiler during the compilation process. Different compilers have different flags, and they can affect optimization, debugging, warnings, and other aspects of the compilation. He...
14,614
[ { "from": "human", "value": "Is it any compilator option of flag?\n" }, { "from": "gpt", "value": "It seems you might be asking about compiler options or flags, which are used in various programming languages to control the behavior of the compiler during the compilation process. Different compi...
I have an MSSQL2005 stored procedure here, which is supposed to take an XML message as input, and store it's content into a table. The table fields are varchars, because our delphi backend application could not handle unicode. Now, the messages that come in, are encoded ISO-8859-1. All is fine until characters over the...
The issue you’re facing stems from the handling of character encodings in SQL Server, especially when working with XML input. ISO-8859-1, which is a single-byte character encoding, is unable to represent characters outside of its defined range (i.e., characters with a code above 127), leading to errors when SQL Server ...
10,908
[ { "from": "human", "value": "I have an MSSQL2005 stored procedure here, which is supposed to take an XML message as input, and store it's content into a table.\nThe table fields are varchars, because our delphi backend application could not handle unicode.\nNow, the messages that come in, are encoded ISO-88...
What tool is there for generating C# classes from NHibernate mappings files?
One popular tool for generating C# classes from NHibernate mapping files is **NHibernate Mapping Generator**. This tool can read NHibernate mapping files (XML or Fluent mappings) and generate the corresponding C# entity classes. ### Other Options 1. **Hbm2Net**: This is a command-line tool that converts Hibernate map...
16,674
[ { "from": "human", "value": "What tool is there for generating C# classes from NHibernate mappings files?\n" }, { "from": "gpt", "value": "One popular tool for generating C# classes from NHibernate mapping files is **NHibernate Mapping Generator**. This tool can read NHibernate mapping files (XM...
I'm writing a Winforms application and I've been writing these awful HTML reports where I have templates set up and use String.Replace to get my variables into the templates, then output the results to a WebBrowser control. I really don't like this set up. I'd love to be able to use ASP.NET for my reports, but my cl...
If you're looking for a better way to generate reports in a WinForms application without relying on a WebBrowser control and without using IIS, you might consider a few different options: ### 1. **Using a Reporting Library** There are many reporting libraries that allow you to create reports more easily without needin...
13,265
[ { "from": "human", "value": "I'm writing a Winforms application and I've been writing these awful HTML reports where I have templates set up and use String.Replace to get my variables into the templates, then output the results to a WebBrowser control. I really don't like this set up. \nI'd love to be abl...
In general I think I can convey most programming related concepts quite well. Yet, I still find it hard to summarise the relationship between Fields, Classes and Packages. How do You summarise "Fields", "Classes" and "Packages" and "Their Relationship" ?
Certainly! Here’s a concise summary of the concepts of Fields, Classes, and Packages in object-oriented programming (particularly in languages like Java): ### 1. Classes - **Definition**: A class is a blueprint for creating objects. It defines the structure (data) and behavior (methods) that the objects created from t...
12,528
[ { "from": "human", "value": "In general I think I can convey most programming related concepts quite well.\nYet, I still find it hard to summarise the relationship between Fields, Classes and Packages.\n\nHow do You summarise \"Fields\", \"Classes\" and \"Packages\" and \"Their Relationship\" ?\n" }, { ...
I have inherited a project that uses LLBLGen Pro for the DB layer. The DB model requires that when a entry is deleted a flag (DeletedDate is set to the current time). The last programmer ignored this requirement and has used regular deletes throughout the entire application. Is there a way to set the code generator to ...
In LLBLGen Pro, handling soft deletes (like setting a `DeletedDate` instead of permanently deleting a record) usually requires some customization. Here's how you can approach this: ### Option 1: Overriding Delete Methods While LLBLGen Pro does not provide built-in support for soft deletes in its code generation, you ...
12,875
[ { "from": "human", "value": "I have inherited a project that uses LLBLGen Pro for the DB layer. The DB model requires that when a entry is deleted a flag (DeletedDate is set to the current time). The last programmer ignored this requirement and has used regular deletes throughout the entire application.\nIs...
What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)? The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client side relatively easily, but I'd like to have it done in my s...
Calculating someone's age in years, months, and days in SQL Server 2000 can indeed be tricky due to the limitations of the `DATEDIFF` function when dealing with boundary cases. However, you can implement a solution that accounts for the complexities of calculating age by using date manipulation. Here's a method that co...
7,981
[ { "from": "human", "value": "What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)?\nThe datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client side relatively ea...
Supposing you have a form that collects and submits sensitive information and you want to ensure it is never accessed via insecure (non-HTTPS) means, how might you best go about enforcing that policy?
To ensure that sensitive information collected via a form is never accessed via insecure (non-HTTPS) means, you can take several measures to enforce this policy: 1. **Enforce HTTPS Redirection**: - Use server-side configurations to redirect all HTTP requests to HTTPS. For example, in Apache, you can use `.htaccess`...
14,149
[ { "from": "human", "value": "Supposing you have a form that collects and submits sensitive information and you want to ensure it is never accessed via insecure (non-HTTPS) means, how might you best go about enforcing that policy?\n" }, { "from": "gpt", "value": "To ensure that sensitive informat...
When Mac OS X goes to sleep, due to closing a laptop or selecting "Sleep" from the Apple menu, how does it suspend an executing process? I suppose non-windowed processes are simply suspended at an arbitrary point of execution. Is that also true for Cocoa apps, or does the OS wait until control returns to the run loop ...
When macOS goes to sleep, it suspends all executing processes, including both non-windowed and graphical applications like Cocoa apps. The way this suspension is handled is generally uniform across different types of processes. ### Process Suspension on Sleep 1. **Arbitrary Point of Execution**: Indeed, when the syste...
13,902
[ { "from": "human", "value": "When Mac OS X goes to sleep, due to closing a laptop or selecting \"Sleep\" from the Apple menu, how does it suspend an executing process?\nI suppose non-windowed processes are simply suspended at an arbitrary point of execution. Is that also true for Cocoa apps, or does the OS...
I am reading image files in Java using java.awt.Image img = Toolkit.getDefaultToolkit().createImage(filePath); On some systems this doesn't work, it instead throws an AWTError complaining about sun/awt/motif/MToolkit. How else can you create a java.awt.Image object from an image file?
The error you are encountering with `Toolkit.getDefaultToolkit().createImage(filePath)` is often related to the absence of certain native libraries or configurations in specific environments. To create a `java.awt.Image` object from an image file reliably across different systems, consider using `ImageIO`, which is par...
12,515
[ { "from": "human", "value": "I am reading image files in Java using\njava.awt.Image img = Toolkit.getDefaultToolkit().createImage(filePath);\n\nOn some systems this doesn't work, it instead throws an AWTError complaining about sun/awt/motif/MToolkit.\nHow else can you create a java.awt.Image object from an ...
I am trying to separate some asp logic out into a separate page. For now, I am trying to call a simple function. Here is the simple index page that I am using <html> <head> <title>Calling a webservice from classic ASP</title> </head> <body> <% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then %> <!--#inclu...
The issue you're facing seems to stem from the placement of the `<!--#include file="aspFunctions.asp"-->` directive within your code. When you include the file, it should be outside of the conditional block that checks for a POST request. Currently, when the page is submitted, the server does not have access to the `do...
15,225
[ { "from": "human", "value": "I am trying to separate some asp logic out into a separate page.\nFor now, I am trying to call a simple function. \nHere is the simple index page that I am using\n<html>\n<head>\n<title>Calling a webservice from classic ASP</title>\n</head>\n<body>\n<%\nIf Request.ServerVariable...
For years, maybe 10, I've been fascinated with cryptography. I read a book about XOR bit-based encryption, and have been hooked ever since thing. I guess it's more fair to say that I'm fascinated by those who can break various encryption methods, but I digress. To the point -- what methods do you use when writing crypt...
It's great to hear about your fascination with cryptography! It’s a vast and intricate field that combines mathematics, computer science, and even a bit of art. Here are some thoughts on various aspects of cryptography, obfuscation, and breaking encryption methods. ### Methods for Writing Cryptography 1. **Symmetric ...
11,315
[ { "from": "human", "value": "For years, maybe 10, I've been fascinated with cryptography. I read a book about XOR bit-based encryption, and have been hooked ever since thing.\nI guess it's more fair to say that I'm fascinated by those who can break various encryption methods, but I digress.\nTo the point --...
break line tag is not working in firefox, neither in chrome. When i see the source of my page i get: <p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p> However when i do view selected source, i get: <p>Zugang zu Testaccount: peter petrelli sein Standardpwd. p...
The issue you're experiencing with the `<br/>` tag not rendering as expected is likely due to the way you've used the tag. In HTML, the `<br>` (break) tag should not have a closing tag and is self-closing. The correct format is to use either `<br>` or `<br />`. The issue might stem from the incorrect usage of `</br>` w...
13,942
[ { "from": "human", "value": "break line tag is not working in firefox, neither in chrome. When i see the source of my page i get: \n<p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p>\n\nHowever when i do view selected source, i get: \n<p>Zugang zu Tes...
I have a question on the best way of exposing an asynchronous remote interface. The conditions are as follows: The protocol is asynchronous A third party can modify the data at any time The command round-trip can be significant The model should be well suited for UI interaction The protocol supports queries over certa...
Creating an asynchronous remote interface that maintains a robust and responsive data model for a UI-based application, such as your Eclipse front-end for XMMS2, can be challenging but also a rewarding opportunity to learn about design patterns, concurrency, and user interaction design. Here are some suggestions and co...
4,801
[ { "from": "human", "value": "I have a question on the best way of exposing an asynchronous remote interface.\nThe conditions are as follows:\n\nThe protocol is asynchronous\nA third party can modify the data at any time\nThe command round-trip can be significant\nThe model should be well suited for UI inter...
When asking about common undefined behavior in C, people sometimes refer to the strict aliasing rule. What are they talking about?
The strict aliasing rule is part of the C standard, specifically in the context of optimizing compilers. It states that an object in memory can only be accessed through a pointer of its own type (or compatible types) unless certain conditions are met. Violating this rule can lead to undefined behavior, which means the ...
11,669
[ { "from": "human", "value": "When asking about common undefined behavior in C, people sometimes refer to the strict aliasing rule.\nWhat are they talking about?\n" }, { "from": "gpt", "value": "The strict aliasing rule is part of the C standard, specifically in the context of optimizing compiler...
How do I detect what browser (IE, Firefox, Opera) the user is accessing my site with? Examples in Javascript, PHP, ASP, Python, JSP, and any others you can think of would be helpful. Is there a language agnostic way to get this information?
Detecting the user's browser can be done in various programming languages using different methods. Below are examples in JavaScript, PHP, ASP, Python, JSP, and a language-agnostic method using the user agent string. ### 1. JavaScript You can use the `navigator.userAgent` property to detect the browser in JavaScript. ...
9,785
[ { "from": "human", "value": "How do I detect what browser (IE, Firefox, Opera) the user is accessing my site with? Examples in Javascript, PHP, ASP, Python, JSP, and any others you can think of would be helpful. Is there a language agnostic way to get this information?\n" }, { "from": "gpt", "...
I have a project which is source controlled using Subversion and VisualSVN. Since the version of web.config is different on the server and the developers' computers I want the file to remain on the computers but to be ignored by Subversion. I added it to the svn:ignore but it still remains (and still has a red exclamat...
To safely remove a file from Subversion (SVN) without deleting it from your local file system, you need to use the `svn delete` command followed by the `--keep-local` option. This will remove the file from version control while leaving it on your local machine. Here are the steps you should follow: 1. **Open your comm...
14,707
[ { "from": "human", "value": "I have a project which is source controlled using Subversion and VisualSVN. Since the version of web.config is different on the server and the developers' computers I want the file to remain on the computers but to be ignored by Subversion. I added it to the svn:ignore but it st...
I've created a WCF service and when I browse to the endpoint I get the following fault: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <s:Fault> <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none"> a:ActionNotSupported </faul...
Dealing with WCF (Windows Communication Foundation) service errors, particularly those related to contract and endpoint mismatches, can indeed be frustrating. Here are some tips and tools that can help streamline your debugging process: ### Tips for Debugging WCF Issues 1. **Check Contracts**: Ensure that the service...
498
[ { "from": "human", "value": "I've created a WCF service and when I browse to the endpoint I get the following fault:\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <s:Body>\n <s:Fault>\n <faultcode \n xmlns:a=\"http://schemas.microsoft.com/ws/2005/05/addressing/non...
What's the best way to automate testing the UI in an Asp.net Page?
Automating UI testing for ASP.NET pages can significantly enhance the reliability and quality of your web applications. Here are some strategies and tools you can use to effectively automate UI testing for ASP.NET applications: ### 1. **Choose the Right Testing Framework** - **Selenium WebDriver:** A widely-used fram...
10,597
[ { "from": "human", "value": "What's the best way to automate testing the UI in an Asp.net Page?\n" }, { "from": "gpt", "value": "Automating UI testing for ASP.NET pages can significantly enhance the reliability and quality of your web applications. Here are some strategies and tools you can use ...
Does anyone know where to find an explanation to the warnings in VS 2005 Code Analyses tool. I would like some documentation, explaining why it creates the warnings it does and what course of action one should take.
In Visual Studio 2005, the Code Analysis tool (also known as FxCop) helps developers identify potential issues in their code. The warnings generated by Code Analysis can be quite helpful, but understanding them can sometimes be challenging. Here are some resources and steps you can take to find explanations for the war...
14,472
[ { "from": "human", "value": "Does anyone know where to find an explanation to the warnings in VS 2005 Code Analyses tool. I would like some documentation, explaining why it creates the warnings it does and what course of action one should take.\n" }, { "from": "gpt", "value": "In Visual Studio 2...
We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP, messaging, etc - we haven't decided). Now my manager thinks we'll need the Jav...
Integrating a C++ application with a Java-based system while maintaining a consistent transaction model across both environments can indeed be challenging. Here are some approaches and considerations for achieving this while keeping performance and stability in mind: ### Approaches 1. **XA Transactions with a Transac...
10,338
[ { "from": "human", "value": "We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP, messaging, etc - we haven't decided)....
I have the following webform: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWebApp.Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <he...
The issue you're encountering with the leading line feeds being removed on post-back is a common occurrence in ASP.NET WebForms due to the way the page lifecycle handles input from `TextBox` controls. When the page is posted back, the server-side state of the control does not preserve leading whitespace characters by d...
12,939
[ { "from": "human", "value": "I have the following webform:\n<%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"Default.aspx.cs\" \n Inherits=\"TestWebApp.Default\" %>\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...
I am adding custom controls to a FlowLayoutPanel. Each control has a date property. I would like to sort the controls in the flowlayoutpanel based on the date property. I can't presort the controls before I add them because it is possible for the user to add more. My current thought is when the ControlAdded event for t...
Sorting controls within a `FlowLayoutPanel` based on a property such as a date can be accomplished by handling the `ControlAdded` event of the `FlowLayoutPanel`. However, using `BringToFront` may not be the most efficient or clean way to achieve the desired order. Instead, consider a different approach that involves re...
12,792
[ { "from": "human", "value": "I am adding custom controls to a FlowLayoutPanel. Each control has a date property. I would like to sort the controls in the flowlayoutpanel based on the date property. I can't presort the controls before I add them because it is possible for the user to add more.\nMy current th...
We have redesigned the structure to a website which has several business units. Now I want to redirect (301) to the new page. IE: was www.example.com/abc now www.example.com/default.aspx?article=abc I have tried to use Global.asax to do this, and it works properly when I debug through it. if (Request.RawUrl....
It seems like you're trying to set up a 301 redirect in your ASP.NET application using `Global.asax`, but it's not working as expected when accessing `http://localhost/example/abc`. Here are some potential causes and solutions to address the issue: 1. **URL Routing**: Ensure that the application is routing URLs correc...
12,785
[ { "from": "human", "value": "We have redesigned the structure to a website which has several business units. Now I want to redirect (301) to the new page.\nIE: \nwas www.example.com/abc \nnow www.example.com/default.aspx?article=abc \nI have tried to use Global.asax to do this, and it works properly when I ...
In other words may one use /<tag[^>]*>.*?<\/tag>/ regex to match the tag html element which does not contain nested tag elements? For example (lt.html): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>greater than sign in attribute value</title> </...
The issue you're encountering stems from how your regex and the BeautifulSoup method are handling the HTML tags, particularly with respect to special characters in attribute values. Your regex pattern `<div[^>]*>(.*?)<\/div>` is designed to match `<div>` tags that contain text content, but when it finds a div with the...
12,758
[ { "from": "human", "value": "In other words may one use /<tag[^>]*>.*?<\\/tag>/ regex to match the tag html element which does not contain nested tag elements?\nFor example (lt.html):\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html>\n <head>\n <titl...
Is it possible to get the progress of an XMLHttpRequest (bytes uploaded, bytes downloaded)? This would be useful to show a progress bar when the user is uploading a large file. The standard API doesn't seem to support it, but maybe there's some non-standard extension in any of the browsers out there? It seems like a p...
Yes, it is indeed possible to track the progress of an `XMLHttpRequest` (XHR) in terms of both uploading and downloading data using the `ProgressEvent` interface. The `XMLHttpRequest` object provides two event handlers that you can use for monitoring progress: `onprogress` for download progress and `onloadstart`/`onloa...
12,694
[ { "from": "human", "value": "Is it possible to get the progress of an XMLHttpRequest (bytes uploaded, bytes downloaded)? \nThis would be useful to show a progress bar when the user is uploading a large file. The standard API doesn't seem to support it, but maybe there's some non-standard extension in any of...
I need to estimate the code coverage of a test set. The tests are run on a J2ME application, on a physical device. MIDP 2.1, CLDC 1.1 and JSR-75 FileConnection are available. As J2ME is (roughly) a subset of J2SE, tools using java.io.File (like those listed in the only answer so far..) can not be used. This is mainly t...
Estimating code coverage for a J2ME application can indeed be challenging due to the limited tools available, particularly when working with a subset of Java and a physical device environment. While Cobertura for J2ME is one option, there are a few alternative approaches and tools you might consider: 1. **Custom Instr...
13,703
[ { "from": "human", "value": "I need to estimate the code coverage of a test set.\nThe tests are run on a J2ME application, on a physical device.\nMIDP 2.1, CLDC 1.1 and JSR-75 FileConnection are available.\nAs J2ME is (roughly) a subset of J2SE, tools using java.io.File (like those listed in the only answer...
i have a list of products that are being displayed in particular order. store admin can reassign the display order, by moving the "hot" items to the top of the list. what's the best way of implementing the admin functionality UI [asp.net C#]? Products table has a [displayOrder(int)] filed which determines the display o...
It sounds like you have a solid direction with using `ReorderList`, which is a good choice for allowing admins to reorder items in a list intuitively. Here are some additional UI suggestions to enhance the usability of your admin functionality: ### UI Design Recommendations for Reordering Products 1. **Drag-and-Drop ...
10,068
[ { "from": "human", "value": "i have a list of products that are being displayed in particular order. store admin can reassign the display order, by moving the \"hot\" items to the top of the list. what's the best way of implementing the admin functionality UI [asp.net C#]? Products table has a [displayOrder...
The Python list comprehension syntax makes it easy to filter values within a comprehension. For example: result = [x**2 for x in mylist if type(x) is int] Will return a list of the squares of integers in mylist. However, what if the test involves some (costly) computation and you want to filter on the result? One o...
Yes, you can achieve this by using a combination of a list comprehension and a helper function or using the `filter` function along with a generator expression. Here’s how you can do it without calling `expensive(x)` multiple times: ### Option 1: Using a helper function You can create a helper function that performs t...
13,386
[ { "from": "human", "value": "The Python list comprehension syntax makes it easy to filter values within a comprehension. For example:\nresult = [x**2 for x in mylist if type(x) is int]\n\nWill return a list of the squares of integers in mylist. However, what if the test involves some (costly) computation ...
I get the concept of creating a business object or entity to represent something like a Person. I can then serialize the Person using a DTO and send it down to the client. If the client changes the object, it can have an IsDirty flag on there so when it gets sent back to the server I know to update it. But what if I ha...
When managing complex business objects like `Order` and its associated `OrderItems`, tracking changes (including deletions) becomes crucial for maintaining data integrity and ensuring that the correct actions are taken when updating the server. Let's break down a strategy that could help you achieve this effectively, e...
11,258
[ { "from": "human", "value": "I get the concept of creating a business object or entity to represent something like a Person. I can then serialize the Person using a DTO and send it down to the client. If the client changes the object, it can have an IsDirty flag on there so when it gets sent back to the ser...
I've got two versions of a project with a JUnit test. Looking at the diff of the files there's no obvious reason to this, but the test passes on one project but not on the other. For a while now I've wondered if there was a program that would record a trace through the whole program when it runs and save it to a file. ...
There are several approaches you can take to trace program execution and compare the flows between two versions of a project. Below are some tools and techniques that can help you achieve this: ### 1. **Java Profilers** Using a Java profiler can be a good way to trace method calls and execution flows. Some popular Jav...
11,098
[ { "from": "human", "value": "I've got two versions of a project with a JUnit test. Looking at the diff of the files there's no obvious reason to this, but the test passes on one project but not on the other.\nFor a while now I've wondered if there was a program that would record a trace through the whole pr...
Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed. Related resources: http://www.codepro...
Docking an application window to the edges of the screen (commonly referred to as "AppBar" functionality) in WPF involves some interop with the Windows API. This allows you to create a WPF window that behaves like a taskbar or docked application. Here's a step-by-step guide and a simple proof of concept for implementi...
7,350
[ { "from": "human", "value": "Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consume...
I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded <object> version of WMP, and a cid: reference to the file, but Outlook 2003 rejects th...
Unfortunately, embedding multimedia players directly in emails, especially using `<object>` or similar tags, is generally not supported by most email clients due to security concerns. Outlook 2003 in particular has limitations on how media and other interactive content can be embedded and executed in emails. Here are ...
13,008
[ { "from": "human", "value": "I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded <object> version of WMP, and a cid: reference...
I realize that in of TOAD books right, it justifies the reaons on why it uses tabbed pane is that tree view involves too much scrolling. But for me i like tree view better. As it only shows you the top level. I see TOAD user interface. i thought the tabbed panels was very confusing for me to switch around. What are you...
Your preference for a tree view over a tabbed pane interface is quite valid and reflects a common perspective among users. Here are some points to consider regarding both interfaces: ### Advantages of Tree View: 1. **Hierarchical Structure**: Tree views are excellent for visualizing hierarchical data, allowing you to ...
15,105
[ { "from": "human", "value": "I realize that in of TOAD books right, it justifies the reaons on why it uses tabbed pane is that tree view involves too much scrolling.\nBut for me i like tree view better. As it only shows you the top level.\nI see TOAD user interface. i thought the tabbed panels was very conf...
Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbException thrown with message: "Cannot modify...
When you encounter the error message "Cannot modify the design of table 'test$'. It is in a read-only database," it typically indicates that the Excel file you are trying to write to is either read-only or that the OLEDB provider is not opening it in a writable mode. Here are a few steps you can take to resolve this is...
9,641
[ { "from": "human", "value": "Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following:\n OleDbCommand dbCmd = new OleDbCommand(\"CREATE TABLE [test$] (...)\", connection);\n dbCmd.CommandTimeout = mTimeout;\n results = dbCmd.ExecuteNonQuery();\n\nBut I get an Ole...
I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The exception evolver.core.model.change.execution.ExecutionException: Compilation failed! DynamicComparator.java:2: package e...
It seems like you're experiencing issues with dynamic code compilation in your application when run through Java Web Start (JWS). The error messages indicate that the compiler cannot find certain classes, which may stem from classpath issues or the way the JNLP class loader works. Here are a few things you can check o...
9,835
[ { "from": "human", "value": "I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start.\n//The exception\nevolver.core.model.change.execution.ExecutionException: Compilation f...
In my base page I need to remove an item from the query string and redirect. I can't use Request.QueryString.Remove("foo") because the collection is read-only. Is there any way to get the query string (except for that one item) without iterating through the collection and re-building it?
In ASP.NET, the `Request.QueryString` collection is indeed read-only, so you cannot directly modify it. However, you can manipulate the query string as a string to achieve your goal of removing an item and then performing a redirect. One approach is to use `HttpUtility.ParseQueryString` to parse the query string, modi...
15,820
[ { "from": "human", "value": "In my base page I need to remove an item from the query string and redirect. I can't use\nRequest.QueryString.Remove(\"foo\")\n\nbecause the collection is read-only. Is there any way to get the query string (except for that one item) without iterating through the collection and ...
When adding a DLL as a reference to an ASP.Net project, VS2008 adds several files to the bin directory. If the DLL is called foo.dll, VS2008 adds foo.dll.refresh, foo.pdb and foo.xml. I know what foo.dll is :-), why does VS2008 add the other three files? What do those three files do? Can I delete them? Do they nee...
When you add a DLL reference to an ASP.NET project in Visual Studio 2008, the IDE adds additional files to the `bin` directory alongside the main DLL. Here’s a breakdown of the three additional files and their purposes: 1. **foo.dll.refresh**: - This file is used by Visual Studio to keep track of the referenced as...
14,085
[ { "from": "human", "value": "When adding a DLL as a reference to an ASP.Net project, VS2008 adds several files to the bin directory. If the DLL is called foo.dll, VS2008 adds foo.dll.refresh, foo.pdb and foo.xml. I know what foo.dll is :-), why does VS2008 add the other three files? What do those three f...
I was wondering how i can force a user who has requested a page using Http to use the secure https version? I am using Websphere 6.1 as my application server and Rad 7 as my development environment Thanks Damien
To force users to use the HTTPS version of your web application in a WebSphere 6.1 environment, you can implement several methods. Here’s a common approach using a combination of WebSphere configuration and servlet filters: ### Method 1: WebSphere Configuration 1. **Enable SSL in WebSphere**: Ensure that SSL is enabl...
11,783
[ { "from": "human", "value": "I was wondering how i can force a user who has requested a page using Http to use the secure https version?\nI am using Websphere 6.1 as my application server and Rad 7 as my development environment\nThanks\nDamien\n" }, { "from": "gpt", "value": "To force users to u...
Is there any way to force an update of software using RunOnce, without having an administrator log in, if there is a service running as Administrator running in the background? EDIT: The main thing I want to be able to do is Run when the RunOnce does, I.E. before Explorer starts. I need to be able to install things, w...
Running tasks with elevated privileges (as Administrator) without a user being logged in poses significant security risks, and most operating systems are designed to prevent such scenarios. However, there are certain approaches you might consider to achieve similar results, but each comes with caveats and requires prop...
11,624
[ { "from": "human", "value": "Is there any way to force an update of software using RunOnce, without having an administrator log in, if there is a service running as Administrator running in the background?\nEDIT: The main thing I want to be able to do is Run when the RunOnce does, I.E. before Explorer start...
I'm using a medical records system built on an Oracle database. Our vendor just told us that we need to shut down Oracle's Enterprise Manager service when we're not using it, because it uses too much of the system's resources. I know I can get actual numbers by checking Sysinternals Process Explorer, but I was hoping t...
Oracle Enterprise Manager (OEM) can indeed consume a significant amount of system resources, especially if it is running on the same server as your Oracle database. From personal experience, here are some considerations to help you decide whether you should shut it down when not in use: 1. **Resource Usage**: OEM can ...
13,549
[ { "from": "human", "value": "I'm using a medical records system built on an Oracle database. Our vendor just told us that we need to shut down Oracle's Enterprise Manager service when we're not using it, because it uses too much of the system's resources. I know I can get actual numbers by checking Sysinter...
Has anyone implemented Mozilla's Object.toSource() method for Internet Explorer and other non-Gecko browsers? I'm looking for a lightweight way to serialize simple objects into strings.
The `Object.toSource()` method is specific to Mozilla's JavaScript implementations and is not supported in other browsers, including Internet Explorer. However, if you are looking for a lightweight way to serialize simple objects into strings for use in non-Gecko browsers, you can consider implementing a custom seriali...
14,772
[ { "from": "human", "value": "Has anyone implemented Mozilla's Object.toSource() method for Internet Explorer and other non-Gecko browsers? I'm looking for a lightweight way to serialize simple objects into strings.\n" }, { "from": "gpt", "value": "The `Object.toSource()` method is specific to M...
I'm building a project using a GNU tool chain and everything works fine until I get to linking it, where the linker complains that it is missing/can't find crti.o. This is not one of my object files, it seems to be related to libc but I can't understand why it would need this crti.o, wouldn't it use a library file, e.g...
When you are building a project with the GNU toolchain, the linker (`ld`) looks for various startup files and libraries, including `crti.o`. This file is part of the C runtime and serves as an initialization routine for C programs. It is necessary for linking when you are building C/C++ applications that require the C ...
12,133
[ { "from": "human", "value": "I'm building a project using a GNU tool chain and everything works fine until I get to linking it, where the linker complains that it is missing/can't find crti.o. This is not one of my object files, it seems to be related to libc but I can't understand why it would need this cr...
I'd like to make status icons for a C# WinForms TreeList control. The statuses are combinations of other statuses (eg. a user node might be inactive or banned or inactive and banned), and the status icon is comprised of non-overlapping, smaller glyphs. I'd really like to avoid having to hand-generate all the possibl...
Yes, you can programmatically generate images for your status icons in C# using the System.Drawing namespace. This allows you to create your images at runtime without needing to generate and store each possible permutation manually. Below is a simple approach to accomplish this. ### Steps to Create Status Icons Progra...
9,912
[ { "from": "human", "value": "I'd like to make status icons for a C# WinForms TreeList control. The statuses are combinations of other statuses (eg. a user node might be inactive or banned or inactive and banned), and the status icon is comprised of non-overlapping, smaller glyphs. \nI'd really like to avo...
I am using Apache Axis to connect my Java app to a web server. I used wsdl2java to create the stubs for me, but when I try to use the stubs, I get the following exception: org.apache.axis.ConfigurationException: No service named `<web service name>` is available What is happening?
The exception `org.apache.axis.ConfigurationException: No service named <web service name> is available` indicates that Apache Axis is unable to find the service definition in the configuration. This usually means that there's a mismatch between the service name you're trying to use and the service definitions that wer...
13,829
[ { "from": "human", "value": "I am using Apache Axis to connect my Java app to a web server. I used wsdl2java to create the stubs for me, but when I try to use the stubs, I get the following exception:\norg.apache.axis.ConfigurationException: No service named `<web service name>` is available\n\nWhat is happ...
in web.xml i set my welcome file to a jsp within web.xml <welcome-file>WEB-INF/index.jsp</welcome-file> inside index.jsp i then forward on to a servlet <% response.sendRedirect(response.encodeRedirectURL("myServlet/")); %> however the application tries to find the servlet at the following path applicationName/WEB-I...
The behavior you are encountering is due to the fact that resources in the `WEB-INF` directory cannot be directly accessed via a URL. This includes JSP files. When you place your `index.jsp` in `WEB-INF`, it becomes inaccessible directly, and as such, the `sendRedirect` method is trying to resolve a path that should no...
13,965
[ { "from": "human", "value": "in web.xml i set my welcome file to a jsp within web.xml\n<welcome-file>WEB-INF/index.jsp</welcome-file>\n\ninside index.jsp i then forward on to a servlet \n<% response.sendRedirect(response.encodeRedirectURL(\"myServlet/\")); %>\n\nhowever the application tries to find the ser...
In both the Visual Studio emacs mode and the default mode the tab key is bound to Edit.InsertTab. However, in the emacs mode the tab button jumps to where it expects the next line to start instead of inserting a tab. Is there a way to disable this "smart insert" while keeping the emacs key bindings?
In Visual Studio's Emacs mode, the behavior you're experiencing with the Tab key is due to the default handling of indentation for code blocks, which often aligns your cursor to the next appropriate indentation level instead of inserting a tab character. If you want to keep the Emacs key bindings but change the behavi...
16,044
[ { "from": "human", "value": "In both the Visual Studio emacs mode and the default mode the tab key is bound to Edit.InsertTab. However, in the emacs mode the tab button jumps to where it expects the next line to start instead of inserting a tab.\nIs there a way to disable this \"smart insert\" while keepin...
I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would I ensure that the scrollbars it shows are c...
Custom drawing scrollbars in controls like `Panel` that you do not create yourself is a challenge in Windows Forms, as these controls use the system's default scrollbar rendering. However, you do have a few options for achieving a custom appearance for scrollbars in such cases. ### 1. **Creating a Custom Control**: On...
11,151
[ { "from": "human", "value": "I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would I ...
In our embedded system (using a PowerPC processor), we want to disable the processor cache. What steps do we need to take? To clarify a bit, the application in question must have as constant a speed of execution as we can make it. Variability in executing the same code path is not acceptable. This is the reason to turn...
Disabling the processor cache in an embedded system using a PowerPC processor involves a series of steps that generally depend on your specific hardware, but here are the typical steps you'll need to follow: ### Steps to Disable the Cache on a PowerPC Processor 1. **Understand the Cache Architecture**: - PowerPC ...
8,345
[ { "from": "human", "value": "In our embedded system (using a PowerPC processor), we want to disable the processor cache. What steps do we need to take?\nTo clarify a bit, the application in question must have as constant a speed of execution as we can make it.\nVariability in executing the same code path is...
I want to load a desktop application, via reflection, as a Control inside another application. The application I'm reflecting is a legacy one - I can't make changes to it. I can dynamically access the Form, but can't load it as a Control. In .Net Form expands on Control, and I can assign the reflected Form as a Control...
In .NET, Windows Forms (`Form`) and `Control` are indeed related, but you cannot directly use a `Form` instance as a `Control` within another `Form` or `Control`. The `Form` class is designed to be a top-level window and has behavior specific to that role (like being shown modally, handling its own window messages, etc...
10,982
[ { "from": "human", "value": "I want to load a desktop application, via reflection, as a Control inside another application.\nThe application I'm reflecting is a legacy one - I can't make changes to it.\nI can dynamically access the Form, but can't load it as a Control.\nIn .Net Form expands on Control, and ...
There are many ways of doing debugging, using a debugger is one, but the simple one for the humble, lazy, programmer is to just add a bunch of print statements to your code. i.e. def foo(x): print 'Hey wow, we got to foo!', x ... print 'foo is returning:', bar return bar Is there a proper name f...
Yes, the practice of adding print statements to your code for debugging purposes is often referred to as **"print debugging"** or **"printf debugging."** This technique involves inserting `print()` (or `printf()` in languages like C) statements at various points in the code to inspect variable values, track the flow of...
16,811
[ { "from": "human", "value": "There are many ways of doing debugging, using a debugger is one, but the simple one for the humble, lazy, programmer is to just add a bunch of print statements to your code.\ni.e.\n def foo(x):\n print 'Hey wow, we got to foo!', x\n\n ...\n\n print 'foo is returning:...
I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from a Ruby perspective? I'm aware of the following (in no particular or...
Based on your requirements and the libraries you've explored, here’s a summary of each option and some recommendations: 1. **Hpricot**: - **Pros**: Simple and easy to use, especially for straightforward XML parsing tasks. It's convenient for quick scripts and small files. - **Cons**: Performance can be an issue ...
10,947
[ { "from": "human", "value": "I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from a Ruby perspective?\nI'm a...
Are there any resources which show how to create custom GnuCash reports? I don't know the intricacies of Scheme but I do know the basics of Lisp, based on tinkering with Emacs. Is there a site which lays out the API for GnuCash reports, ideally with a little explanation of Scheme as well?
Creating custom reports in GnuCash using Scheme can be quite rewarding, especially if you have some Lisp experience. While there may not be a comprehensive single resource that covers everything, there are several places where you can find valuable information. ### Key Resources for GnuCash Reporting with Scheme 1. *...
10,258
[ { "from": "human", "value": "Are there any resources which show how to create custom GnuCash reports? I don't know the intricacies of Scheme but I do know the basics of Lisp, based on tinkering with Emacs. Is there a site which lays out the API for GnuCash reports, ideally with a little explanation of Schem...
How do I initialize an automatic download of a file in Internet Explorer? For example, in the download page, I want the download link to appear and a message: "If you download doesn't start automatically .... etc". The download should begin shortly after the page loads. In Firefox this is easy, you just need to include...
In Internet Explorer, you can use a combination of HTML and JavaScript to initiate an automatic download while also providing a message for users in case the download does not start automatically. Here’s a simple method to achieve this: ### Step-by-Step Instructions 1. **Create a Download Page**: You will need an HTM...
12,924
[ { "from": "human", "value": "How do I initialize an automatic download of a file in Internet Explorer?\nFor example, in the download page, I want the download link to appear and a message: \"If you download doesn't start automatically .... etc\". The download should begin shortly after the page loads.\nIn F...
I recently moved my website to a shared hosting solution at asmallorange.com, but I had to set my domain to use their provided nameservers in order for the site to properly resolve. I was determined to keep control of the domain's DNS but I could find no way to make my top level domain resolve to the shared location w...
When you set your domain to use the nameservers provided by your shared hosting provider (in this case, asmallorange.com), those nameservers handle the DNS resolution for your domain. This means that they translate your domain name (like topleveldomain.com) into an IP address that points to the web server where your we...
13,754
[ { "from": "human", "value": "I recently moved my website to a shared hosting solution at asmallorange.com, but I had to set my domain to use their provided nameservers in order for the site to properly resolve. I was determined to keep control of the domain's DNS but I could find no way to make my top leve...
I would like to know at runtime in which of several possible host processes my current code is executing. The host processes have configured names at the Biztalk management level, but I need to know which process I'm in from inside the code. I didn't find any supported way to do this and I'm even stuck with the search...
To determine which BizTalk host process your code is executing in, you can leverage the BizTalk API, particularly the `HostInstance` class and related properties. Although you cannot directly access this information from a typical .NET environment, you can utilize the `Microsoft.BizTalk.Common` namespace to retrieve th...
11,852
[ { "from": "human", "value": "I would like to know at runtime in which of several possible host processes my current code is executing. The host processes have configured names at the Biztalk management level, but I need to know which process I'm in from inside the code. \nI didn't find any supported way to ...
I am a programmer who writes a lot of code for desktop applications, now started considering cross-platform apps as an issue but at work I write C# apps and I come from C++ and CS background and of course, I wrote several things in QT/C++. But now I am kinda confused about web applications, I have done some work on PHP...
It's great that you're exploring new opportunities and considering expanding your skill set. The decision to transition from desktop applications to web application development ultimately depends on a few factors: your interests, the demands of your current role or market, and the potential for growth in the area you c...
13,074
[ { "from": "human", "value": "I am a programmer who writes a lot of code for desktop applications, now started considering cross-platform apps as an issue but at work I write C# apps and I come from C++ and CS background and of course, I wrote several things in QT/C++. But now I am kinda confused about web a...
Is it OK if the same OpenSSL context is used by several different accepting sockets? In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets.
Yes, it is generally acceptable to use the same OpenSSL context for multiple accepting sockets in a server application, including when using Boost.Asio's SSL support. The `boost::asio::ssl::context` object encapsulates SSL/TLS configurations, such as certificates and private keys, and is thread-safe for read-only opera...
11,161
[ { "from": "human", "value": "Is it OK if the same OpenSSL context is used by several different accepting sockets?\nIn particular I'm using the same boost::asio::ssl::context with 2 different listening sockets. \n" }, { "from": "gpt", "value": "Yes, it is generally acceptable to use the same Ope...
How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows: Users submit content Other users view and vote on the content (assume 90% of t...
Implementing a recommendation system for a website that evaluates the "hotness" of content based on user interactions is an interesting challenge. Below is a general approach and best practices that you can consider when designing such a system. ### Key Components 1. **Database Design** - **Content Table**: Store ...
5,675
[ { "from": "human", "value": "How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of \"hotness\" according to how popular the item is. The flow is as follows:\n\nUsers submit content\nOther users...
I can't find a reference to it but I remember reading that it wasn't a good idea to call virtual (polymorphic) methods within a destructor or the Dispose() method of IDisposable. Is this true and if so can someone explain why?
Yes, it's true that calling virtual (polymorphic) methods from a destructor or the `Dispose` method of a class that implements `IDisposable` can lead to undefined behavior or unexpected results. Here’s a detailed explanation of why this is the case: ### Destructors In C++, destructors are called when an object is des...
10,782
[ { "from": "human", "value": "I can't find a reference to it but I remember reading that it wasn't a good idea to call virtual (polymorphic) methods within a destructor or the Dispose() method of IDisposable.\nIs this true and if so can someone explain why?\n" }, { "from": "gpt", "value": "Yes, i...
In the process of learning TinyOS I have discovered that I am totally clueless about makefiles. There are many optional compile time features that can be used by way of declaring preprocessor variables. To use them you have to do things like: CFLAGS="-DPACKET_LINK" this enables a certain feature. and CFLAGS="-DP...
Certainly! Let's break down the components of the lines you've encountered regarding makefiles and what they mean in a more general context. ### Understanding the Makefile Syntax 1. **Makefiles**: - A makefile is a special file used to control the build process of a project. It defines how to compile and link the ...
12,326
[ { "from": "human", "value": "In the process of learning TinyOS I have discovered that I am totally clueless about makefiles.\nThere are many optional compile time features that can be used by way of declaring preprocessor variables.\nTo use them you have to do things like:\nCFLAGS=\"-DPACKET_LINK\" t...
What is the easiest way to copy the all the values from a column in a table to another column in the same table?
The easiest way to copy all the values from one column to another column in the same table depends on the database management system (DBMS) you're using. However, a common SQL approach can be used across many SQL-based databases. ### Using SQL Assuming you have a table named `my_table` and you want to copy values from...
15,132
[ { "from": "human", "value": "What is the easiest way to copy the all the values from a column in a table to another column in the same table?\n" }, { "from": "gpt", "value": "The easiest way to copy all the values from one column to another column in the same table depends on the database manage...
I'd like to install Gentoo. I need it to develop GUI C++ applications using wxWidgets, so I need: build tools: make, automake, autoconf, etc. C++ compiler (GCC) X Window System for testing (Fluxbox or something minimal would be enough) Now, I have two options: download the small network installer (57MB) do a network...
To install Gentoo and have the necessary tools for developing GUI C++ applications with wxWidgets while minimizing your download size, the small network installer (57MB) is likely your best option. Here's some information to help you decide: ### Network Installer - **Size**: The network installer is much smaller (57M...
12,285
[ { "from": "human", "value": "I'd like to install Gentoo. I need it to develop GUI C++ applications using wxWidgets, so I need:\n\nbuild tools: make, automake, autoconf, etc.\nC++ compiler (GCC)\nX Window System for testing (Fluxbox or something minimal would be enough)\n\nNow, I have two options:\n\ndownloa...
I'm used to writing classes like this: public class foo { private string mBar = "bar"; public string Bar { get { return mBar; } set { mBar = value; } } //... other methods, no constructor ... } Converting Bar to an auto-property seems convenient and concise, but how can I retain the initialization with...
You are correct! In C#, starting from version 6.0, you can indeed initialize auto-properties directly where they are declared. This allows you to maintain the default value without having to add a constructor. Here’s how you can do it: ```csharp public class Foo { public string Bar { get; set; } = "bar"; // Direct...
16,302
[ { "from": "human", "value": "I'm used to writing classes like this:\npublic class foo {\n private string mBar = \"bar\";\n public string Bar {\n get { return mBar; }\n set { mBar = value; }\n }\n //... other methods, no constructor ...\n}\n\nConverting Bar to an auto-property seems convenient and ...
A site I'm working on has Flash headers (using swfobject to embed them). Now I'm required to code in a bit of HTML that's supposed to overlap the Flash movie. I've tried setting z-index on the Flash element's container and the (absolutely positioned) div but it keeps "vanishing" behind the Flash movie. I'm hoping for ...
It sounds like you've made significant progress in addressing the overlap issue with your Flash content by using `wmode="transparent"` for the SWF file. This is indeed a critical step since it allows HTML content to be rendered above the Flash movie. Regarding the Safari/Mac issue where the div still hid behind the Fl...
14,853
[ { "from": "human", "value": "A site I'm working on has Flash headers (using swfobject to embed them). Now I'm required to code in a bit of HTML that's supposed to overlap the Flash movie.\nI've tried setting z-index on the Flash element's container and the (absolutely positioned) div but it keeps \"vanishin...
I want to write a raw byte/byte stream to a position in a file. This is what I have currently: $fpr = fopen($out, 'r+'); fseek($fpr, 1); //seek to second byte fwrite($fpr, 0x63); fclose($fpr); This currently writes the actually string value of "99" starting at byte offset 1. IE, it writes bytes "9" and "9". I just ...
When you use `fwrite` in PHP, it interprets the data you provide to it as a string. So when you write `0x63`, PHP converts that to the string representation of `99`, resulting in the output you described. To write the actual byte value (in this case, `0x63`), you need to convert it to a string that represents the byte...
15,836
[ { "from": "human", "value": "I want to write a raw byte/byte stream to a position in a file.\nThis is what I have currently:\n$fpr = fopen($out, 'r+');\nfseek($fpr, 1); //seek to second byte\nfwrite($fpr, 0x63); \nfclose($fpr);\n\nThis currently writes the actually string value of \"99\" starting at byte of...
I haven't used Visual Studio since VB 3 and am trying to give it a shot with ASP.NET. It seems that it should be able to connect to a website (via some sort of ftp like protocol I figure) and allow to edit without having to manually upload/download the files. Is this the way it is supposed to work or am I mis-understan...
Welcome back to the world of development with Visual Studio! It's great that you're giving ASP.NET a shot. Regarding your question about connecting to a website and editing files directly, here are a few insights: ### Understanding Visual Studio and ASP.NET 1. **Web Projects vs. Websites**: In ASP.NET, you can create...
12,606
[ { "from": "human", "value": "I haven't used Visual Studio since VB 3 and am trying to give it a shot with ASP.NET. It seems that it should be able to connect to a website (via some sort of ftp like protocol I figure) and allow to edit without having to manually upload/download the files. Is this the way it ...
I'm interested in using Office 2007 to convert between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx) How would I do this? I'd like to write a simple command line app that takes in two filenames (input and output) and perhaps the source and/or destination types,...
To create a simple command-line application that converts files between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx) using Office 2007, you'll need to automate Microsoft Office applications (Word, Excel, PowerPoint) via COM (Component Object Model). Here's a s...
6,131
[ { "from": "human", "value": "I'm interested in using Office 2007 to convert between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx)\nHow would I do this? I'd like to write a simple command line app that takes in two filenames (input and output) and pe...
Problem: html file on local server (inside our organization) with link to an exe on the same server. clicking the link runs the exe on the client. Instead I want it to offer downloading it. Tried so far: Changed permissions on the exe's virtual directory to be read and script. Added Content-disposition header on the...
To ensure that clicking a link to an `.exe` file on a local server prompts users to download the file instead of running it, you can follow these steps: ### 1. Configure the Server **For IIS (Internet Information Services)**: - You can set up the Content-Disposition header directly in your IIS configuration. This can...
9,592
[ { "from": "human", "value": "Problem:\n\nhtml file on local server (inside our organization) with link to an exe on the same server.\nclicking the link runs the exe on the client. Instead I want it to offer downloading it.\n\nTried so far:\n\nChanged permissions on the exe's virtual directory to be read and...
This exception peppers our production catalina logs on a simple 'getParameter()' call. WARNING: Parameters: Character decoding failed. Parameter skipped. java.io.CharConversionException: EOF at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:82) at org.apache.tomcat.util.buf.UDecoder.convert(UDecode...
The warnings and exceptions you are encountering in your Tomcat logs suggest that there are issues with the URL encoding of request parameters in your application. Let's break down the error messages and how you might address them. ### Explanation of the Exceptions 1. **EOF Exception**: The `java.io.CharConversionExc...
11,877
[ { "from": "human", "value": "This exception peppers our production catalina logs on a simple 'getParameter()' call.\n\nWARNING: Parameters: Character decoding failed. Parameter skipped.\n\njava.io.CharConversionException: EOF\n at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:82)\n at org....
I have two tables, let's call them PERSON and NAME. PERSON person_id dob NAME name_id person_id name And let's say that the NAME table has data like: name_id person_id name 1 1 Joe 2 1 Fred 3 1 Sam 4 2 Jane 5 2 Kim I need a...
Yes, you can achieve the desired output using the `WM_CONCAT` function in Oracle 10g. Your understanding of using `WM_CONCAT` is correct. Below is the SQL query that will return the `name_id` and a concatenated list of `names` for each `person_id`: ```sql SELECT person_id AS name_id, WM_CONCAT(name) AS names F...
15,081
[ { "from": "human", "value": "I have two tables, let's call them PERSON and NAME.\n PERSON\n person_id\n dob\n\n NAME\n name_id\n person_id\n name\n\nAnd let's say that the NAME table has data like:\nname_id person_id name\n1 1 Joe\n2 1 Fred\n3 1 Sam\n4 ...
Someone told me about a C++ style difference in their team. I have my own viewpoint on the subject, but I would be interested by pros and cons coming from everyone. So, in case you have a class property you want to expose via two getters, one read/write, and the other, readonly (i.e. there is no set method). There are ...
Both `MethodA` and `MethodB` represent different ways to expose a property with both read-only and read-write access in C++. Here are the pros and cons of each method from a technical and stylistic perspective. ### Method A ```cpp class MethodA { public: const T& get() const; // Read-only T& get(); // Read-wr...
8,963
[ { "from": "human", "value": "Someone told me about a C++ style difference in their team. I have my own viewpoint on the subject, but I would be interested by pros and cons coming from everyone.\nSo, in case you have a class property you want to expose via two getters, one read/write, and the other, readonly...
I'm wondering if updating statistics has helped you before and how did you know to update them?
Updating statistics in databases can significantly improve query performance, as it helps the query optimizer make better decisions about execution plans. Here are a few indicators that updating statistics might be beneficial: 1. **Performance Degradation**: If you notice a slowdown in query performance, it might indi...
15,840
[ { "from": "human", "value": "I'm wondering if updating statistics has helped you before and how did you know to update them?\n" }, { "from": "gpt", "value": "Updating statistics in databases can significantly improve query performance, as it helps the query optimizer make better decisions about ...
For example: root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 }); or: root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 });
Both code snippets you provided are valid ways to create and add a new instance of the `TNode` class to the `Nodes` collection of the `root` object. The difference between the two is mainly in formatting and readability. 1. **Single Line Format:** ```csharp root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, ...
14,684
[ { "from": "human", "value": "For example:\nroot.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 });\n\nor:\nroot.Nodes.Add(new TNode() { Foo1 = bar1, \n Foo2 = bar2, \n Foo3 = bar3 });\n\n" }, { "from": "gpt", "value": "Both c...
Is there a way to make psycopg and postgres deal with errors without having to reestablish the connection, like MySQLdb? The commented version of the below works with MySQLdb, the comments make it work with Psycopg2: results = {'felicitas': 3, 'volumes': 8, 'acillevs': 1, 'mosaics': 13, 'perat\xe9': 1, 'representative...
When working with Psycopg2 and PostgreSQL, handling errors without reestablishing the connection can be achieved in several ways. One common way to handle formatting errors, such as apostrophes in strings, is to use parameterized queries. This allows you to avoid issues with special characters and SQL injection vulnera...
10,777
[ { "from": "human", "value": "Is there a way to make psycopg and postgres deal with errors without having to reestablish the connection, like MySQLdb? The commented version of the below works with MySQLdb, the comments make it work with Psycopg2:\nresults = {'felicitas': 3, 'volumes': 8, 'acillevs': 1, 'mos...
When calling CoInitializeEx, you can specify the following values for dwCoInit: typedef enum tagCOINIT { COINIT_MULTITHREADED = 0x0, COINIT_APARTMENTTHREADED = 0x2, COINIT_DISABLE_OLE1DDE = 0x4, COINIT_SPEED_OVER_MEMORY = 0x8, } COINIT; What does the suggestively titled "speed over memory" value ...
The `COINIT_SPEED_OVER_MEMORY` flag, when specified in a call to `CoInitializeEx`, indicates a preference for speed over memory usage in the allocation of memory resources for the COM library. This flag can potentially lead to optimizations in how memory is handled, allowing COM to allocate larger amounts of memory for...
11,215
[ { "from": "human", "value": "When calling CoInitializeEx, you can specify the following values for dwCoInit:\ntypedef enum tagCOINIT {\n COINIT_MULTITHREADED = 0x0,\n COINIT_APARTMENTTHREADED = 0x2,\n COINIT_DISABLE_OLE1DDE = 0x4,\n COINIT_SPEED_OVER_MEMORY = 0x8,\n} COINIT;\n\nWhat does t...
I have created a Web Application in asp.net 2.0. which is working fine on my Local machine. However when trying to deploy it on sever that has windows 2003 sever, I get the error: Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this requ...
The error message you're encountering indicates that the ASP.NET application cannot find the `MasterPage.master` file when deployed to the server. Here are a few steps you can take to troubleshoot and resolve this issue: 1. **Check File Existence**: Ensure that the `MasterPage.master` file is indeed present in the roo...
13,325
[ { "from": "human", "value": "I have created a Web Application in asp.net 2.0. which is working fine on my Local machine. However when trying to deploy it on sever that has windows 2003 sever, I get the error:\nServer Error in '/' Application.\n\nParser Error\nDescription: An error occurred during the parsin...
Why would one choose YAML over XML or any other formats?
Choosing YAML over XML or other data serialization formats can depend on several factors, including readability, ease of use, and specific use cases. Here are some reasons why one might choose YAML: 1. **Readability**: YAML is designed to be human-readable and easily understandable. Its use of indentation to represent...
12,344
[ { "from": "human", "value": "Why would one choose YAML over XML or any other formats?\n" }, { "from": "gpt", "value": "Choosing YAML over XML or other data serialization formats can depend on several factors, including readability, ease of use, and specific use cases. Here are some reasons why o...
I have this bit of javascript written with jQuery 1.2.5. It's contained inside the main function() of a plugin that I wrote. The plugin is a horizontal gallery scroller very similar to jCarousel. It does alot of auto calculating of widths and determines how many to scroll based on that and the size of the images, wh...
To prevent multiple clicks from triggering the animation in your gallery scroller before the previous animation has finished, you can use a flag to track whether an animation is currently in progress. Here’s an example of how to implement that in your existing code: ```javascript var self = this; var isAnimating = fal...
12,563
[ { "from": "human", "value": "I have this bit of javascript written with jQuery 1.2.5. It's contained inside the main function() of a plugin that I wrote. The plugin is a horizontal gallery scroller very similar to jCarousel. It does alot of auto calculating of widths and determines how many to scroll bas...
I can get easily see what projects and dlls a single project references from within a Visual Studio .NET project. Is there any application or use of reflection that can build me a full dependency tree that I can use to plot a graphical chart of dependencies?
Yes, you can use reflection and various .NET libraries to build a full dependency tree of a Visual Studio .NET project. Here's how you can approach this task: ### Steps to Build a Dependency Tree 1. **Load the Assemblies**: Use reflection to load the assemblies (DLLs) referenced by the project. 2. **Get References**...
11,546
[ { "from": "human", "value": "I can get easily see what projects and dlls a single project references from within a Visual Studio .NET project.\nIs there any application or use of reflection that can build me a full dependency tree that I can use to plot a graphical chart of dependencies?\n" }, { "fr...
I've heard many times that all programming is really a subset of math. Some suggest that OO, at its roots, is mathematically based, but I don't get the connection, aside from some obvious examples: using induction to prove a recursive algorithm, formal correctness proofs, functional languages, lambda calculus, asympto...
The idea that programming can be considered a subset of mathematics stems from the fact that many principles and constructs in programming can be rigorously defined, analyzed, and proven using mathematical concepts. While programming itself is an applied discipline that often focuses on practical implementation, many o...
10,728
[ { "from": "human", "value": "I've heard many times that all programming is really a subset of math. Some suggest that OO, at its roots, is mathematically based, but I don't get the connection, aside from some obvious examples:\n\nusing induction to prove a recursive algorithm,\nformal correctness proofs,\nf...
This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After the items are added to the list, the consumer should not be able to modify them again, l...
Your question is clear, and it appears that you're looking for a way to encapsulate the list of objects in class "A" while providing a controlled way for consumers to interact with the objects in that list. A common design pattern that suits your requirements is the **Collection Wrapper** or **Read-Only Collection** pa...
10,962
[ { "from": "human", "value": "This is kind of hard to explain, I hope my English is sufficient:\nI have a class \"A\" which should maintain a list of objects of class \"B\" (like a private List). A consumer of class \"A\" should be able to add items to the list. After the items are added to the list, the con...
I am considering adding OpenID to our customer facing admin and control panel areas... 1 - Associating OpenID's With Existing Accounts For customers that already have accounts with us, I'm thinking they would need to login using their existing account number that we issue and then I'd have a mechanism to associate thei...
Integrating OpenID into your customer-facing admin and control panel areas can provide a convenient login mechanism for your users. However, it's essential to consider both the implementation process and security implications. Let's address your points: ### 1. Associating OpenIDs With Existing Accounts Your approach ...
12,292
[ { "from": "human", "value": "I am considering adding OpenID to our customer facing admin and control panel areas...\n1 - Associating OpenID's With Existing Accounts\nFor customers that already have accounts with us, I'm thinking they would need to login using their existing account number that we issue and ...