instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here? class TestClass { int iMyVariable; static void Main() { TestClass oTestClass = new TestClass(); unsafe { fixed (int* p = &oTestClas...
The `fixed` statement in your code is used in the context of unsafe code in C#. Let's break down why it's necessary in this scenario. ### Understanding the Context 1. **Unsafe Code**: The `unsafe` keyword allows you to work with pointers in C#. Pointers enable you to directly manipulate memory addresses, which is pow...
27,476
[ { "from": "human", "value": "We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here?\nclass TestClass\n{\n int iMyVariable;\n static void Main()\n {\n TestClass oTestClass = new TestClass();\n unsafe\...
I'd like to have it yell hooray whenever an assert statement succeeds, or at the very least have it display the number of successful assert statements that were encountered. I'm using JUnit4. Any suggestions?
You can achieve this in JUnit 4 by utilizing a custom test runner or by creating a listener that hooks into the test execution process. However, a simpler approach is to extend `JUnit's` functionality using `@Rule` or a custom `TestWatcher`. Here's how you can implement both options: ### Option 1: Using TestWatcher Y...
26,570
[ { "from": "human", "value": "I'd like to have it yell hooray whenever an assert statement succeeds, or at the very least have it display the number of successful assert statements that were encountered.\nI'm using JUnit4.\nAny suggestions?\n" }, { "from": "gpt", "value": "You can achieve this in...
Is it alright to do this? $author = strtolower($_SESSION['valid_username']); I want to enter all authors into the table as lower case.
Yes, it's perfectly fine to convert a string to lowercase using `strtolower()` in PHP, especially if you want to ensure that all authors' names in your database are stored in a consistent format (lowercase in this case). Here's a breakdown of what your code does: ```php $author = strtolower($_SESSION['valid_username'...
29,725
[ { "from": "human", "value": "Is it alright to do this?\n$author = strtolower($_SESSION['valid_username']);\n\nI want to enter all authors into the table as lower case.\n" }, { "from": "gpt", "value": "Yes, it's perfectly fine to convert a string to lowercase using `strtolower()` in PHP, especial...
I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application. I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attempt to browse the site in a web-browser, I am prompted f...
The issue you're experiencing with being prompted for a password when trying to access your ASP.NET 2.0 web service application is likely due to the authentication settings configured in IIS. Here are some steps you can take to resolve this issue and ensure that your ASP.NET 2.0 application works properly without promp...
24,779
[ { "from": "human", "value": "I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application. \nI have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attempt to browse ...
Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT + MinGW for Windows) to compile FFMPEG under Windows. Apparently it is possible, there is even a tutorial at Craig Shaw's website but I have not been able to make it work. I run ./configure on the FFMPEG source code then create a new project in E...
Compiling FFmpeg on Windows using Eclipse CDT with MinGW can be a bit tricky, but it is indeed possible. Here are some general steps you can follow to get it set up correctly. While I can't provide a direct solution, I can guide you through a process that might help: ### Prerequisites 1. **Install MinGW**: Ensure you ...
26,020
[ { "from": "human", "value": "Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT + MinGW for Windows) to compile FFMPEG under Windows. Apparently it is possible, there is even a tutorial at Craig Shaw's website but I have not been able to make it work.\nI run ./configure on the FFMPEG ...
I am migrating a site from SharePoint 2 to 3 (in fact, from SharePoint Portal Server 2003 to Microsoft Office SharePoint Server 2007). There are a handful of 3rd party web parts and since this is a migration, not an in-place upgrade, I need to install these web parts on the new farm. How do I do this, given that I hav...
Migrating from SharePoint Portal Server 2003 to Microsoft Office SharePoint Server 2007 involves several considerations, especially when dealing with third-party web parts. Here’s a step-by-step approach to handle the CAB files you have: ### 1. **Understand the CAB Files** CAB files are typically compressed packages t...
24,944
[ { "from": "human", "value": "I am migrating a site from SharePoint 2 to 3 (in fact, from SharePoint Portal Server 2003 to Microsoft Office SharePoint Server 2007). There are a handful of 3rd party web parts and since this is a migration, not an in-place upgrade, I need to install these web parts on the new...
This is javascript, but a virtually identical regex is failing in PHP too, so I don't think it's language specific var r = new RegExp( "^(:19|20)?[0-9][0-9]" // optional 19/20 start followed by 2 numbers + "-" // a hyphen + "(:0?[1-9]|1[0-2])" // optional 0...
The issue with your regular expression lies in the use of parentheses around the capturing groups. In JavaScript (and PHP), parentheses are used for capturing groups, but they also affect the way the regex pattern is evaluated. The use of the colon `:` at the beginning of your groups is unnecessary and incorrect. Here...
30,516
[ { "from": "human", "value": "This is javascript, but a virtually identical regex is failing in PHP too, so I don't think it's language specific\nvar r = new RegExp(\n \"^(:19|20)?[0-9][0-9]\" // optional 19/20 start followed by 2 numbers\n + \"-\" // a hyphen\n ...
I'm thinking about learning CAS, but I need to quickly grasp basic architecture, performance implications and if it at all suits my needs. What should I read?
To quickly grasp the basics of Content Addressable Storage (CAS) and its architecture, performance implications, and suitability for your needs, here are some recommended readings and resources: 1. **Introductory Articles & Blogs:** - Look for introductory articles or blog posts that explain CAS in simple terms. We...
26,967
[ { "from": "human", "value": "I'm thinking about learning CAS, but I need to quickly grasp basic architecture, performance implications and if it at all suits my needs. What should I read?\n" }, { "from": "gpt", "value": "To quickly grasp the basics of Content Addressable Storage (CAS) and its ar...
In ASP.NET, I'm looking for a way to audit a user leaving my application. To be specific, I'd like to insert a 'logout' record in an audit table in SQL Server when the user's session is abandoned/destroyed for any reason (not necessarily because of a call to session.abandon) I have a 'SessionHelper' class that manages ...
To audit user sessions in an ASP.NET application, especially when a session is abandoned or times out, you have to consider a few key points regarding how ASP.NET handles sessions. It's important to note that the `Session_End` event only works in InProc session state mode, and it doesn't fire on session timeouts in all...
27,258
[ { "from": "human", "value": "In ASP.NET, I'm looking for a way to audit a user leaving my application. To be specific, I'd like to insert a 'logout' record in an audit table in SQL Server when the user's session is abandoned/destroyed for any reason (not necessarily because of a call to session.abandon)\nI ...
SQL Server (2005/2008) Each of the below statements have the same result. Does anyone know if one outperforms the other? insert into SOMETABLE values ('FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000') insert into SOMETABLE select 'FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000' i...
In SQL Server, when comparing the performance of different `INSERT` statements, the main consideration is how the data is being inserted into the table. Let's analyze the three statements you provided: 1. **Using `VALUES` syntax:** ```sql INSERT INTO SOMETABLE VALUES ('FieldOneValue','FieldTwoValue',3,4.55,'...
27,437
[ { "from": "human", "value": "SQL Server (2005/2008)\nEach of the below statements have the same result. Does anyone know if one outperforms the other?\ninsert into SOMETABLE \n values ('FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000')\n\ninsert into SOMETABLE \n select 'FieldOneValue','Fie...
There are two databases in SQL Server 2005: One called "A" and another one called "A_2". "A" is a variable name to be entered by the user, the "_2" prefix for the second database is always known. (So databases could be "MyDB" and "MyDB_2", etc) How to access the other database from within a stored procedure without kno...
In SQL Server, to access a database using a variable name, you typically use dynamic SQL with the `EXEC` statement. However, since you've specified that you don't want to use `EXEC`, the options are limited because SQL Server does not allow directly passing variables for database names in static SQL statements. That s...
28,124
[ { "from": "human", "value": "There are two databases in SQL Server 2005: One called \"A\" and another one called \"A_2\".\n\"A\" is a variable name to be entered by the user, the \"_2\" prefix for the second database is always known. (So databases could be \"MyDB\" and \"MyDB_2\", etc)\nHow to access the ot...
I have heard from people who have switched either way and who swear by the one or the other. Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do with Eclips...
Certainly! Here are some specific features and capabilities of IntelliJ IDEA that may be seen as advantages over Eclipse, particularly from the perspective of users who have transitioned from Eclipse to IntelliJ: 1. **Smart Code Completion**: IntelliJ offers more advanced and context-aware code completion. It can sugg...
26,661
[ { "from": "human", "value": "I have heard from people who have switched either way and who swear by the one or the other.\nBeing a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are \"ex-Eclipsians\" some specific things that you can do w...
Like, let's say I had a tree structure, then I would use, naturally a tree control, since that GUI element maps perfectly to the structure. But what I have is a graph, potentially too wide to fit in one web page. I can't think of examples of GUIs that really match the structure. Some ideas I have that don't quite fit...
You're right in identifying the challenges of visualizing and interacting with graph structures in a user interface. While tree structures map well to hierarchical GUI elements like tree controls, graphs often require more flexible and interactive approaches. Here are several ideas that may work well for representing a...
27,861
[ { "from": "human", "value": "Like, let's say I had a tree structure, then I would use, naturally a tree control, since that GUI element maps perfectly to the structure.\nBut what I have is a graph, potentially too wide to fit in one web page. I can't think of examples of GUIs that really match the structur...
I have a C++ app in VS2005 and import a VB DLL. IntelliSense shows me all the symbols in the DLL as expected but it also shows all (or nearly all) of them again with an underscore prefix (no @s in them though). Why is this? What are the differences between the underscored items and the normal items?
When you see symbols in your Visual C++ project that are prefixed with underscores, it's usually related to the way the Visual Basic (VB) compiler names the exported functions from a DLL. This naming convention is often referred to as "name mangling," which is a mechanism used by compilers to differentiate between vari...
28,803
[ { "from": "human", "value": "I have a C++ app in VS2005 and import a VB DLL. IntelliSense shows me all the symbols in the DLL as expected but it also shows all (or nearly all) of them again with an underscore prefix (no @s in them though). Why is this? What are the differences between the underscored items ...
I'm looking for a way to add a close button to a .NET ToolTip object similar to the one the NotifyIcon has. I'm using the tooltip as a message balloon called programatically with the Show() method. That works fine but there is no onclick event or easy way to close the tooltip. You have to call the Hide() method somewhe...
Unfortunately, the standard .NET `ToolTip` class does not support adding custom controls (like a close button) or handling events like clicks directly. The `ToolTip` is designed for simple pop-up messages and does not provide customization options for this purpose. However, you can implement a custom form that mimics ...
25,519
[ { "from": "human", "value": "I'm looking for a way to add a close button to a .NET ToolTip object similar to the one the NotifyIcon has. I'm using the tooltip as a message balloon called programatically with the Show() method. That works fine but there is no onclick event or easy way to close the tooltip. Y...
Mylyn is a task oriented plugin that allows for example to assign a set of files to a task. Is there a Mylyn type plugin for Visual Studio?
Yes, there are several extensions for Visual Studio that offer task management and help to organize your work similarly to how Mylyn does for Eclipse. Here are a couple of options: 1. **Task List in Visual Studio**: Visual Studio has a built-in Task List feature that allows you to create and manage tasks. You can add ...
30,700
[ { "from": "human", "value": "Mylyn is a task oriented plugin that allows for example to assign a set of files to a task. Is there a Mylyn type plugin for Visual Studio?\n" }, { "from": "gpt", "value": "Yes, there are several extensions for Visual Studio that offer task management and help to org...
When you take your first look at an Oracle database, one of the first questions is often "where's the alert log?". Grid Control can tell you, but its often not available in the environment. I posted some bash and Perl scripts to find and tail the alert log on my blog some time back, and I'm surprised to see that post s...
In Oracle databases, the alert log is an essential file for monitoring and troubleshooting. Your method of using `background_dump_dest` from the `v$parameter` view is a common approach to locate the alert log. However, starting from Oracle Database 11g, there's an improved way to find the alert log location that is mor...
15,261
[ { "from": "human", "value": "When you take your first look at an Oracle database, one of the first questions is often \"where's the alert log?\". Grid Control can tell you, but its often not available in the environment.\nI posted some bash and Perl scripts to find and tail the alert log on my blog some tim...
I was pointed to SubSonic (www.subsonicproject.com), but then I found WebWidgetry (www.nthpenguin.com) Before I dig into them too much I'm curious to know who's used either and what the pro's and con's might be? Thanks for the help, Jim
Hi Jim, Both SubSonic and WebWidgetry serve different purposes in the web development space, and choosing between them depends on your specific needs. Here's a breakdown of each along with some pros and cons: ### SubSonic **Overview:** SubSonic is an open-source web application framework that emphasizes rapid applic...
28,864
[ { "from": "human", "value": "I was pointed to SubSonic (www.subsonicproject.com), but then I found WebWidgetry (www.nthpenguin.com) Before I dig into them too much I'm curious to know who's used either and what the pro's and con's might be?\nThanks for the help,\nJim\n" }, { "from": "gpt", "val...
I have been looking at the new database server we are setting up for a client and note the database files are set to grow by 1 meg everytime the file is full and the initial size is 100 MB. I have been considering this breifly and it doesn't sound right. I've checked a few sites on DB considerations and they didn't pr...
When setting up a database server and considering how to manage database file growth, it’s important to strike a balance between performance, storage management, and operational requirements. Here are some considerations regarding your questions about database file growth: ### 1. Database File Growth Settings - **Inc...
28,004
[ { "from": "human", "value": "I have been looking at the new database server we are setting up for a client and note the database files are set to grow by 1 meg everytime the file is full and the initial size is 100 MB.\nI have been considering this breifly and it doesn't sound right. I've checked a few sit...
How do I take an efficient simple random sample in SQL? The database in question is running MySQL; my table is at least 200,000 rows, and I want a simple random sample of about 10,000. The "obvious" answer is to: SELECT * FROM table ORDER BY RAND() LIMIT 10000 For large tables, that's too slow: it calls RAND() for eve...
To efficiently take a simple random sample in MySQL from a large dataset, you've already identified a couple of smart strategies to optimize the process. Below are detailed steps and considerations for implementing your approach, along with alternative methods for sampling without the performance overhead of ordering b...
26,432
[ { "from": "human", "value": "How do I take an efficient simple random sample in SQL? The database in question is running MySQL; my table is at least 200,000 rows, and I want a simple random sample of about 10,000.\nThe \"obvious\" answer is to:\nSELECT * FROM table ORDER BY RAND() LIMIT 10000\n\nFor large t...
I want to ask a question about how you would approach a simple object-oriented design problem. I have a few ideas of my own about what the best way of tackling this scenario, but I would be interested in hearing some opinions from the Stack Overflow community. Links to relevant online articles are also appreciated. I'm...
This is an interesting design problem that touches on various principles of object-oriented design, such as inheritance, composition, and the potential complications of multiple roles. Here are several approaches you could consider, along with their pros and cons: ### 1. **Single Inheritance Approach** You create a si...
21,638
[ { "from": "human", "value": "I want to ask a question about how you would approach a simple object-oriented design problem. I have a few ideas of my own about what the best way of tackling this scenario, but I would be interested in hearing some opinions from the Stack Overflow community. Links to relevant ...
I have an plain-old asp web site that makes a call to a method in a dll written in VB 6. This method sets an error code in the VB Err Object if something goes wrong. Now I want to access that error code and description set in the Err object from a javascript (where I do the call to the dll method). First: is it possibl...
Accessing the error code and description from a VB6 DLL's `Err` object directly in JavaScript through ASP can be a bit tricky. Since you're calling a COM object from JavaScript (specifically, through ASP), the error handling differs from what you're used to in VB6. Here's a brief outline on how to handle this situatio...
28,372
[ { "from": "human", "value": "I have an plain-old asp web site that makes a call to a method in a dll written in VB 6. This method sets an error code in the VB Err Object if something goes wrong. Now I want to access that error code and description set in the Err object from a javascript (where I do the call...
Is there a way (hacky will do) to allow a user to go back to a previous version of a ClickOnce network deployed application? I've looked in the docs and API and there seems to be no way. You can selectively choose if you would like to update, but once updated there is, seemingly, no way back.
ClickOnce deployment does not provide a built-in mechanism for rolling back to a previous version once a user has updated to a newer one. However, you can implement a hacky solution to allow users to revert back to an older version. Here are a few approaches you could consider: ### 1. Store Previous Versions You can ...
28,361
[ { "from": "human", "value": "Is there a way (hacky will do) to allow a user to go back to a previous version of a ClickOnce network deployed application?\nI've looked in the docs and API and there seems to be no way. You can selectively choose if you would like to update, but once updated there is, seemingl...
I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a Python application in a useful way from gdb. (This is a variation on my q...
Yes, you can indeed create a dump of a running Python application and then analyze it later. This can be helpful for diagnosing issues like memory leaks or other unexpected behavior without having to debug the live process. Here are some methods you can use to achieve this: ### Method 1: Use `faulthandler` to Dump the...
21,377
[ { "from": "human", "value": "I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a Python application in a useful w...
There was a registry fix for Visual Studio 2005 to prevent it from checking references in .aspx files, but it does not seem to work for 2008. With variable renames, finding all references in an ASP.NET project is extremely slow. Is there a way to prevent this in VS2008?
In Visual Studio 2008, there is no specific registry fix like there was for Visual Studio 2005 to prevent it from checking references in `.aspx` files. However, you can improve performance and reduce the delays caused by the IDE searching for references in your ASP.NET project by taking several alternative steps: ### ...
29,366
[ { "from": "human", "value": "There was a registry fix for Visual Studio 2005 to prevent it from checking references in .aspx files, but it does not seem to work for 2008. With variable renames, finding all references in an ASP.NET project is extremely slow. Is there a way to prevent this in VS2008?\n" }, ...
I've been working with jQuery and *.asmx web services lately, and I'm trying to be security-conscious in doing so. I figure it would be possible to submit an AJAX request -- even when logged-out -- to a resource that should only be accessible while logged-in. Thus, I include special keys and hashes with each of these A...
Your concerns about security are valid and important to consider when working with AJAX requests and ASP.NET web services. Let's break down your questions: 1. **Postbacks and Security**: In ASP.NET, postbacks (including those initiated by forms in a web application) do indeed rely on mechanisms like ViewState and vali...
27,951
[ { "from": "human", "value": "I've been working with jQuery and *.asmx web services lately, and I'm trying to be security-conscious in doing so.\nI figure it would be possible to submit an AJAX request -- even when logged-out -- to a resource that should only be accessible while logged-in.\nThus, I include s...
So I have an IList of business entities that I loop through in a ListView into an unordered list. I created an extension method on this Entity in my presentation layer. In code behind, I can Response.Write the result of this extension method, but when I try to access it through the ListView I get an error. The method i...
The issue you are encountering is related to the way extension methods are referenced in ASP.NET data binding expressions like the one you're using within a `<%# ... %>` block in a ListView. Here's a checklist to troubleshoot and solve your issue: 1. **Namespace Declaration**: Ensure that you have included the namesp...
28,184
[ { "from": "human", "value": "So I have an IList of business entities that I loop through in a ListView into an unordered list. I created an extension method on this Entity in my presentation layer. In code behind, I can Response.Write the result of this extension method, but when I try to access it through ...
I'm evaluating Terracotta to help me scale up an application which is currently RAM-bounded. It is a collaborative filter and stores about 2 kilobytes of data per-user. I want to use Amazon's EC2, which means I'm limited to 14GB of RAM, which gives me an effective per-server upper-bound of around 7 million users. I nee...
Using Terracotta to scale your application can certainly help you go beyond the RAM limitations of a single server. With Terracotta, you can create a distributed in-memory data grid that allows you to have an effective clustered heap larger than the available RAM on each server. In your case, achieving a clustered heap...
18,507
[ { "from": "human", "value": "I'm evaluating Terracotta to help me scale up an application which is currently RAM-bounded. It is a collaborative filter and stores about 2 kilobytes of data per-user. I want to use Amazon's EC2, which means I'm limited to 14GB of RAM, which gives me an effective per-server upp...
I need to give users the ability to optionally add metadata to documents. Another way to state this is the fact that users need to add at least 5 categories to a document. Basically what I want to do is dynamically add metadata (or categories) to a document on an ad hoc basis. Here are the options that I have thought o...
To implement a flexible and generic system for allowing users to add metadata to documents, let's evaluate the options you've presented and discuss additional potential approaches. ### Option 1: Dynamically Creating New Table Columns - **Pros**: - Each piece of metadata can be stored in its own column, making query...
26,354
[ { "from": "human", "value": "I need to give users the ability to optionally add metadata to documents. Another way to state this is the fact that users need to add at least 5 categories to a document.\nBasically what I want to do is dynamically add metadata (or categories) to a document on an ad hoc basis. ...
I am facing this peculiar problem. My webapp, works fine on my localhost. Its a JSP/Struts-Tomcat-MySQL app. However, when I host it on hostjava.net (shared tomcat), it is unable to connect to the database. After some debugging, I have identified the problem, to be with JNDI lookup for datasource. If you want, you can ...
It seems that you're experiencing issues with JNDI datasource configuration on a shared Tomcat hosting environment. Here are a few things to check and troubleshoot the problem: 1. **JNDI Resource Configuration**: Ensure that the datasource is correctly configured in the `context.xml` file. The configuration you sh...
25,920
[ { "from": "human", "value": "I am facing this peculiar problem. My webapp, works fine on my localhost. Its a JSP/Struts-Tomcat-MySQL app. However, when I host it on hostjava.net (shared tomcat), it is unable to connect to the database.\nAfter some debugging, I have identified the problem, to be with JNDI lo...
I'm writing a log file viewer for a web application and I want to paginate through the lines of the log file. The items in the file are line based with the newest item at the bottom. So I need a tail() method that can read n lines from the bottom and support an offset. This is what I came up with: def tail(f, n, offs...
Your approach to reading the last `n` lines from a log file with an offset is a good starting point. However, there are a few issues and possible improvements that can be made to enhance the functionality and robustness of your `tail` function. Here are some suggestions: 1. **Avoiding Infinite Loop**: Your while loop ...
14,694
[ { "from": "human", "value": "I'm writing a log file viewer for a web application and I want to paginate through the lines of the log file. The items in the file are line based with the newest item at the bottom.\nSo I need a tail() method that can read n lines from the bottom and support an offset. This i...
I would like to know who is locking a file (win32). I know about WhoLockMe, but I would like a command-line tool which does more or less the same thing. I also looked at this question, but it seems only applicable for files opened remotely.
If you're looking for a command-line tool to identify which process is locking a file in Windows, you have a few options. Here are some command-line utilities that can help you achieve this: 1. **Handle (Sysinternals)**: - **Handle** is a command-line utility from Sysinternals that allows you to see which processes...
28,173
[ { "from": "human", "value": "I would like to know who is locking a file (win32). I know about WhoLockMe, but I would like a command-line tool which does more or less the same thing.\nI also looked at this question, but it seems only applicable for files opened remotely.\n" }, { "from": "gpt", "v...
Derik Whitaker posted an article a couple of days ago that hit a point that I've been curious about for some time: should business logic exist in controllers? So far all the ASP.NET MVC demos I've seen put repository access and business logic in the controller. Some even throw validation in there as well. This result...
You're absolutely right to question the practice of placing business logic in controllers within the ASP.NET MVC framework. While it's common to see examples that do this for simplicity's sake, it goes against the principles of the MVC architecture and can lead to bloated controllers that are hard to maintain and test....
24,501
[ { "from": "human", "value": "Derik Whitaker posted an article a couple of days ago that hit a point that I've been curious about for some time: should business logic exist in controllers?\nSo far all the ASP.NET MVC demos I've seen put repository access and business logic in the controller. Some even throw...
I need to know when my Window goes out of input focus, so I overloaded the OnKillFocus() method of the CWnd. However it doesn't invoke this method when I focus another application (alt+tab), or even minimize the window. But it DOES invoke the method when I restore it from being minimized. Are these the intended times ...
Yes, the behavior you are observing is consistent with how the `OnKillFocus()` method works in MFC (Microsoft Foundation Classes). The `OnKillFocus()` method is called when your window loses input focus to another window within the same application or to a window in another application, but it does have some specifics ...
30,203
[ { "from": "human", "value": "I need to know when my Window goes out of input focus, so I overloaded the OnKillFocus() method of the CWnd. \nHowever it doesn't invoke this method when I focus another application (alt+tab), or even minimize the window. But it DOES invoke the method when I restore it from bein...
I don't really get lambda expressions. While they've been around since the days of ALGOL, I didn't start hearing about them until fairly recently, when Python and Ruby became very popular. Now that C# has the => syntax, people in my world (.NET) are talking about lamdba expressions more and more. I've read the Wikiped...
Lambda expressions are a powerful feature in many modern programming languages, including C#. They allow you to write concise, inline functions that can be passed as arguments to methods, stored in variables, or returned from methods. This functional programming concept enhances code readability and allows for more exp...
24,184
[ { "from": "human", "value": "I don't really get lambda expressions. While they've been around since the days of ALGOL, I didn't start hearing about them until fairly recently, when Python and Ruby became very popular. Now that C# has the => syntax, people in my world (.NET) are talking about lamdba express...
What are the minimum OS requirements for each of the .Net frameworks? E.g. for which version is it impossible to run each OS on: Windows 95 Windows 98 Windows 98SE Windows ME Windows NT 3.x Windows NT 4 Windows 2000 I believe all .Net frameworks are compatible w/ XP, Vista, Windows Server 2003, and Windows Server 20...
Here is a summary of the minimum operating system requirements for each version of the .NET Framework, along with the compatibility of various Windows OS versions that you mentioned: ### .NET Framework Versions and Their OS Requirements 1. **.NET Framework 1.0** - Minimum OS: Windows 98, Windows NT 4.0 (Service Pa...
24,756
[ { "from": "human", "value": "What are the minimum OS requirements for each of the .Net frameworks? E.g. for which version is it impossible to run each OS on:\n\nWindows 95\nWindows 98\nWindows 98SE\nWindows ME\nWindows NT 3.x\nWindows NT 4\nWindows 2000\n\nI believe all .Net frameworks are compatible w/ XP...
I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like... x = 40 f = lambda { |y| x + y } save_for_later(f) Later, in a separate run of the Ruby interpreter, I want to be able to say... f = load_from_before z = f.call(2) z...
Serializing a lambda (or proc) in Ruby that captures its local environment (closure) presents some challenges, primarily because Ruby does not support the serialization of lambdas directly through `Marshal`. However, we can work around this limitation by manually serializing the lambda and the variables it closes over....
29,762
[ { "from": "human", "value": "I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like...\nx = 40\nf = lambda { |y| x + y }\nsave_for_later(f)\n\nLater, in a separate run of the Ruby interpreter, I want to be able ...
function Submit_click() { if (!bValidateFields()) return; } function bValidateFields() { /// <summary>Validation rules</summary> /// <returns>Boolean</returns> ... } So, when I type the call to my bValidateFields() function intellisence in Visual Studio doesn't show my comments. But according to this it should....
In Visual Studio, for IntelliSense to show your comments for a function, the comments need to be in a specific format that Visual Studio recognizes, usually following the XML documentation comment style. Your current comment format using `/// <summary>` is correct for C# and some other languages that use XML-style comm...
29,016
[ { "from": "human", "value": "function Submit_click()\n{\n if (!bValidateFields())\n return;\n}\n\nfunction bValidateFields() {\n/// <summary>Validation rules</summary>\n/// <returns>Boolean</returns>\n...\n}\n\nSo, when I type the call to my bValidateFields() function intellisence in Visual Studio doesn...
At work we do almost everything in Java and perl, but I wanted to build out a feature using PHP and sessions. Some peeps thought that it was a bad idea to try to do PHP sessions on our system, cause it's distributed to many servers. What would the specific problem be?
Using PHP sessions in a distributed system can introduce several challenges. Here's a breakdown of the specific issues that may arise when attempting to manage PHP sessions in a multi-server environment: 1. **Session Storage**: By default, PHP stores session data in files on the local filesystem. In a distributed envi...
26,951
[ { "from": "human", "value": "At work we do almost everything in Java and perl, but I wanted to build out a feature using PHP and sessions. Some peeps thought that it was a bad idea to try to do PHP sessions on our system, cause it's distributed to many servers. What would the specific problem be?\n" }, ...
It's great to find all those little snippets of code on the Web for your current needs, but is there anything better than getting whole application source code at once and reading it like a book? There's no better way to learn positive and negative aspects of various architecture solutions. That's why I was trying to ...
It's true that reviewing full application source code can provide valuable insights into architecture, design patterns, and best practices. Here are some known repositories and resources where you can find the source code of large applications: 1. **GitHub**: Many popular projects and applications have their source co...
26,590
[ { "from": "human", "value": "It's great to find all those little snippets of code on the Web for your current needs, but is there anything better than getting whole application source code at once and reading it like a book? \nThere's no better way to learn positive and negative aspects of various architect...
I'm importing data from another system to MySQL, its a CSV file. The "Date" field however contains cryptic of 3-digit time entries, here's a random sample set: > 540 > 780 > 620 > 965 What's this? obviously its not 5:40 and 6:20. But it's not UNIX either (I tried 1225295XXX before I realized the time range this repres...
It sounds like the entries you're dealing with are representing time in a non-standard format. Based on the values you provided (e.g., 540, 780, 620, 965), it's likely that these are representations of time in minutes rather than hours and minutes or any other commonly recognized format. For example: - 540 could repre...
30,133
[ { "from": "human", "value": "I'm importing data from another system to MySQL, its a CSV file. The \"Date\" field however contains cryptic of 3-digit time entries, here's a random sample set:\n> 540\n> 780\n> 620\n> 965\n\nWhat's this? obviously its not 5:40 and 6:20. But it's not UNIX either (I tried 122529...
Given the string "ThisStringHasNoSpacesButItDoesHaveCapitals" what is the best way to add spaces before the capital letters. So the end string would be "This String Has No Spaces But It Does Have Capitals" Here is my attempt with a RegEx System.Text.RegularExpressions.Regex.Replace(value, "[A-Z]", " $0")
Your approach using regular expressions is almost correct, but it would also add a space before the first capital letter in the string. To avoid that, you can modify your regex to only match capital letters that are preceded by lowercase letters or are not at the start of the string. Here’s how you can achieve this: ...
31,072
[ { "from": "human", "value": "Given the string \"ThisStringHasNoSpacesButItDoesHaveCapitals\" what is the best way to add spaces before the capital letters. So the end string would be \"This String Has No Spaces But It Does Have Capitals\"\nHere is my attempt with a RegEx\nSystem.Text.RegularExpressions.Rege...
I have an ASP.Net 2.0 page that contains two UpdatePanels. The first panel contains a TreeView. The second panel contains a label and is triggered by a selection in the tree. When I select a node the label gets updated as expected and the TreeNode that I clicked on becomes highlighted and the previously selected node i...
The issue you're encountering stems from how ASP.NET manages the state of the TreeView control and the UpdatePanel. When you initially set the `Selected` property of a node to `true` in the `Page_Load` method, that node is highlighted. However, when you change the selected node in the `TreeView1_SelectedNodeChanged` me...
28,797
[ { "from": "human", "value": "I have an ASP.Net 2.0 page that contains two UpdatePanels. The first panel contains a TreeView. The second panel contains a label and is triggered by a selection in the tree. When I select a node the label gets updated as expected and the TreeNode that I clicked on becomes highl...
Why is volatile needed in C? What is it used for? What will it do?
In C, the `volatile` keyword is used as a type qualifier that tells the compiler not to optimize certain variables, as their values may be changed by factors outside of the program's control. Here are the key points regarding the use of `volatile`: ### Why `volatile` is Needed: 1. **External Changes**: Variables mark...
28,550
[ { "from": "human", "value": "Why is volatile needed in C? What is it used for? What will it do?\n" }, { "from": "gpt", "value": "In C, the `volatile` keyword is used as a type qualifier that tells the compiler not to optimize certain variables, as their values may be changed by factors outside o...
I would like to set the MSMQ message label using the NetMsmqBinding. I understand it’s easy when using the MsmqIntegrationBinding, but I would like to continue to use the NetMsmqBinding (even call private methods, if possible)
In WCF (Windows Communication Foundation), the `NetMsmqBinding` does not natively support setting the MSMQ message label directly through its configuration or properties. However, you can achieve this by using a custom message inspector or modifying the message before it is sent. ### Using a Message Inspector You can...
29,137
[ { "from": "human", "value": "I would like to set the MSMQ message label using the NetMsmqBinding. I understand it’s easy when using the MsmqIntegrationBinding, but I would like to continue to use the NetMsmqBinding (even call private methods, if possible)\n" }, { "from": "gpt", "value": "In WCF ...
When posting example code or filing bug reports based on a real production app, it would be helpful to have some way to change the table and column names to not potentially give away information about the internals of the app. Doing it by hand without breaking things is time consuming. Does anything automatic exist? ...
Yes, there are tools and techniques available that can help automatically anonymize database schemas, including table and column names, while preserving the relationships between them. Here are some approaches you can consider: 1. **Data Anonymization Tools**: There are specialized tools designed for data anonymizatio...
27,737
[ { "from": "human", "value": "When posting example code or filing bug reports based on a real production app, it would be helpful to have some way to change the table and column names to not potentially give away information about the internals of the app. Doing it by hand without breaking things is time co...
Please help, I am stuck here --- irb> a = "line of text\n line two\n line three" irb> system("cat > test_file << #{a}") cat: of: No such file or directory cat: text: No such file or directory => false
The issue you're encountering is due to the way you're trying to use `system` to write the contents of the variable `a` to a file using the `cat` command. The command you are trying to execute doesn't correctly handle multiline input in the way you're using it. Here’s how you can achieve your goal without using `cat`:...
31,384
[ { "from": "human", "value": "Please help, I am stuck here ---\nirb> a = \"line of text\\n line two\\n line three\"\nirb> system(\"cat > test_file << #{a}\")\ncat: of: No such file or directory\ncat: text: No such file or directory\n=> false\n\n" }, { "from": "gpt", "value": "The issue you're e...
Recently, I made a post about the developers I'm working with not using try catch blocks properly, and unfortuantely using try... catch blocks in critical situations and ignoring the exception error all together. causing me major heart ache. Here is an example of one of the several thousand sections of code that they ...
Your concerns regarding exception handling, code organization, and the general structure of your application are valid and important, especially when modifying legacy code from developers who may not have followed best practices. ### Analyzing the Exception Handling In the code you provided, the usage of `try...catc...
24,503
[ { "from": "human", "value": "Recently, I made a post about the developers I'm working with not using try catch blocks properly, and unfortuantely using try... catch blocks in critical situations and ignoring the exception error all together. causing me major heart ache. Here is an example of one of the sev...
To test printing in a Visual Basic Project I need to simulate a SLOW printer, how can I do that?
To simulate a slow printer in a Visual Basic (VB) project, you can implement a delay in your printing process to mimic the behavior of a slow printer. Here's a simple way to do this using `Thread.Sleep` method to introduce a delay after each print job or after each page if you're printing multiple pages. Here's a basi...
27,971
[ { "from": "human", "value": "To test printing in a Visual Basic Project I need to simulate a SLOW printer,\nhow can I do that?\n" }, { "from": "gpt", "value": "To simulate a slow printer in a Visual Basic (VB) project, you can implement a delay in your printing process to mimic the behavior of a...
For a requirement i was asked to export information into a custom entity that was created in MS CRM 4.0. I am trying to do this programmatically and I have not found a single code that actually accomplishes this. I wrote code to check if a certain value for a field exists in the entity but creating a new entity seems t...
Exporting information into a custom entity in Microsoft Dynamics CRM 4.0 can be done programmatically using the CRM SDK. To create a new record in a custom entity, you typically need to perform the following steps: 1. **Set up the CRM SDK**: Make sure you have the CRM SDK installed and referenced in your project. 2. ...
27,232
[ { "from": "human", "value": "For a requirement i was asked to export information into a custom entity that was created in MS CRM 4.0. I am trying to do this programmatically and I have not found a single code that actually accomplishes this. I wrote code to check if a certain value for a field exists in the...
I am in the process of developing a web application that consists visually of a header above a body containing four columns of variable-height content. The design gods have decreed it to be fixed height, mainly because each of the columns can potentially get very long, and so (being designers) they are wanting iframes ...
To create a layout with a fixed header and four columns of variable-height content that fill the available vertical space, while also ensuring each column can scroll independently, you can use a combination of CSS flexbox and the `overflow` property. Here's a general approach to achieving this: ### Step 1: Structure Y...
22,374
[ { "from": "human", "value": "I am in the process of developing a web application that consists visually of a header above a body containing four columns of variable-height content. The design gods have decreed it to be fixed height, mainly because each of the columns can potentially get very long, and so (b...
I need a way to get the elapsed time (wall-clock time) since a program started, in a way that is resilient to users meddling with the system clock. On windows, the non standard clock() implementation doesn't do the trick, as it appears to work just by calculating the difference with the time sampled at start up, so tha...
To measure elapsed wall-clock time in a manner that is resilient to system clock changes, you can use a high-resolution monotonic clock available in both Windows and UNIX-like systems. Monotonic clocks are designed to measure time intervals without being affected by system time changes, making them suitable for your re...
28,580
[ { "from": "human", "value": "I need a way to get the elapsed time (wall-clock time) since a program started, in a way that is resilient to users meddling with the system clock.\nOn windows, the non standard clock() implementation doesn't do the trick, as it appears to work just by calculating the difference...
I am trying to mock out HttpContext so that I can unit test my controller's Request.IsAuthenicated call. I am using the code that I found at Scott Hanselman's blog to simulate HttpContext using rhino.mocks. so i have this unit test piece: PostsController postsController = new PostsController(postDL); mocks.SetFakeCont...
When unit testing a controller and mocking the `HttpContext`, it's important to ensure that the controller's context is properly set up. If you are using Rhino Mocks, you need to ensure that you are mocking the `HttpContext`, and specifically the `Request` property of the controller. Here's how you can set up your uni...
26,901
[ { "from": "human", "value": "I am trying to mock out HttpContext so that I can unit test my controller's Request.IsAuthenicated call. I am using the code that I found at Scott Hanselman's blog to simulate HttpContext using rhino.mocks. \nso i have this unit test piece:\nPostsController postsController = new...
How does one add a comment to an MS Access Query, to provide a description of what it does? Once added, how can one retrieve such comments programmatically?
In Microsoft Access, you can add comments to a query to provide descriptions or explanations about its purpose or function. Here’s how you can do it, as well as how to retrieve those comments programmatically. ### Adding Comments to an MS Access Query 1. **Using the Query Design View:** - Open the query in Design ...
27,332
[ { "from": "human", "value": "How does one add a comment to an MS Access Query, to provide a description of what it does?\nOnce added, how can one retrieve such comments programmatically?\n" }, { "from": "gpt", "value": "In Microsoft Access, you can add comments to a query to provide descriptions...
I'm using System.Reflection.Emit for a while now, and find it (who don't?) as painful as bug prone. Do you know if there is a good wrapper around the IL Generator, something that I can rely on to emit IL in a more safe and easier manner than with playing directly with SRE? Edit: I know that manipulating expression tree...
Yes, working directly with `System.Reflection.Emit` (SRE) can indeed be quite challenging. While there are not many widely-used libraries that wrap `ILGenerator` specifically, there are a few options that might help you simplify and enhance your experience when emitting IL code. Here are some suggestions for wrappers ...
19,154
[ { "from": "human", "value": "I'm using System.Reflection.Emit for a while now, and find it (who don't?) as painful as bug prone.\nDo you know if there is a good wrapper around the IL Generator, something that I can rely on to emit IL in a more safe and easier manner than with playing directly with SRE?\nEdi...
I have found jQuery to be a great tool to simplify my MVC Views. For example, instead of including complicated logic to add alternating styles to my tables I just do this... $(document).ready(function() { $("table.details tr:odd").addClass("detailsAlternatingRow"); $("table.details tr:even").addClass("detailsRow"...
Absolutely! jQuery is a powerful library that can help you streamline your MVC Views by simplifying DOM manipulation, event handling, and AJAX calls. Here are some additional uses of jQuery that can help you reduce complexity in your views: ### 1. **AJAX Calls** You can easily fetch data asynchronously without needing...
19,730
[ { "from": "human", "value": "I have found jQuery to be a great tool to simplify my MVC Views.\nFor example, instead of including complicated logic to add alternating styles to my tables I just do this...\n$(document).ready(function() {\n $(\"table.details tr:odd\").addClass(\"detailsAlternatingRow\");\n ...
I was thinking about the idea of using Ajax instead of TagLib. The most elegant way would be: Using Java Annotation. The idea is, designers or anybody can make the HTML without any taglib ,just using the "standard" HTML tags with id or name, and call the Javascript. That way any WYSIWYG can be used, developer don't ha...
The concept you’ve presented is quite interesting and taps into some modern trends in web development, especially regarding the separation of concerns between developers and designers. Let's break down the key components of your idea: ### Benefits 1. **Separation of Concerns**: By allowing designers to work purely wi...
27,992
[ { "from": "human", "value": "I was thinking about the idea of using Ajax instead of TagLib. The most elegant way would be: Using Java Annotation. \nThe idea is, designers or anybody can make the HTML without any taglib ,just using the \"standard\" HTML tags with id or name, and call the Javascript. That way...
Having not done ASP.NET since v1.1, and now blitzing through the Wrox Pro ASP.NET v3.5 book, what other resources are available to get me developing enterprise ASP.NET apps the fastest? I've been developing in DotNet since Beta and have been doing Winform & middle-layer architecture/design/dev for 3.5 years now (as thi...
It's great to hear that you're diving back into ASP.NET! Given your background and current needs, here are several resources and strategies that can help you accelerate your learning and development in enterprise ASP.NET applications: ### Online Courses and Tutorials: 1. **Pluralsight** - Offers a wide range of course...
27,782
[ { "from": "human", "value": "Having not done ASP.NET since v1.1, and now blitzing through the Wrox Pro ASP.NET v3.5 book, what other resources are available to get me developing enterprise ASP.NET apps the fastest?\nI've been developing in DotNet since Beta and have been doing Winform & middle-layer archite...
I need to create a 'slider' for a client's site. The slider should allow people to select how many items they want of x item, and show what the price will be based on that. The weird(ish) part is that the ratio of the price increase will go down as the amount of items goes up: 1 item: $100 2 items: +90 = $190 3 items:...
Creating a slider that adjusts the price based on the quantity of items selected can be done easily with HTML, CSS, and JavaScript. Below is a simple implementation based on your requirements. ### HTML Create the HTML structure for the slider and price display: ```html <!DOCTYPE html> <html lang="en"> <head> <me...
22,256
[ { "from": "human", "value": "I need to create a 'slider' for a client's site. The slider should allow people to select how many items they want of x item, and show what the price will be based on that. The weird(ish) part is that the ratio of the price increase will go down as the amount of items goes up:\n...
Is there any method? My computer is AMD64. ::std::string str; BOOL loadU(const wchar_t* lpszPathName, int flag = 0); When I used: loadU(&str); the VS2005 compiler says: Error 7 error C2664:: cannot convert parameter 1 from 'std::string *__w64 ' to 'const wchar_t *' How can I do it?
The error you're encountering is due to a mismatch between the types you're trying to use. The function `loadU` expects a `const wchar_t*` as its first parameter, but you're trying to pass it a `std::string`. Here's a breakdown of how to address the issue: 1. **Understand the Data Types**: - `std::string` is used...
27,226
[ { "from": "human", "value": "Is there any method?\nMy computer is AMD64.\n::std::string str;\nBOOL loadU(const wchar_t* lpszPathName, int flag = 0);\n\nWhen I used: \nloadU(&str);\n\nthe VS2005 compiler says:\nError 7 error C2664:: cannot convert parameter 1 from 'std::string *__w64 ' to 'const wchar_t *'\n...
This is somewhat similar to this question. However, rather than wanting to hide a column all together, I am just looking to hide the column on the List.aspx page. My specific example is that fields that are long (or at least nvarchar(MAX)) automatically hide from the List.aspx page as is but are still visible on the Ed...
Yes, it is possible to hide specific columns from the List.aspx page while keeping them visible on the Edit.aspx page in a SharePoint list. You can achieve this by customizing the List View in SharePoint. Here's how you can do this: ### Method 1: Using List View Settings 1. **Navigate to your List**: Go to your Share...
11,219
[ { "from": "human", "value": "This is somewhat similar to this question.\nHowever, rather than wanting to hide a column all together, I am just looking to hide the column on the List.aspx page.\nMy specific example is that fields that are long (or at least nvarchar(MAX)) automatically hide from the List.aspx...
What's the best/most efficient way to extract text set between parenthesis? Say I wanted to get the string "text" from the string "ignore everything except this (text)" in the most efficient manner possible. So far, the best I've come up with is this: $fullString = "ignore everything except this (text)"; $start = strpo...
Your current approach has a small issue that needs to be corrected. Specifically, you are using `strpos()` incorrectly, and your calculation for the length of the substring is not quite right either. You can improve the efficiency and clarity of your code using a simpler method. Here's a corrected version of your appr...
25,881
[ { "from": "human", "value": "What's the best/most efficient way to extract text set between parenthesis? Say I wanted to get the string \"text\" from the string \"ignore everything except this (text)\" in the most efficient manner possible.\nSo far, the best I've come up with is this:\n$fullString = \"ignor...
In my Silverlight app I want a multi-line text box to expand every time the user hits Enter. The difficult part is how to calculate the correct height based on the number of text lines. I have tried the following but the textbox becomes too small: box.Height = box.FontSize*lineCount + box.Padding.Top + box.Padding.Bott...
To create a multi-line text box in Silverlight that expands correctly when the user presses Enter, it's important to ensure that you're accounting for the line height properly. The `FontSize` property does indeed use points (1 point = 1/72 inch), which can lead to some confusion when converting to pixel dimensions. To...
28,395
[ { "from": "human", "value": "In my Silverlight app I want a multi-line text box to expand every time the user hits Enter.\nThe difficult part is how to calculate the correct height based on the number of text lines.\nI have tried the following but the textbox becomes too small:\nbox.Height = box.FontSize*li...
How are non-deterministic functions used in SQL partitioning functions and are they useful?
In SQL, partitioning functions are used to divide a table into smaller, more manageable pieces called partitions, based on the values of certain columns. These partitions can improve query performance, make maintenance easier, and optimize storage management. ### Non-deterministic Functions in SQL Non-deterministic f...
28,167
[ { "from": "human", "value": "How are non-deterministic functions used in SQL partitioning functions and are they useful?\n" }, { "from": "gpt", "value": "In SQL, partitioning functions are used to divide a table into smaller, more manageable pieces called partitions, based on the values of certa...
I'm new to the VxWorks Environment are there any good sources of information out there?
Welcome to the VxWorks environment! VxWorks is a real-time operating system (RTOS) widely used in embedded systems. Here are some valuable resources to help you get started: 1. **Official Documentation**: - The official Wind River documentation is an essential resource. You can find user guides, programming refere...
27,104
[ { "from": "human", "value": "I'm new to the VxWorks Environment are there any good sources of information out there? \n" }, { "from": "gpt", "value": "Welcome to the VxWorks environment! VxWorks is a real-time operating system (RTOS) widely used in embedded systems. Here are some valuable resour...
What I'd like to avoid: ManagementClass m = new ManagementClass("Win32_LogicalDisk"); ManagementObjectCollection managementObjects = m.GetInstances(); List<ManagementObject> managementList = new List<ManagementObject>(); foreach(ManagementObject m in managementObjects){ managementList.Add(m); } Isn't there a...
Yes, there is a way to convert a `ManagementObjectCollection` directly into a `List<ManagementObject>` without needing to iterate through each `ManagementObject` and add it to a list manually. You can use LINQ to achieve this in a more concise way. Here’s how you can do that: ```csharp using System; using System.Col...
28,254
[ { "from": "human", "value": "What I'd like to avoid: \nManagementClass m = new ManagementClass(\"Win32_LogicalDisk\");\n\nManagementObjectCollection managementObjects = m.GetInstances();\n\nList<ManagementObject> managementList = new List<ManagementObject>();\n\nforeach(ManagementObject m in managementObjec...
I am busy writing my thesis (so, I guess this could count as a homework question). Now, one of the things that came up was the Unix select system call. I would like to add a reference to the appropriate man page, but all I can find that seems the slight bit official is the Single Unix Specification site that wants my m...
When writing a thesis and referencing the `select` system call in Unix, it's best to provide a reliable and accessible reference. While you noted the Single Unix Specification may not be accessible without payment, there are alternative ways to reference the `select` system call. Here are a few options: 1. **Linux Ma...
29,598
[ { "from": "human", "value": "I am busy writing my thesis (so, I guess this could count as a homework question). Now, one of the things that came up was the Unix select system call. I would like to add a reference to the appropriate man page, but all I can find that seems the slight bit official is the Singl...
We have been having serious trouble getting an application we devlop running with UAC enabled for long. Once installed (the installer fails almost immediately with UAC) it appears that UAC can be turned on and have the application work. However, after a while, it will stop working with strange errors about cannot find ...
Dealing with UAC (User Account Control) and folder virtualization in Windows Vista and later versions can indeed be challenging, especially when third-party software is involved. Here are some suggestions and approaches to help you manage the situation: ### Understanding Folder Virtualization Folder virtualization is ...
27,799
[ { "from": "human", "value": "We have been having serious trouble getting an application we devlop running with UAC enabled for long.\nOnce installed (the installer fails almost immediately with UAC) it appears that UAC can be turned on and have the application work. However, after a while, it will stop work...
Can anyone recommend any good resources for learning C++ Templates? Many thanks.
Certainly! C++ templates can be a complex but powerful feature of the language. Here are some great resources to help you learn about C++ templates: ### Books 1. **"C++ Templates: The Complete Guide" by David Vandevoorde, Nicolai M. Josuttis, and Douglas Gregor** - This is one of the most comprehensive books on C++...
22,150
[ { "from": "human", "value": "Can anyone recommend any good resources for learning C++ Templates?\nMany thanks.\n" }, { "from": "gpt", "value": "Certainly! C++ templates can be a complex but powerful feature of the language. Here are some great resources to help you learn about C++ templates:\n\n...
I need to invoke a c# application within my c# control, as I do not feel like rewriting the application as a control. I am able to launch the application using System.Diagnostics.Process.Start. Now how do I call the methods in my application from/via the c# control as this is where I invoked the application using Syst...
Invoking methods from an external C# application that you have started using `System.Diagnostics.Process.Start` can be challenging, as each application runs in its own process. However, there are a few approaches you can consider to enable communication between your C# control and the external application. Here are som...
25,364
[ { "from": "human", "value": "I need to invoke a c# application within my c# control, as I do not feel like rewriting the application as a control. \nI am able to launch the application using System.Diagnostics.Process.Start.\nNow how do I call the methods in my application from/via the c# control as this is...
I'm a c++ programmer and I'm playing around with java after finding JPA which for a few of my current applications is a god send. I haven't touched java since university and I'm having a problem running out of heap space. I'm using the code below as the main part of a not-very-serious test of jdbc/jpa/lucene but I keep...
It looks like you're running into an OutOfMemoryError while processing your data. In Java, especially with operations that involve a lot of object creation or database interactions, it's important to manage memory effectively. Here are a few potential issues and optimizations to consider: ### 1. Use `EntityManager` Pr...
22,221
[ { "from": "human", "value": "I'm a c++ programmer and I'm playing around with java after finding JPA which for a few of my current applications is a god send. I haven't touched java since university and I'm having a problem running out of heap space. I'm using the code below as the main part of a not-very-s...
I have a setup project for a .NET Service Application which uses a .NET component which exposes a COM interface (COM callable wrapper / CCW). To get the component working on a target machine, it has to be registered with regasm.exe /tlb /codebase component.dll The /tlb switch to generate the typelib is mandatory in t...
To configure a Visual Studio 2008 Setup Project to register a .NET assembly with `regasm.exe` using the `/tlb` switch, you will need to follow these steps: 1. **Create a Setup Project**: If you haven't already created a setup project, create one by going to `File -> New -> Project -> Other Project Types -> Setup and D...
26,175
[ { "from": "human", "value": "I have a setup project for a .NET Service Application which uses a .NET component which exposes a COM interface (COM callable wrapper / CCW).\nTo get the component working on a target machine, it has to be registered with\n\nregasm.exe /tlb /codebase component.dll\n\nThe /tlb sw...
My team is currently limited to drawing images on an opengl 1.4 platform, which means that we can't use any nifty texture mapping to draw an image (yes, we're confined to using the intel integrated graphics platform, it's very annoying). So far, we're able to draw, scale, and flip an image, but the guy doing the graph...
In OpenGL, the `glRotate` function is used to apply a rotation transformation to the current matrix. However, when using `glDrawPixels`, you are working directly with pixel data in screen coordinates, and transformations such as rotation do not apply directly to that operation. The reason for this limitation is that ...
24,278
[ { "from": "human", "value": "My team is currently limited to drawing images on an opengl 1.4 platform, which means that we can't use any nifty texture mapping to draw an image (yes, we're confined to using the intel integrated graphics platform, it's very annoying). So far, we're able to draw, scale, and f...
I am reading a binary log file produced by a piece of equipment. I have the data in a byte[]. If I need to read two bytes to create a short I can do something like this: short value = (short)(byte[1] << 8); value += byte[2]; Now I know the value is the correct for valid data. How would I know if the file was mes...
Hi Keith, You've asked an important question regarding how to handle values like `FF FF` in a binary log when reading data types like `short` from a byte array. Let's break it down. ### Understanding `FF FF` as a `short` When you read the two bytes `FF FF`, you're indeed converting these bytes into a `short`. The bi...
28,883
[ { "from": "human", "value": "I am reading a binary log file produced by a piece of equipment. \nI have the data in a byte[]. \nIf I need to read two bytes to create a short I can do something like this:\nshort value = (short)(byte[1] << 8);\nvalue += byte[2];\n\nNow I know the value is the correct for val...
We have a shrink wrap type Windows server application where we need to create a self signed certificate on the server to be used by some WCF web services. From our searches on the web, it appears that the makecert utility in the PlatformSDK from Microsoft cannot be distributed with our application, so we're looking fo...
Creating a self-signed certificate for use in a Windows Server application can indeed be done using OpenSSL, and you can subsequently import the generated certificate into the Windows LocalMachine certificate store. Additionally, it’s possible to create the certificate directly within a .NET application. Below, I’ll ou...
25,507
[ { "from": "human", "value": "We have a shrink wrap type Windows server application where we need to create a self signed certificate on the server to be used by some WCF web services. From our searches on the web, it appears that the makecert utility in the PlatformSDK from Microsoft cannot be distributed ...
Can anyone recommend an SVN client for use in Excel with VBA (code modules only). Ideally, I would also like SVN to ignore case when diffing prior to committing changes so as to avoid excessive churn in the repository (VBA has an annoying habit of changing the case of variables all over the project).
When working with SVN (Subversion) for version control in Excel with VBA, a few SVN clients can be useful for integrating with your development process. While Excel doesn't directly support SVN, you can use external SVN clients that can be operated from the command line or with additional functionality. ### Recommende...
27,888
[ { "from": "human", "value": "Can anyone recommend an SVN client for use in Excel with VBA (code modules only). Ideally, I would also like SVN to ignore case when diffing prior to committing changes so as to avoid excessive churn in the repository (VBA has an annoying habit of changing the case of variables...
Currently my app uses just Direct3D9 for graphics, however in the future I' m planning to extend this to D3D10 and possibly OpenGL. The question is how can I do this in a tidy way? At present there are various Render methods in my code void Render(boost::function<void()> &Call) { D3dDevice->BeginScene(); Call()...
To extend your current rendering system to support multiple graphics APIs (like Direct3D9, Direct3D10, and OpenGL) in a tidy and maintainable way, you should consider implementing an abstraction layer that separates your rendering logic from the specifics of each API. Here's how you can go about it: ### Step 1: Create...
14,667
[ { "from": "human", "value": "Currently my app uses just Direct3D9 for graphics, however in the future I' m planning to extend this to D3D10 and possibly OpenGL. The question is how can I do this in a tidy way?\nAt present there are various Render methods in my code\nvoid Render(boost::function<void()> &Call...
Is there a way to connect to a db with Integrated Security from multiple domains?
Connecting to a database with Integrated Security (also known as Windows Authentication) from multiple domains can present challenges due to the way authentication works in Windows environments. Here are some approaches you can consider to achieve this: ### 1. **Trust Relationships between Domains:** - **Set Up Tru...
27,633
[ { "from": "human", "value": "Is there a way to connect to a db with Integrated Security from multiple domains?\n" }, { "from": "gpt", "value": "Connecting to a database with Integrated Security (also known as Windows Authentication) from multiple domains can present challenges due to the way aut...
While I'm googling/reading for this answer I thought I would also ask here. I have a class that is a wrapper for a SDK. The class accepts an ILoader object and uses the ILoader object to create an ISBAObject which is cast into an ISmallBusinessInstance object. I am simply trying to mock this behavior using Moq. [...
The error you’re encountering stems from the way you’re attempting to use the `Returns` method in Moq. The issue arises because the `Returns` method expects an object that matches the expected return type of the method you are mocking, but you're providing a `Mock<ISbaObjects>` instead of an actual instance of `ISbaObj...
29,720
[ { "from": "human", "value": "While I'm googling/reading for this answer I thought I would also ask here. \nI have a class that is a wrapper for a SDK. The class accepts an ILoader object and uses the ILoader object to create an ISBAObject which is cast into an ISmallBusinessInstance object. I am simply tr...
I have a simple Flex application that is a panel with a repeater inside of it; albeit a little simplified, it is like such: <mx:Panel id="pnl"> <mx:Repeater id="rp"> <mx:Label text = "foo" /> </mx:Repeater> </mx:Panel> I am then embedding this Flex application into an HTML wrapper. I am then attempt...
The issue you're encountering seems to be related to how the Flash content interacts with the HTML and the rendering of the Flex application itself in different browsers like Firefox and Safari. Here are some potential reasons for the behavior you're seeing, along with solutions to work around them: ### Possible Cause...
25,554
[ { "from": "human", "value": "I have a simple Flex application that is a panel with a repeater inside of it; albeit a little simplified, it is like such:\n\n\n<mx:Panel id=\"pnl\">\n <mx:Repeater id=\"rp\">\n <mx:Label text = \"foo\" />\n </mx:Repeater>\n</mx:Panel>\n\n\nI am then embedding this...
There are two scenarios I need to clarify: An executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime. An executable compiled with .NET 1.1 needs to use a library compiled with .NET 3.5. I cannot find a reliable source stating that it is not possible...
In .NET, different versions of the runtime can coexist on the same machine, but the interoperability between different runtime versions can be quite limited due to the way the CLR (Common Language Runtime) handles assemblies and dependencies. ### Scenario 1: Executable compiled with .NET 3.5 using a library compiled w...
26,935
[ { "from": "human", "value": "There are two scenarios I need to clarify:\n\nAn executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime.\nAn executable compiled with .NET 1.1 needs to use a library compiled with .NET 3.5.\n\nI cannot find a r...
It's been a while since I last coded arm assembler and I'm a little rusty on the details. If I call a C function from arm, I only have to worry about saving r0-r3 and lr, right? If the C function uses any other registers, is it responsible for saving those on the stack and restoring them? In other words, the compiler ...
In the ARM EABI (Embedded Application Binary Interface), the calling convention defines how registers are used across function calls. Here's a brief overview relevant to your question: 1. **Caller-Saved Registers**: In the ARM EABI calling convention, registers r0 to r3 are considered caller-saved registers. This mean...
28,149
[ { "from": "human", "value": "It's been a while since I last coded arm assembler and I'm a little rusty on the details. If I call a C function from arm, I only have to worry about saving r0-r3 and lr, right?\nIf the C function uses any other registers, is it responsible for saving those on the stack and res...
My C++ application stores some common user data in %CSIDL_COMMON_APPDATA%\Company\Product. I want to make sure the Users group has write permissions to this folder which on Vista it does not. How would do I do this?
To ensure that the Users group has write permissions to a specific folder in `%CSIDL_COMMON_APPDATA%\Company\Product` on Windows Vista and later, you'll need to modify the folder's security descriptor. This can be done programmatically using the Windows API or through a script (like a PowerShell or batch script). Below...
24,108
[ { "from": "human", "value": "My C++ application stores some common user data in %CSIDL_COMMON_APPDATA%\\Company\\Product. I want to make sure the Users group has write permissions to this folder which on Vista it does not. How would do I do this?\n" }, { "from": "gpt", "value": "To ensure that ...
I'm about to take on a project that requires a Firefox addon to issue call to COM dll's installed on the client Windows machine and I'm having a hard time estimating the complexity of this undertaking. I have quite a bit of experience with COM, so I'm not frightened by it. I have less experience with Firefox addons, bu...
Creating a Firefox add-on that communicates with COM DLLs installed on a client’s Windows machine is a complex task due to several constraints and security models in modern web browsers, including Firefox. Here’s a breakdown of the situation: ### Key Points: 1. **WebExtension API Limitations**: - Modern Firefox ad...
29,503
[ { "from": "human", "value": "I'm about to take on a project that requires a Firefox addon to issue call to COM dll's installed on the client Windows machine and I'm having a hard time estimating the complexity of this undertaking.\nI have quite a bit of experience with COM, so I'm not frightened by it. I ha...
I have a situation where I want to create a signature of a data structure: my $signature = ds_to_sig( { foo => 'bar', baz => 'bundy', boing => undef, number => 1_234_567, } ); The aim should be that if the data structure changes then so should the signature. Is there an established way to do this?
Creating a signature for a data structure in Perl can be achieved by serializing the data structure in a way that reflects its contents and structure. A common approach is to use a combination of serialization and hashing. You can use the `Data::Dumper` module to serialize the data structure and then compute a digest f...
25,117
[ { "from": "human", "value": "I have a situation where I want to create a signature of a data structure:\nmy $signature = ds_to_sig(\n { foo => 'bar',\n baz => 'bundy',\n boing => undef,\n number => 1_234_567,\n }\n);\n\nThe aim should be that if the data structure changes then so should the s...
I have an application in which attr_accessor is being used to keep temporary data for a model which will be passed to a rake task. Seeing there is not a database field for these attributes and they are not being calculated from database data, will the attr_accessor data persist and be available to the rake task? What...
In Ruby on Rails, `attr_accessor` is a way to define virtual attributes in a model. These attributes are stored in memory and do not persist to the database. Here's how it works with respect to your questions: 1. **Persistence of `attr_accessor` Data**: The data stored in attributes defined by `attr_accessor` will **n...
26,592
[ { "from": "human", "value": "I have an application in which attr_accessor is being used to keep temporary data for a model which will be passed to a rake task. Seeing there is not a database field for these attributes and they are not being calculated from database data, will the attr_accessor data persist...
Does anybody have a keybinding scheme similar to VS 2005 available for Eclipse? How to import it into preferences of Eclipse (I see only export button).
Yes, you can import a keybinding scheme similar to Visual Studio 2005 into Eclipse, although it requires a bit of manual setup since Eclipse does not provide a built-in profile for Visual Studio keybindings. ### Steps to Set Up Visual Studio Keybindings in Eclipse: 1. **Check Existing Keybindings:** - First, take ...
27,648
[ { "from": "human", "value": "Does anybody have a keybinding scheme similar to VS 2005 available for Eclipse?\nHow to import it into preferences of Eclipse (I see only export button).\n" }, { "from": "gpt", "value": "Yes, you can import a keybinding scheme similar to Visual Studio 2005 into Eclip...
I need to search all cpp/h files in svn working copy for "foo", excluding svn's special folders completely. What is the exact command for GNU grep?
You can use the `grep` command along with the `--exclude-dir` option to exclude certain directories from the search. In a typical Subversion working copy, the special folders you want to exclude are `.svn` directories. Here's the command you can use: ```bash grep -r --include='*.cpp' --include='*.h' 'foo' --exclude-di...
31,005
[ { "from": "human", "value": "I need to search all cpp/h files in svn working copy for \"foo\", excluding svn's special folders completely. What is the exact command for GNU grep?\n" }, { "from": "gpt", "value": "You can use the `grep` command along with the `--exclude-dir` option to exclude cert...
I currently have an asp.net website hosted on two web servers that sit behind a Cisco load balancer. The two web servers reference a single MSSQL database server. Since this database server is a single point of failure, I'm adding an additional MSSQL server for backup. I would like to setup my web.config files to wri...
It sounds like you're on the right track with your research into using SQL Server's features for handling failover scenarios. Given your needs for a primary and backup SQL Server, you can indeed handle this configuration effectively, but there are a few nuances. ### Using Web.config for Failover In SQL Server 2005 an...
28,298
[ { "from": "human", "value": "I currently have an asp.net website hosted on two web servers that sit behind a Cisco load balancer. The two web servers reference a single MSSQL database server.\nSince this database server is a single point of failure, I'm adding an additional MSSQL server for backup. I woul...
I have a ListCtrl that displays a list of items for the user to select. This works fine except that when the ctrl is not large enough to show all the items, I want it to expand downwards with a vertical scoll bar rather than using a horizontal scroll bar as it expands to the right. The ListCtrl's creation: self.subject...
In your wxPython application, if you want the `wx.ListCtrl` to expand downwards instead of allowing horizontal scrolling when there are too many items to display, you need to adjust its size and layout accordingly. The key here is to set the list control to automatically manage its size and to prevent it from expanding...
27,067
[ { "from": "human", "value": "I have a ListCtrl that displays a list of items for the user to select. This works fine except that when the ctrl is not large enough to show all the items, I want it to expand downwards with a vertical scoll bar rather than using a horizontal scroll bar as it expands to the rig...
Given the html form ... <form id="mainform" action="/upload" enctype="multipart/form-data" method="post"> <div> <input type="file" name="img"/> </div> <div> <input type="submit" value="Send"> </div> </form> ... and the handler ... class Picture(db.Model): ...
In Google App Engine's webapp framework (which appears to be what you're using), you won't be able to directly retrieve the filename of the uploaded file using `self.request.get()`. The method `self.request.get("img")` will only return the binary data of the uploaded file. To get the filename of the uploaded file, you...
30,294
[ { "from": "human", "value": "Given the html form ...\n <form id=\"mainform\" action=\"/upload\" enctype=\"multipart/form-data\" method=\"post\">\n <div>\n <input type=\"file\" name=\"img\"/>\n </div>\n <div>\n <input type=\"submit\" value=\"Send\">\n </div>...
I'm facing a problem with IE7 full screen mode. Got an app lying in an activeX embedded in IE. Until IE6, we managed fullscreen via IWebBrowser2::put_FullScreen(bool bIsFull) which was good and well. But since IE7, it seems that this trick is deprecated, as it looses the tab bar on the way back from fullscreen. On...
Achieving a true fullscreen experience in Internet Explorer 7 (IE7) can indeed be challenging due to its limitations and the handling of fullscreen mode by the browser itself. As you've noted, the `IWebBrowser2::put_FullScreen` method is deprecated and doesn't provide the desired functionality anymore, particularly whe...
28,988
[ { "from": "human", "value": "I'm facing a problem with IE7 full screen mode.\nGot an app lying in an activeX embedded in IE. Until IE6, we managed fullscreen via \n\nIWebBrowser2::put_FullScreen(bool bIsFull)\n which was good and well.\n\nBut since IE7, it seems that this trick is deprecated, as it looses ...
I want to sprintf() an unsigned long long value in visual C++ 6.0 (plain C). char buf[1000]; //bad coding unsigned __int64 l = 12345678; char t1[6] = "test1"; char t2[6] = "test2"; sprintf(buf, "%lli, %s, %s", l, t1, t2); gives the result 12345678, (null), test1 (watch that test2 is not printed) and l = 123456789...
In Visual C++ 6.0, the `sprintf` function doesn't handle the `unsigned __int64` type correctly with the `"%lli"` format specifier. The standard way to format a `unsigned long long` or `unsigned __int64` value in such older C/C++ environments is to use a combination of proper format specifiers and casting. Here's a cor...
28,604
[ { "from": "human", "value": "I want to sprintf() an unsigned long long value in visual C++ 6.0 (plain C).\nchar buf[1000]; //bad coding \nunsigned __int64 l = 12345678; \nchar t1[6] = \"test1\"; \nchar t2[6] = \"test2\"; \nsprintf(buf, \"%lli, %s, %s\", l, t1, t2);\n\ngives the result\n12345678, (null), tes...
I wanted to try a little design by contract in my latest C# application and wanted to have syntax akin to: public string Foo() { set { Assert.IsNotNull(value); Assert.IsTrue(value.Contains("bar")); _foo = value; } } I know I can get static methods like this from a unit test framework, b...
In C#, there isn't a built-in mechanism for design by contract that allows you to directly use assertions in property setters as you have in your example. However, you can achieve similar functionality using existing libraries or implementing your own assertion logic. ### Using Existing Libraries 1. **Code Contracts*...
27,794
[ { "from": "human", "value": "I wanted to try a little design by contract in my latest C# application and wanted to have syntax akin to:\npublic string Foo()\n{\n set {\n Assert.IsNotNull(value);\n Assert.IsTrue(value.Contains(\"bar\"));\n _foo = value;\n }\n}\n\nI know I can get s...
I am migrating a client's SourceSafe repository (3 projects) to SVN and two of the projects share source files. (These projects are separate products - with different names and release versions, etc) Has SVN resolved this shortcoming? How do people generally handle this scenario? Of the options I know about/can think...
Migrating from SourceSafe to SVN can indeed be challenging, especially when dealing with shared source files across different projects. Each of the options you listed has its pros and cons, and the best choice may depend on the specifics of your development process, team structure, and workflow. Let’s break down the op...
26,042
[ { "from": "human", "value": "I am migrating a client's SourceSafe repository (3 projects) to SVN and two of the projects share source files. (These projects are separate products - with different names and release versions, etc)\nHas SVN resolved this shortcoming? How do people generally handle this scena...
I want to skin a vb.net app I made ive googled some stuff and I've seen skinned vb.net apps. However it seems like any time i try to find someone explaining it its a link to a pay for product. Does anyone have anything useful on this? I have seen some free ways to do this programatically I cannot seem to make it tra...
Creating a skinned VB.NET application can be achieved in various ways, often involving customizing the appearance of your forms, controls, and overall UI. Here are some common methods and tips to help you skin your VB.NET app without relying on paid products. ### 1. **Custom Drawing** You can use GDI+ to draw your ...
24,697
[ { "from": "human", "value": "I want to skin a vb.net app I made ive googled some stuff and I've seen skinned vb.net apps. \nHowever it seems like any time i try to find someone explaining it its a link to a pay for product.\nDoes anyone have anything useful on this?\n\nI have seen some free ways to do this...
I've recently seen the light of EventWaitHandle's powerful behavior in C# and decided to move some functionality in a sister application to do the same. The only problem is that the sister app is written in C. No big deal, I'm using pthreads, which have a pthread_cond_t datatype that allows for signalling. My only ques...
In POSIX threads (pthreads), the `pthread_cond_t` (condition variable) indeed does not have the behavior you're looking for by default. The behavior of a condition variable is to signal waiting threads, but if a thread signals a condition variable before any thread is waiting on it, that signal is essentially lost. Whe...
25,120
[ { "from": "human", "value": "I've recently seen the light of EventWaitHandle's powerful behavior in C# and decided to move some functionality in a sister application to do the same. The only problem is that the sister app is written in C.\nNo big deal, I'm using pthreads, which have a pthread_cond_t datatyp...
If you have multiple, unrelated projects, is it a good idea to put them in the same repository? myRepo/projectA/trunk myRepo/projectA/tags myRepo/projectA/branches myRepo/projectB/trunk myRepo/projectB/tags myRepo/projectB/branches or would you create new repositories for each? myRepoA/trunk myRepoA/tags myRepoA/branc...
Deciding whether to consolidate multiple unrelated projects into a single repository or to keep them in separate repositories depends on various factors, including your team's workflow, the nature of the projects, and how the projects will be maintained over time. Here's a breakdown of the pros and cons of each approac...
26,236
[ { "from": "human", "value": "If you have multiple, unrelated projects, is it a good idea to put them in the same repository?\nmyRepo/projectA/trunk\nmyRepo/projectA/tags\nmyRepo/projectA/branches\nmyRepo/projectB/trunk\nmyRepo/projectB/tags\nmyRepo/projectB/branches\n\nor would you create new repositories f...
I've two tables TAB_A and TAB_B. TAB_A is master table and TAB_B is child / transaction table. TAB_A is having COL_A (Primary key) and TAB_B is having COL_B (Primary key) and also COL_A. For some business reason, Foreign key is not defined between TAB_A and TAB_B on column COL_A. There are four records in TAB_B with so...
The behavior you are experiencing is due to how SQL handles joins between tables. Let's break down the two queries you provided. ### Query Analysis 1. **First Query:** ```sql SELECT B.COL_B, B.COL_A FROM TAB_A A, TAB_B B WHERE A.COL_A = B.COL_A AND B.COL_A IN (1, 2, 3, 4) `...
26,653
[ { "from": "human", "value": "I've two tables TAB_A and TAB_B. TAB_A is master table and TAB_B is child / transaction table. TAB_A is having COL_A (Primary key) and TAB_B is having COL_B (Primary key) and also COL_A.\nFor some business reason, Foreign key is not defined between TAB_A and TAB_B on column COL_...
We've got Ultraseek 5.7 indexing the content on our corporate intranet site, and we'd like to make sure our web pages are being optimized for it. Which SEO techniques are useful for Ultraseek, and where can I find documentation about these features? Features I've considered implementing: Make the title and first H1 ...
When optimizing for Ultraseek (now known as Verity Ultraseek), it's essential to focus on several key techniques to improve the indexing and searchability of your corporate intranet site. Here are some SEO techniques and best practices that you can implement: ### Recommended SEO Techniques for Ultraseek: 1. **Title T...
29,000
[ { "from": "human", "value": "We've got Ultraseek 5.7 indexing the content on our corporate intranet site, and we'd like to make sure our web pages are being optimized for it. \nWhich SEO techniques are useful for Ultraseek, and where can I find documentation about these features?\nFeatures I've considered ...