instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am writing an unit test for a mvc web application that checks if a returned list of anonymous variables(in a jsonresult) is correct. therefore i need to iterate through that list but i cannot seem to find a way to do so. so i have 2 methods 1) returns a json result . In that json result there is a property called dat...
When dealing with anonymous types in C#, you can't reference them outside the scope where they're created. However, you can still work with the data inside your unit test by deserializing the JSON into a more accessible structure. Below are steps you can take to achieve this: 1. **Change Your JSON Result**: Ensure tha...
37,133
[ { "from": "human", "value": "I am writing an unit test for a mvc web application that checks if a returned list of anonymous variables(in a jsonresult) is correct. therefore i need to iterate through that list but i cannot seem to find a way to do so.\nso i have 2 methods\n1) returns a json result . In that...
I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries. Now, since the underlying implementation (and since SQL Server...
Your observations regarding LINQ to SQL and Entity Framework (EF) bring up some interesting points, and the transition from one to the other can indeed be confusing. Let's clarify a few aspects regarding the differences and why Microsoft chose to push forward with Entity Framework. 1. **Design Goals and Complexity**: ...
37,676
[ { "from": "human", "value": "I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.\nNow, since the under...
I know enough to know that we need to get our application to deploy with a single user action. However, I don't know: What are some good tools to use in a .NET shop? How do you manage config changes for each of your environments? Can someone point me to some good resources for continous integration. I'd like to see s...
Certainly! To achieve a smooth deployment process in a .NET environment, as well as to manage configuration changes across different environments, you can utilize several tools and practices. Here are some recommendations: ### Tools for Continuous Integration and Deployment in a .NET Environment 1. **Azure DevOps**: ...
33,248
[ { "from": "human", "value": "I know enough to know that we need to get our application to deploy with a single user action. However, I don't know:\n\nWhat are some good tools to use in a .NET shop?\nHow do you manage config changes for each of your environments?\n\nCan someone point me to some good resource...
I'm trying to read the data in a Win32 ListView owned by another process. Unfortunately, my WriteProcessMemory() call fails with the error "This function is not supported on this system." when I specify "NULL" for the base address in my VirtualAlloc() call. If, however, I offset that VirtualAlloc() address by some "mag...
The issues you're facing are due to the complexities of memory management and the way different processes interact on the Windows operating system, especially in the context of a non-x86 architecture like Windows Mobile on ARM. 1. **Address Space Isolation**: In Windows, each process runs in its own virtual memory spa...
36,335
[ { "from": "human", "value": "I'm trying to read the data in a Win32 ListView owned by another process. Unfortunately, my WriteProcessMemory() call fails with the error \"This function is not supported on this system.\" when I specify \"NULL\" for the base address in my VirtualAlloc() call. If, however, I of...
I'm trying to create a pimped-out version of the slider that has a user control in the "thumb"-part (meaning: the moving thingy on the slider) that reacts to the slider's movements. Basically my current demo / development version is just a UserControl with 5 visual states that just make it change a smiley face to an an...
Creating a customized slider in WPF (Windows Presentation Foundation) by incorporating a UserControl as the thumb element is a neat idea, but it does come with its challenges. Let's address your questions step-by-step. ### 1. Is there any better way to replace the thumb of the Slider-control than editing its template?...
36,718
[ { "from": "human", "value": "I'm trying to create a pimped-out version of the slider that has a user control in the \"thumb\"-part (meaning: the moving thingy on the slider) that reacts to the slider's movements. Basically my current demo / development version is just a UserControl with 5 visual states that...
Just a few quick questions from me: What is the best way to inserting a Flash SWF file into a flex, that will enable me to have it start from frame 0 on reentry of that framework? Would this be States, Viewstack? Is there a way of using forward and back buttons to navigate through displaying a set of States rather than...
Incorporating Flash SWF files into a Flex application and managing states and navigation requires a good understanding of both technologies. Here are the answers to your questions: ### 1. Inserting a Flash SWF File into Flex You can use the `SWFLoader` component to load a Flash SWF file into your Flex application. To...
30,402
[ { "from": "human", "value": "Just a few quick questions from me:\nWhat is the best way to inserting a Flash SWF file into a flex, that will enable me to have it start from frame 0 on reentry of that framework? Would this be States, Viewstack?\nIs there a way of using forward and back buttons to navigate thr...
I have set-up tomcat to catch all my exceptions and pass them to a servlet with the following in web.xml. <servlet-mapping> <servlet-name>exception</servlet-name> <url-pattern>/exception</url-pattern> </servlet-mapping> <error-page> <exception-type>java.lang.Exception</exception-type> <location>/excepti...
To capture the original request URI that caused the exception in your servlet, you will need to utilize the `HttpServletRequest` object and its `getAttribute()` method to retrieve the original request URI. However, for this to work, you need to set the original request URI as an attribute in a servlet filter or within ...
31,076
[ { "from": "human", "value": "I have set-up tomcat to catch all my exceptions and pass them to a servlet with the following in web.xml.\n<servlet-mapping>\n <servlet-name>exception</servlet-name>\n <url-pattern>/exception</url-pattern>\n</servlet-mapping>\n<error-page>\n <exception-type>java.lang.Ex...
I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it. I've been asked this question on my job interview and I thought it might be useful to learn a bit more. These are the ones I could come up with: Java is "platform indepe...
You've raised some important points regarding the differences between Java and C#. Here are additional distinctions and considerations that may enhance your understanding: 1. **Memory Management**: - **Java**: Java uses automatic garbage collection, which helps manage memory by automatically reclaiming memory that...
36,126
[ { "from": "human", "value": "I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it.\nI've been asked this question on my job interview and I thought it might be useful to learn a bit more.\nThese are the ones I co...
I'm trying to get better at using MVC/MVP style patterns with my WinForm apps and I'm struggling with something that maybe someone here with more experience can help me with. Below is my basic project layout: The class G2.cs handles the running of various threads and includes a Start/Stop and other various methods inv...
It's great that you’re exploring MVC/MVP patterns with your WinForms application! Let’s go over your questions and clarify how to manage the references and responsibilities in your application structure. ### Passing References to Controllers In a typical MVP architecture: 1. **G2 Class Reference**: You can pass a re...
37,589
[ { "from": "human", "value": "I'm trying to get better at using MVC/MVP style patterns with my WinForm apps and I'm struggling with something that maybe someone here with more experience can help me with.\nBelow is my basic project layout:\n\nThe class G2.cs handles the running of various threads and include...
I would like to be able to achieve something like this: class Zot { namespace A { static int x; static int y; } } I am working with a legacy system that uses code generation heavily off a DB schema, and certain fields are exposed as methods/variables in the class definition. I need to ...
Your approach of using a `struct` as a namespace is a common practice in C++ when you're looking to group related static variables without polluting the surrounding scope. However, given your additional requirement to access these static variables from a template, your solution is still valid. Here’s a refined version...
38,253
[ { "from": "human", "value": "I would like to be able to achieve something like this:\nclass Zot\n{\n namespace A\n {\n static int x;\n static int y;\n } \n}\n\nI am working with a legacy system that uses code generation heavily off a DB schema, and certain fields are exposed as met...
When building a application that accesses a MySQL database on linux using C/C++ i have to dynamically link into the mysql client library. Is there a way in which i can statically link the application so that the mysql client libraries are no longer required? What is the best practice, with regards to C\C++ development...
Certainly! Here are some insights on both statically linking a MySQL client library and best practices for handling long queries in your C/C++ application. ### Statically Linking MySQL Client Libraries 1. **Obtain the Static Library**: First, ensure that you have the static version of the MySQL client library (usu...
36,530
[ { "from": "human", "value": "When building a application that accesses a MySQL database on linux using C/C++ i have to dynamically link into the mysql client library. Is there a way in which i can statically link the application so that the mysql client libraries are no longer required?\nWhat is the best p...
I'd love to know if there is a module to parse "human formatted" dates in Perl. I mean things like "tomorrow", "Tuesday", "next week", "1 hour ago". My research with CPAN suggest that there is no such module, so how would you go about creating one? NLP is way over the top for this.
If you're looking to parse "human formatted" dates in Perl, while it's true that there isn't a widely-used CPAN module specifically designed for this purpose, you can create a simple parser using Perl's built-in functionalities and some regex. Here’s a basic outline of how you could implement such a module. ### Steps ...
36,458
[ { "from": "human", "value": "I'd love to know if there is a module to parse \"human formatted\" dates in Perl. I mean things like \"tomorrow\", \"Tuesday\", \"next week\", \"1 hour ago\".\nMy research with CPAN suggest that there is no such module, so how would you go about creating one? NLP is way over the...
I am still learning sql server somewhat and recently came across a select query in a stored procedure which was causing a very slow fill of a dataset in c#. At first I thought this was to do with .NET but then found a suggestion to put in the stored procedure: set implicit_transactions off this seems to cure it but I w...
It's great to see that you're diving deeper into SQL Server and stored procedures! Let's break down the various SQL settings you've mentioned, along with a brief explanation of what they do. I'll also mention where you can typically find more detailed information about these settings. ### SQL Server Settings Overview ...
36,770
[ { "from": "human", "value": "I am still learning sql server somewhat and recently came across a select query in a stored procedure which was causing a very slow fill of a dataset in c#. At first I thought this was to do with .NET but then found a suggestion to put in the stored procedure:\nset implicit_tran...
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging webservice calls to our database, and finally got the SoapExtension configured and running using a very stripped-down implementation that was ported over from another project. I've set it up in the configuration file so it will run for all metho...
The issue you're encountering with the `SoapServerMessage` and its `MethodInfo` property appears to stem from the timing of when the `LogInput` method is being called in the `ProcessMessage` lifecycle. Specifically, it seems that the `MethodInfo` property is not initialized when you're trying to access it in the `Befor...
36,191
[ { "from": "human", "value": "NOTE: Using .NET 2.0, and VS2005 as IDE\nHello all,\nI'm working on logging webservice calls to our database, and finally got the SoapExtension configured and running using a very stripped-down implementation that was ported over from another project. I've set it up in the conf...
Background: I have a kubuntu laptop right now that I can't use wirelessly, i.e. I haven't got wireless assistant installed. But I have a windows laptop that I can download the debian packages seperately on a USB memory stick. How do I install a debian package on the computer locally?
To install a Debian package on your Kubuntu laptop using a USB memory stick, you can follow these steps: 1. **Download the Debian Package on Your Windows Laptop:** - Find the `.deb` package you want to install from a trusted source. You can typically find packages on websites like [Debian Packages](https://packages...
37,967
[ { "from": "human", "value": "Background: I have a kubuntu laptop right now that I can't use wirelessly, i.e. I haven't got wireless assistant installed. But I have a windows laptop that I can download the debian packages seperately on a USB memory stick.\nHow do I install a debian package on the computer lo...
For example: First, say I have a Silverlight app with Windowless=true so that I can place ASP.NET controls on top of it. Then I place an ASP.NET button on the page. How can I have say the text of a control in the Silverlight app change when the user presses the ASP.NET button? How would I send the Silverlight app a...
To update a control in a Silverlight app from an ASP.NET button click, you will need to utilize the interoperability features between ASP.NET and Silverlight. Here's a step-by-step guide to achieve this: ### Step 1: Create the Silverlight Application 1. **Create a Silverlight Control**: Make sure you have a Silverlig...
37,044
[ { "from": "human", "value": "For example: \nFirst, say I have a Silverlight app with Windowless=true so that I can place ASP.NET controls on top of it. Then I place an ASP.NET button on the page. How can I have say the text of a control in the Silverlight app change when the user presses the ASP.NET butto...
I'm in the process of setting up a new website which would greatly benefit from having user-forums. Since I already have user accounts, and profile details, stored away it seems that I'd benefit from choosing an open-source forum package which I could modify so that logins were tested against my existing database. Righ...
While Perl-based forum software is less common than PHP-based solutions, there are still a few options you can consider. Here are some Perl-based forums and their features: 1. **pluk**: Pluk is a simple and lightweight forum system written in Perl. It's designed to be easy to set up and can be modified to authenticate...
33,995
[ { "from": "human", "value": "I'm in the process of setting up a new website which would greatly benefit from having user-forums.\nSince I already have user accounts, and profile details, stored away it seems that I'd benefit from choosing an open-source forum package which I could modify so that logins were...
I am running JVM 1.5.0 (Mac OS X Default), and I am monitoring my Java program in the Activity Monitor. I have the following: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Date; public class MemoryTest { public static void me...
The behavior you're observing is related to how the Java Virtual Machine (JVM) and the operating system manage memory. 1. **Garbage Collection**: When you invoke `System.gc()`, you are requesting the JVM to perform garbage collection. In your case, the garbage collector does free up the memory that was previously use...
39,637
[ { "from": "human", "value": "I am running JVM 1.5.0 (Mac OS X Default), and I am monitoring my Java program in the Activity Monitor. I have the following:\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Date;\n\n...
I have a small project that basically a Python wrapper to a websites API. It's fairly well tested, but there are some conditions I cannot work out how to easily test: when the remote API is unreachable, or otherwise broken. More specifically, I would quite like a test for each of the following: When the site is unreac...
Testing the resilience of your Python wrapper for a website's API is crucial, especially for edge cases like timeouts, HTTP errors, and malformed content. While you mentioned some ideas, you can implement effective testing strategies using mocking libraries such as `unittest.mock` or `responses` to simulate these condi...
36,339
[ { "from": "human", "value": "I have a small project that basically a Python wrapper to a websites API.\nIt's fairly well tested, but there are some conditions I cannot work out how to easily test: when the remote API is unreachable, or otherwise broken.\nMore specifically, I would quite like a test for each...
I want to implement Scrum, but I can't decide on a Sprint length. Ken Schwaber seems to relate that 30 days it the defacto... but I can't imagine waiting 30 days without the possibility of changing direction or reprioritizing. Our projects usually only last 1-3 months using the waterfall method and moving to Scrum wou...
Implementing Scrum is a great step toward a more agile approach, and choosing the right Sprint length is crucial for your team's success. Here are some considerations for the Sprint length, as well as insights on the experiences of others who have made this transition: ### Common Sprint Lengths 1. **1-Week Sprints**:...
37,459
[ { "from": "human", "value": "I want to implement Scrum, but I can't decide on a Sprint length. Ken Schwaber seems to relate that 30 days it the defacto... but I can't imagine waiting 30 days without the possibility of changing direction or reprioritizing. \nOur projects usually only last 1-3 months using th...
I have a project in a c++ solution. For that project, I have some config files that I would like to manage from within the project and when I build the project, have those config files added to the executable build path in the proper directory structure. Example: test.exe references config/myconfig.txt Is there a way t...
To achieve the setup you want, where configuration files are included in the build output directory with the proper directory structure, you can use your C++ project's build system (e.g., CMake, Makefiles, Visual Studio project files, etc.) to automate the copying of those config files during the build process. ### Us...
36,592
[ { "from": "human", "value": "I have a project in a c++ solution. For that project, I have some config files that I would like to manage from within the project and when I build the project, have those config files added to the executable build path in the proper directory structure.\nExample:\ntest.exe refe...
My C++ framework has Buttons. A Button derives from Control. So a function accepting a Control can take a Button as its argument. So far so good. I also have List<T>. However, List<Button> doesn't derive from List<Control>, which means a function accepting a list of Controls can't take a list of Buttons as its argument...
This is a common situation encountered in object-oriented programming, particularly when dealing with collections of derived types. In C++, you cannot directly derive one template instantiation from another, which is why `List<Button>` does not derive from `List<Control>`. However, you can design a solution using poly...
37,627
[ { "from": "human", "value": "My C++ framework has Buttons. A Button derives from Control. So a function accepting a Control can take a Button as its argument. So far so good.\nI also have List<T>. However, List<Button> doesn't derive from List<Control>, which means a function accepting a list of Controls ca...
I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query. Here is my query at the moment: var items = db.InventoryItem .Include("Kind") .Include("PropertyValues") .Include("PropertyValues.KindProperty") .Where(itm =...
The issue you are encountering arises from the fact that LINQ to Entities does not recognize the `Contains` method when it's applied to a collection of values like `valueIds`. This typically happens when the `valueIds` collection is of a type that can't be directly translated into SQL. To resolve this issue, you can c...
39,177
[ { "from": "human", "value": "I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query. Here is my query at the moment:\nvar items = db.InventoryItem\n .Include(\"Kind\")\n .Include(\"PropertyValues\")\n .Include(\"Property...
What is the standard encoding of C++ source code? Does the C++ standard even say something about this? Can I write C++ source in Unicode? For example, can I use non-ASCII characters such as Chinese characters in comments? If so, is full Unicode allowed or just a subset of Unicode? (e.g., that 16-bit first page or whate...
The C++ standard does not prescribe a specific encoding for source code files. However, it does state that a C++ source file must be composed of a sequence of source characters, which includes both ASCII and other characters from the Unicode standard. ### Unicode and C++ Source Code 1. **Character Set**: According to...
38,894
[ { "from": "human", "value": "What is the standard encoding of C++ source code? Does the C++ standard even say something about this? Can I write C++ source in Unicode?\nFor example, can I use non-ASCII characters such as Chinese characters in comments? If so, is full Unicode allowed or just a subset of Unico...
Would anyone know if there are plans or extensions to Visual Studio to allow for multi-lingual projects? While the .NET platform is truly polyglot, Visual Studio project are stubbornly monoglot which means that all the work that goes into tooling C# and VB is unusable from newer languages like F# and IronPython. PEX is...
As of my last knowledge update in October 2023, Visual Studio has historically been more focused on supporting primary languages like C# and VB.NET, while providing limited built-in support for other languages such as F# and IronPython. However, there are some avenues and tools that can facilitate multilingual developm...
37,721
[ { "from": "human", "value": "Would anyone know if there are plans or extensions to Visual Studio to allow for multi-lingual projects?\nWhile the .NET platform is truly polyglot, Visual Studio project are stubbornly monoglot which means that all the work that goes into tooling C# and VB is unusable from newe...
Are there any UPS WorldShip integration APIS or Libraries out there for .net? I've been tasked with integrating our Sample Order application (A VB.Net/SQL Server app) with UPS, and having it write .xml files for the auto import feature though serialization has gotten my foot in the door- but some of the more advanced s...
Integrating with UPS WorldShip can indeed be challenging due to the complexity of shipping options, especially for international orders. Here are some approaches and resources that may help you in your integration process: ### 1. **UPS Developer Kit** UPS provides a Developer Kit that includes APIs and documentation f...
37,234
[ { "from": "human", "value": "Are there any UPS WorldShip integration APIS or Libraries out there for .net? I've been tasked with integrating our Sample Order application (A VB.Net/SQL Server app) with UPS, and having it write .xml files for the auto import feature though serialization has gotten my foot in ...
The following code fails to compile stating "A local variable named 'st' cannot be declared in this scope because it would give a different meaning to 'st', which is already used in a 'child' scope to denote something else": var l = new List<string>(); l.Find(st => st.EndsWith("12")); string s...
You've raised some insightful questions regarding variable scope and shadowing in C#. Let’s clarify how the C# compiler deals with these aspects of scope, which will also help answer your questions. ### Variable Shadowing When you define a variable within a scope (like a block defined by `{}`), that variable is said ...
36,516
[ { "from": "human", "value": "The following code fails to compile stating \"A local variable named 'st' cannot be declared in this scope because it would give a different meaning to 'st', which is already used in a 'child' scope to denote something else\": \n var l = new List<string>();\n l.Fi...
I am working on my website, and I am trying to get the url parameter "page" which is an integer that tells which entry to read in the MySQL database that hols the HTML for all the pages. Here is my code, with the MySQL username and password removed for security reasons: if ($_GET["page"]) { $con = mysql_connect("lo...
It looks like you are using the old `mysql_*` functions, which are deprecated in PHP and do not return the actual results you want. Instead, they return resource identifiers. You should use `mysqli_*` or `PDO` to work with your MySQL database. For your case, I will show you how to rewrite your code using `mysqli_*`. H...
37,880
[ { "from": "human", "value": "I am working on my website, and I am trying to get the url parameter \"page\" which is an integer that tells which entry to read in the MySQL database that hols the HTML for all the pages. Here is my code, with the MySQL username and password removed for security reasons:\n if ...
I'm new to OODBMS systems, but I'm using Db4o on a new project for which it's perfectly suited. Things are going great and I really like the concept, but I'm struggling with how to do basic data management tasks associated with development. Periodically I want to wipe out all of a certain Type in the DB, how do I do ...
Db4o (database for objects) is a powerful object-oriented database management system, and it's great to hear that you're enjoying working with it. Let's address your questions about data management tasks and schema changes. ### Deleting All Instances of a Certain Type To wipe out all instances of a specific type in th...
36,990
[ { "from": "human", "value": "I'm new to OODBMS systems, but I'm using Db4o on a new project for which it's perfectly suited. Things are going great and I really like the concept, but I'm struggling with how to do basic data management tasks associated with development. Periodically I want to wipe out all ...
using jython I have a situation where emails come in with different attachments. Certain file types I process others I ignore and dont write to file. I am caught in a rather nasty situation, because sometimes people send an email as an attachment, and that attached email has legal attachments. What I want to do is ski...
To handle this scenario, you'll want to parse the ROOT email while explicitly checking for any child emails (i.e., attachments that are themselves email messages) and skipping them, along with their own attachments. Below is an example of how you might do this in Jython using the standard email library. ```python impo...
38,092
[ { "from": "human", "value": "using jython\nI have a situation where emails come in with different attachments. Certain file types I process others I ignore and dont write to file.\nI am caught in a rather nasty situation, because sometimes people send an email as an attachment, and that attached email has l...
This question is directly related to my previous question ASP.NET AJAX Is it possible to perform the post back asynchronously? I have multiple CustomTextbox controls on the page, when i post back i want to update another control on the form. If i place all the controls in an updater panel after the first post back t...
In ASP.NET Web Forms, a postback typically leads to the entire page being re-rendered. However, with the use of AJAX (especially via `UpdatePanel`), you can achieve asynchronous postbacks which allow parts of your page to update without refreshing the entire page. From your description, it seems like you are facing is...
36,821
[ { "from": "human", "value": "This question is directly related to my previous question ASP.NET AJAX\nIs it possible to perform the post back asynchronously? I have multiple CustomTextbox controls on the page, when i post back i want to update another control on the form. \nIf i place all the controls in a...
My understanding of SetMaxThreads() in C# was that it can not be set to less than the number of processors. But in my code I am unable to set the number to less than 8, I have no idea why this is. If I set it to lower it returns false! (Running an Intel Core 2)
The `SetMaxThreads` method in C# is used to set the maximum number of threads that the thread pool can use for parallel execution. This method is part of the `ThreadPool` class in the `System.Threading` namespace. ### Understanding `SetMaxThreads()` When using `SetMaxThreads()`, you need to consider the following: 1...
38,418
[ { "from": "human", "value": "My understanding of SetMaxThreads() in C# was that it can not be set to less than the number of processors.\nBut in my code I am unable to set the number to less than 8, I have no idea why this is.\nIf I set it to lower it returns false!\n(Running an Intel Core 2)\n" }, { ...
For some solutions, when I open them Visual Studio will get files that aren't in the project (particularly from obj/Debug) and add it to the changeset and I always have to perform a Undo Pending Changes operation on them. It's annoying. Is there any way to prevent Visual Studio from behaving in this way?
The issue you're experiencing with Visual Studio tracking files from the `obj/Debug` directory (or similar build directories) can be frustrating, but it can be managed by modifying how Visual Studio interacts with source control and adjusting your project settings. ### Here are some steps you can take to resolve this ...
38,577
[ { "from": "human", "value": "For some solutions, when I open them Visual Studio will get files that aren't in the project (particularly from obj/Debug) and add it to the changeset and I always have to perform a Undo Pending Changes operation on them. It's annoying. Is there any way to prevent Visual Studio ...
Can I convert a string representing a boolean value (e.g., 'true', 'false') into an intrinsic type in JavaScript? I have a hidden form in HTML that is updated based on a user's selection within a list. This form contains some fields which represent boolean values and are dynamically populated with an intrinsic boolean ...
Yes, there is a more robust way to convert a string representing a boolean value into a boolean in JavaScript. Your current approach of using strict equality (`==`) is functional, but it can be improved for better clarity and flexibility. You can create a simple utility function that interprets the string value and r...
36,210
[ { "from": "human", "value": "Can I convert a string representing a boolean value (e.g., 'true', 'false') into an intrinsic type in JavaScript?\nI have a hidden form in HTML that is updated based on a user's selection within a list. This form contains some fields which represent boolean values and are dynami...
I'm using .NET Regular Expressions to strip HTML code. Using something like: <title>(?<Title>[\w\W]+?)</title>[\w\W]+?<div class="article">(?<Text>[\w\W]+?)</div> This works for 99% of the time, but sometimes, when parsing... Regex.IsMatch(HTML, Pattern) The parser just blocks and it will continue on this line of cod...
The issue you're encountering with your regular expression could be attributed to "catastrophic backtracking," which is a common performance problem in regex engines, especially when using patterns that allow for excessive backtracking. When you use constructs like `.+?` or `.+`, the regex engine might have to check ...
38,822
[ { "from": "human", "value": "I'm using .NET Regular Expressions to strip HTML code.\nUsing something like:\n<title>(?<Title>[\\w\\W]+?)</title>[\\w\\W]+?<div class=\"article\">(?<Text>[\\w\\W]+?)</div>\n\nThis works for 99% of the time, but sometimes, when parsing...\nRegex.IsMatch(HTML, Pattern)\n\nThe par...
Can PL/SQL procedure in Oracle know it's own name? Let me explain: CREATE OR REPLACE procedure some_procedure is v_procedure_name varchar2(32); begin v_procedure_name := %%something%%; end; After %%something%% executes, variable v_procedure_name should contain 'SOME_PROCEDURE'. It is also OK if it contains obj...
In PL/SQL, you cannot directly obtain the name of the procedure or function from within its own code using a built-in mechanism. However, there are workarounds that you can use to achieve a similar effect. 1. **Using the `USER_PROCEDURES` or `ALL_PROCEDURES` View:** You can query the `USER_PROCEDURES` or `ALL_PROCE...
39,674
[ { "from": "human", "value": "Can PL/SQL procedure in Oracle know it's own name?\nLet me explain:\nCREATE OR REPLACE procedure some_procedure is\n v_procedure_name varchar2(32);\nbegin\n v_procedure_name := %%something%%;\nend;\n\nAfter %%something%% executes, variable v_procedure_name should contain '...
Do the new real-time and low latency patches from Ingo Molnar render previous real-time extensions for Linux (such as RTAI, Xenomai) obsolete?
Ingo Molnar and the Linux kernel community have made significant advancements in the real-time capabilities of the Linux kernel, especially with the introduction of the PREEMPT-RT patches. These patches enhance the kernel's real-time performance by reducing latencies and improving task scheduling, making it suitable fo...
38,154
[ { "from": "human", "value": "Do the new real-time and low latency patches from Ingo Molnar render previous real-time extensions for Linux (such as RTAI, Xenomai) obsolete?\n" }, { "from": "gpt", "value": "Ingo Molnar and the Linux kernel community have made significant advancements in the real-t...
How can REVOKE operations on a table be audited in Oracle? Grants can be audited with... AUDIT GRANT ON *schema.table*; Both grants and revokes on system privileges and rolls can be audited with... AUDIT SYSTEM GRANT; Neither of these statements will audit object level revokes. My database is 10g. I am interested ...
In Oracle Database 10g, there is no built-in auditing feature that specifically captures `REVOKE` operations on object-level privileges. While you can audit `GRANT` operations using the `AUDIT GRANT ON schema.table` command, auditing `REVOKE` operations is not directly supported through the standard auditing commands. ...
37,704
[ { "from": "human", "value": "How can REVOKE operations on a table be audited in Oracle? Grants can be audited with...\nAUDIT GRANT ON *schema.table*;\n\nBoth grants and revokes on system privileges and rolls can be audited with...\nAUDIT SYSTEM GRANT;\n\nNeither of these statements will audit object level ...
As a primarily Windows developer, perhaps I'm missing something cultural in the Linux community, but it has always confused me. When downloading something that the files are first put into a .tar archive then zipped. Why the two-step process? Doesn't zipping achieve the file grouping? Is there some other benefit that I...
The two-step process of first creating a `.tar` archive and then compressing it (often resulting in a `.tar.gz` or `.tar.bz2` file) is common in the Linux community for several reasons, each stemming from the specific roles that these formats play: 1. **File Archiving vs. Compression**: - The `.tar` format (short ...
39,616
[ { "from": "human", "value": "As a primarily Windows developer, perhaps I'm missing something cultural in the Linux community, but it has always confused me.\nWhen downloading something that the files are first put into a .tar archive then zipped. Why the two-step process? Doesn't zipping achieve the file gr...
I'm setting up some Virtual PC images. I want to customize the machine with some pre-installed tools and then use this as a base for creating new machines. What's the best practice for prepping the machine for use? Should I use SysPrep or NewSid? When's the appropriate time for use and the contrast between them?
When preparing a Virtual PC image for deployment, it's essential to set up the machine correctly to ensure that the clones function without issues, particularly regarding unique identification and hardware configurations. The two tools you've mentioned—**Sysprep** and **NewSID**—are used for different purposes in this ...
38,451
[ { "from": "human", "value": "I'm setting up some Virtual PC images. I want to customize the machine with some pre-installed tools and then use this as a base for creating new machines.\nWhat's the best practice for prepping the machine for use? \nShould I use SysPrep or NewSid? When's the appropriate tim...
I have a piece of code which sends e-mails using a third party e-mail sending component. When the e-mails are delivered, the HTML which should be appearing in the body of the e-mail is also being added as an attachment with the filename ATT00001. I suspect the attachment is being created by the receiving e-mail server ...
The issue you are experiencing with the HTML content being sent as an attachment in emails can indeed be related to how the email is constructed, particularly regarding content types and character encoding. Here are some possible reasons and solutions: 1. **MIME Type and Content-Type Header**: Ensure that you are s...
38,440
[ { "from": "human", "value": "I have a piece of code which sends e-mails using a third party e-mail sending component.\nWhen the e-mails are delivered, the HTML which should be appearing in the body of the e-mail is also being added as an attachment with the filename ATT00001.\nI suspect the attachment is be...
I'm playing with this ActionScript which generates a random 'squiggle'. Each time a 'squiggle' is placed, it appears within a sprite with a white background. If I change the background colour of the flash file to pink for example, it would still show up as white. Does anybody know how I might make the sprite background...
In ActionScript, to make the background of a sprite transparent, you need to ensure that the sprite itself does not have a background color set. Instead of using a white background rectangle, you can simply avoid drawing a background, which will allow the underlying stage color to show through. Here’s how you can modi...
39,410
[ { "from": "human", "value": "I'm playing with this ActionScript which generates a random 'squiggle'.\nEach time a 'squiggle' is placed, it appears within a sprite with a white background.\nIf I change the background colour of the flash file to pink for example, it would still show up as white.\nDoes anybody...
Using IMDbPy it is painfully easy to access movies from the IMDB site: import imdb access = imdb.IMDb() movie = access.get_movie(3242) # random ID print "title: %s year: %s" % (movie['title'], movie['year']) However I see no way to get the picture or thumbnail of the movie cover. Suggestions?
To retrieve the movie poster or thumbnail using IMDbPy, you can access the `movie['cover url']` attribute after you fetch the movie details. Here's an updated version of your code that demonstrates how to get the movie's cover image URL: ```python import imdb access = imdb.IMDb() movie = access.get_movie(3242) # ran...
40,565
[ { "from": "human", "value": "Using IMDbPy it is painfully easy to access movies from the IMDB site:\nimport imdb\n\naccess = imdb.IMDb()\nmovie = access.get_movie(3242) # random ID\n\nprint \"title: %s year: %s\" % (movie['title'], movie['year'])\n\nHowever I see no way to get the picture or thumbnail of th...
I want some particular urls like "springer.com" to automatically convert to "springer.com.proxy1.mycollege.edu". The second url takes me to springer site through my college library gateway; I am able to access some parts that would otherwise be restricted. Is there some way to convert the url as above automatically in ...
To automatically convert URLs in Firefox 3 so that they redirect to a specific proxy site (like adding `proxy1.mycollege.edu` to `springer.com`), you can use a browser extension or create a custom user script. However, since Firefox 3 is a very old version, support for extensions may be limited, and you might have trou...
37,144
[ { "from": "human", "value": "I want some particular urls like \"springer.com\" to automatically convert to \"springer.com.proxy1.mycollege.edu\". The second url takes me to springer site through my college library gateway; I am able to access some parts that would otherwise be restricted.\nIs there some way...
I am working on a VB.NET WinForms app that was "upgraded" by Visual Studio (originally 1.0 or 1.1) from VB6 code (which was itself upgraded from VB5). Except for the few new forms I've created since taking over maintenance of this app, all of the forms in the application have a method called DefInstance which allows yo...
The `DefInstance` pattern you're encountering in the VB.NET WinForms application is indeed a remnant from VB6, where forms were managed a bit differently. Let's address your questions one by one: ### (1) Is this DefInstance thing merely an unfortunate remnant of the VB6 heritage of this app? Yes, the `DefInstance` me...
39,499
[ { "from": "human", "value": "I am working on a VB.NET WinForms app that was \"upgraded\" by Visual Studio (originally 1.0 or 1.1) from VB6 code (which was itself upgraded from VB5). Except for the few new forms I've created since taking over maintenance of this app, all of the forms in the application have ...
paredit binds M-<up> and M-<down>, but I want windmove to own those keybindings. I have paredit-mode set to activate in certain modes only, but windmove is set to run globally. I want windmove to win, but paredit steals those keybindings when it loads. How can I easily stop paredit from stomping on windmove's keybind...
You can prevent `paredit` from overriding the keybindings used by `windmove` by using Emacs' built-in features for managing keymaps. Rather than modifying `paredit.el` directly, you can set up your own keybindings after `paredit` is loaded to override the default ones for the key combinations you want. Here's how you ...
38,884
[ { "from": "human", "value": "paredit binds M-<up> and M-<down>, but I want windmove to own those keybindings. I have paredit-mode set to activate in certain modes only, but windmove is set to run globally. I want windmove to win, but paredit steals those keybindings when it loads.\nHow can I easily stop p...
This is making me kind of crazy: I did a mysqldump of a partitioned table on one server, moved the resulting SQL dump to another server, and attempted to run the insert. It fails, but I'm having difficulty figuring out why. Google and the MySQL forums and docs have not been much help. The failing query looks like th...
It sounds like you've been through a lot of troubleshooting to identify the issue with the partitioned table creation in MySQL. The specific error `Can't create/write to file ... (Errcode: 13)` indeed suggests a permissions problem. Here are some possible solutions and points to consider based on your findings and the ...
39,435
[ { "from": "human", "value": "This is making me kind of crazy: I did a mysqldump of a partitioned table on one server, moved the resulting SQL dump to another server, and attempted to run the insert. It fails, but I'm having difficulty figuring out why. Google and the MySQL forums and docs have not been m...
At one point I had looked at implementing a class/template in C++ that would support an Enum that would behave like it does in Ada. It has been some time since I thought about this problem and I was wondering if anyone has ever solved this problem? EDIT: My apologies, I should clarify what functionality I thought were ...
In C++, you can implement a class template that emulates some of the features you described from Ada enums, including string conversion, increment and decrement operations, and getting the first and last values. Below is an example implementation that captures these features. ### C++ Enum Wrapper Implementation ```cp...
34,499
[ { "from": "human", "value": "At one point I had looked at implementing a class/template in C++ that would support an Enum that would behave like it does in Ada. It has been some time since I thought about this problem and I was wondering if anyone has ever solved this problem?\nEDIT:\nMy apologies, I should...
Is there an application , which can parse a given set of stored procedures (SQL Server 2000) and gets all tables and associated columns that are being used in it. The stored procedure can have tables from different databases. Output should be like TableA columnA columnC columnD TableB columnE columnF...
Yes, parsing SQL Server stored procedures to identify tables and their associated columns can be accomplished through various methods. While your application using the Database Edition GDR is a good start, there are other approaches and tools that you can also consider. ### Other Approaches to Parse Stored Procedures ...
34,630
[ { "from": "human", "value": "Is there an application , which can parse a given set of stored procedures (SQL Server 2000) and gets all tables and associated columns that are being used in it.\nThe stored procedure can have tables from different databases.\nOutput should be like \nTableA \n columnA\n co...
I am attempting to write a Windows Service in C#. I need to find the path to a certain file, which is stored in an environment variable. In a regular C# console application, I can achieve that with the following line: string t = System.Environment.GetEnvironmentVariable("TIP_HOME"); If I write that to the console I ...
When running a Windows Service, the environment in which the service executes can be different from the environment you experience in a typical console application or user session. Here are a few potential reasons why `System.Environment.GetEnvironmentVariable("TIP_HOME")` is returning an empty string in your Windows S...
38,450
[ { "from": "human", "value": "I am attempting to write a Windows Service in C#. I need to find the path to a certain file, which is stored in an environment variable. In a regular C# console application, I can achieve that with the following line:\nstring t = System.Environment.GetEnvironmentVariable(\"TIP...
i want the result of an equation rounded to the nearest integer. e.g. 137 * (3/4) = 103 Consider the following incorrect code. int width1 = 4; int height1 = 3; int width2 = 137; int height2 = width2 * (height1 / width1); What is the proper way to perform "integer" math in C#? Do i really have to do: int height2 = ...
In C#, when you're performing calculations involving integers, you should be aware that integer division will truncate the result rather than round it. This means that if you divide two integers, the result will also be an integer, and any decimal part will be lost. In your example, `height2` is calculated using integ...
38,542
[ { "from": "human", "value": "i want the result of an equation rounded to the nearest integer.\ne.g. \n137 * (3/4) = 103\n\nConsider the following incorrect code. \nint width1 = 4;\nint height1 = 3;\n\nint width2 = 137;\nint height2 = width2 * (height1 / width1);\n\nWhat is the proper way to perform \"intege...
I have worked on iPhone application but not aware of the formalities to submit it to Apple Store. Please somebody help me out to solve the following queries: Are their any submission charge to be paid? And Procedure to submit application to Apple Store. Thanks & Regards, Khushi
Hello Khushi, I'm happy to help you with your queries about submitting an iPhone application to the Apple App Store. ### 1. Submission Charges Yes, there is a fee associated with submitting apps to the Apple App Store. You need to enroll in the Apple Developer Program, which costs **$99 per year**. This fee allows yo...
36,743
[ { "from": "human", "value": "I have worked on iPhone application but not aware of the formalities to submit it to Apple Store. Please somebody help me out to solve the following queries:\nAre their any submission charge to be paid?\nAnd Procedure to submit application to Apple Store.\nThanks & Regards,\nKhu...
I have a text box in wxPython that takes the output of dictionary.items() and displays it to the user as items are added to the dictionary. However, the raw data is very ugly, looking like [(u'BC',45) (u'CHM',25) (u'CPM',30)] I know dictionary.items() is a list of tuples, but I can't seem to figure out how to make a ...
To format the output of a dictionary in a way that it displays nicely in a wxPython text box, you'll want to iterate over the items in the dictionary, format them into a string for each tuple, and then join them together with newline characters. This will give you the desired output format. Here’s an example of how yo...
36,985
[ { "from": "human", "value": "I have a text box in wxPython that takes the output of dictionary.items() and displays it to the user as items are added to the dictionary. However, the raw data is very ugly, looking like \n[(u'BC',45)\n(u'CHM',25)\n(u'CPM',30)]\n\nI know dictionary.items() is a list of tuples,...
I have config.time_zone in environment.rb set to "UTC", and my mySQL server returns the current time in my local time zone when I issue "select now();" and in utc when I ask for "select utc_timestamp;" I'm running rails 2.1.2, the mysql gem 2.7.3, activerecord gem 2.1.2, and mysql --version returns "Ver 14.12 Distrib 5...
The issue you're experiencing is related to how ActiveRecord and MySQL handle time zones, and how Ruby's `Time` objects work in conjunction with them. Let's break it down: 1. **ActiveRecord Time Zone Handling**: In Rails, when you set `config.time_zone` to "UTC" in `environment.rb`, ActiveRecord expects to convert ...
37,809
[ { "from": "human", "value": "I have config.time_zone in environment.rb set to \"UTC\", and my mySQL server returns the current time in my local time zone when I issue \"select now();\" and in utc when I ask for \"select utc_timestamp;\"\nI'm running rails 2.1.2, the mysql gem 2.7.3, activerecord gem 2.1.2, ...
I'm looking into why a managed process is using a lot of memory. Is there a way to run GC.Collect(3) from WinDbg, so that I can focus on the actual memory allocation?
In WinDbg, you can't directly call `GC.Collect(3)` like you would in your .NET application. However, you can invoke a full garbage collection to help you analyze the memory usage of a .NET application. The command you want to use in WinDbg is `!clrstack` to investigate the managed stack, and the `!gcroot` command to tr...
39,450
[ { "from": "human", "value": "I'm looking into why a managed process is using a lot of memory. Is there a way to run GC.Collect(3) from WinDbg, so that I can focus on the actual memory allocation?\n" }, { "from": "gpt", "value": "In WinDbg, you can't directly call `GC.Collect(3)` like you would i...
I have an MDI application that allows me to open different types of child windows. I can open multiple (but different) instances of the same type of child window. (Example: I can open 3 instances of child window type A and 2 instances of child window type B. All 5 windows are distinct entities and do not share data ...
To prevent the user from dragging a `ToolStrip` from one instance of a `ToolStripContainer` to another in a WinForms application, you can take advantage of the events and properties available within the `ToolStrip` and `ToolStripContainer` classes. Since you are using .NET 3.0, you can control the drag-and-drop behavio...
37,479
[ { "from": "human", "value": "I have an MDI application that allows me to open different types of child windows. I can open multiple (but different) instances of the same type of child window. (Example: I can open 3 instances of child window type A and 2 instances of child window type B. All 5 windows are...
I have this rewrite rule RewriteEngine On RewriteBase /location/ RewriteRule ^(.+)/?$ index.php?franchise=$1 Which is suppose to change this URL http://example.com/location/kings-lynn Into this one http://example.com/location/index.php?franchise=kings-lynn But instead I am getting this http://example.com/location/in...
It looks like there are a couple of issues in your rewrite rule. The most common reason for the behavior you're seeing (e.g., getting `index.php?franchise=index.php`) is that the rewrite rule is not being applied as expected, and the back-reference is being mishandled. Here’s how to fix your rewrite rule: 1. **Adjust...
37,225
[ { "from": "human", "value": "I have this rewrite rule\nRewriteEngine On\nRewriteBase /location/\nRewriteRule ^(.+)/?$ index.php?franchise=$1\n\nWhich is suppose to change this URL\nhttp://example.com/location/kings-lynn\n\nInto this one\nhttp://example.com/location/index.php?franchise=kings-lynn\n\nBut inst...
I want to grant a user permission to create, alter, and execute stored procedures, but without the ability to create other database objects. I excluded them from the role db_ddladmin, but explicitly granted the permissions "Create procedure" and "Execute". These permssions appear in the effective permissions list. H...
In SQL Server, creating a stored procedure requires the user to have permissions not just to create the procedure, but also permissions on the schema in which they are trying to create the stored procedure. In your case, the user is attempting to create a stored procedure in the "dbo" schema, but it appears they do not...
39,032
[ { "from": "human", "value": "I want to grant a user permission to create, alter, and execute stored procedures, but without the ability to create other database objects. I excluded them from the role db_ddladmin, but explicitly granted the permissions \"Create procedure\" and \"Execute\". These permssions...
is it possible to get other sounds to a divx as it is with getting subtitles? what is that format of that?
Yes, it is indeed possible to add or switch audio tracks in a DivX video file, similar to how you can add or switch subtitles. The process and formats involved may vary depending on the tools you use and the specific requirements of your video. ### Audio Formats: DivX typically uses the MPEG-4 Part 2 video codec, and ...
38,502
[ { "from": "human", "value": "is it possible to get other sounds to a divx as it is with getting subtitles?\nwhat is that format of that?\n" }, { "from": "gpt", "value": "Yes, it is indeed possible to add or switch audio tracks in a DivX video file, similar to how you can add or switch subtitles....
I'm trying to compile the examples that come with activemq in apache-activemq-5.1.0\example\src\ TopicPublisher.java, CommandLineSupport.java on compiling thru netbeans it has some referencing problems saying javax.jms does not exist. I've tried the j2ee.jar, openjms, sun jms but they all give the same error. its also ...
It sounds like you're missing some required JAR files that are necessary for compiling the examples in ActiveMQ. Specifically, the errors indicate that your project is not able to locate the JMS classes and some ActiveMQ utility classes. Here's a checklist you can follow to resolve these issues: 1. **Ensure JAR Files ...
37,377
[ { "from": "human", "value": "I'm trying to compile the examples that come with activemq\nin apache-activemq-5.1.0\\example\\src\\\nTopicPublisher.java, CommandLineSupport.java\non compiling thru netbeans it has some referencing problems saying javax.jms does not exist.\nI've tried the j2ee.jar, openjms, sun...
I need help with this route map routes.MapRoute("Blog_Archive", "Blog/Archive/{year}/{month}/{day}", new { controller = "Blog", action = "archive", year = "", month = "", day =...
The issue you're facing stems from the fact that the route you defined expects three parameters: `year`, `month`, and `day`. When you only provide the `year`, the route does not match because it is expecting the `month` and `day` as well. To resolve this, you can modify your routing configuration to allow for optional...
39,050
[ { "from": "human", "value": "I need help with this route map\nroutes.MapRoute(\"Blog_Archive\", \n \"Blog/Archive/{year}/{month}/{day}\",\n new { \n controller = \"Blog\",\n action = \"archive\",\n year = \"\",\n ...
I am wondering how I should properly get rid of branches that no longer have any purpose. Right now even if i delete them and commit they are still listed as branches in the properties windows for a particular branching root (directory). If I select merge I don't get an option to merge to the deleted branch which obvio...
It sounds like you are dealing with a version control system (likely Git, but the principles can apply to others) where you want to delete branches that are no longer needed. Here’s a general guide on how to properly delete branches and understand their behavior in your repository: ### Deleting Branches in Git 1. **D...
38,655
[ { "from": "human", "value": "I am wondering how I should properly get rid of branches that no longer have any purpose. Right now even if i delete them and commit they are still listed as branches in the properties windows for a particular branching root (directory). If I select merge I don't get an option t...
What memory leak detection tools are available for use with open source C/C++ on Windows?
There are several memory leak detection tools available for use with open-source C/C++ projects on Windows. Here are some popular options: 1. **Valgrind**: Although Valgrind is primarily designed for Unix-like operating systems, it can be used on Windows through Windows Subsystem for Linux (WSL). Valgrind is a powerfu...
35,017
[ { "from": "human", "value": "What memory leak detection tools are available for use with open source C/C++ on Windows?\n" }, { "from": "gpt", "value": "There are several memory leak detection tools available for use with open-source C/C++ projects on Windows. Here are some popular options:\n\n1....
I have only been working with sharepoint for three months but right from the start I was told that the SharePoint content db was off limits as MS could change the schema at any time. The recommended route is to use the object model, and in most case I kind of understands that. Now I need to join some lists in order to ...
Linking your own database directly to the SharePoint content database using SQL Server joins or views is not recommended and could lead to serious issues. Here’s why: 1. **Unsupported Configuration**: Directly accessing or modifying the SharePoint content database schema violates Microsoft's guidelines and best practi...
37,644
[ { "from": "human", "value": "I have only been working with sharepoint for three months but right from the start I was told that the SharePoint content db was off limits as MS could change the schema at any time. The recommended route is to use the object model, and in most case I kind of understands that.\n...
How do I make icons for my exe file when compiling my Python program?
Creating an icon for your executable file when compiling a Python program can be done using tools like `PyInstaller` or `cx_Freeze`. Here, I'll guide you through the process using `PyInstaller`, which is a popular tool for converting Python scripts into standalone executables. ### Steps to Add an Icon to Your Executab...
39,531
[ { "from": "human", "value": "How do I make icons for my exe file when compiling my Python program?\n" }, { "from": "gpt", "value": "Creating an icon for your executable file when compiling a Python program can be done using tools like `PyInstaller` or `cx_Freeze`. Here, I'll guide you through th...
I have a long running insert transaction that inserts data into several related tables. When this insert is running, I cannot perform a select * from MainTable. The select just spins its wheels until the insert is done. I will be performing several of these inserts at the same/overlapping time. To check that the ...
To handle your situation in SQL Server, where you want to check the status of specific rows while allowing other transactions to proceed, you can utilize a combination of transaction isolation levels and row-level locking techniques. ### Key Strategies: 1. **Use `READ COMMITTED` Isolation Level**: By default, SQL...
36,612
[ { "from": "human", "value": "I have a long running insert transaction that inserts data into several related tables. \nWhen this insert is running, I cannot perform a select * from MainTable. The select just spins its wheels until the insert is done. \nI will be performing several of these inserts at the...
I need to transform an Oracle SQL statement into a Stored Procedure therefore users with less privileges can access certain data field: SELECT info_field, data_field FROM table_one WHERE some_id = '<id>' -- I need this <id> to be the procedure's parameter UNION ALL SELECT info_field, data_field FROM ...
Certainly! You can create a stored procedure in Oracle SQL that takes an ID as a parameter and returns the results from the multiple tables using a UNION ALL query. Since you mentioned there are approximately 12 tables, you can either hard-code them in the stored procedure or use dynamic SQL if you expect to add more t...
35,680
[ { "from": "human", "value": "I need to transform an Oracle SQL statement into a Stored Procedure therefore users with less privileges can access certain data field:\nSELECT\n info_field, data_field\nFROM\n table_one\nWHERE\n some_id = '<id>' -- I need this <id> to be the procedure's parameter\nUNIO...
A number of business areas I work with use a folder structure to organise their Sharepoint housed documents (not ideal I know, but we're stuck with it). I would like to use a web part page to present a number of views of their document libraries based on the subfolders that the documents appear in, but this is provin...
Using a folder structure to organize documents in SharePoint can indeed make it challenging to create user-friendly views. However, you can create a web part page to display views based on subfolders by utilizing a combination of built-in SharePoint features. Here are a few approaches you can consider: ### 1. **Use Do...
38,126
[ { "from": "human", "value": "A number of business areas I work with use a folder structure to organise their Sharepoint housed documents (not ideal I know, but we're stuck with it). \nI would like to use a web part page to present a number of views of their document libraries based on the subfolders that t...
I have a requirement to disallow backslash characters in a given string field defined by an xsd document. However, being as green as I am, I am not confident with my xsd and/or regex knowledge. Here is what I have so far: <xs:simpleType name="BackslashRestrictedField"> <xs:restriction base="xs:string"> <xs:minL...
You're on the right track with using XSD to restrict the contents of a string, but your regex pattern needs a bit of adjustment to ensure it correctly disallows backslash characters in the string. The regex pattern you've currently used (`[^\\]`) only matches a single character that is not a backslash. This means that...
39,889
[ { "from": "human", "value": "I have a requirement to disallow backslash characters in a given string field defined by an xsd document. However, being as green as I am, I am not confident with my xsd and/or regex knowledge. Here is what I have so far:\n<xs:simpleType name=\"BackslashRestrictedField\">\n <...
Strange program hang, what does this mean in debug? After attaching windbg I found the following: (1714.258): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax=015b5c74 ebx=178a13e0 ecx=dddddddd edx=009a8c...
The debug output you provided indicates that your application has encountered an access violation exception. This particular exception means that the application tried to read or write to a memory address that it does not have permission to access. Let's break down the information you've presented: 1. **Access Violati...
36,005
[ { "from": "human", "value": "Strange program hang, what does this mean in debug?\nAfter attaching windbg I found the following:\n\n(1714.258): Access violation - code c0000005 (first chance)\nFirst chance exceptions are reported before any exception handling.\nThis exception may be expected and handled.\nea...
I had a method with a lot of persistence calls that used a nHibernate session, it worked, was alright. But I needed to refactor this method, extracting a method from a content inside a loop, for multithread reasons. Then I created an class with this method. It is like a normal refactoring, but the nHibernate session in...
It sounds like you've encountered a common issue when working with NHibernate in a multi-threaded environment. NHibernate sessions are not inherently thread-safe, which means that a single session should not be shared between multiple threads. Each thread should manage its own session instance to avoid concurrency issu...
37,507
[ { "from": "human", "value": "I had a method with a lot of persistence calls that used a nHibernate session, it worked, was alright. But I needed to refactor this method, extracting a method from a content inside a loop, for multithread reasons. Then I created an class with this method. It is like a normal r...
I am using Oracle BPEL Process manager and have a task assigned to a group of users. I try to mark it approved using Java class oracle.bpel.services.workflow.task.ITaskService.updateTaskOutcome(). This works if the task is assigned to an individual user, but if the task is assigned to a group of users, I get an error ...
Working with Oracle BPEL and managing tasks, especially when dealing with user groups, can be a bit tricky. When a task is assigned to a group, it typically implies that any member of that group can acquire and work on the task. Here’s a general outline of how you can handle this scenario programmatically. ### Sample ...
36,829
[ { "from": "human", "value": "I am using Oracle BPEL Process manager and have a task assigned to a group of users. \nI try to mark it approved using Java class oracle.bpel.services.workflow.task.ITaskService.updateTaskOutcome(). This works if the task is assigned to an individual user, but if the task is ass...
I know how to use the OleDbConnection class to open an excel file and select from it, but is there a simple method to read the data from an excel file that has been read into a Stream? And is there also a similar method for QuickBooks?
Yes, you can read data from an Excel file that has been loaded into a `Stream`, and there are libraries that facilitate this process. A popular library for handling Excel files in .NET is **EPPlus**, which allows you to read Excel files easily without needing to rely on OleDb. For QuickBooks, you would typically use th...
35,568
[ { "from": "human", "value": "I know how to use the OleDbConnection class to open an excel file and select from it, but is there a simple method to read the data from an excel file that has been read into a Stream? And is there also a similar method for QuickBooks?\n" }, { "from": "gpt", "value":...
I have the following code to create a UIPickerView: pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 416.0f - height, 320.0f, height)]; pickerView.delegate = self; pickerView.showsSelectionIndicator = YES; [pickerView setSoundsEnabled:YES]; I would like to change the component widths and change the t...
Yes, you can customize the component widths and text sizes in a `UIPickerView`. Here’s how you can do it: ### 1. Change Component Widths To customize the widths of individual components in a `UIPickerView`, you can implement the `pickerView:widthForComponent:` delegate method. Here’s an example: ```objective-c - (CGF...
35,806
[ { "from": "human", "value": "I have the following code to create a UIPickerView: \npickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 416.0f - height, 320.0f, height)];\npickerView.delegate = self;\npickerView.showsSelectionIndicator = YES;\n[pickerView setSoundsEnabled:YES];\n\nI would like ...
In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class: customerAddress, deliveryAddress, invoiceAddress. Whats the best way to reflect this structure in a database? The straightforward way would be a customer table and a separate address table. A m...
When designing a database structure for your `Customer` and `Address` classes, both the normalized and denormalized approaches you mentioned have their pros and cons. Let's explore each approach in detail: ### Normalized Approach **Structure:** - `Customer` table (with customer-specific fields) - `Address` table (wit...
37,588
[ { "from": "human", "value": "In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class: customerAddress, deliveryAddress, invoiceAddress.\nWhats the best way to reflect this structure in a database?\n\nThe straightforward way would be a custo...
I need to create an XmlDocument with a root element containing multiple namespaces. Am using C# 2.0 or 3.0 Here is my code: XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement("JOBS", "http://www.example.com"); doc.AppendChild(root); XmlElement job = doc.CreateElement("JOB", "http://www.example.c...
To achieve the desired XML structure with multiple namespaces in an `XmlDocument` using C#, you will need to manually manage the namespaces. You can add namespaces to the root element and use them without prefixing every element when creating child elements. Here's how you can do it: ```csharp using System; using Sys...
38,788
[ { "from": "human", "value": "I need to create an XmlDocument with a root element containing multiple namespaces. Am using C# 2.0 or 3.0\nHere is my code:\nXmlDocument doc = new XmlDocument();\nXmlElement root = doc.CreateElement(\"JOBS\", \"http://www.example.com\");\ndoc.AppendChild(root);\n\nXmlElement j...
I have the requirement to call an internal method of a 3rd party object (I cannot make it public for example). I can do that via reflection. Unfortunately this does not work in ASP.NET Medium trust due to insufficient rights: <IPermission class="ReflectionPermission" version="1" Flags="RestrictedMemberAccess"/></Permis...
In ASP.NET Medium Trust scenarios, your ability to use reflection is restricted, as you’ve encountered with `ReflectionPermission` settings. Unfortunately, using LINQ expressions does not circumvent these restrictions. Both reflection and expression trees work within the same permissions, and if reflection is restricte...
35,803
[ { "from": "human", "value": "I have the requirement to call an internal method of a 3rd party object (I cannot make it public for example). I can do that via reflection. Unfortunately this does not work in ASP.NET Medium trust due to insufficient rights:\n<IPermission class=\"ReflectionPermission\" version=...
I have Microsoft Script debugger installed and selected (somwhere) as the script debugger of IE. I want to make VS the default script debugger. When I uninstall MS Script debugger IE just wouldn't start any debugger on a javascript error. So how do I go back to VS as my default IE script debugger?
To set Visual Studio as the default script debugger for Internet Explorer, follow these steps: ### Step 1: Ensure Visual Studio is Installed Make sure you have Visual Studio installed, as it includes the debugging tools needed to work with JavaScript. ### Step 2: Configure Internet Explorer 1. **Open Internet Explore...
38,353
[ { "from": "human", "value": "I have Microsoft Script debugger installed and selected (somwhere) as the script debugger of IE. I want to make VS the default script debugger. When I uninstall MS Script debugger IE just wouldn't start any debugger on a javascript error.\nSo how do I go back to VS as my default...
When we use getstring to get data from a recordset (ADO) then it returns all the columns. If only certain columns are required, how do we modify the getstring statement?
In ADO (ActiveX Data Objects), the `GetString` method is used to retrieve data from a recordset and convert it to a string format. By default, `GetString` retrieves all columns from the current recordset. However, if you want to retrieve data from only specific columns, you cannot modify the `GetString` method directly...
39,746
[ { "from": "human", "value": "When we use getstring to get data from a recordset (ADO) then it returns all the columns.\nIf only certain columns are required, how do we modify the getstring statement?\n" }, { "from": "gpt", "value": "In ADO (ActiveX Data Objects), the `GetString` method is used t...
My list (@degree) is built from a SQL command. The NVL command in the SQL isn't working, neither are tests such as: if (@degree[$i] == "") if (@degree[$i] == " ") if (@degree[$i] == '') if (@degree[$i] == -1) if (@degree[$i] == 0) if (@degree[$i] == ()) if (@degree[$i] == undef) $i is a counter variable in a for loop....
It looks like you're dealing with a list of degree values that may contain empty elements, and you want to replace those empty elements with the word "OTHER". From your description, it seems like you're using a programming language that looks similar to Perl or another language that supports array handling with `@` for...
39,107
[ { "from": "human", "value": "My list (@degree) is built from a SQL command. The NVL command in the SQL isn't working, neither are tests such as:\nif (@degree[$i] == \"\")\nif (@degree[$i] == \" \")\nif (@degree[$i] == '')\nif (@degree[$i] == -1)\nif (@degree[$i] == 0)\nif (@degree[$i] == ())\nif (@degree[$i...
In most versions of windows, you can get to the menu by pressing the F10 key, thus avoiding having to use the mouse. This behaviour does not appear to be present in Windows Mobile 5.0, but is desirable as the device I am using will be more keyboard than touch screen driven. Is there a way of programmatically activat...
In Windows Mobile 5.0, the behavior and capabilities regarding menus and keyboard navigation are indeed different from desktop versions of Windows. The lack of F10 support to activate menus can be challenging when designing keyboard-centric applications. However, you can programmatically activate and use menus in Windo...
36,995
[ { "from": "human", "value": "In most versions of windows, you can get to the menu by pressing the F10 key, thus avoiding having to use the mouse. This behaviour does not appear to be present in Windows Mobile 5.0, but is desirable as the device I am using will be more keyboard than touch screen driven. \n...
I have a web service using .net c# and I want to write to a text file on the server, but I cannot get this to work. I believe it's a permission problem. Specifically, I think the problem is I am using System.IO.Directory.GetCurrentDirectory(). Is there a better alternative?
When working with file writing in a web service (especially if it's hosted on IIS or any similar environment), using `System.IO.Directory.GetCurrentDirectory()` can lead to issues, primarily due to permission constraints and the working directory being different than you might expect. The application may not have the n...
31,749
[ { "from": "human", "value": "I have a web service using .net c# and I want to write to a text file on the server, but I cannot get this to work. I believe it's a permission problem.\nSpecifically, I think the problem is I am using System.IO.Directory.GetCurrentDirectory(). \nIs there a better alternative?\...
How can I fetch more than 1000 record from data store and put all in one single list to pass to django?
In Django, if you're dealing with a database that has more than 1000 records, you have to consider how you're querying and processing the data. Many databases have a default limit on how many records you can retrieve at once for performance reasons. However, you can still fetch more records by using pagination or other...
37,512
[ { "from": "human", "value": "How can I fetch more than 1000 record from data store and put all in one single list to pass to django?\n" }, { "from": "gpt", "value": "In Django, if you're dealing with a database that has more than 1000 records, you have to consider how you're querying and process...
We are currently using unit tests to test our project. We have the majority of functionality covered but I think our tests are too brittle. I was wondering if there are any specific things we can be doing to make the unit tests more flexible so they don't break for the wrong reasons. A couple answers have mentioned ...
Creating robust and flexible unit tests is crucial for maintaining a healthy codebase. Here are some strategies you can implement to make your unit tests less brittle and more effective: ### 1. **Focus on Testing Behavior, Not Implementation:** - Write tests based on the expected behavior of your code rather than i...
35,273
[ { "from": "human", "value": "We are currently using unit tests to test our project. We have the majority of functionality covered but I think our tests are too brittle. \nI was wondering if there are any specific things we can be doing to make the unit tests more flexible so they don't break for the wrong...
Once a programmer decides to implement IXmlSerializable, what are the rules and best practices for implementing it? I've heard that GetSchema() should return null and ReadXml should move to the next element before returning. Is this true? And what about WriteXml - should it write a root element for the object or is it ...
When implementing the `IXmlSerializable` interface, there are indeed several best practices and conventions you should adhere to in order to ensure your implementation is robust and functions as intended. Here are some guidelines based on your questions and code sample: ### General Guidelines for Implementing IXmlSeri...
35,299
[ { "from": "human", "value": "Once a programmer decides to implement IXmlSerializable, what are the rules and best practices for implementing it? I've heard that GetSchema() should return null and ReadXml should move to the next element before returning. Is this true? And what about WriteXml - should it writ...
Pretty all in question... I'm looking for batch script, code or library which allows to edit and create settings for PPPoE connections in windows when hardware and infrastructure is already present. Also I'm looking for script/code to change active connection. .NET is preffered, but any other language will do as well. ...
To manage PPPoE connections on Windows, you can use Windows Management Instrumentation (WMI) or the `netsh` command-line utility. Below are examples in both PowerShell (which can be integrated into .NET applications) and a pure .NET approach using WMI. ### Option 1: PowerShell Script You can create a PowerShell scrip...
37,180
[ { "from": "human", "value": "Pretty all in question... I'm looking for batch script, code or library which allows to edit and create settings for PPPoE connections in windows when hardware and infrastructure is already present. Also I'm looking for script/code to change active connection.\n.NET is preffered...
I need to connect to Outlook through ASP.NET web application using user credentials. What are my options? FYI: User logs into the web site by using Windows Authentication. I'm working with Outlook 2003.
To connect to Outlook through an ASP.NET web application using user credentials, especially when considering that users log in via Windows Authentication, you have several options. However, it's important to note that Outlook 2003 is quite outdated, so your implementation may depend on the specific capabilities of that...
35,269
[ { "from": "human", "value": "I need to connect to Outlook through ASP.NET web application using user credentials. What are my options? \nFYI: User logs into the web site by using Windows Authentication. I'm working with Outlook 2003. \n" }, { "from": "gpt", "value": "To connect to Outlook throug...
Given a pointer to some variable.. is there a way to check whether it was statically or dynamically allocated??
In C and C++, there is no built-in way to determine whether a given pointer points to memory that was allocated statically or dynamically. The language itself does not keep track of how a pointer was allocated once it is assigned. However, there are some general guidelines and approaches that you might consider for di...
37,769
[ { "from": "human", "value": "Given a pointer to some variable.. is there a way to check whether it was statically or dynamically allocated?? \n" }, { "from": "gpt", "value": "In C and C++, there is no built-in way to determine whether a given pointer points to memory that was allocated statical...
I'm looking into integrating jBPM with my current project, so far so good just including the jpdl jar in my ear and using the spring modules 0.8 jbpm module, however I've got to have a reasonable way of going from my changes to to the process definition in the designer to deployment in production. The path has to be r...
Integrating jBPM with your project while ensuring a smooth and repeatable deployment process across multiple environments can be challenging. Since you're looking to manage process definitions in a way that avoids executing Java code during migration, here are a few suggestions that might help streamline your process: ...
38,156
[ { "from": "human", "value": "I'm looking into integrating jBPM with my current project, so far so good just including the jpdl jar in my ear and using the spring modules 0.8 jbpm module, however I've got to have a reasonable way of going from my changes to to the process definition in the designer to deplo...
I need to use JUnit 4.4 (or newer) in a set of eclipse plugin tests, but I've run into the following problem: Tests are not detected when running with the junit 4.4 or 4.5 bundles from springsource (junit44 and junit45). The org.junit4 bundle that can be obtained with eclipse supplies junit 4.3 (as of Ganymead / Eclip...
It sounds like you're facing a compatibility issue between different versions of JUnit and the Eclipse Plugin Test Framework. The key points to note are that: 1. **JUnit Version Compatibility**: You need to use JUnit 4.4 (or newer) because some of your dependencies (like JMock) require it. 2. **Running Tests with the...
34,228
[ { "from": "human", "value": "I need to use JUnit 4.4 (or newer) in a set of eclipse plugin tests, but I've run into the following problem:\nTests are not detected when running with the junit 4.4 or 4.5 bundles from springsource\n(junit44 and junit45). The org.junit4 bundle that can be obtained with eclipse...
I remember reading about an automation program for windows that would accept a list of commands like this: press the ok button put "hello world" into the text control press the add button etc etc. Can anyone name this program? A thousand thankyous.
It sounds like you might be referring to **AutoHotkey**. AutoHotkey is a powerful and versatile scripting language for Windows that allows users to automate almost any task by sending keystrokes and mouse clicks, as well as manipulating windows and controls. With AutoHotkey, you can write scripts to perform actions l...
40,776
[ { "from": "human", "value": "I remember reading about an automation program for windows that would accept a list of commands like this:\npress the ok button\nput \"hello world\" into the text control\npress the add button\n\netc etc. Can anyone name this program? A thousand thankyous.\n" }, { "from"...
Suppose you have a method that should create and return an array of some sort. What if the array doesn't get populated. Do you return an empty array or null/nothing?
When designing a method that returns an array, the choice between returning an empty array or `null` (or `nothing` in some languages) depends on the context and your specific use case. Here are some considerations for each approach: ### Returning an Empty Array 1. **Clarity and Safety**: Returning an empty array is g...
39,322
[ { "from": "human", "value": "Suppose you have a method that should create and return an array of some sort. What if the array doesn't get populated. Do you return an empty array or null/nothing?\n" }, { "from": "gpt", "value": "When designing a method that returns an array, the choice between re...
In a C# application I am working on I have a very long identifier as follows:- foo.bar.bwah.blah.whatever.very.very.huge Whenever I to reference this object it's an absolute nightmare, and unfortunately I do need to reference it a lot:- var something = foo.bar.bwah.blah.whatever.very.very.huge.a; var somethingElse = f...
In C#, you cannot directly create a reference to a variable like you would with pointers in C/C++. However, you can achieve a similar result by using a property or a method that encapsulates the long identifier. This way, you can create a short alias that always refers to the current value of the long identifier, regar...
38,513
[ { "from": "human", "value": "In a C# application I am working on I have a very long identifier as follows:-\nfoo.bar.bwah.blah.whatever.very.very.huge\n\nWhenever I to reference this object it's an absolute nightmare, and unfortunately I do need to reference it a lot:-\nvar something = foo.bar.bwah.blah.wha...
Seems a great C++ unit testing framework. I'm just wanting something a bit more sophisticated than the console output for running the test, also something that makes it really easy to run specific tests (since gtest supports all kinds of test filtering) If there is nothing, I'll probably roll my own
If you're looking for a more sophisticated way to run and display results from Google Test (gtest), you have a few options: 1. **CTest**: If you are using CMake, you can integrate Google Test with CTest. This allows you to run tests from a more user-friendly interface and also provides options for generating reports. ...
39,744
[ { "from": "human", "value": "Seems a great C++ unit testing framework. I'm just wanting something a bit more sophisticated than the console output for running the test, also something that makes it really easy to run specific tests (since gtest supports all kinds of test filtering)\nIf there is nothing, I...
In a code review, I stumbled over this (simplified) code fragment to unregister an event handler: Fire -= new MyDelegate(OnFire); I thought that this does not unregister the event handler because it creates a new delegate which had never been registered before. But searching MSDN I found several code samples which us...
Your initial reasoning about the use of `new MyDelegate(OnFire)` to unregister the event handler is understandable, but there’s a crucial aspect of delegates in C# that explains why this works in your code sample. ### Understanding Delegate Invocation and Unsubscription In C#, delegates are reference types that can e...
39,347
[ { "from": "human", "value": "In a code review, I stumbled over this (simplified) code fragment to unregister an event handler:\n Fire -= new MyDelegate(OnFire);\n\nI thought that this does not unregister the event handler because it creates a new delegate which had never been registered before. But searchin...
My company is currently migrating some of their really old db's to sql server 2005. Some legacy apps have problems connecting to the new server. The connection string works in Asp.NET 2.0, probably because it assumes tcp:1433 automatically. I have to construct the connection string like this in ASP.NET 1.1 for it to wo...
In ASP.NET 1.1 and earlier versions of ADO.NET, the connection string handling is not as flexible as it is in later versions. Here are a few possible reasons and solutions for why you may be encountering connection issues without specifying the protocol and port: 1. **Legacy Connection String Parsing**: In older versi...
39,317
[ { "from": "human", "value": "My company is currently migrating some of their really old db's to sql server 2005. Some legacy apps have problems connecting to the new server. The connection string works in Asp.NET 2.0, probably because it assumes tcp:1433 automatically.\nI have to construct the connection st...
I have a set of divs that I want to make collapsible/expandable using jQuery's slideToggle() method. How do I make all of these divs collapsed by default? I'd like to avoid explicitly calling slideToggle() on each element during/after page rendering.
To have a set of `<div>` elements collapsed by default using jQuery's `slideToggle()` method without explicitly calling it on each element during or after page rendering, you can use CSS to initially hide the `<div>` elements. Then, when the user interacts with the associated elements (like a button or header) to expan...
39,687
[ { "from": "human", "value": "I have a set of divs that I want to make collapsible/expandable using jQuery's slideToggle() method. How do I make all of these divs collapsed by default? I'd like to avoid explicitly calling slideToggle() on each element during/after page rendering.\n" }, { "from": "gpt...
How would one code the following C# code in Managed C++ void Foo() { using (SqlConnection con = new SqlConnection("connectionStringGoesHere")) { //do stuff } } Clarificaton: For managed objects.
To translate the given C# code into Managed C++, you would use the CLR (Common Language Runtime) feature that allows you to work with .NET libraries in C++. The `SqlConnection` class is part of the `System.Data.SqlClient` namespace in .NET, so you will need to include that and properly manage the connection using a try...
40,216
[ { "from": "human", "value": "How would one code the following C# code in Managed C++\nvoid Foo()\n{\n using (SqlConnection con = new SqlConnection(\"connectionStringGoesHere\"))\n {\n //do stuff\n }\n}\n\nClarificaton:\nFor managed objects.\n" }, { "from": "gpt", "value": "To tr...
Accepting the possibility of extreme ridicule, I must admit that I really miss sun Teamware's filemerge tool. I have switched from solaris to red hat linux, and find myself regularly missing filemerge (not to be confused with the Apple tool of the same name), as well as the solaris version of pstack (which worked on co...
It's understandable to miss tools that you're accustomed to, especially when they offer unique features that you rely on. Fortunately, there are alternatives on Red Hat Linux that can help you with file merging and analyzing core files. ### Alternatives to FileMerge 1. **Meld**: A popular graphical diff and merge too...
37,503
[ { "from": "human", "value": "Accepting the possibility of extreme ridicule, I must admit that I really miss sun Teamware's filemerge tool. I have switched from solaris to red hat linux, and find myself regularly missing filemerge (not to be confused with the Apple tool of the same name), as well as the sola...
SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU FROM PRACOWNICY GROUP BY NR_DZIALU HAVING NR_DZIALU = 30 or SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU FROM PRACOWNICY WHERE NR_DZIALU = 30 GROUP BY NR_DZIALU
Both of the SQL queries you've provided are intended to count the number of employees (`LICZ_PRAC_DZIALU`) in a specific department (`NR_DZIALU`), which in this case is department 30. However, they have some differences in how they operate, particularly with respect to the use of the `HAVING` clause vs. the `WHERE` cla...
39,713
[ { "from": "human", "value": "SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU\n FROM PRACOWNICY\n GROUP BY NR_DZIALU\n HAVING NR_DZIALU = 30\n\nor\nSELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU\n FROM PRACOWNICY\n WHERE NR_DZIALU = 30\n GROUP BY NR_DZIALU\n\n" }, { ...