instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
.NET 3.5, C# I have a web app with a "search" feature. Some of the fields that are searchable are first-class columns in the table, but some of them are in fact nested fields inside an XML data type. Previously, I built a system for dynamically constructing the SQL for my search. I had a nice class hierarchy that bu...
In .NET 3.5 with LINQ to SQL, there is no built-in support for querying SQL Server's XML data types directly through LINQ. The LINQ to SQL provider does not know how to translate XML queries into SQL when working with XML columns, and as such, you will not be able to use LINQ's expressive capabilities to directly parse...
34,729
[ { "from": "human", "value": ".NET 3.5, C#\nI have a web app with a \"search\" feature. Some of the fields that are searchable are first-class columns in the table, but some of them are in fact nested fields inside an XML data type. \nPreviously, I built a system for dynamically constructing the SQL for my ...
Today I changed the application pool identity of our ASP.NET application from "Network Service" to a domain user. I added the user to the local group "IIS_WPG", done a iisreset just in case, and everything works fine with IE6 and Firefox 3.0 But when I go to the website with IE7, an authentication popup appears, I typ...
The issue you're experiencing with IE7 when changing the application pool identity to a domain user is likely related to authentication settings or permissions. Here are some steps and checks to resolve the problem: 1. **Check Authentication Settings in IIS**: - Open IIS Manager. - Select your website. - Clic...
37,620
[ { "from": "human", "value": "Today I changed the application pool identity of our ASP.NET application from \"Network Service\" to a domain user.\nI added the user to the local group \"IIS_WPG\", done a iisreset just in case, and \neverything works fine with IE6 and Firefox 3.0\nBut when I go to the website ...
I use eclipse to work on an application which was originally created independently of eclipse. As such, the application's directory structure is decidedly not eclipse-friendly. I want to programmatically generate a project for the application. The .project and .classpath files are easy enough to figure out, and I've ...
Generating Eclipse project files and structure programmatically can indeed be challenging, especially when dealing with a non-standard project structure. The `.location` file and some other metadata files under Eclipse's `.metadata` are not easily accessible or documented, which makes reverse engineering them quite dif...
34,238
[ { "from": "human", "value": "I use eclipse to work on an application which was originally created independently of eclipse. As such, the application's directory structure is decidedly not eclipse-friendly.\nI want to programmatically generate a project for the application. The .project and .classpath file...
Basically I want to use RegEx to grab stuff in between paragraphs in a document. I think the expression would be: <p>.+?</p> Say it grabs 10 items using this RegEx, I then want PHP to randomly choose one of those and then save it to a variable. Any ideas?
You can certainly use regular expressions in PHP to extract paragraphs from a document and then randomly select one of those paragraphs. Here's a step-by-step guide to achieve this: 1. Use the regular expression to match all paragraphs. 2. Use `preg_match_all` to extract all matches. 3. Randomly select one of the matc...
35,935
[ { "from": "human", "value": "Basically I want to use RegEx to grab stuff in between paragraphs in a document. I think the expression would be:\n<p>.+?</p>\n\nSay it grabs 10 items using this RegEx, I then want PHP to randomly choose one of those and then save it to a variable. Any ideas?\n" }, { "fr...
Today I had my first test with the ASP.NET AJAX Timer Control, in hope that it would allow me to constantly keep updating my site. At the moment, it just updates once; this does not match the behavior of the previous .NET timers. Was the AJAX Timer control only made to update an item once? Or do I need to use another f...
The ASP.NET AJAX Timer Control is indeed designed to periodically execute a function at a specified interval, updating the page content without requiring a full postback. If your AJAX Timer is only updating once, it's likely due to the way it's configured or integrated into your page. Here are some key points to ensu...
35,402
[ { "from": "human", "value": "Today I had my first test with the ASP.NET AJAX Timer Control, in hope that it would allow me to constantly keep updating my site.\nAt the moment, it just updates once; this does not match the behavior of the previous .NET timers.\nWas the AJAX Timer control only made to update ...
Assume I have a function like this: MyClass &MyFunction(void) { static MyClass *ptr = 0; if (ptr == 0) ptr = new MyClass; return MyClass; } The question is at program exit time, will the ptr variable ever become invalid (i.e. the contents of that ptr are cleaned up by the exiting process)? I realize that thi...
In C++, the behavior of static variables (both pointers and other primitive types) during program termination has specific rules governed by the C++ language standard. ### Static Variables at Program Termination 1. **Static Variables Lifetime**: Static variables, including both static pointers and primitive types (li...
37,499
[ { "from": "human", "value": "Assume I have a function like this:\nMyClass &MyFunction(void)\n{\n static MyClass *ptr = 0;\n if (ptr == 0)\n ptr = new MyClass;\n return MyClass;\n}\n\nThe question is at program exit time, will the ptr variable ever become invalid (i.e. the contents of that ptr are clea...
Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the first period then return whatever came after the "http://" ... Then you remember http://super.duper.domain.example Oh. So then you think, okay, find the last period, go back a word and get everything before! Then you rememb...
Extracting the subdomain from a URL can indeed be tricky due to the variety of domain structures, especially with different types of top-level domains (TLDs). Here are some approaches you could consider to get the subdomain more reliably without having to store a list of all TLDs: ### 1. Use a Domain Parsing Library I...
36,105
[ { "from": "human", "value": "Getting the subdomain from a URL sounds easy at first.\nhttp://www.domain.example\n\nScan for the first period then return whatever came after the \"http://\" ...\nThen you remember\nhttp://super.duper.domain.example\n\nOh. So then you think, okay, find the last period, go back ...
In my fieldset I have labels next (side) to my textboxes, but for some reason, they are towards the top and not middle. Here is my CSS for the fieldset: fieldset { clear: both; font-size: 100%; border-color: #000000; border-width: 1px 0 0 0; border-style: solid none none none; padding: 10px; margin: 0 0 0...
It looks like your labels are aligning at the top of the textboxes because they are using `float: left;`. When you float elements, they do not participate in the normal document flow, which can lead to alignment issues if you want them to be vertically centered relative to other elements like textboxes. To vertically ...
29,302
[ { "from": "human", "value": "In my fieldset I have labels next (side) to my textboxes, but for some reason, they are towards the top and not middle. Here is my CSS for the fieldset:\nfieldset {\n clear: both;\n font-size: 100%;\n border-color: #000000;\n border-width: 1px 0 0 0;\n border-style: solid n...
Why is it called a single in VB.net? I'm sure there is a good reason but it doesn't seem intuitive to a non formally trained programmer like me.
In VB.NET (Visual Basic .NET), the term "Single" refers to a specific data type that represents a single-precision floating-point number. The naming convention originates from the way floating-point numbers are represented in computing. Here’s a breakdown of the terminology: 1. **Floating-Point Number**: These are nu...
38,943
[ { "from": "human", "value": "Why is it called a single in VB.net? I'm sure there is a good reason but it doesn't seem intuitive to a non formally trained programmer like me.\n" }, { "from": "gpt", "value": "In VB.NET (Visual Basic .NET), the term \"Single\" refers to a specific data type that r...
Is there any way to catch all syscalls on Linux? The only solution I know of is using LD_PRELOAD à la fakeroot, but that only works for dynamically linked applications. Furthermore, this approach requires enumerating all syscalls which is something I'd like to avoid.
Yes, there are several methods to catch all system calls on Linux, beyond the `LD_PRELOAD` technique. Here are a few popular approaches: 1. **Using `ptrace`:** The `ptrace` system call allows one process (the tracer) to observe and control the execution of another process (the tracee). This can be used to intercept...
34,736
[ { "from": "human", "value": "Is there any way to catch all syscalls on Linux? The only solution I know of is using LD_PRELOAD à la fakeroot, but that only works for dynamically linked applications. Furthermore, this approach requires enumerating all syscalls which is something I'd like to avoid.\n" }, {...
Is there a way of reusing the same resultMap multiple times in a single query. For example, suppose I have a "foo" resultMap: <resultMap id="foo" class="Foo"> <result property="Bar" column="bar" /> </resultMap> Is there a way to define another resultMap that reuses the above for different columns? Something like... ...
In MyBatis, you cannot directly reuse a `<resultMap>` by referencing it multiple times with different columns in the way you described. However, you can achieve a similar effect by defining a combination of result mappings and using property references for different column mappings. Instead of trying to apply the same...
35,995
[ { "from": "human", "value": "Is there a way of reusing the same resultMap multiple times in a single query.\nFor example, suppose I have a \"foo\" resultMap:\n<resultMap id=\"foo\" class=\"Foo\">\n <result property=\"Bar\" column=\"bar\" />\n</resultMap>\n\nIs there a way to define another resultMap that r...
My code is like the following: URLConnection cnx = address.openConnection(); cnx.setAllowUserInteraction(false); cnx.setDoOutput(true); cnx.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); InputStream is = cnx.getInputStream(); Is it ok if I set the headers before I...
Yes, it is perfectly fine to set request headers using `addRequestProperty` on a `URLConnection` before calling `getInputStream()`. When you set headers with `addRequestProperty`, those headers are included in the HTTP request that is sent to the server when `getInputStream()` (or `connect()`, if called explicitly) is ...
38,762
[ { "from": "human", "value": "My code is like the following:\nURLConnection cnx = address.openConnection();\ncnx.setAllowUserInteraction(false); \ncnx.setDoOutput(true);\ncnx.addRequestProperty(\"User-Agent\", \n \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\");\nInputStream is = cnx.getInp...
Suppose a and b are both of type int, and b is nonzero. Consider the result of performing a/b in the following cases: a and b are both nonnegative. a and b are both negative. Exactly one of them is negative. In Case 1 the result is rounded down to the nearest integer. But what does the standard say about Cases 2 an...
In the context of the C and C++ standards, the behavior of integer division is defined clearly for both positive and negative operands. 1. **Case 1: Both `a` and `b` are nonnegative** - The result of `a / b` is defined to round down to the nearest integer, which is equivalent to performing a floor operation on the res...
38,084
[ { "from": "human", "value": "Suppose a and b are both of type int, and b is nonzero. Consider the result of performing a/b in the following cases:\n\na and b are both nonnegative.\na and b are both negative.\nExactly one of them is negative.\n\nIn Case 1 the result is rounded down to the nearest integer. ...
I'm trying to create an instance of a class at run time. The classes I'm trying to create all inherit from a base class, ConfigMgrObj, and are named ConfigMgr_xxxxxx e.g. ConfigMgr_Collection. They all take a special object that I'm calling oController and a string as arguments. This is the line I'm using to do it, whe...
The `TypeLoadException` you are encountering suggests that the specified type (in your case, the class with the name `ConfigMgr_Collection`) could not be found or loaded. This can happen for several reasons. Here are some common issues to check: 1. **Namespace**: Ensure that the class `ConfigMgr_Collection` is indeed ...
24,154
[ { "from": "human", "value": "I'm trying to create an instance of a class at run time. The classes I'm trying to create all inherit from a base class, ConfigMgrObj, and are named ConfigMgr_xxxxxx e.g. ConfigMgr_Collection. They all take a special object that I'm calling oController and a string as arguments....
How can I access the WCF Service through JavaScript? My problem is, I have to access the operation contracts through the JavaScript (my website is not Ajax enabled). Previously for calling .asmx web services, I am using the following code snippet var xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttp.open("POST", ...
Accessing a WCF service directly via JavaScript without using AJAX (and by extension, without asynchronous calls) can be done, but it may require some understanding of how WCF services expose their endpoints and the expected request formats. Below is a way to call a WCF service similar to how you're using the `ActiveXO...
35,100
[ { "from": "human", "value": "How can I access the WCF Service through JavaScript?\nMy problem is, I have to access the operation contracts through the JavaScript (my website is not Ajax enabled).\nPreviously for calling .asmx web services, \nI am using the following code snippet\nvar xmlHttp = new ActiveXOb...
Can someone tell me what Strong typing and weak typing means and which one is better?
Strong typing and weak typing are concepts in programming languages that refer to how strictly the language enforces type constraints. ### Strong Typing: - In a strongly typed language, types are enforced at compile time or runtime, and type errors are typically caught early. This means that you cannot perform operati...
37,944
[ { "from": "human", "value": "Can someone tell me what Strong typing and weak typing means and which one is better?\n" }, { "from": "gpt", "value": "Strong typing and weak typing are concepts in programming languages that refer to how strictly the language enforces type constraints.\n\n### Strong...
I am not use: Process.Start (String, String) to open a link. But every time the browser open a new tab or new window to open the link. Is there a way that to open the link in the latest opened page? Just redirection, no new tab or new window?
When you use `Process.Start` to open a URL, it typically launches the default web browser and opens the URL in a new tab or window. Unfortunately, there isn't a direct way to control the behavior of how browsers handle link openings (e.g., whether it opens in a new tab or an existing tab) through `Process.Start`. This ...
36,764
[ { "from": "human", "value": "I am not use: Process.Start (String, String) to open a link. But every time the browser open a new tab or new window to open the link.\nIs there a way that to open the link in the latest opened page? Just redirection, no new tab or new window?\n" }, { "from": "gpt", ...
1a)Are MS Word and MS PowerPoint different processes or threads of a single process? b)How does a spell checker routine (common to both, word and PowerPoint) used? I mean is the code copied 2 times for each of the processes in the main memory, if they are different processes if they are threads. The question is not s...
To answer your questions about MS Word and MS PowerPoint, let's clarify the concepts of processes and threads first. ### 1a) Are MS Word and MS PowerPoint different processes or threads of a single process? **Processes vs. Threads:** - **Processes** are independent programs that run in their own memory space. Each pr...
37,901
[ { "from": "human", "value": "1a)Are MS Word and MS PowerPoint different processes or threads of a single process?\nb)How does a spell checker routine (common to both, word and PowerPoint) used? I mean is the code copied 2 times for each of the processes in the main memory,\n\nif they are different processes...
Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: Prj1 is an EXE that depends on Prj2 Prj2 is a DLL that exports some functions You can see the directory structure and the contents of my SConstruct and SConscript files here Problem The problem I'm running into is that...
To allow building your projects with simpler commands in SCons, you can indeed use Aliases. Here’s how you can modify your SConstruct and SConscript files to achieve this. ### Step 1: Modify the SConstruct File 1. **Define the build environment**: Make sure you're creating the build environment properly. 2. **Use Ali...
35,449
[ { "from": "human", "value": "Background\nI'm trying out Scons by setting up a basic C++ sample project that has two sub-projects:\n\nPrj1 is an EXE that depends on Prj2\nPrj2 is a DLL that exports some functions\n\nYou can see the directory structure and the contents of my SConstruct and SConscript files he...
I have a C/C++ application and I need to create a X509 pem certificate containing both a public and private key. The certificate can be self signed, or unsigned, doesn't matter. I want to do this inside an app, not from command line. What OpenSSL functions will do this for me? Any sample code is a bonus!
Creating a self-signed X.509 certificate with a corresponding private key in a C or C++ application using OpenSSL involves several steps. Below is a simple example that demonstrates how to do this. ### Requirements Ensure you have OpenSSL installed and linked to your project. You can install it on Linux using: ```bash...
34,261
[ { "from": "human", "value": "I have a C/C++ application and I need to create a X509 pem certificate containing both a public and private key. The certificate can be self signed, or unsigned, doesn't matter.\nI want to do this inside an app, not from command line.\nWhat OpenSSL functions will do this for me...
We have a JavaScript function named "move" which does just "windows.location.href = any given anchor". This function works on IE, Opera and Safari, but somehow is ignored in Firefox. Researching on Google doesn't produce a satisfactory answer why it doesn't work. Does any JavaScript guru knows about this behavior, an...
The issue you're encountering in Firefox with the `window.location.href` not working as expected when trying to jump to an anchor (also known as a fragment identifier) could stem from a few different factors. However, it’s important to note that in modern browsers, including Firefox, changing `window.location.href` sho...
33,583
[ { "from": "human", "value": "We have a JavaScript function named \"move\" which does just \"windows.location.href = any given anchor\". \nThis function works on IE, Opera and Safari, but somehow is ignored in Firefox. Researching on Google doesn't produce a satisfactory answer why it doesn't work. \nDoes an...
What would be the best hashing algorithm if we had the following priorities (in that order): Minimal hash collisions Performance It doesn't have to be secure. Basically I'm trying to create an index based on a combination of properties of some objects. All the properties are strings. Any references to c# implementati...
When you're looking for a hashing algorithm with minimal hash collisions and good performance for indexing strings in C#, you might want to consider the following options: ### 1. **MurmurHash** - **Overview**: MurmurHash is a non-cryptographic hash function known for its high performance and low collision rates. It’s ...
32,170
[ { "from": "human", "value": "What would be the best hashing algorithm if we had the following priorities (in that order):\n\nMinimal hash collisions\nPerformance\n\nIt doesn't have to be secure. Basically I'm trying to create an index based on a combination of properties of some objects. All the properties ...
Is there a way to do this almost out-of-the-box? I could go and write a big method that would use the collected tokens to figure out which leaves should be put in which branches and in the end populate a TreeNode object, but since gppg already handled everything by using supplied regular expressions, I was wondering if...
It's great to hear that you're diving into compiler construction! When it comes to generating an Abstract Syntax Tree (AST) from a parser generated by tools like `gppg`, there are indeed ways to simplify the process. Here are some pointers to help you with your AST creation: ### 1. Understanding the Role of the Parser...
35,027
[ { "from": "human", "value": "Is there a way to do this almost out-of-the-box?\nI could go and write a big method that would use the collected tokens to figure out which leaves should be put in which branches and in the end populate a TreeNode object, but since gppg already handled everything by using suppli...
What would be the easiest way to move the mouse around (and possibly click) using Python on OS X? This is just for rapid prototyping, it doesn't have to be elegant.
For rapid prototyping to control the mouse on macOS using Python, you can use the `pyautogui` library, which is straightforward and user-friendly. Here's a step-by-step guide on how to get started: ### Step 1: Install `pyautogui` You can install `pyautogui` using `pip`. Open your terminal and run: ```bash pip instal...
36,668
[ { "from": "human", "value": "What would be the easiest way to move the mouse around (and possibly click) using Python on OS X? \nThis is just for rapid prototyping, it doesn't have to be elegant.\n" }, { "from": "gpt", "value": "For rapid prototyping to control the mouse on macOS using Python, ...
I have a C# Windows application which runs a service. I would like to leverage PowerShell in order to offer a command line management interface for administering my running service. From my point of view, I am trying to offer the same administrative interface a la Exchange 2007. Do you have any suggestion or sample cod...
Creating a PowerShell management interface for your C# Windows service involves several steps. You need to design your service to expose its internal state and functionality, and then create PowerShell cmdlets to interact with that service. ### Step 1: Expose Your Service's Internal State and Functionality The first ...
34,078
[ { "from": "human", "value": "I have a C# Windows application which runs a service. I would like to leverage PowerShell in order to offer a command line management interface for administering my running service.\nFrom my point of view, I am trying to offer the same administrative interface a la Exchange 2007...
As far as I understand, if I want to get my database under source control then I need to be checking in change scripts for each change and then running them from some revision to get the correct DB. I am trying to make a batch file that will be checked in too, that allows other developers on the team to re-build the DB...
Hi Martin, It's great to see you taking steps to put your database under source control and make it easier for your team to manage changes. Using SQL scripts and `sqlcmd` is a common and effective way to automate database changes and facilitate local setups. Here’s a general outline of best practices and advice that m...
33,177
[ { "from": "human", "value": "As far as I understand, if I want to get my database under source control then I need to be checking in change scripts for each change and then running them from some revision to get the correct DB.\nI am trying to make a batch file that will be checked in too, that allows other...
Currently, we're storing the user's HTTP_REFERER so we can redirect the user back to the previous page they were browsing before they logged in. Http Referer comes from the client and can be spoofed or blank. Is there a more secure/reliable method to deliver this handy user redirect?
Using the `HTTP_REFERER` header for redirecting users back to a previous page after login is indeed not the most reliable or secure approach, as you noted. Here are several alternative methods to handle user redirection in a more secure and reliable manner: ### 1. Use Session or State Variables Instead of relying on ...
36,023
[ { "from": "human", "value": "Currently, we're storing the user's HTTP_REFERER so we can redirect the user back to the previous page they were browsing before they logged in.\nHttp Referer comes from the client and can be spoofed or blank. Is there a more secure/reliable method to deliver this handy user red...
In my ASP.NET application I have a web.config file. In the web.config file I have a connection string... <connectionStrings> <add name="HRDb" connectionString="xxxxx" providerName="System.Data.SqlClient" /> </connectionStrings> Yet, when I retrieve this value using ConfigurationManager.ConnectionStringsp["HRDb"], ...
When you're running your ASP.NET application in Visual Studio, the `ConfigurationManager` retrieves connection strings and other configuration settings primarily from the `web.config` file located in the root directory of your web project. However, there are some reasons you might be seeing an old connection string: 1...
33,643
[ { "from": "human", "value": "In my ASP.NET application I have a web.config file. In the web.config file I have a connection string...\n<connectionStrings>\n <add name=\"HRDb\" connectionString=\"xxxxx\" providerName=\"System.Data.SqlClient\" />\n</connectionStrings>\n\nYet, when I retrieve this value usi...
I'm working on an anti-spam project (centmail) that involves having the sender use a client plugin that adds a custom header (as well as a signature, but that part's easier). The general problem is to add an email header to your outgoing mail where the contents of the header field is determined dynamically for each me...
It sounds like you're working on an interesting project with CentMail. Here's a breakdown of how to add dynamic custom headers in several popular email clients, including options beyond Pine/Alpine. ### Thunderbird In Thunderbird, you can use the "Send Later" feature along with a small add-on or JavaScript to dynamica...
34,766
[ { "from": "human", "value": "I'm working on an anti-spam project (centmail) that involves having the sender use a client plugin that adds a custom header (as well as a signature, but that part's easier). The general problem is to add an email header to your outgoing mail where the contents of the header fi...
I have a project with a post build event: copy $(ProjectDir)DbVerse\Lunaverse.DbVerse.*.exe $(TargetDir) It works fine every time on my machine. I have a new developer who always gets the "exited with code 1" error. I had her run the same command in a DOS prompt, and it worked fine. What could be causing this? Is...
The "exited with code 1" error in Visual Studio during a post-build event usually indicates that the command line you provided is failing for some reason. Since you've already confirmed that the command works fine when run directly in a DOS prompt, the issue may be related to the environment in which Visual Studio is e...
36,548
[ { "from": "human", "value": "I have a project with a post build event:\ncopy $(ProjectDir)DbVerse\\Lunaverse.DbVerse.*.exe $(TargetDir)\n\nIt works fine every time on my machine. I have a new developer who always gets the \"exited with code 1\" error. I had her run the same command in a DOS prompt, and i...
I hope someone can help me with this, I'm mostly a C# developer so my C and C++ skills are bad. I have a native C dll that is a plugin of a larger application. I cross compile this dll for windows on linux using gcc. In the native dll when I create a D3DSurface I want to call a function in a Mixed Mode C++ dll and pa...
To create a mixed-mode C++ DLL that interacts with both your native C DLL and your C# code, you'll need to follow these steps: 1. **Define your Mixed-Mode C++ DLL**: In this DLL, you'll create a function that will be called from your native C DLL, which will in turn call the C# method. You can use `#include <vcclr.h>`...
35,590
[ { "from": "human", "value": "I hope someone can help me with this, I'm mostly a C# developer so my\nC and C++ skills are bad. I have a native C dll that is a plugin of a\nlarger application. I cross compile this dll for windows on linux\nusing gcc.\nIn the native dll when I create a D3DSurface I want to c...
I have a webservice @ http://recpushdata.cyndigo.com/Jobs.asmx but I'm not able to access it though I am adding it as a WebReference properly. Any Help would be great.
If you are having trouble accessing the web service at `http://recpushdata.cyndigo.com/Jobs.asmx`, here are some steps and troubleshooting tips that may help you resolve the issue: ### 1. Check URL Accessibility: - Open a web browser and navigate to `http://recpushdata.cyndigo.com/Jobs.asmx`. - If you cannot access i...
36,091
[ { "from": "human", "value": "I have a webservice @ http://recpushdata.cyndigo.com/Jobs.asmx but I'm not able to access it though I am adding it as a WebReference properly.\nAny Help would be great.\n" }, { "from": "gpt", "value": "If you are having trouble accessing the web service at `http://re...
I'm required to write documentation for my current project that lists all .c files and for each one lists every .h file which is directly or indirectly included by that file. This is a large project, and although we have Makefiles which theoretically have this information, those Makefiles are sometimes incorrect (we in...
Yes, there are several tools that can help you analyze the include dependencies in your C project. Here are a few popular ones you might find useful: ### 1. **CInclude** This tool is specifically designed to track C/C++ file includes. You can use it to generate a dependency graph for `.c` and `.h` files. **Usage:** 1...
33,271
[ { "from": "human", "value": "I'm required to write documentation for my current project that lists all .c files and for each one lists every .h file which is directly or indirectly included by that file.\nThis is a large project, and although we have Makefiles which theoretically have this information, thos...
I need to make a piece of C# code interact through COM with all kinds of implementations. To make it easeier for users of that integration, I included the interacted interfaces in IDL (as part of a relevant existing DLL, but without coclass or implementation), then got that into my C# code by running Tlbimp to create t...
Based on the information provided, it looks like you've set up a COM interface in IDL and implemented it in C#. However, you're encountering a casting issue when trying to use the `IScriptGenerator` interface. Here are a few potential reasons for the issue, along with suggestions to troubleshoot and fix it: ### Possib...
32,711
[ { "from": "human", "value": "I need to make a piece of C# code interact through COM with all kinds of implementations.\nTo make it easeier for users of that integration, I included the interacted interfaces in IDL (as part of a relevant existing DLL, but without coclass or implementation), then got that int...
If you were to build a badge system similiar to how SO does it, would you put the logic/business layer in the database directly (via stored procedure, scheduled sql jobs) or put it in the server side? From what I can think of, you have to: list badges that pertain to the current user action check if the user has a bad...
Designing a badge system requires careful consideration of where to place the logic to ensure scalability, maintainability, and performance. Here’s a breakdown of the options you presented, along with a recommended approach that might work best for your needs: ### Options Considered 1. **Business Logic in the Web App...
36,950
[ { "from": "human", "value": "If you were to build a badge system similiar to how SO does it, would you put the logic/business layer in the database directly (via stored procedure, scheduled sql jobs) or put it in the server side?\nFrom what I can think of, you have to:\n\nlist badges that pertain to the cur...
How do I go about performing AES encryption on a GUID? On the clients computer we will store a GUID and their public key, and our internal servers will have the private key and their guid. Is this all the necessary inputs to generate the AES encryption?
To perform AES encryption on a GUID (or any data), you'll need to follow a series of steps and ensure you have the necessary components. Let's break this down step by step: ### Steps for AES Encryption of a GUID 1. **Define the GUID**: First, you need to have the GUID you want to encrypt. A GUID is typically a 128-bi...
37,080
[ { "from": "human", "value": "How do I go about performing AES encryption on a GUID?\nOn the clients computer we will store a GUID and their public key, and our internal servers will have the private key and their guid.\nIs this all the necessary inputs to generate the AES encryption?\n" }, { "from":...
In C#, can I convert a string value to a string literal, the way I would see it in code? I would like to replace tabs, newlines, etc. with their escape sequences. If this code: Console.WriteLine(someString); produces: Hello World! I want this code: Console.WriteLine(ToLiteral(someString)); to produce: \tHello\r\n\tW...
In C#, you can create a method that converts a string to a string literal format by replacing specific characters (like tabs, newlines, etc.) with their escape sequences. Below is an example of how you could implement a method called `ToLiteral` to achieve this. Here's the code that shows how to convert special charac...
38,474
[ { "from": "human", "value": "In C#, can I convert a string value to a string literal, the way I would see it in code? I would like to replace tabs, newlines, etc. with their escape sequences.\nIf this code:\nConsole.WriteLine(someString);\n\nproduces:\nHello\nWorld!\n\nI want this code:\nConsole.WriteLine(T...
Does anyone know how to use the Raw Input facility on Windows from a WX Python application? What I need to do is be able to differentiate the input from multiple keyboards. So if there is another way to achieving that, that would work too.
Using the Raw Input facility in Windows can help differentiate input from multiple keyboards, but it's not directly supported in wxPython, as wxPython abstracts the underlying platform-specific input handling. However, you can achieve your goal by using the Windows Raw Input API directly via the `ctypes` library or a t...
33,194
[ { "from": "human", "value": "Does anyone know how to use the Raw Input facility on Windows from a WX Python application?\nWhat I need to do is be able to differentiate the input from multiple keyboards. So if there is another way to achieving that, that would work too.\n" }, { "from": "gpt", "va...
// A Mutex allows threads mutually exclusive access to a resource. //----------------------------------------------------------------------- class Mutex { private: CRITICAL_SECTION m_mutex; public: Mutex() { InitializeCriticalSection(&m_mutex); } ~Mutex() { DeleteCriticalSection(&m_mutex); } voi...
The error message you are receiving suggests that there is an issue with the memory management related to your `CRITICAL_SECTION` object in the `Mutex` class. Specifically, the error indicates that the `lpCriticalSection` pointer is pointing to an invalid memory location. This can occur due to a number of reasons, such...
37,441
[ { "from": "human", "value": "// A Mutex allows threads mutually exclusive access to a resource.\n//-----------------------------------------------------------------------\n\nclass Mutex\n{\nprivate:\n CRITICAL_SECTION m_mutex;\n\npublic:\n Mutex() { InitializeCriticalSection(&m_mutex); }\n ~Mutex(...
Is there a standard posix C function to convert encodings, say from windows-1251 to utf-8 and back?
POSIX C does not provide a standard function specifically for converting between different character encodings such as Windows-1251 and UTF-8. However, there are libraries that can be used to handle character encoding conversion effectively. ### 1. **iconv** One of the most commonly used libraries for character encod...
32,435
[ { "from": "human", "value": "Is there a standard posix C function to convert encodings, say from windows-1251 to utf-8 and back?\n" }, { "from": "gpt", "value": "POSIX C does not provide a standard function specifically for converting between different character encodings such as Windows-1251 an...
I'm experiencing a strange behavior of SVN. I've got SVN repository running on Apache 2.2.9 with mod_dav, mod_dav_svn and SVN 1.5.2. When I try to check out (from remote 1.5.4 client or server-local 1.5.2 client - both "default" svn binaries), I'm getting something like: mx-mac:Test mx$ svn ci -m "" Adding test...
It sounds like you're encountering an issue with the SVN setup on your Apache server, and the error message along with the "Reset by peer" indication suggests that there might be a few underlying problems. Here are several steps you can take to troubleshoot and possibly resolve the issue: 1. **Check Apache Error Logs*...
37,209
[ { "from": "human", "value": "I'm experiencing a strange behavior of SVN.\nI've got SVN repository running on Apache 2.2.9 with mod_dav, mod_dav_svn and SVN 1.5.2.\nWhen I try to check out (from remote 1.5.4 client or server-local 1.5.2 client - both \"default\" svn binaries), I'm getting something like:\nmx...
What is the memory model for concurrency in C++03? (And, does C++11 change the memory model to support concurrency better?)
In C++03, the language did not include any formal memory model that specifically addressed concurrency. The lack of a defined memory model meant that behavior could be unpredictable when accessing shared data from multiple threads. In C++03, the C++ standard primarily focused on single-threaded programming, and while i...
38,326
[ { "from": "human", "value": "What is the memory model for concurrency in C++03?\n(And, does C++11 change the memory model to support concurrency better?)\n" }, { "from": "gpt", "value": "In C++03, the language did not include any formal memory model that specifically addressed concurrency. The l...
I used to use the standard mysql_connect(), mysql_query(), etc statements for doing MySQL stuff from PHP. Lately I've been switching over to using the wonderful MDB2 class. Along with it, I'm using prepared statements, so I don't have to worry about escaping my input and SQL injection attacks. However, there's one prob...
The behavior you're encountering stems from how the prepared statements are implemented in MDB2 or the underlying database driver. In general, the distinction between `NULL` and an empty string `""` is important in SQL, and it should be respected in your application logic as well. When using prepared statements, it's ...
31,393
[ { "from": "human", "value": "I used to use the standard mysql_connect(), mysql_query(), etc statements for doing MySQL stuff from PHP. Lately I've been switching over to using the wonderful MDB2 class. Along with it, I'm using prepared statements, so I don't have to worry about escaping my input and SQL inj...
I've long had a desire for an STLish container that I could place into a shared memory segment or a memory mapped file. I've considered the use of a custom allocator and placement new to place a regular STL container into a shared memory segment. (like this ddj article). The problem is that STL containers will internal...
You're correct that using STL containers directly in shared memory can be quite challenging due to their internal management of pointers. When using shared memory or memory-mapped files, the addresses can change between different runs or different processes, leading to issues if internal pointers of STL containers beco...
34,291
[ { "from": "human", "value": "I've long had a desire for an STLish container that I could place into a shared memory segment or a memory mapped file.\nI've considered the use of a custom allocator and placement new to place a regular STL container into a shared memory segment. (like this ddj article). The pr...
Is there a way to access a list's (or tuple's, or other iterable's) next or previous element while looping through it with a for loop? l = [1, 2, 3] for item in l: if item == 2: get_previous(l, item)
Yes, you can access the previous or next element of a list (or tuple, or other iterable) while looping through it. However, there isn't a built-in way to do this directly in a regular `for` loop. Instead, you can use the `enumerate` function to get the index of the current element, which allows you to easily access the...
38,609
[ { "from": "human", "value": "Is there a way to access a list's (or tuple's, or other iterable's) next or previous element while looping through it with a for loop?\nl = [1, 2, 3]\nfor item in l:\n if item == 2:\n get_previous(l, item)\n\n" }, { "from": "gpt", "value": "Yes, you can acc...
This problem occurred during daylight saving time change. After the change occurred, we've noticed that our server application started writing into the log incorrect time - one hour ahead which means that .NET caches time zone offset. We had to restart our application to resolve this problem. I wrote a simple applicati...
The issue you're experiencing with .NET caching the time zone offset during the daylight saving time change is a known limitation. When the application starts, it retrieves the current time zone and its offset, but it doesn't automatically update that information when the system time zone changes while the application ...
37,477
[ { "from": "human", "value": "This problem occurred during daylight saving time change. After the change occurred, we've noticed that our server application started writing into the log incorrect time - one hour ahead which means that .NET caches time zone offset. We had to restart our application to resolve...
We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to supplement on the rules. Anyone has experienc...
Yes, there are several state machine frameworks that work well with Java and can be integrated into a JBoss environment. Here are some popular options you might consider: 1. **Spring State Machine**: This is a powerful state machine framework built on top of the Spring Framework. It offers a lot of flexibility and is ...
36,660
[ { "from": "human", "value": "We are developing an application that involves a lot of different tests where each test lead the users to a number of steps. We are thinking of using a state machine framework to capture the states/transitions out of the code. We are also thinking of using rule engine to suppl...
We currently have a heated internal debate as to whether the actual .NET assembly name should include the code's version number (e.g. CodeName02.exe or CompanyName.CodeName02.dll). Does anyone know of an authoritative source, like Microsoft, that provides guidance on this issue?
The decision on whether to include the version number in the assembly name is largely a matter of convention, maintainability, and your project's specific requirements. While Microsoft does not explicitly state that version numbers should or should not be part of assembly names, there are some best practices and guidel...
36,632
[ { "from": "human", "value": "We currently have a heated internal debate as to whether the actual .NET assembly name should include the code's version number (e.g. CodeName02.exe or CompanyName.CodeName02.dll). Does anyone know of an authoritative source, like Microsoft, that provides guidance on this issue?...
My company change the domain from abc to xyz and now i can't log into my local sql2005 via Windows login nor sql login. both login gave me this error: An error has occured while establishing a connection to the server. blah blah blah...Sql server does not allow remote connection. Error:26 - Error locating Server/Insta...
When you change the domain of your company, it can lead to several issues related to SQL Server authentication, particularly with Windows authentication. However, SQL authentication should still work unless there are specific issues with the SQL Server instance or the configuration itself. Here are some steps you can t...
37,066
[ { "from": "human", "value": "My company change the domain from abc to xyz and now i can't log into my local sql2005 via Windows login nor sql login.\nboth login gave me this error: An error has occured while establishing a connection to the server. blah blah blah...Sql server does not allow remote connectio...
Wanting to deploy my project on different servers I would prefer to be able to specify a connect string using a relative path. I can't seem to get that to work and want to know if there is some trick to it...?
Using relative paths in connection strings can be tricky and may depend on the specific database or framework you are using. However, there are some general approaches and considerations that can help you achieve this. ### General Considerations: 1. **Current Working Directory**: Relative paths are resolved based on t...
37,409
[ { "from": "human", "value": "Wanting to deploy my project on different servers I would prefer to be able to specify a connect string using a relative path. I can't seem to get that to work and want to know if there is some trick to it...?\n" }, { "from": "gpt", "value": "Using relative paths in ...
How could you calculate the minimum width needed to display a string in X lines, given that text should break on whitespace?
To calculate the minimum width needed to display a string in a specified number of lines while ensuring that the text breaks on whitespace, you can follow these steps: ### Step 1: Understand the Requirements 1. **Input String**: A string that needs to be displayed. 2. **Number of Lines**: The maximum number of lines t...
35,343
[ { "from": "human", "value": "How could you calculate the minimum width needed to display a string in X lines, given that text should break on whitespace?\n" }, { "from": "gpt", "value": "To calculate the minimum width needed to display a string in a specified number of lines while ensuring that ...
I've almost completely installed Boost, but I have a problem with how to set my path to Boost in Tools->options->projects->VC++ Directories. I've written the path to include files and libraries (my folder contains two subfolders, lib and include), but when I try to use Boost with #include boost/regex.hpp, I got this li...
Installing and configuring Boost for Visual Studio 2008 can be a bit tricky, especially due to the need for proper linking. Here's a step-by-step guide to help you set up Boost correctly: ### Step 1: Download and Extract Boost 1. Download the Boost library from the [official website](https://www.boost.org/users/downl...
33,058
[ { "from": "human", "value": "I've almost completely installed Boost, but I have a problem with how to set my path to Boost in Tools->options->projects->VC++ Directories.\nI've written the path to include files and libraries (my folder contains two subfolders, lib and include), but when I try to use Boost wi...
I'm playing a bit with LINQ to SQL and overall it's a much better option than what Microsoft had before (DataSet), but it seems that object-oriented capabilities are still limited. Since we currently use a custom persistence framework that created a OO model on top of DataSet, I'm looking to port the framework to a new...
Using LINQ to SQL as the foundation for a new object-oriented (OO) model can be a compelling direction, especially if you are aiming to improve upon the limitations you've encountered with DataSet and your custom persistence framework. Here are some thoughts on your questions: ### 1. Other Similar Initiatives There ar...
32,051
[ { "from": "human", "value": "I'm playing a bit with LINQ to SQL and overall it's a much better option than what Microsoft had before (DataSet), but it seems that object-oriented capabilities are still limited. Since we currently use a custom persistence framework that created a OO model on top of DataSet, I...
public enum myEnum { VAL1(10), VAL2(20), VAL3("hai") { public Object getValue() { return this.strVal; } public String showMsg() { return "This is your msg!"; } }; String strVal; Integer intVal; public Object getValue() { return this.int...
When you define a specific class body for an enum constant in Java (as you did with `VAL3`), you are creating an anonymous inner class that extends the enum type itself. This allows the constant `VAL3` to have its own unique implementation of methods while still being part of the same enum type (`myEnum`). Here's a br...
37,937
[ { "from": "human", "value": "public enum myEnum { \nVAL1(10), VAL2(20), VAL3(\"hai\") {\n public Object getValue() {\n return this.strVal;\n }\n public String showMsg() {\n return \"This is your msg!\";\n }\n };\n String strVal;\n Integer intVal;...
I have an ActiveX plugin that we need (if possible) to run in Firefox. Is there a plugin (or other way) for Firefox that will allow this?
As of 2023, Firefox does not support ActiveX controls. ActiveX is a technology developed by Microsoft and is primarily supported in Internet Explorer. Mozilla Firefox has never supported ActiveX, and there are no plugins or extensions that can enable this functionality. If you need to run an application or service tha...
39,623
[ { "from": "human", "value": "I have an ActiveX plugin that we need (if possible) to run in Firefox. Is there a plugin (or other way) for Firefox that will allow this?\n" }, { "from": "gpt", "value": "As of 2023, Firefox does not support ActiveX controls. ActiveX is a technology developed by Micr...
I have a string var s:String = "This is a line \n This is another line."; this.txtHolder.text = s; //.text has \n, not a new line and i want to put it into a text area, but the new line character is ignored. How can i ensure that the text breaks where i want it to when its assigned?
If you want to display a string with newline characters in a text area, you need to ensure that the text area is set up to interpret those newline characters correctly. In ActionScript (if you're using it), the newline character `\n` should typically work for text areas. Here are a few things you can try to ensure tha...
37,410
[ { "from": "human", "value": "I have a string\nvar s:String = \"This is a line \\n This is another line.\";\nthis.txtHolder.text = s; //.text has \\n, not a new line\n\nand i want to put it into a text area, but the new line character is ignored. How can i ensure that the text breaks where i want it to when ...
I have collection of objects. Each object represents a coordinate range (ie, a block). What I want is to find the object near another coordinate in a given direction. Is there a way to do this without traversing the whole collection all the time?
Yes, there are several approaches you can take to efficiently find the nearest object in a given direction without traversing the entire collection each time. Here are a few methods: 1. **Spatial Indexing**: Use spatial data structures like: - **Quadtrees**: If your data is in 2D space, a quadtree can help you quic...
33,164
[ { "from": "human", "value": "I have collection of objects. Each object represents a coordinate range (ie, a block). What I want is to find the object near another coordinate in a given direction.\nIs there a way to do this without traversing the whole collection all the time?\n" }, { "from": "gpt", ...
How can I make cookies in my Flash application using ActionScript 2.0?
In ActionScript 2.0, you don't have direct access to HTTP cookies like you do in traditional web development with languages such as JavaScript. However, you can create a similar effect using Local Shared Objects (LSOs), which can be used to store data on the client's machine similar to how cookies work. Here's a simpl...
35,891
[ { "from": "human", "value": "How can I make cookies in my Flash application using ActionScript 2.0?\n" }, { "from": "gpt", "value": "In ActionScript 2.0, you don't have direct access to HTTP cookies like you do in traditional web development with languages such as JavaScript. However, you can cr...
Is there a way in .NET 2.0 (C#) to serialize object like you do using XmlSerializer in a simple / customizable human readable format thats for instance looks like PXLS or JSON? Also I know that XML is human readable, I'm looking for something with less annoying redundancy, something that you can output to the console a...
In .NET 2.0, you don't have built-in support for JSON serialization, but you can implement a simple custom serialization format that is more readable than XML. One common approach to creating a human-readable format is to use a simplified key-value pair representation, which you could define as follows: 1. **Custom Se...
33,919
[ { "from": "human", "value": "Is there a way in .NET 2.0 (C#) to serialize object like you do using XmlSerializer in a simple / customizable human readable format thats for instance looks like PXLS or JSON?\nAlso I know that XML is human readable, I'm looking for something with less annoying redundancy, some...
Are they the same thing? Just finished to watch Rob Connery's Storefront tutorial and they seem to be similar techinques. I mean, when I implement a DAL object I have the GetStuff, Add/Delete etc methods and I always write the interface first so that I can switch db later. Am I confusing things?
It sounds like you're discussing two concepts that can be related but aren't necessarily the same: the Data Access Layer (DAL) and the Repository Pattern. Both are used to manage data access in a structured way, but they have different purposes and design philosophies. ### Data Access Layer (DAL) - The DAL is a layer ...
38,423
[ { "from": "human", "value": "Are they the same thing? Just finished to watch Rob Connery's Storefront tutorial and they seem to be similar techinques. I mean, when I implement a DAL object I have the GetStuff, Add/Delete etc methods and I always write the interface first so that I can switch db later. \nAm ...
I have an ASP.Net application which as desired feature, users would like to be able to take a screenshot. While I know this can be simulated, it would be really great to have a way to take a URL (or the current rendered page), and turn it into an image which can be stored on the server. Is this crazy? Is there a way ...
No, it's not crazy at all! Taking screenshots of a webpage and saving them as images on a server is a common requirement in many applications. There are several ways you can achieve this in an ASP.NET application. Below are some methods you can consider: ### 1. Using a Headless Browser Headless browsers can render we...
35,285
[ { "from": "human", "value": "I have an ASP.Net application which as desired feature, users would like to be able to take a screenshot. While I know this can be simulated, it would be really great to have a way to take a URL (or the current rendered page), and turn it into an image which can be stored on th...
I have a form that contains a bunch of checkboxes. Before submitting the form, I'd like to grab the values of the checkboxes and stick them into a text field, then submit that. So I might have: Red Orange X Yellow Blue X Green And I'd like my textfield to end up with the content "Yellow, Green" . This doe...
Certainly! You can achieve this using jQuery by selecting the checked checkboxes, extracting their values, and then concatenating them into a string that you can place into a text field. Below is a simple example to demonstrate how to do this: ### HTML Structure Here's an example of how your form with checkboxes might...
35,371
[ { "from": "human", "value": "I have a form that contains a bunch of checkboxes. Before submitting the form, I'd like to grab the values of the checkboxes and stick them into a text field, then submit that.\nSo I might have:\n Red\n Orange\nX Yellow\n Blue\nX Green\nAnd I'd like my textfield to end ...
I had read that SEO is applicable for static website, which holding the information in the initial page itself. Is it possible to get search engines to index the dynamically added information? I used AJAX for loading information. In this situation how can I optimize a site for search engines?
Yes, it is possible for search engines to index dynamically added information, but it can be more challenging than with static content. AJAX (Asynchronous JavaScript and XML) loads content dynamically, which can create difficulties for search engines that may not be able to see or index this content effectively. Howeve...
32,180
[ { "from": "human", "value": "I had read that SEO is applicable for static website, which holding the information in the initial page itself. Is it possible to get search engines to index the dynamically added information?\nI used AJAX for loading information. In this situation how can I optimize a site for ...
I'm writing a php program that pulls from a database source. Some of the varchars have quotes that are displaying as black diamonds with a question mark in them (�, REPLACEMENT CHARACTER, I assume from Microsoft Word text). How can I use php to strip these characters out?
The black diamond with a question mark (`�`) typically appears when there are characters in your text that are not properly encoded or are invalid in the expected character set. In PHP, you can handle this by using a combination of functions to strip out or replace these unwanted characters. Here’s a PHP approach to r...
37,406
[ { "from": "human", "value": "I'm writing a php program that pulls from a database source. Some of the varchars have quotes that are displaying as black diamonds with a question mark in them (�, REPLACEMENT CHARACTER, I assume from Microsoft Word text).\nHow can I use php to strip these characters out?\n" ...
I've previously used jquery-ui tabs extension to load page fragments via ajax, and to conceal or reveal hidden divs within a page. Both of these methods are well documented, and I've had no problems there. Now, however, I want to do something different with tabs. When the user selects a tab, it should reload the pag...
To achieve your goal of reloading the page based on the newly selected tab, you can use jQuery UI's `tabs` widget and leverage the `select` event. However, it's important to note that the `select` event has been replaced by the `activate` event in newer versions of jQuery UI, so I'll provide a solution based on the cur...
31,053
[ { "from": "human", "value": "I've previously used jquery-ui tabs extension to load page fragments via ajax, and to conceal or reveal hidden divs within a page. Both of these methods are well documented, and I've had no problems there.\nNow, however, I want to do something different with tabs. When the us...
I have to analyse some existing Erlang code. Does anybody knows about a tool able to visually / graphically trace the modules calls ? The behaviour should be : give a directory containing the source code, and get a gui / picture / file of the calls (module1->module2->module3....). Something like an UML reverse-engineer...
There are several tools available for analyzing Erlang code and visualizing module calls. Here are a few you can consider: 1. **Erlang/OTP Documentation Tools**: - The official Erlang/OTP documentation includes tools like `EDoc` and `ErlDoc` that can generate documentation from your source code, which may include s...
38,572
[ { "from": "human", "value": "I have to analyse some existing Erlang code.\nDoes anybody knows about a tool able to visually / graphically trace the modules calls ?\nThe behaviour should be : give a directory containing the source code, and get a gui / picture / file of the calls (module1->module2->module3.....
I'm trying to create a function in C# which will allow me to, when called, return a reference to a given class type. The only types of functions like this that I have seen are in UnrealScript and even then the functionality is hard coded into its compiler. I'm wondering if I can do this in C#. Here's what I mean (co...
In C#, you cannot directly specify a type to instantiate in the way you're describing. However, you can achieve similar functionality using reflection or a factory method pattern with generics. Below are a couple of approaches that can accomplish your goal. ### Approach 1: Using Reflection You can create a method tha...
35,820
[ { "from": "human", "value": "I'm trying to create a function in C# which will allow me to, when called, return a reference to a given class type. The only types of functions like this that I have seen are in UnrealScript and even then the functionality is hard coded into its compiler. I'm wondering if I c...
I've created a series of radio button controls in C#. (radCompany, radProperty etc.) I've set their group name to be the same (282_Type) so they function as a list of radio buttons. How do I retrieve the name (like: ct100$m$dfgadjkfasdghasdkjfg$282_Type) in c# so I can use this in a Javascript method i'm creating? Th...
To retrieve the name of the radio button group (like `ct100$sdfsdf$sdfsdf$282_Type`) in C#, you can use the `ClientID` property of the control to get the full ID of the radio buttons, and then you can extract the name using a method like the following. Here is an example of how to get the `name` attribute in the code-...
36,497
[ { "from": "human", "value": "I've created a series of radio button controls in C#. (radCompany, radProperty etc.)\nI've set their group name to be the same (282_Type) so they function as a list of radio buttons. \nHow do I retrieve the name (like: ct100$m$dfgadjkfasdghasdkjfg$282_Type) in c# so I can use t...
I'm looking for a (preferably free) component for Delphi for users to easily select about 100 different colours. I've currently got one as part of DevExpress's editors, but it only has about 20 proper colours to choose, with a bunch of other 'Windows' colours like clHighlight, clBtnFace, etc. It's for regular users, so...
It sounds like you've found a satisfactory solution by using the MS Paint color dialog, which is indeed a simple and effective way to allow users to select colors. For future reference, or for others looking for similar solutions, here are some additional Delphi components and options that can help users select colors ...
38,167
[ { "from": "human", "value": "I'm looking for a (preferably free) component for Delphi for users to easily select about 100 different colours.\nI've currently got one as part of DevExpress's editors, but it only has about 20 proper colours to choose, with a bunch of other 'Windows' colours like clHighlight, ...
I am working on a simple portal application using the ASP.NET membership and login controls. I would like to use the PasswordRecovery control to send emails containing forgotten passwords, however my portal requires localization. I have an existing Content Management System that I am pulling the localized strings out o...
Hi Max, It sounds like you're trying to customize the `PasswordRecovery` control to integrate with your existing localization system, which is a common requirement for applications with multiple languages. You're correct that the `PasswordRecovery` control uses `MailDefinition.BodyFileName` to specify the body of the ...
37,129
[ { "from": "human", "value": "I am working on a simple portal application using the ASP.NET membership and login controls. I would like to use the PasswordRecovery control to send emails containing forgotten passwords, however my portal requires localization. I have an existing Content Management System that...
Is there a free and open source extension of JTextArea that would support "vi mode"?
Yes, there are several open-source libraries that can help you implement "vi mode" functionality for a `JTextArea` or provide similar features. While there isn't a widely recognized direct extension of `JTextArea` specifically for "vi mode," you can look into libraries that emulate text editor functionality similar to ...
37,024
[ { "from": "human", "value": "Is there a free and open source extension of JTextArea that would support \"vi mode\"?\n" }, { "from": "gpt", "value": "Yes, there are several open-source libraries that can help you implement \"vi mode\" functionality for a `JTextArea` or provide similar features. W...
On Mac OS X, I am running Flex Builder (which is basically a customized Eclipse). When I do a Find it beeps if it cannot find the selected text and when it wraps the search to the top. Is it possible to turn off that beep? I've searched the internet and the preferences pane to no avail.
Yes, you can try to turn off the beep sound that occurs in Flex Builder (Eclipse) when a search cannot find the selected text or when it wraps the search. Here are some steps you can follow to potentially disable the beep: 1. **Check System Preferences**: - Open `System Preferences` on your Mac. - Go to `Sound`....
38,939
[ { "from": "human", "value": "On Mac OS X, I am running Flex Builder (which is basically a customized Eclipse). When I do a Find it beeps if it cannot find the selected text and when it wraps the search to the top.\nIs it possible to turn off that beep? I've searched the internet and the preferences pane to ...
for example, I have the following xml document: def CAR_RECORDS = ''' <records> <car name='HSV Maloo' make='Holden' year='2006'/> <car name='P50' make='Peel' year='1962'/> <car name='Royale' make='Bugatti' year='1931'/> </records> ''' and I want to move the car "Royale" up to first one, and i...
You can achieve this manipulation of the XML document using Groovy's built-in XML capabilities. The following Groovy script demonstrates how to reorder the car records, move "Royale" to the top, and insert a new car after "HSV Maloo". Here's a detailed Groovy script to accomplish your task: ```groovy import groovy.xm...
33,282
[ { "from": "human", "value": "for example, I have the following xml document:\ndef CAR_RECORDS = '''\n <records>\n <car name='HSV Maloo' make='Holden' year='2006'/>\n <car name='P50' make='Peel' year='1962'/>\n <car name='Royale' make='Bugatti' year='1931'/>\n </records>\n'''\n\nand I wa...
I am using a native library which returns an IntPtr to a memory location, which contains the value of an attribute. I know what the type of the attribute is and I have a method for marshalling a value (taking the IntPtr and the type of the attribute) from the memory pointed at by the pointer. This method either calls...
To create unit tests for your method that marshals values from a memory location given an `IntPtr`, you can create a block of memory in your test that mimics the data you expect to read. You can use the `Marshal` class to allocate memory, write your test data into it, and then pass the pointer to your method. Here's h...
33,925
[ { "from": "human", "value": "I am using a native library which returns an IntPtr to a memory location, which contains the value of an attribute. I know what the type of the attribute is and I have a method for marshalling a value (taking the IntPtr and the type of the attribute) from the memory pointed at ...
A lot of programmers who are used Visual Studio have a hard time adjusting to the fact that in other source control systems, files do not need to be locked/checked out to one developer at any given time. Proponents of merging say that allowing two people to work on the same file speeds up productivity since it eliminat...
The choice between using a locking model versus a merging model in source control systems largely depends on the specific context of the team and the project. Here are some compelling reasons for each method: ### Reasons to Favor Merging: 1. **Increased Collaboration**: Merging allows multiple developers to work on t...
34,658
[ { "from": "human", "value": "A lot of programmers who are used Visual Studio have a hard time adjusting to the fact that in other source control systems, files do not need to be locked/checked out to one developer at any given time.\nProponents of merging say that allowing two people to work on the same fil...
Can anyone explain to me how to get the visual state manager to work with a WPF application? It's just been added to the new wpftoolkit. I installed it as told, but even the sample doesn't show the VSM. In silverlight it work, but not in WPF. If installed the latest Blend 2 and updated with the SP1.
The Visual State Manager (VSM) in WPF is a powerful feature that allows you to define different visual states for controls in your user interface and transition between those states in a seamless manner. If you're having trouble getting it to work in a WPF application, here are some steps and considerations to help you...
30,624
[ { "from": "human", "value": "Can anyone explain to me how to get the visual state manager to work with a WPF application? It's just been added to the new wpftoolkit. I installed it as told, but even the sample doesn't show the VSM. In silverlight it work, but not in WPF. If installed the latest Blend 2 and ...
I am building a Facebook App which is heavy on Javascript. For this I have multiple Javascript files. Since in Facebook development, the page is served over a tunnel, there is excessive latency added while requesting multiple javascript files. Is it possible to combine the contents of multiple javascript files at runti...
Yes, it's possible to combine the contents of multiple JavaScript files at runtime, which can help reduce the latency caused by multiple requests in your Facebook app. Here are a few approaches you could consider for combining your JavaScript files during runtime without affecting your development workflow: ### 1. Use...
36,949
[ { "from": "human", "value": "I am building a Facebook App which is heavy on Javascript. For this I have multiple Javascript files. Since in Facebook development, the page is served over a tunnel, there is excessive latency added while requesting multiple javascript files. Is it possible to combine the conte...
We have a DLL used as the middle layer between our website front end and our back end ticketing system. The method of insertion into the ticketing system is a bit complicated to explain, but the short version is that it's slow. The best case scenario I've gotten is a 9 second submission time. The real problem though,...
It sounds like you're encountering performance discrepancies between a Windows application and an ASP.NET web application when calling a web service. Given that the code is identical and that most of the time is being spent on the web service call, here are some potential factors to consider that could contribute to th...
29,435
[ { "from": "human", "value": "We have a DLL used as the middle layer between our website front end and our back end ticketing system. The method of insertion into the ticketing system is a bit complicated to explain, but the short version is that it's slow. The best case scenario I've gotten is a 9 second ...
I want to build two-dimentional array of strings where length of one dimention is 2. Similar to this string[,] array = new string[,] { {"a", "b"}, {"c", "d"}, {"e", "f"}, {"g", "h"} } Doing List<string[]> list = new List<string[]>(); list.Add(new string[2] {"a", "b"}); list.Add(new string[2] {"c", "d"...
In C#, if you want to create a two-dimensional array (`string[,]`) dynamically, you can't use `List<string[]>` since that results in a jagged array (`string[][]`), which is different from a rectangular array (`string[,]`). However, you can create a two-dimensional array by specifying its dimensions directly and then ...
37,685
[ { "from": "human", "value": "I want to build two-dimentional array of strings where length of one dimention is 2. Similar to this\nstring[,] array = new string[,]\n{\n {\"a\", \"b\"},\n {\"c\", \"d\"},\n {\"e\", \"f\"},\n {\"g\", \"h\"}\n}\n\nDoing\nList<string[]> list = new List<string[]>();\n\...
I have an ASP.NET 2.0 (C#) webpage with a link that pulls a blob from a MS SQL database and ouputs it in the appropriat file format, i.e., Word, WordPerfect, PDF. My users would like to print these files with one click. Right now they have to click the link to open the file, then click the "Print" button within the app...
To achieve the functionality you're describing—printing documents from your ASP.NET 2.0 application with one click—there are several strategies you could consider. However, please note that due to browser security restrictions, achieving this entirely on the client-side (via JavaScript) may not be possible for printing...
34,346
[ { "from": "human", "value": "I have an ASP.NET 2.0 (C#) webpage with a link that pulls a blob from a MS SQL database and ouputs it in the appropriat file format, i.e., Word, WordPerfect, PDF.\nMy users would like to print these files with one click. Right now they have to click the link to open the file, th...
In what cases is it necessary to synchronize access to instance members? I understand that access to static members of a class always needs to be synchronized- because they are shared across all object instances of the class. My question is when would I be incorrect if I do not synchronize instance members? for examp...
To determine when it's necessary to synchronize access to instance members of a class, we need to consider how instances of that class are being accessed. Synchronization is necessary when multiple threads may be accessing shared data concurrently, which can lead to inconsistent or incorrect results. Here are some sc...
36,138
[ { "from": "human", "value": "In what cases is it necessary to synchronize access to instance members? \nI understand that access to static members of a class always needs to be synchronized- because they are shared across all object instances of the class.\nMy question is when would I be incorrect if I do n...
Here is pseudo-code of how I setup an array representing the MandelBrot set, yet it becomes horribly stretched when leaving an aspect ratio of 1:1. xStep = (maxX - minX) / width; yStep = (maxY - minY) / height; for(i = 0; i < width; i++) for(j = 0; j < height; j++) { constantReal = minReal + xStep * i; consta...
The issue you're encountering with the aspect ratio when rendering the Mandelbrot set is a common one. It arises because the `xStep` and `yStep` calculations are not adjusted to maintain a 1:1 aspect ratio when the dimensions of the output image (width and height) are different. To maintain the aspect ratio and avoid ...
37,972
[ { "from": "human", "value": "Here is pseudo-code of how I setup an array representing the MandelBrot set, yet it becomes horribly stretched when leaving an aspect ratio of 1:1.\nxStep = (maxX - minX) / width;\nyStep = (maxY - minY) / height;\n\nfor(i = 0; i < width; i++)\n for(j = 0; j < height; j++)\n {\n...
How do I expose the ActualWidth property of one of the components of my user control to users? I have found plenty of examples of how to expose a normal property by creating a new dependency property and binding, but none on how to expose a read-only property like ActualWidth.
To expose a read-only property like `ActualWidth` in a WPF UserControl, you can create a Dependency Property that returns the `ActualWidth` of the desired component. Since `ActualWidth` is not a dependency property itself, you cannot bind directly to it in XAML. However, you can create a new Dependency Property and upd...
35,969
[ { "from": "human", "value": "How do I expose the ActualWidth property of one of the components of my user control to users?\nI have found plenty of examples of how to expose a normal property by creating a new dependency property and binding, but none on how to expose a read-only property like ActualWidth.\...
My Sharepoint 2007 web part executes code to start a K2 workflow process. The workflow server resides on another server. When my code executes, I get the following error: "24408 K2:NT AUTHORITY\ANONYMOUS LOGON from 172.172.172.172:1721 does not have rights to Start Process MyProject\MyProcessName" I'm sure this is a ge...
The error you're encountering indicates that the SharePoint application is not correctly authenticating with the K2 server when attempting to start the workflow. Instead of using the current domain user, it's falling back to `NT AUTHORITY\ANONYMOUS LOGON`, which typically occurs when the authentication delegation isn't...
35,441
[ { "from": "human", "value": "My Sharepoint 2007 web part executes code to start a K2 workflow process. The workflow server resides on another server.\nWhen my code executes, I get the following error:\n\"24408 K2:NT AUTHORITY\\ANONYMOUS LOGON from 172.172.172.172:1721 does not have rights to Start Process M...
For a deleted file what's the command to use to view the content of a old revision E:\Downloads\eeli\eel\eel>svn cat eel-scalable-font.h -r 2 svn: warning: 'eel-scalable-font.h' is not under version control
The error message you're encountering indicates that the file `eel-scalable-font.h` is not under version control, which means that it cannot be accessed through Subversion (SVN) commands such as `svn cat`. Here are a few steps you might consider to troubleshoot and view the contents of an old revision of a file that ...
36,665
[ { "from": "human", "value": "For a deleted file what's the command to use to view the content of a old revision\nE:\\Downloads\\eeli\\eel\\eel>svn cat eel-scalable-font.h -r 2\nsvn: warning: 'eel-scalable-font.h' is not under version control\n\n" }, { "from": "gpt", "value": "The error message y...
I have tried, 'PreviousPage', 'PreviousPage.IsCrossPagePostBack' 'Page.previousPage', page.title It causes the client to stop rendering the page after this line. simple example protected void Page_Load(object sender, EventArgs e) { response.write("I can see this"); string test = PreviousPage.IsCrossPagePostBack.toStrin...
It seems you're experiencing a problem with ASP.NET when attempting to access properties of the `PreviousPage` object during the `Page_Load` event. Let's break down the code you've provided and identify potential issues. ### Issues in Your Code 1. **`Response.Write` and `PreviousPage.IsCrossPagePostBack`**: - You'...
36,348
[ { "from": "human", "value": "I have tried, 'PreviousPage', 'PreviousPage.IsCrossPagePostBack' 'Page.previousPage', page.title\nIt causes the client to stop rendering the page after this line.\nsimple example\nprotected void Page_Load(object sender, EventArgs e)\n{\nresponse.write(\"I can see this\");\nstrin...
I have a project that has a makefile with broken dependencies. Is there any best known way to generate a list of dependencies for the project that I can use in the makefile, other than examining each source file by hand or with a hand written perl script?
Certainly! If you are looking to generate a list of dependencies for a project with a Makefile, there are several tools and techniques that can help automate this process without the need for manually examining each source file. ### 1. **Using `gcc` or `g++` with Dependency Generation Flags** If you're using GCC or G...
36,444
[ { "from": "human", "value": "I have a project that has a makefile with broken dependencies. Is there any best known way to generate a list of dependencies for the project that I can use in the makefile, other than examining each source file by hand or with a hand written perl script?\n" }, { "from"...
I ask this because at work I am supposed to develop a web-application that is used in an intranet, by two people. It's an application that should keep some states in a workflow. So I have to keep data in a session and have to care about concurrency. It would be so much easier to develop a normal desktop-application. ...
Web applications have gained immense popularity for a variety of reasons, and while there may be some cases where desktop applications are more suitable, the trend towards web apps has a strong foundation. Here are some reasons why web applications are appealing and widely adopted: 1. **Accessibility**: Web applicatio...
35,271
[ { "from": "human", "value": "I ask this because at work I am supposed to develop a web-application that is used in an intranet, by two people. It's an application that should keep some states in a workflow. So I have to keep data in a session and have to care about concurrency. It would be so much easier ...
G'day! I have one million different words which I'd like to query for in a table with 15 million rows. The result of synonyms together with the word is getting processed after each query. table looks like this: synonym word --------------------- ancient old anile old centenarian ol...
G'day Chris! To optimize the process of querying synonyms for a million different words in a table with 15 million rows, there are several approaches you can consider. Here are a few suggestions: ### 1. Use a Single Query with `IN` Clause Instead of querying the database for each word individually, you can gather a b...
35,388
[ { "from": "human", "value": "G'day!\nI have one million different words which I'd like to query for in a table with 15 million rows. The result of synonyms together with the word is getting processed after each query.\ntable looks like this:\n synonym word\n ---------------------\n ancient ...
I would like to transfer a text file to a webserver using wininet as if the file was being transferred using a web form that posts the file to the server. Based on answers I've received I've tried the following code: static TCHAR hdrs[] = "Content-Type: multipart/form-data\nContent-Length: 25"; static TCHAR frmdata[]...
To transfer a file to a web server using the `WinINet` API in a manner similar to a form submission, you need to properly format the multipart form-data, including boundary strings that separate different parts of the form data. The code you provided is missing some key components, such as the correct structure for the...
29,120
[ { "from": "human", "value": "I would like to transfer a text file to a webserver using wininet as if the file was being transferred using a web form that posts the file to the server.\nBased on answers I've received I've tried the following code:\n static TCHAR hdrs[] = \"Content-Type: multipart/form-data\\...
In looking at the use of C# in a ISV setting, I'm wondering what prominent C# based desktop apps are out there? I can think of only Paint .NET. Is C# a good idea for an ISV, or should one stick to more native environments like Delphi or even QT? Of course any experienced based advise or feedback would be appreciated.
C# is a robust and versatile language widely used in the development of desktop applications, particularly in the Microsoft ecosystem. There are numerous prominent desktop applications built with C#, including: 1. **Visual Studio**: Microsoft's flagship integrated development environment (IDE) for developers. It inclu...
35,093
[ { "from": "human", "value": "In looking at the use of C# in a ISV setting, I'm wondering what prominent C# based desktop apps are out there? I can think of only Paint .NET. \nIs C# a good idea for an ISV, or should one stick to more native environments like Delphi or even QT?\nOf course any experienced base...
I have a piece of XML that is structured similar to this: <root> <score name="Exam 1"><value>76</value></score> <score name="Exam 2"><value>87</value</score> </root> and I would like to transform it to look like this: <root> <Exam 1>76</Exam 1> <Exam 2>87</Exam 2> </root> Following this articl...
The error you are encountering, "is an invalid QName," stems from the fact that XML element names cannot contain spaces. In your case, you are trying to create elements using the name attribute values like "Exam 1", which contains a space, leading to the exception. To resolve this issue, you have a couple of options: ...
35,328
[ { "from": "human", "value": "I have a piece of XML that is structured similar to this:\n <root>\n <score name=\"Exam 1\"><value>76</value></score>\n <score name=\"Exam 2\"><value>87</value</score>\n </root>\n\nand I would like to transform it to look like this:\n<root>\n <Exam 1>76</Exam 1>\n ...
While playing around with regexps in Scala I wrote something like this: scala> val y = "Foo" y: java.lang.String = Foo scala> y "Bar" scala> As you can see, the second statement is just silently accepted. Is this legal a legal statement, and if so, what does it do? Or is it a bug in the parser and there should be an...
In Scala, the statement `y "Bar"` is indeed legal, and it’s an example of the way Scala allows for syntactic flexibility, particularly when it comes to method invocation. In this case, `y` is a string, and in Scala, if you have an identifier followed by another identifier (like `y "Bar"`), Scala interprets this as cal...
36,868
[ { "from": "human", "value": "While playing around with regexps in Scala I wrote something like this:\nscala> val y = \"Foo\"\ny: java.lang.String = Foo\n\nscala> y \"Bar\"\n\nscala>\n\nAs you can see, the second statement is just silently accepted. Is this legal a legal statement, and if so, what does it do...
While writing a utility script to insert images into a database I wondered if there were a groovier way of doing it. In the end settled for something along the lines of this: def sql = Sql.newInstance(...) // ... Connection conn = sql.getConnection() PreparedStatement stmt.prepareStatment(...) stmt.setBinary(...) s...
Certainly! Groovy's syntax and features allow for more concise and expressive code, especially when working with databases. Instead of dealing with `Connection`, `PreparedStatement`, and managing resources explicitly, you can leverage Groovy's `Sql` class and its closures to simplify the process. Here’s a more Groovy ...
38,964
[ { "from": "human", "value": "While writing a utility script to insert images into a database I wondered if there were a groovier way of doing it. In the end settled for something along the lines of this:\ndef sql = Sql.newInstance(...)\n// ... \nConnection conn = sql.getConnection()\nPreparedStatement st...
Does anyone else find that the documentation of a lot of payment processors have poor or incomplete documentation as to how to use their API? Or it's just plain confusing? Recently I have setup both PayPal and Beanstream and found that both are either confusing or don't include full documentation. For example, in the B...
Yes, many developers have experienced similar frustrations with payment processor documentation. In the rapidly evolving world of payments, APIs, and integrations, clear and comprehensive documentation is crucial for developers to successfully implement these systems. However, many payment processors fail to provide ad...
38,152
[ { "from": "human", "value": "Does anyone else find that the documentation of a lot of payment processors have poor or incomplete documentation as to how to use their API? Or it's just plain confusing?\nRecently I have setup both PayPal and Beanstream and found that both are either confusing or don't include...
I have a .NET component exposed as a CCW (Com Callable Wrapper) and being loaded into an unmanaged IIS application (ATL server). The assembly is installed and registered with COM using regasm /codebase. The component requires configuration such as is typically put into a Web.config file for an IIS app. But I don't wa...
When you're dealing with a .NET component exposed as a COM Callable Wrapper (CCW) and want to manage its configuration outside of the standard `w3wp.exe.config` or `machine.config`, you have a few potential options, although they may not be straightforward due to the restrictions of the AppDomain. Here are some approac...
35,836
[ { "from": "human", "value": "I have a .NET component exposed as a CCW (Com Callable Wrapper) and being loaded into an unmanaged IIS application (ATL server). The assembly is installed and registered with COM using regasm /codebase.\nThe component requires configuration such as is typically put into a Web.c...
MS SQL has a convenient workaround for concatenating a column value from multiple rows into one value: SELECT col1 FROM table1 WHERE col2 = 'x' ORDER by col3 FOR XML path('') and that returns a nice recordset: XML_F52E2B61-18A1-11d1-B105-00805F49916B ---------------------------...
Yes, you can customize the column name returned in your SQL query by using an alias. You can do this by specifying an alias after the `FOR XML PATH('')` statement. Here's how you can modify your query to return a custom column name: ```sql SELECT (SELECT col1 FROM table1 WHERE col2 = 'x' ORDER ...
36,283
[ { "from": "human", "value": "MS SQL has a convenient workaround for concatenating a column value from multiple rows into one value:\nSELECT col1\n FROM table1\n WHERE col2 = 'x'\n ORDER by col3\n FOR XML path('')\n\nand that returns a nice recordset:\nXML_F52E2B61-18A1-11d1-B105-00805F49916B ...
I have the following code in Visual Studio 2005. Dim OutFile As System.IO.StreamWriter Try OutFile = New System.IO.StreamWriter(Filename) // Do stuff with OutFile Catch Ex As Exception // Handle Exception Finally If OutFile IsNot Nothing Then OutFile.Close() End Try But...
In Visual Studio 2005, the warning you are encountering is due to the fact that `OutFile` might not be assigned a value if an exception occurs when creating the `StreamWriter`. This can lead to a Null Reference Exception when the `Finally` block tries to access `OutFile`. To resolve this warning while maintaining your...
38,306
[ { "from": "human", "value": "I have the following code in Visual Studio 2005.\n Dim OutFile As System.IO.StreamWriter\n Try\n OutFile = New System.IO.StreamWriter(Filename)\n // Do stuff with OutFile\n Catch Ex As Exception\n // Handle Exception\n Finally\n If OutFile Is...
Say I have a method that needs to pull 8 values from a map with 100 elements in it. Which do you think would be preferable: Walk in a for loop from begin to end once, pulling the elements out by switching on the key? Or using find 8 times to get those values?
When deciding between walking through the entire map once in a for loop or using `find` multiple times, the preferable approach usually depends on several factors such as the size of the map, the number of elements you're retrieving, and the specific characteristics of your implementation. Here are some considerations...
35,727
[ { "from": "human", "value": "Say I have a method that needs to pull 8 values from a map with 100 elements in it. Which do you think would be preferable:\nWalk in a for loop from begin to end once, pulling the elements out by switching on the key?\nOr using find 8 times to get those values?\n" }, { "...
I need to implement a SSO between a SharePoint site and a custom PHP-based site which resides on a different domain. I need to use the SharePoint user accounts to log in the PHP site. (I'll have a full control over the PHP source) Is this possible? Any tips and tricks?
Implementing Single Sign-On (SSO) between a SharePoint site and a custom PHP-based site on a different domain is possible but can be quite complex. Here’s an overview of the steps and considerations to implement SSO in this scenario: ### 1. Choose an Authentication Protocol Consider using standard protocols for SSO, s...
34,128
[ { "from": "human", "value": "I need to implement a SSO between a SharePoint site and a custom PHP-based site which resides on a different domain. I need to use the SharePoint user accounts to log in the PHP site. (I'll have a full control over the PHP source)\nIs this possible? Any tips and tricks?\n" }, ...