instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have an object in SQL (A) that has a many to many relationships with another object (B). I'm currently building an API layer DLL that will allow the user to assign objects of type B into type A. Right now the user would retrieve a list of entries of type A and a list of entries of type B using different LINQ data con...
Your issue arises from the way Entity Framework (or other ORM frameworks you may be using) handles object tracking and entity states. When you retrieve entities from one DataContext, that context keeps track of those entities. If you then try to add those entities to a different DataContext, it doesn't recognize them a...
43,245
[ { "from": "human", "value": "I have an object in SQL (A) that has a many to many relationships with another object (B). I'm currently building an API layer DLL that will allow the user to assign objects of type B into type A. Right now the user would retrieve a list of entries of type A and a list of entrie...
I am trying to create a very simple ASP.NET application that presents information retrieved from a database based on the URL, in a similar way to a wiki, but in this case the site is read-only. An example of a URL I'd like would be: http://www.foo.com/bar The application would then use "bar" as a SQL query parameter t...
To achieve the functionality you're looking for with a simple ASP.NET application on IIS6, you can use a combination of URL rewriting and an ASP.NET Web Forms application. Given that you are working with a single `default.aspx` file and want to retrieve information based on the URL, here's a basic approach you can take...
40,305
[ { "from": "human", "value": "I am trying to create a very simple ASP.NET application that presents information retrieved from a database based on the URL, in a similar way to a wiki, but in this case the site is read-only. An example of a URL I'd like would be:\nhttp://www.foo.com/bar\n\nThe application wou...
I am trying to trace a deadlock that is occurring in our SQL 2005 database (64-bit). We do not currently have snapshot isolation enabled. I turned on tf-1204 and received the output below. From this output I am able to determine that Node 1 is a stored procedure that selects data and only modifies values in #temp ta...
To resolve the object identifiers you see in your deadlock trace, you need to understand how SQL Server handles object IDs (OIDs) and how to map those large numbers to the actual objects in your database. The keys you see in the deadlock output (e.g., `10:72057594060734464` and `10:72057594038910976`) are composed of ...
42,796
[ { "from": "human", "value": "I am trying to trace a deadlock that is occurring in our SQL 2005 database (64-bit). We do not currently have snapshot isolation enabled.\nI turned on tf-1204 and received the output below. \nFrom this output I am able to determine that Node 1 is a stored procedure that select...
I'm trying to increase the timeout on all sessions. The site is hosted with Godaddy, and it is written in Flash (client side of course) and asp.net on the backend. I've added this to my web.config, <sessionState timeout="720"> </sessionState> Is that really all that I need to do? I'd prefer to not let sessions ex...
Increasing the session timeout in your ASP.NET application is indeed a crucial step if you want to keep sessions alive longer. Setting the `timeout` attribute in your `web.config` is the right approach. Here’s a summary of what you need to consider: ### Configuration in `web.config` Your configuration for `sessionStat...
42,818
[ { "from": "human", "value": "I'm trying to increase the timeout on all sessions. The site is hosted with Godaddy, and it is written in Flash (client side of course) and asp.net on the backend. I've added this to my web.config, \n<sessionState timeout=\"720\">\n\n</sessionState>\n\nIs that really all that ...
I'm wondering where the callbacks are (or if there are anything) for animations in a CALayer. Specifically, for implied animations like altering the frame, position, etc. In a UIView, you could do something like this: [UIView beginAnimations:@"SlideOut" context:nil]; [UIView setAnimationDuration:.3]; [UIView setAnimati...
In Core Animation, particularly with `CALayer`, you don't have direct callbacks similar to `UIView` animations like `setAnimationDidStopSelector`. However, you can achieve similar functionality using the `CAAnimation` class, where you can implement `CAAnimationDelegate` methods to be notified when an animation complete...
37,837
[ { "from": "human", "value": "I'm wondering where the callbacks are (or if there are anything) for animations in a CALayer. Specifically, for implied animations like altering the frame, position, etc. In a UIView, you could do something like this:\n[UIView beginAnimations:@\"SlideOut\" context:nil];\n[UIView...
I'm writing an application that allows users to upload images onto the server. I expect about 20 images per day all jpeg and probably not edited/resized. (This is another question, how to resize the images on the server side before storing. Maybe someone can please drop a .NET resource for that in the comment or so). ...
When considering where to store images uploaded by users, both approaches have their pros and cons. Let’s delve into the advantages and disadvantages of each approach more systematically: ### Option A: Store Images in the File System **Advantages:** 1. **Performance:** File systems generally provide faster access to ...
42,380
[ { "from": "human", "value": "I'm writing an application that allows users to upload images onto the server. I expect about 20 images per day all jpeg and probably not edited/resized. (This is another question, how to resize the images on the server side before storing. Maybe someone can please drop a .NET r...
It would seem the Immediate window needs some jazzing up ala IntelliSense? Anyone agree/disagree? Is this coming in VS2008/2010?
The Immediate Window in Visual Studio is indeed a powerful feature for debugging, allowing developers to execute commands and evaluate expressions during a debugging session. While it serves its purpose well, many users have expressed the desire for enhanced features like IntelliSense to make it more user-friendly and ...
45,878
[ { "from": "human", "value": "It would seem the Immediate window needs some jazzing up ala IntelliSense?\nAnyone agree/disagree? Is this coming in VS2008/2010?\n" }, { "from": "gpt", "value": "The Immediate Window in Visual Studio is indeed a powerful feature for debugging, allowing developers to...
What's the best way to return a random line in a text file using C? It has to use the standard I/O library (<stdio.h>) because it's for Nintendo DS homebrew. Clarifications: Using a header in the file to store the number of lines won't work for what I want to do. I want it to be as random as possible (the best being i...
To return a random line from a text file using C and ensure that each line has an equal probability of being chosen, you can implement a method that counts the lines in the file and then randomly selects one line based on the count. This approach does not require any modifications to the file format, and it makes sure ...
42,437
[ { "from": "human", "value": "What's the best way to return a random line in a text file using C? It has to use the standard I/O library (<stdio.h>) because it's for Nintendo DS homebrew.\nClarifications:\n\nUsing a header in the file to store the number of lines won't work for what I want to do.\nI want it ...
How can I delete all the tables in a web page? The tables don't have any ids associated with them.
If you want to delete all tables from a web page using JavaScript, you can do this by selecting all the `<table>` elements and removing them from the DOM. Here's a simple way to do that: ### Using JavaScript in the Browser Console 1. Open the webpage where you want to delete the tables. 2. Open the browser's Develope...
43,649
[ { "from": "human", "value": "How can I delete all the tables in a web page? The tables don't have any ids associated with them.\n" }, { "from": "gpt", "value": "If you want to delete all tables from a web page using JavaScript, you can do this by selecting all the `<table>` elements and removing...
I've got to write few words about C#, generally piece of cake? No! I've searched through various internet resources and books and what i got is kind of headache. For example Garbage Collector some sources says that this is C# feature, other that CLR got this feature and C# along with all other .NET languages got it by...
It sounds like you’re trying to get a clearer understanding of C# and its relationship with the .NET ecosystem, particularly the Common Language Runtime (CLR). It’s true that the distinctions between what is a C# feature versus what is a CLR feature can often be blurred, leading to confusion. Let’s clarify a few points...
42,249
[ { "from": "human", "value": "I've got to write few words about C#, generally piece of cake? No! \nI've searched through various internet resources and books and what i got is kind of headache. For example Garbage Collector some sources says that this is C# feature, other that CLR got this feature and C# alo...
I'm building a demo app in WPF, which is new to me. I'm currently displaying text in a FlowDocument, and need to print it. The code I'm using looks like this: PrintDialog pd = new PrintDialog(); fd.PageHeight = pd.PrintableAreaHeight; fd.PageWidth = pd.PrintableAreaWidth; fd.PagePadding...
When you modify the properties of a `FlowDocument` in WPF, such as `PageHeight`, `PageWidth`, and others, those changes affect the original `FlowDocument` instance. This is why you're seeing the settings you used for printing also reflected in the displayed document. There are several ways to handle this situation, a...
41,877
[ { "from": "human", "value": "I'm building a demo app in WPF, which is new to me. I'm currently displaying text in a FlowDocument, and need to print it.\nThe code I'm using looks like this:\n PrintDialog pd = new PrintDialog();\n fd.PageHeight = pd.PrintableAreaHeight;\n fd.PageWidth = ...
I'm working on a project were we have number (5 at the moment) of servers spread across the world. Clients connect to one of those servers through a centralized broker. We know the originating country of the client but nothing else. We have full control of the servers so we can have all the info we need on those. We do...
Determining server proximity based on country-level information can be challenging, especially without direct access to client IP addresses for pinging. Here are several potential approaches you might consider to address the problem: ### 1. **GeoIP Databases**: You could use a GeoIP database to map countries to geogra...
43,509
[ { "from": "human", "value": "I'm working on a project were we have number (5 at the moment) of servers spread across the world.\nClients connect to one of those servers through a centralized broker.\nWe know the originating country of the client but nothing else. We have full control of the servers so we ca...
I have a single string that contains the command-line parameters to be passed to another executable and I need to extract the string[] containing the individual parameters in the same way that C# would if the commands had been specified on the command-line. The string[] will be used when executing another assemblies en...
To achieve the desired splitting of a command-line string into an array of parameters in C#, you can utilize a regular expression that correctly handles quoted strings, while respecting spaces outside of them. Here’s a sample method that demonstrates how to split the string correctly: ```csharp using System; using Sy...
42,306
[ { "from": "human", "value": "I have a single string that contains the command-line parameters to be passed to another executable and I need to extract the string[] containing the individual parameters in the same way that C# would if the commands had been specified on the command-line. The string[] will be ...
How do I publish a Web Service to a server with MSBuild?
To publish a web service (e.g., an ASP.NET Web Application or an ASP.NET Core application) to a server using MSBuild, you'll need to follow a series of steps. MSBuild is a powerful build tool that is commonly used to automate the build and deployment processes for .NET applications. Here’s a general approach to publis...
39,247
[ { "from": "human", "value": "How do I publish a Web Service to a server with MSBuild?\n" }, { "from": "gpt", "value": "To publish a web service (e.g., an ASP.NET Web Application or an ASP.NET Core application) to a server using MSBuild, you'll need to follow a series of steps. MSBuild is a power...
test[_nObjectives].pool[j].feedbackCorrect = oQuestions[j].getElementsByTagName("feedbackCorrect")[0].firstChild.data; and the XML in this case contains this: <feedbackCorrect> </feedbackCorrect> When executing that line of code the following error occurs: Message: Object required I don't get it. The tag is the...
The issue you're encountering occurs when you try to access the `firstChild` of an empty XML element. Specifically, when the `<feedbackCorrect>` tag is empty, `firstChild` will be `null`, and trying to access `data` on a `null` value results in the "Object required" error. Here's how you can modify your code to handle...
44,904
[ { "from": "human", "value": "test[_nObjectives].pool[j].feedbackCorrect = \noQuestions[j].getElementsByTagName(\"feedbackCorrect\")[0].firstChild.data;\n\nand the XML in this case contains this: \n <feedbackCorrect>\n </feedbackCorrect>\n\nWhen executing that line of code the following error occurs: Messa...
My hosting provider (pairNetworks) has certain rules for scripts run on the server. I'm trying to compress a file for backup purposes, and would ideally like to use bzip2 to take advantage of its AWESOME compression rate. However, when trying to compress this 90 MB file, the process sometimes runs upwards of 1.5 minute...
Using the `nice` command will not reduce the total CPU time consumed by a process; instead, it changes the priority of the process. A process with a higher "niceness" value will be more favorable to other processes competing for CPU time, but it will still consume the same total amount of CPU time. Since your hosting...
43,435
[ { "from": "human", "value": "My hosting provider (pairNetworks) has certain rules for scripts run on the server. I'm trying to compress a file for backup purposes, and would ideally like to use bzip2 to take advantage of its AWESOME compression rate. However, when trying to compress this 90 MB file, the pro...
Is there an easy way with LINQ to flatten an XML file? I can see a number of ways with XSLT but wondered what the best option with LINQ would be? I cant put the xml structure up exactly as stackoverflow seems to filter chevron chars. But its something like this nodeA --nodeA1 --nodeA2 NodeB I want to end up with ...
You can certainly use LINQ to XML to flatten an XML structure in C#. Below is an example of how you can achieve this with LINQ: ### Sample XML Structure Let's say you have an XML structure like this: ```xml <root> <nodeA> <nodeA1>Value1</nodeA1> <nodeA2>Value2</nodeA2> </nodeA> <NodeB>Val...
43,110
[ { "from": "human", "value": "Is there an easy way with LINQ to flatten an XML file?\nI can see a number of ways with XSLT but wondered what the best option with LINQ would be?\nI cant put the xml structure up exactly as stackoverflow seems to filter chevron chars. But its something like this \nnodeA \n--nod...
I have a table: MyTable config as XML title as varchar(255) In MyTable.config I have XML in the following structure: <configuration pagetitle="myConfig"> <column> <row> <component id="1" type="MyPiece" title="My Title" text="junk" /> </row> </column> </configuration> I need a script to inject th...
To update the `text` attribute of the `component` node in the XML stored in the `config` column of your `MyTable`, you can use SQL Server's XML manipulation functions. Given your requirement, you want to set the `text` attribute of the `<component>` node to the value from the `title` column. Here's how you can achieve...
43,918
[ { "from": "human", "value": "I have a table:\nMyTable\n config as XML\n title as varchar(255)\n\nIn MyTable.config I have XML in the following structure:\n<configuration pagetitle=\"myConfig\">\n <column>\n <row>\n <component id=\"1\" type=\"MyPiece\" title=\"My Title\" text=\"junk\" />\n </ro...
In my current color scheme, the F# interactive shell is unreadable within Visual Studio. I've been through all the color settings, and I can't find the settings it is using. How do you change the color settings for the F# interactive shell within Visual Studio?
To change the color settings for the F# Interactive (FSI) shell in Visual Studio, you can follow these steps: 1. **Open Visual Studio Options**: - Go to the `Tools` menu and select `Options`. 2. **Navigate to Fonts and Colors**: - In the Options dialog, expand the `Environment` section on the left pane and then...
42,780
[ { "from": "human", "value": "In my current color scheme, the F# interactive shell is unreadable within Visual Studio. I've been through all the color settings, and I can't find the settings it is using.\nHow do you change the color settings for the F# interactive shell within Visual Studio?\n" }, { ...
What's the secret to getting ClaimsResponse working with DotNetOpenId? For example, in this bit of code (from Scott Hanselman's blog) the ClaimsResponse object should have lots of nice little things like 'nickname' and 'email address', but the ClaimsResponse object itself is 'null': OpenIdRelyingParty openid = new Ope...
It sounds like you're trying to obtain claims from an OpenID provider using the DotNetOpenId library but not getting the expected `ClaimsResponse` populated. There are several things to check to ensure that you're correctly fetching claims from the OpenID provider. 1. **Check OpenID Provider Support**: Not all OpenID ...
41,428
[ { "from": "human", "value": "What's the secret to getting ClaimsResponse working with DotNetOpenId?\nFor example, in this bit of code (from Scott Hanselman's blog) the ClaimsResponse object should have lots of nice little things like 'nickname' and 'email address', but the ClaimsResponse object itself is 'n...
Is there an SSH client that can present a client side GUI interface to the screen* program? I'm thinking of an SSH program that would hook in with screen's session handling and map client side actions (clicking on a tab, ctrl-tab, scrolling, possibly even allowing several tabs to be seen at the same time) to whatever i...
Yes, there are several SSH clients and terminal multiplexer options that can work with `screen` and provide a graphical user interface to manage sessions and windows effectively. Here are a few solutions you can consider: 1. **tmux**: While not an SSH client itself, `tmux` is a powerful terminal multiplexer similar to...
40,694
[ { "from": "human", "value": "Is there an SSH client that can present a client side GUI interface to the screen* program?\nI'm thinking of an SSH program that would hook in with screen's session handling and map client side actions (clicking on a tab, ctrl-tab, scrolling, possibly even allowing several tabs ...
Let say I have a sheet in with columns Customer and CreatedDate with lots of row with data. Anyone who knows how to setup (through VBA or Formula) a second sheet that displays rows from the first sheet based on certain where statements, i.e. all rows with customers "created this month." (similar to a select ... where q...
You can achieve this in Excel using both VBA and formulas. Below are methods for both approaches. ### Method 1: Using Formulas 1. **Create a Second Sheet**: Start by creating a new sheet (e.g., "FilteredData"). 2. **Set Up Headers**: In the second sheet, set up headers that match the columns from the first sheet. ...
38,747
[ { "from": "human", "value": "Let say I have a sheet in with columns Customer and CreatedDate with lots of row with data. Anyone who knows how to setup (through VBA or Formula) a second sheet that displays rows from the first sheet based on certain where statements, i.e. all rows with customers \"created thi...
I need to have a staticText to float below another element with variable height. I'm taking a sample from the book JasperReports for Java Programmers. It says that it's possible to do it. The difference with my sample is that I use a hard coded string in textFieldExpression, they use a $F{} field. <textField isStretchW...
The behavior of `positionType="Float"` in JasperReports can indeed be a bit confusing, and it appears that you are on the right track regarding how it is supposed to work. When you set `positionType="Float"` on a `<staticText>` element, the `y` attribute is intended to be overridden by the vertical positioning of the...
41,835
[ { "from": "human", "value": "I need to have a staticText to float below another element with variable height. I'm taking a sample from the book JasperReports for Java Programmers. It says that it's possible to do it. The difference with my sample is that I use a hard coded string in textFieldExpression, the...
Or should they always be a function when business logic is invloved ? Example: Order.RequiresPayment property or function ? There are business rules as for when it is true or not IS there a pattern that may determine this?
The choice between using a property or a function when representing business logic in an object-oriented design often depends on several factors, including readability, performance, complexity, and the nature of the logic itself. ### Factors to Consider 1. **Complexity of the Logic**: - **Simple Logic**: If the lo...
41,016
[ { "from": "human", "value": "Or should they always be a function when business logic is invloved ?\nExample: Order.RequiresPayment \nproperty or function ?\nThere are business rules as for when it is true or not\nIS there a pattern that may determine this?\n" }, { "from": "gpt", "value": "The ch...
We're trying to send an image of a large SWF file to a server to have it mailed out and we're having a bit of trouble with transmission time. The SWF is about 900px x 600px and restricted to AS2 so we've been using this Bitmap Exporter class. We've tried using several different ways to transmit the data; base10, base3...
When working with large images and Flash (ActionScript 2), there are several strategies you can implement to improve the transmission time. Here are some suggestions to enhance the efficiency of sending bitmap data to your server: ### 1. **Compression** Compress the bitmap data before transmission. Instead of sending ...
43,335
[ { "from": "human", "value": "We're trying to send an image of a large SWF file to a server to have it mailed out and we're having a bit of trouble with transmission time. \nThe SWF is about 900px x 600px and restricted to AS2 so we've been using this Bitmap Exporter class. We've tried using several differen...
Just wondering how much people log within their applications??? I have seen this: "I typically like to use the ERROR log level to log any exceptions that are caught by the application. I will use the INFO log level as a "first level" debugging scheme to show whenever I enter or exit a method. From there I ...
Hi Anthony, You've raised a very common point of discussion among developers regarding logging practices in applications. Here’s an overview of various perspectives and approaches that might help you find a balance that works for you: ### 1. **Purpose of Logging:** - **Debugging:** Logging is a primary tool for di...
40,136
[ { "from": "human", "value": "Just wondering how much people log within their applications???\nI have seen this:\n\n\"I typically like to use the ERROR log\n level to log any exceptions that are\n caught by the application. I will use\n the INFO log level as a \"first level\"\n debugging scheme to show w...
If I've created a label in TFS, assigning it to several files, my coworkers cannot change the versions of files (nor add other files) to that label. We get this error: TF14077: The owner of a label cannot be changed. Researching the problem, I found this article, which states: It is possible that a user could be a...
It seems like you're encountering a situation with Team Foundation Server (TFS) where your intention to allow users to edit labels created by others is not functioning as expected. Here are a few troubleshooting steps and considerations that may help you resolve this issue: ### 1. **Verify Effective Permissions** Even...
36,846
[ { "from": "human", "value": "If I've created a label in TFS, assigning it to several files, my coworkers cannot change the versions of files (nor add other files) to that label. We get this error:\nTF14077: The owner of a label cannot be changed. \n\nResearching the problem, I found this article, which stat...
I have a simple table in SQL Server 2005, I wish to convert this to XML (using the "FOR XML" clause). I'm having trouble getting my XML to look like the required output. I've tried looking through various tutorials on the web, but I am struggling. Can someone help? The table I have looks like this TYPE,GROUP,VALUE Book...
To achieve the desired XML output from your SQL Server 2005 table, you'll want to structure your query to first group the data by `TYPE`, then output the nested rows accordingly. The key here is to first select the outer structure (the `<variable>` tags) and then use a subquery to select the inner rows for each group...
36,611
[ { "from": "human", "value": "I have a simple table in SQL Server 2005, I wish to convert this to XML (using the \"FOR XML\" clause). I'm having trouble getting my XML to look like the required output.\nI've tried looking through various tutorials on the web, but I am struggling. Can someone help?\nThe table...
What is the meaning of the concepts 'covariance' and 'contravariance'? Given 2 classes, Animal and Elephant (which inherits from Animal), my understanding is that you would get a run-time errors if you try and put an Elephant into an array of Animals, and this happens because Elephant is "bigger" (more specific) than A...
Covariance and contravariance are concepts that arise primarily in type theory and programming, especially in the context of object-oriented languages with inheritance and polymorphism. They help describe how types relate to each other when working with collections or interfaces. ### Covariance Covariance allows you ...
42,728
[ { "from": "human", "value": "What is the meaning of the concepts 'covariance' and 'contravariance'?\nGiven 2 classes, Animal and Elephant (which inherits from Animal), my understanding is that you would get a run-time errors if you try and put an Elephant into an array of Animals, and this happens because E...
I'm currently using AntLR to parse some files with a proprietary language. I have a need of highlighting sections of it on an editor (think of highlighting a method in a Java class, for instance). Does anyone has a hint on how to get them? Say I have this code: function test(param1, param2) { } as function is a keywor...
To achieve syntax highlighting in your editor using ANTLR, you need to extract the token positions and ranges from your parse tree or abstract syntax tree (AST) during the parsing process. Here's how you can approach this: 1. **Define Your Grammar**: Ensure your ANTLR grammar defines a rule for functions that captures...
39,256
[ { "from": "human", "value": "I'm currently using AntLR to parse some files with a proprietary language.\nI have a need of highlighting sections of it on an editor (think of highlighting a method in a Java class, for instance).\nDoes anyone has a hint on how to get them?\nSay I have this code:\nfunction test...
I am extremely new to python, having started to learn it less than a month ago, but experienced with some other programming languages (primarily C# and SQL). But now that Python 3.0 has been released and is not backwards compatible, what would be the advantages and disadvantages of deciding to focus on Python 3.0 or P...
Welcome to the world of Python! Since you're new to Python but experienced in other languages, you'll likely find the transition smooth due to your existing programming skills. Here are some advantages and disadvantages of focusing on Python 3.x versus Python 2.6: ### Advantages of Focusing on Python 3.x 1. **Future-...
42,126
[ { "from": "human", "value": "I am extremely new to python, having started to learn it less than a month ago, but experienced with some other programming languages (primarily C# and SQL). But now that Python 3.0 has been released and is not backwards compatible, what would be the advantages and disadvantage...
I've got a popup div showing on rightclick (I know this breaks expected functionality but Google Docs does it so why not?) However the element I'm showing my popup on has a "title" attribute set which appears over the top of my div. I still want the tooltip to work but not when the popup is there. What's the best way t...
To prevent the title attribute tooltip from showing while your popup is open, you can temporarily remove the title attribute from the element when the popup is displayed, and restore it once the popup is closed. Here's a simple implementation using jQuery. ### Step-by-Step Approach 1. **Store the original title**: Wh...
39,187
[ { "from": "human", "value": "I've got a popup div showing on rightclick (I know this breaks expected functionality but Google Docs does it so why not?) However the element I'm showing my popup on has a \"title\" attribute set which appears over the top of my div. I still want the tooltip to work but not whe...
Is it possible to use batch file (for XP) to call another batch file from different computer? if yes, how identify the target computer? Is it by IP comp ID?
Yes, it is possible to use a batch file on one computer to call another batch file on a different computer over a network in Windows XP. However, there are some prerequisites and considerations for this to work effectively. ### Prerequisites: 1. **Network Connection**: Ensure both computers are connected to the same n...
38,537
[ { "from": "human", "value": "Is it possible to use batch file (for XP) to call another batch file from different computer? if yes, how identify the target computer? Is it by IP comp ID?\n" }, { "from": "gpt", "value": "Yes, it is possible to use a batch file on one computer to call another batch...
I'm using MS Sql 2005. Why does this give me the correct results (returns 169 rows)... select * from [import_Data] where [import_Data].name not in ( select [import_Data].name from [import_Data] inner join [resource] on [import_Data].name = [resource].name where [imp...
The issue you're encountering with the second query returning 0 rows, while the first returns 169 rows, likely stems from the behavior of the `NOT IN` clause when dealing with null values. ### Explanation of the Behavior 1. **`NOT IN` and Null Values**: - When you use the `NOT IN` clause, if any of the values in ...
42,939
[ { "from": "human", "value": "I'm using MS Sql 2005.\nWhy does this give me the correct results (returns 169 rows)...\nselect\n * \nfrom \n [import_Data] \nwhere \n [import_Data].name not in \n (\n select \n [import_Data].name \n from \n [import_Data] \n inner join [resource] on [imp...
What is the 'correct' way to store a native pointer inside a Java object? I could treat the pointer as a Java int, if I happen to know that native pointers are <= 32 bits in size, or a Java long if I happen to know that native pointers are <= 64 bits in size. But is there a better or cleaner way to do this? Edit: Retur...
Storing native pointers within Java objects can be a bit tricky, especially considering the differences between Java's managed memory model and the native memory used by C/C++ applications. Using `int` or `long` to store pointers can lead to portability issues, especially when considering different architectures (32-bi...
42,117
[ { "from": "human", "value": "What is the 'correct' way to store a native pointer inside a Java object?\nI could treat the pointer as a Java int, if I happen to know that native pointers are <= 32 bits in size, or a Java long if I happen to know that native pointers are <= 64 bits in size. But is there a bet...
I am trying to get my head around a LINQ issue. The ultimate goal is to load tree view with data acquired from LINQ to SQL (view). The issue is when I try to access the data acquired it keeps throwing a "query operator not supported during runtime". The code involved is no more than: Dim tasklistdata As New lqDataC...
The issue you're experiencing is related to how LINQ to SQL works with its query results and deferred execution. When you define your `lqHospitalList` query, it doesn't actually execute immediately; it builds up a query that will be executed when you iterate over it or access it directly. The statement `lqHospitalList...
42,734
[ { "from": "human", "value": "I am trying to get my head around a LINQ issue. The ultimate goal is to load tree view with data acquired from LINQ to SQL (view). The issue is when I try to access the data acquired it keeps throwing a \"query operator not supported during runtime\". The code involved is no mor...
Playing with log4net, I have seen the possibility to use a per-thread stack of context labels called the NDC. The labels pushed on this stack are displayed in a PatternLayout by specifying the %x or the %ndc format parameter. The usage is something like: ILog log = log4net.LogManager.GetLogger(...) ; //pattern layou...
The Nested Diagnostic Context (NDC) feature in log4net can be extremely useful in a variety of scenarios, particularly when you want to add context to log messages for better traceability. Here are some scenarios where I've found this feature to be particularly beneficial: 1. **Multi-layered Applications**: In applica...
42,643
[ { "from": "human", "value": "Playing with log4net, I have seen the possibility to use a per-thread stack of context labels called the NDC. \nThe labels pushed on this stack are displayed in a PatternLayout by specifying the %x or the %ndc format parameter.\nThe usage is something like: \nILog log = log4net....
I need to find out the position of the TR. Actually, I got the index of the TD which is 291, But I need to get the index of the TR contains the TD. We can get the innerHTML by document.getElementsByTagName("td")[291].parentNode.innerHTML.. How to get the index of that parentNode I mean the TR. Please help me
To find the index of the `<tr>` that contains a specific `<td>`, you can use a combination of JavaScript DOM methods. Since you already have the index of the `<td>`, you can access its parent `<tr>`, and then loop through all the `<tr>` elements to find its index. Here's how you can do that: ```javascript // Get the ...
44,345
[ { "from": "human", "value": "I need to find out the position of the TR.\nActually, I got the index of the TD which is 291,\nBut I need to get the index of the TR contains the TD.\nWe can get the innerHTML by\ndocument.getElementsByTagName(\"td\")[291].parentNode.innerHTML..\n\nHow to get the index of that p...
I am familiar with using the os.system to run from the command line. However, I would like to be able to run a jar file from inside of a specific folder, eg. my 'test' folder. This is because my jar (located in my 'test' folder) requires a file inside of my 'test' folder. So, how would I write a function in my script t...
To run a JAR file from a specific folder using Python, you can use the `subprocess` module instead of `os.system`. The `subprocess` module is more flexible and powerful for executing shell commands. Below is a detailed explanation of how to write a function that runs your JAR file with a specified parameter. ### Steps...
40,560
[ { "from": "human", "value": "I am familiar with using the os.system to run from the command line. However, I would like to be able to run a jar file from inside of a specific folder, eg. my 'test' folder. This is because my jar (located in my 'test' folder) requires a file inside of my 'test' folder. So, ho...
I have a string. I need to replace all instances of a given array of strings from this original string - how would I do that? Currently I am using... var inputString = "this is my original string."; var replacement = ""; var pattern = string.Join("|", arrayOfStringsToRemove); Regex.Replace(inputString, pattern, replac...
You're correct that directly using a string to construct a regular expression can cause issues with special characters. In your case, when you're constructing the `pattern` for the regex using `string.Join("|", arrayOfStringsToRemove)`, any special regex characters in the strings will be interpreted as regex syntax rat...
43,733
[ { "from": "human", "value": "I have a string. I need to replace all instances of a given array of strings from this original string - how would I do that?\nCurrently I am using...\nvar inputString = \"this is my original string.\";\nvar replacement = \"\";\nvar pattern = string.Join(\"|\", arrayOfStringsToR...
When using routing in a Camel context via RouteBuilder, What is the practical difference between: 1) from(A).to(B).to(C); 2) from(A).to(B); from(B).to(C)
In Apache Camel, the way you define routes can have a significant impact on the behavior and structure of your message flows. Let's look at the practical differences between the two route definitions you've provided: ### 1. `from(A).to(B).to(C);` In this case, you're creating a single route that starts from endpoint ...
42,004
[ { "from": "human", "value": "When using routing in a Camel context via RouteBuilder, What is the practical difference between:\n1) from(A).to(B).to(C);\n2) from(A).to(B); from(B).to(C)\n" }, { "from": "gpt", "value": "In Apache Camel, the way you define routes can have a significant impact on th...
How do I get AS3 and/or Flex/AIR applications to communicate with CORBA apps?
To enable communication between ActionScript 3 (AS3) or Adobe Flex/AIR applications and CORBA (Common Object Request Broker Architecture) applications, you need to bridge the gap between the two technologies, as they operate on fundamentally different paradigms. Here are several approaches to achieve this: ### 1. **We...
40,020
[ { "from": "human", "value": "How do I get AS3 and/or Flex/AIR applications to communicate with CORBA apps?\n" }, { "from": "gpt", "value": "To enable communication between ActionScript 3 (AS3) or Adobe Flex/AIR applications and CORBA (Common Object Request Broker Architecture) applications, you ...
I had a painful experience with the "Analysis of Algorithms" classes back in college but have recently found a need for it in the real world. -- Anyway, I'm looking for a simple-yet-effective crash course. Any ideas? Related Sidenote: It sure would be nice if there were a "Cartoon Guide to Algorithm Analysis", taugh...
It's great to hear you're looking to refresh your knowledge of algorithm analysis! While a "Cartoon Guide to Algorithm Analysis" featuring Dilbert sounds entertaining, I can suggest a structured approach to help you get back on track with a focus on simplicity and effectiveness. Here’s a crash course outline you can fo...
38,784
[ { "from": "human", "value": "I had a painful experience with the \"Analysis of Algorithms\" classes back in college but have recently found a need for it in the real world. -- Anyway, I'm looking for a simple-yet-effective crash course. Any ideas?\nRelated Sidenote: It sure would be nice if there were a ...
Our organization provides a variety of services to our clients (e.g., web hosting, tech support, custom programming, etc...). There's a page on our website that lists all available services and their corresponding prices. This was static data, but my boss wants it all pulled from a database instead. There are about 100...
Your concern about needing to have a clean and efficient database design is valid. Here are a couple of approaches you can consider, along with their pros and cons: ### Option 1: Use Separate Columns for Price and Display Instead of creating a single price column and a separate display column, you could redefine your...
41,887
[ { "from": "human", "value": "Our organization provides a variety of services to our clients (e.g., web hosting, tech support, custom programming, etc...). There's a page on our website that lists all available services and their corresponding prices. This was static data, but my boss wants it all pulled fro...
I am a little confused as to the definition of classes as Models or Views in the Sketch example AppKit application (found at /Developer/Examples/AppKit/Sketch). The classes SKTRectangle, SKTCircle etc. are considered Model classes but they have drawing code. I am under the impression that Models should be free of any ...
Your confusion is quite understandable, as the lines between Model and View can sometimes blur, especially in graphics or drawing applications like the Sketch example in AppKit. In a typical Model-View-Controller (MVC) architecture, the distinction is generally as follows: - **Model**: Represents the data and the bus...
40,306
[ { "from": "human", "value": "I am a little confused as to the definition of classes as Models or Views in the Sketch example AppKit application (found at /Developer/Examples/AppKit/Sketch). The classes SKTRectangle, SKTCircle etc. are considered Model classes but they have drawing code. \nI am under the imp...
I need to spawn a process in Java (under Linux exclusively) that will continue to run after the JVM has exited. How can I do this? Basically the Java app should spawn an updater which stops the Java app, updates files and then starts it again. I'm interested in a hack & slash method to just get it working as well as ...
To achieve spawning a process in Java that continues running after the JVM exits, you can use a simple approach and a more structured approach. Below are both the "hack & slash" method and a more design-oriented solution. ### Hack & Slash Method You can use the `ProcessBuilder` class in Java to spawn a shell command ...
39,523
[ { "from": "human", "value": "I need to spawn a process in Java (under Linux exclusively) that will continue to run after the JVM has exited. How can I do this? \nBasically the Java app should spawn an updater which stops the Java app, updates files and then starts it again.\nI'm interested in a hack & slas...
After upgrading a VB 6 based application exposing a COM interface, COM Clients (in .NET) built against the previous version receive E_NOINTERFACE errors. The error message (translated), Cannot convert COM-object of type AProduct.AClass to interface of type AProduct._AClass ... What went wrong here? What is the cause...
The `E_NOINTERFACE` error you're encountering in the context of your upgraded VB6 application exposing a COM interface usually indicates that the requested interface is not supported by the object being referenced. This can happen for several reasons when upgrading a COM component, and you're right to consider the impl...
41,221
[ { "from": "human", "value": "After upgrading a VB 6 based application exposing a COM interface, \nCOM Clients (in .NET) built against the previous version receive E_NOINTERFACE errors.\nThe error message (translated),\n\nCannot convert COM-object of type AProduct.AClass to interface of type AProduct._AClass...
There are a few questions about configuring Apache for local development, such as this one, but I didn't see anything about IIS. Suggestions for locking down IIS without crippling it's functionality? In response to a comment, I'm looking to do ASP.NET development using the IIS server that comes with Windows XP Pro SP3 ...
When setting up IIS (Internet Information Services) for local development on Windows XP Pro SP3, it's important to strike a balance between security and functionality, especially since older versions like IIS 5 or 6 may have vulnerabilities that newer versions have addressed. Here are several suggestions for locking do...
42,969
[ { "from": "human", "value": "There are a few questions about configuring Apache for local development, such as this one, but I didn't see anything about IIS. Suggestions for locking down IIS without crippling it's functionality?\nIn response to a comment, I'm looking to do ASP.NET development using the IIS ...
I'm developing a small tray-icon application for Windows and I need to display non-intrusive visual notifications similar to those that appear when you receive a new message in MSN Messenger or any other IM application. I have looked at Snarl, but it seems to be a separate application that I need to install. I want som...
For developing a tray-icon application on Windows that can display non-intrusive visual notifications without requiring a separate application, consider the following options: ### 1. **Toast Notifications with Windows API** Windows provides a built-in way to display toast notifications via the Windows API. You can use...
41,331
[ { "from": "human", "value": "I'm developing a small tray-icon application for Windows and I need to display non-intrusive visual notifications similar to those that appear when you receive a new message in MSN Messenger or any other IM application.\nI have looked at Snarl, but it seems to be a separate appl...
solution structure [Plain Winforms + VS 2008 Express Edition] CoffeeMakerInterface (NS CoffeeMaker) CoffeeMakerSoftware (NS CoffeeMakerSoftware) TestCoffeeMaker (NS TestCoffeeMaker) CoffeeMakerSoftware proj references CoffeeMakerInterface. TestCoffeeMaker proj references CoffeeMakerInterface and CoffeeMakerSoftware. ...
It sounds like you're encountering a common issue related to project references and namespaces in Visual Studio. Here are several suggestions that might help you resolve the build errors you're experiencing in your WinForms project: 1. **Check for Circular References**: Ensure that there are no circular dependencies b...
40,934
[ { "from": "human", "value": "solution structure [Plain Winforms + VS 2008 Express Edition]\n\nCoffeeMakerInterface (NS CoffeeMaker)\nCoffeeMakerSoftware (NS CoffeeMakerSoftware)\nTestCoffeeMaker (NS TestCoffeeMaker)\n\nCoffeeMakerSoftware proj references CoffeeMakerInterface.\nTestCoffeeMaker proj reference...
Duplicate: Working copy XXX locked and cleanup failed in SVN When I try to commit: Error: Working copy 'D:\Webs\Drupal 6' locked Error: Please execute the "Cleanup" command. When I try to do a cleanup: Cleanup failed to process the following paths: D:\Webs\Drupal 6 How can I solve this problem?
The error messages you're encountering indicate that your Subversion (SVN) working copy is in a locked state, which is preventing you from performing commits or cleanups. Here are steps you can follow to resolve this issue: ### Step-by-Step Solutions: 1. **Backup Your Working Copy**: Before making any changes, it’s a...
41,179
[ { "from": "human", "value": "Duplicate: Working copy XXX locked and cleanup failed in SVN\nWhen I try to commit:\nError: Working copy 'D:\\Webs\\Drupal 6' locked \nError: Please execute the \"Cleanup\" command. \n\nWhen I try to do a cleanup:\nCleanup failed to process the following paths:\nD:\\Webs\\Drup...
I'm starting a new job and am inheriting a asp .net web application on the 2.0 .net framework. The application works alright. It published successfully from vs 2005. I created a new virtual directory in IIS and pointed to the precompiled directory just published. When I load my application, I get an error that reads as...
It sounds like you're running into an issue where the ASP.NET application is being treated as an ASP page (or as a static XML file) by IIS instead of executing the server-side code. Here are some steps to troubleshoot and potentially fix the issue: 1. **Verify Application Pool Settings**: - Make sure that the appli...
40,265
[ { "from": "human", "value": "I'm starting a new job and am inheriting a asp .net web application on the 2.0 .net framework. The application works alright. It published successfully from vs 2005. I created a new virtual directory in IIS and pointed to the precompiled directory just published.\nWhen I load my...
Random quick question. The System.Web.Cache class, at what level is the information stored? On a per session level or whole application level? Thanks
The `System.Web.Cache` class in ASP.NET stores information at the whole application level. This means that any cached items are shared across all users and sessions of the application. This is different from session state, which is stored on a per-user session level, allowing individual users to have their own unique d...
47,225
[ { "from": "human", "value": "Random quick question. \nThe System.Web.Cache class, at what level is the information stored? On a per session level or whole application level?\nThanks\n" }, { "from": "gpt", "value": "The `System.Web.Cache` class in ASP.NET stores information at the whole applicati...
When first setting and subsequently experimenting with a Papervison3D scene, I often find myself lost because I somehow get the camera not looking at the scene geometry. If I don't realize that's the problem, then I start trying to find out why my scene isn't rendering - d'oh! Is there a best practice for setting up a...
When setting up a Papervision3D scene, it's important to ensure that the camera is positioned correctly so you can view all the elements in your scene. Here are some best practices for configuring a camera to achieve a comprehensive overview, such as an isometric top-down view: ### 1. **Set Up the Scene Extents** Firs...
42,615
[ { "from": "human", "value": "When first setting and subsequently experimenting with a Papervison3D scene, I often find myself lost because I somehow get the camera not looking at the scene geometry. If I don't realize that's the problem, then I start trying to find out why my scene isn't rendering - d'oh!\...
This is a second-hand question from an OS development site, but it made me curious since I couldn't find a decent explanation anywhere. When compiling and linking a free-standing C++ program using gcc, sometimes a linker error like this occurs: out/kernel.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0...
The symbol `__gxx_personality_v0` is part of the C++ exception handling mechanism and is specifically related to the Itanium C++ ABI (Application Binary Interface), which is used by many compilers, including GCC. Let's break down its purpose and relevance, especially in the context of free-standing environments. ### P...
41,164
[ { "from": "human", "value": "This is a second-hand question from an OS development site, but it made me curious since I couldn't find a decent explanation anywhere.\nWhen compiling and linking a free-standing C++ program using gcc, sometimes a linker error like this occurs:\nout/kernel.o:(.eh_frame+0x11): u...
Is there a way to monitor the size of the cache on your web server? I just want to see how much of my server's memory is being taken up by the cache.
Yes, there are several methods to monitor the size of the cache on your web server, depending on the type of cache you are using (e.g., file-based caching, memory caching with systems like Memcached or Redis, etc.) and the web server itself (e.g., Apache, Nginx, etc.). Below are some common approaches for monitoring ca...
42,144
[ { "from": "human", "value": "Is there a way to monitor the size of the cache on your web server? I just want to see how much of my server's memory is being taken up by the cache.\n" }, { "from": "gpt", "value": "Yes, there are several methods to monitor the size of the cache on your web server, ...
Solution: I've misinterpreted the example from SQL Books Online. Yes, that below the section Errors Unaffected by a TRY…CATCH Construct ... I'm so sorry :( I was just trying to execute this simple example in SQL Server Management Studio: USE AdventureWorks; GO BEGIN TRY -- Table does not exist; object name reso...
No problem! It's a common point of confusion when working with error handling in SQL Server. The behavior you're experiencing is indeed due to the fact that certain types of errors in SQL Server, specifically compilation errors like the one caused by a non-existent table, are raised before the execution of the block of...
44,078
[ { "from": "human", "value": "Solution:\n\nI've misinterpreted the example from SQL Books Online. Yes, that below the section Errors Unaffected by a TRY…CATCH Construct ... I'm so sorry :(\n\n\nI was just trying to execute this simple example in SQL Server Management Studio:\nUSE AdventureWorks;\nGO\n\nBEGIN...
I want to calculate the allowance for a consultant traveling to overseas countries. I have to take into account that I can gain a day or lose a day traveling to an international country. Different countries has a different set of allowances. How can I adjust my code to know whether I will gain a day or lose and adjust...
To calculate the allowance for a consultant traveling internationally, factoring in the potential gain or loss of days due to travel, you can implement a code structure that checks the travel dates and determines the adjustment. Below is a Python example that illustrates how you could approach this. ### Example Code ...
41,466
[ { "from": "human", "value": "I want to calculate the allowance for a consultant traveling to overseas countries. \nI have to take into account that I can gain a day or lose a day traveling to an international country. Different countries has a different set of allowances.\nHow can I adjust my code to know w...
I want to create a C# program to provision Windows Mobile devices. I have found MSDN documentation on a function called DMProcessConfigXML, but no instructions on how to use this function. How can I use this function in my Windows Mobile app? I suspect it has something to do with using pinvoke. Thanks, Paul
To use the `DMProcessConfigXML` function in your C# application for provisioning Windows Mobile devices, you will indeed need to use Platform Invocation Services (P/Invoke) to call this native function from the DLL that provides it. ### Step-by-Step Guide to Use DMProcessConfigXML 1. **Identify the DLL**: The `DMProc...
43,611
[ { "from": "human", "value": "I want to create a C# program to provision Windows Mobile devices. I have found MSDN documentation on a function called DMProcessConfigXML, but no instructions on how to use this function.\nHow can I use this function in my Windows Mobile app? I suspect it has something to do wi...
So I'm converting my mapping files on an as needed basis (when making changes, convert to mapping). Any when configuring NHibernate like so: Assembly asm = Assembly.Load("RPMWare.Core.DataAccess"); //NHibernate configuration: see hibernate.cfg.xml var cfg = new Configuration(); cfg.AddMappingsFromAssembly(asm); cfg.Co...
The exception you're encountering indicates that there is a version mismatch between the NHibernate assembly your application is trying to load and the version that is referenced in your project's configuration or code. Here are several steps you can take to troubleshoot and resolve this issue: 1. **Check Assembly Ref...
41,584
[ { "from": "human", "value": "So I'm converting my mapping files on an as needed basis (when making\nchanges, convert to mapping). Any when configuring NHibernate like so:\nAssembly asm = Assembly.Load(\"RPMWare.Core.DataAccess\");\n\n//NHibernate configuration: see hibernate.cfg.xml\nvar cfg = new Configura...
Ok, this is working on windows. My Java app is running and functioning normally javac -classpath .;ojdbc14.jar -g foo.java java -classpath .;ojdbc14.jar foo However, when I do the same thing on Unix I get this error: ojdbc14.jar: not found What am I doing wrong? I know the ";" is telling my shell that ojdbc14.ja...
The issue you're encountering is related to the way classpath separators are handled in Windows versus Unix-like systems (such as Linux or macOS). In Windows, the classpath uses a semicolon (`;`) as the separator, whereas in Unix-like systems, you should use a colon (`:`) instead. Here's how to fix your command for Un...
44,919
[ { "from": "human", "value": "Ok, this is working on windows. My Java app is running and functioning normally\njavac -classpath .;ojdbc14.jar -g foo.java\njava -classpath .;ojdbc14.jar foo\n\nHowever, when I do the same thing on Unix I get this error:\n ojdbc14.jar: not found\nWhat am I doing wrong? I k...
In OpenGL I'm trying to rotate a camera around a point, with camera being distance r from the point and facing the point when it rotates. In other words, I want the camera to move along the circumference of a circle at a radius r from the center, with the camera facing the center at any point along the circumference....
To rotate the camera around a specific point in 3D space (in your case, the point (3, 0, 3)), you need to set up your transformations carefully. You need to follow these steps: 1. **Translate** the camera to the center of the circle. 2. **Rotate** around the desired axis (in this case, the Y-axis). 3. **Translate** ba...
41,477
[ { "from": "human", "value": "In OpenGL I'm trying to rotate a camera around a point, with camera being distance r from the point and facing the point when it rotates. In other words, I want the camera to move along the circumference of a circle at a radius r from the center, with the camera facing the cen...
I have a MySQL (v 5, MyISAM) query that returns different rows depending on date string format. (1) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008-10-31 23:59:59' (2) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008/10/31 23:59:59' (3) date1 > '2008-10-31 23:59:59' (4) date1 >...
The behavior you are observing in your MySQL queries is due to how MySQL handles date and datetime string comparisons with different formats. 1. **Date Formats in MySQL**: MySQL supports various date and datetime formats for string literals, but the standard format (which is best practice) is `YYYY-MM-DD` for dates an...
42,287
[ { "from": "human", "value": "I have a MySQL (v 5, MyISAM) query that returns different rows depending on date string format.\n(1) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008-10-31 23:59:59'\n(2) IFNULL(date1, ADDDATE('2008/10/31 23:59:59',INTERVAL 1 DAY)) > '2008/10/31 23:59:59'\n\n...
At the moment we are checking out our php producation code straight into www. With this we get all the Netbeans meta data and project files that are needed for the site, we have to constantly rm the metadata files from www so they are not accessible from the browser, same goes for all the svn metadata and files too. Is...
Checking out your production code directly into the `www` directory and having to manually remove metadata files is not an ideal practice for a number of reasons. Here are several recommendations to address your concerns: ### 1. Use a Deployment Process Instead of checking out directly to the `www` directory, conside...
40,810
[ { "from": "human", "value": "At the moment we are checking out our php producation code straight into www. With this we get all the Netbeans meta data and project files that are needed for the site, we have to constantly rm the metadata files from www so they are not accessible from the browser, same goes f...
Is there a way in Python to handle XML files similar to the way PHP's SimpleXML extension does them? Ideally I just want to be able to access certain xml datas from a list object.
Yes, Python provides several libraries that can help you work with XML files similarly to how PHP's SimpleXML extension does. One of the most popular and user-friendly libraries for handling XML in Python is `xml.etree.ElementTree`, which is part of Python's standard library. Here’s how you can use `ElementTree` to pa...
41,730
[ { "from": "human", "value": "Is there a way in Python to handle XML files similar to the way PHP's SimpleXML extension does them?\nIdeally I just want to be able to access certain xml datas from a list object.\n" }, { "from": "gpt", "value": "Yes, Python provides several libraries that can help ...
I have a web application which references an external DLL (lets call this productA.dll) I have updated my GAC, my web.config, and my references, checked the versions and everything looks consistent. However, when I run my application, methods that I use from productA.dll cannot be called, and I get a the specified modu...
When encountering the "specified module cannot be found" error in a web application referencing an external DLL, despite being able to use that DLL in a Windows application, here are several diagnostics techniques and potential solutions you can consider: ### 1. **Check the Deployment Target:** Ensure that your web...
40,725
[ { "from": "human", "value": "I have a web application which references an external DLL (lets call this productA.dll)\nI have updated my GAC, my web.config, and my references, checked the versions and everything looks consistent.\nHowever, when I run my application, methods that I use from productA.dll canno...
In Python 2.6, a new "timeout" parameter was added to the httplib.HTTPConnection class: http://docs.python.org/library/httplib.html#httplib.HTTPConnection However, this is only a timeout for the connection to a server. I am looking to set a timeout value for the request, not the connection. This doesn't seem to be su...
In Python 2.6, while the `httplib` module introduced a timeout for establishing a connection, it does not directly support timeouts for the entire request process. However, you can emulate this behavior using threads or the `signal` module to handle timeouts. ### Method 1: Using Threads You can use a separate thread t...
41,254
[ { "from": "human", "value": "In Python 2.6, a new \"timeout\" parameter was added to the httplib.HTTPConnection class:\nhttp://docs.python.org/library/httplib.html#httplib.HTTPConnection\nHowever, this is only a timeout for the connection to a server. I am looking to set a timeout value for the request, no...
I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions. As we've gone along we've implemented some very ...
It's great to hear that you're finding inspiration in frameworks like SproutCore and Cappuccino, which have indeed drawn from established design patterns in desktop GUI development. There are several other frameworks and paradigms from both desktop and web applications that can offer you valuable insights into structur...
40,797
[ { "from": "human", "value": "I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions.\nAs we'...
Does anyone know how to auto-mount an Elastic Block Storage (EBS) volume when starting a Windows 2003 instance in Amazon's Elastic Compute Cloud (EC2)?
To auto-mount an Elastic Block Store (EBS) volume when starting a Windows 2003 instance in Amazon EC2, you'll need to follow a few steps. Windows 2003 does not have built-in support for automatically mounting EBS volumes at startup, but you can use a combination of scripts and Windows Task Scheduler to achieve this. H...
41,116
[ { "from": "human", "value": "Does anyone know how to auto-mount an Elastic Block Storage (EBS) volume when starting a Windows 2003 instance in Amazon's Elastic Compute Cloud (EC2)?\n" }, { "from": "gpt", "value": "To auto-mount an Elastic Block Store (EBS) volume when starting a Windows 2003 ins...
Is there a difference in behavior between adding a control to the ASPX page directly and loading a control programmatically and adding to a placeholder? The control inherits from System.Web.UI.WebControls.DataBoundControl. The reason I ask is that I have a control that works when I add it to the ASPX page like so: ... ...
Yes, there are notable differences in behavior between adding a control directly in the ASPX markup and creating and adding a control programmatically in the code-behind, which can lead to the issues you're experiencing. Here are some factors to consider: 1. **ViewState Management**: When you add a control in the ASP...
38,874
[ { "from": "human", "value": "Is there a difference in behavior between adding a control to the ASPX page directly and loading a control programmatically and adding to a placeholder?\nThe control inherits from System.Web.UI.WebControls.DataBoundControl.\nThe reason I ask is that I have a control that works w...
I am querying Google Base using the .NET library pretty much as described on this page. http://code.google.com/apis/base/docs/2.0/developers_guide_dotnet.html When I run the query a GBaseFeed is returned and it will usually have the TotalRecords property set to something like 35, but in the Entries collection it will o...
The issue you're encountering with Google Base API returning a `GBaseFeed` with a `TotalRecords` count that does not match the number of items in the `Entries` collection can happen for a few reasons: 1. **Pagination**: Google Base API may implement pagination, which means that your query may return results in batches...
43,571
[ { "from": "human", "value": "I am querying Google Base using the .NET library pretty much as described on this page.\nhttp://code.google.com/apis/base/docs/2.0/developers_guide_dotnet.html\nWhen I run the query a GBaseFeed is returned and it will usually have the TotalRecords property set to something like ...
I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge. On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge. Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control? ...
To create a "meter" effect similar to what you see in Windows Explorer without the animation of a `TProgressBar`, you will want to take advantage of custom drawing in Delphi. Since the `TProgressBar` is not well-suited for a stationary gauge when the Aero theme is enabled (due to the animation), the recommended approac...
36,472
[ { "from": "human", "value": "I'm using a Delphi 2009 VCL TProgressBar as a kind of \"empty/full\" gauge.\nOn Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge.\nIs there any way of disabling this (NOT by adjusting user's theme settings...
Is there any BNF grammar for regular expression?
Yes, there are Backus-Naur Form (BNF) grammars that can represent the syntax of regular expressions. A regular expression is a sequence of characters that defines a search pattern, usually for string matching. Below is a simple BNF grammar that describes the basic components of regular expressions. ### BNF Grammar for...
38,563
[ { "from": "human", "value": "Is there any BNF grammar for regular expression?\n" }, { "from": "gpt", "value": "Yes, there are Backus-Naur Form (BNF) grammars that can represent the syntax of regular expressions. A regular expression is a sequence of characters that defines a search pattern, usua...
I have got a button with an onclick javascript event that does some form validation. If the validation fails, false is returned. Otherwise nothing is returned, and the form should be submitted. But what's happening is the url loads in the address bar but the page never loads. No headers are sent, no error messages dis...
The issue you're experiencing with your form submission in Internet Explorer (IE) could be related to how the `onclick` event handler is set up, particularly with returning `false`. Here's a checklist of potential issues and solutions that might resolve your problem: 1. **Event Handling**: Make sure that your event ha...
42,721
[ { "from": "human", "value": "I have got a button with an onclick javascript event that does some form validation. If the validation fails, false is returned. Otherwise nothing is returned, and the form should be submitted. \nBut what's happening is the url loads in the address bar but the page never loads. ...
What is the most efficient algorithm for grouping identical items together in an array, given the following: Almost all items are duplicated several times. The items are not necessarily integers or anything else that's similarly simple. The range of the keys is not even well-defined, let alone small. In fact, the ke...
To efficiently group identical items in an array where items can be arbitrary structs, and you have constraints on memory allocations and performance, a viable approach is to use a hash table with a custom memory management strategy. ### Steps to Implement the Grouping Algorithm 1. **Define a Hash Function**: Impleme...
43,116
[ { "from": "human", "value": "What is the most efficient algorithm for grouping identical items together in an array, given the following:\n\nAlmost all items are duplicated several times.\nThe items are not necessarily integers or anything else that's similarly simple. The range of the keys is not even wel...
I use an SQL statement to remove records that exist on another database but this takes a very long time. Is there any other alternative to the code below that can be faster? Database is Access. email_DB.mdb is from where I want to remove the email addresses that exist on the other database (table Newsletter_Subscribers...
The error message "Too few parameters. Expected 1." typically indicates that Access cannot recognize one of the fields or parameters in your query. This can happen if the SQL statement includes field names from the table that aren't fully qualified, or if it tries to reference fields in a way that Access doesn't allow ...
38,646
[ { "from": "human", "value": "I use an SQL statement to remove records that exist on another database but this takes a very long time.\nIs there any other alternative to the code below that can be faster? Database is Access.\nemail_DB.mdb is from where I want to remove the email addresses that exist on the o...
I've been trying to add a swf over a swf on a html page, it's working fine in Firefox, but in IE, the one that's added first is always on top of the other one. I used z-index but it's not working, does anyone know how to solve this? Thanks. I already added wmode:transparent, it is working in firefox but not in IE 6.
When embedding SWF files (Flash) in HTML, browser inconsistencies can be a challenge, especially with Internet Explorer, particularly older versions like IE6. Using `wmode` set to `transparent` or `opaque` should ideally help manage stacking, but issues can still arise. Here's a checklist and some solutions to try to ...
39,133
[ { "from": "human", "value": "I've been trying to add a swf over a swf on a html page, it's working fine in Firefox, but in IE, the one that's added first is always on top of the other one. I used z-index but it's not working, does anyone know how to solve this? Thanks.\nI already added wmode:transparent, it...
I am trying to comment an API (.Net) that I am exposing to a customer. I am doing this by using XML comments, and extracting via SandCastle. This is all fine and dandy, however I have unittesting for the API, and thought the code from these would be good to place in the example tags. So does anyone know of a good way t...
Integrating unit test code into the XML comments for your API documentation can indeed enhance the clarity and usefulness of your examples. Here are a few approaches you could consider for extracting unit test code and including it in the XML comments: ### 1. Custom Tooling to Extract Unit Test Code Create a custom t...
43,121
[ { "from": "human", "value": "I am trying to comment an API (.Net) that I am exposing to a customer.\nI am doing this by using XML comments, and extracting via SandCastle.\nThis is all fine and dandy, however I have unittesting for the API, and thought the code from these would be good to place in the exampl...
To outline: I have a parser that grabs Cell references using the following regex "$"?{letter}{1,2}"$"?{digit}{1,3} I cant seem to find an elegant way to split the resulting char* into its row, and column components. ex. split a1 into a and 1 or split $aa$4 into fixed_col a fixed row 4 Any help is appreciate...
To split a cell reference into its column and row components, you can use a combination of regex and string manipulation in a programming language of your choice. Here, I'll provide a solution in Python, but the logic can be adapted to other languages as well. ### Using Regular Expressions in Python You can create a ...
42,232
[ { "from": "human", "value": "To outline: I have a parser that grabs Cell references using the following regex\n\"$\"?{letter}{1,2}\"$\"?{digit}{1,3}\nI cant seem to find an elegant way to split the resulting char* into its row, and column components.\nex. split a1 into a and 1 \n or \nsplit $aa$4 i...
Is it possible to write a PL/SQL query to identify a complete list of a stored procedures dependencies? I'm only interested in identifying other stored procedures and I'd prefer not to limit the depth of nesting that it gets too either. For example, if A calls B, which calls C, which calls D, I'd want B, C and D report...
Yes, you can create a PL/SQL script to identify all the dependencies of stored procedures recursively. In Oracle, you can use the `USER_DEPENDENCIES` view to find dependencies between objects. However, since you want to traverse the dependencies recursively and include all the nested calls, you can create a recursive p...
42,137
[ { "from": "human", "value": "Is it possible to write a PL/SQL query to identify a complete list of a stored procedures dependencies? I'm only interested in identifying other stored procedures and I'd prefer not to limit the depth of nesting that it gets too either. For example, if A calls B, which calls C, ...
I have an application built in Flex Builder 3. It has a fair amount of mxml and as3 code which uses some other custom compenents. I have looked at the documentation on building components which shows how to make a simple mxml or action script component that extends something like a combobox, but I'm lost as to how to...
To convert your existing Flex application built in Flex Builder 3 into a reusable component, you'll need to encapsulate the application's logic and interface into a single component that can be instantiated multiple times. Here are the steps to help you achieve that: ### Step 1: Identify the Application's Entry Points...
31,786
[ { "from": "human", "value": "I have an application built in Flex Builder 3. It has a fair amount of mxml and as3 code which uses some other custom compenents. I have looked at the documentation on building components which shows how to make a simple mxml or action script component that extends something l...
I have been working on a Java project for a class for a while now. It is an implementation of a linked list (here called AddressList, containing simple nodes called ListNode). The catch is that everything would have to be done with recursive algorithms. I was able to do everything fine sans one method: public AddressLi...
Your approach to recursively reversing the linked list looks good overall, but there are a few considerations and potential improvements you might want to take into account: 1. **Avoiding Unnecessary Object Creation**: The current implementation creates a new `AddressList` each time `reverse()` is called. This can be ...
43,615
[ { "from": "human", "value": "I have been working on a Java project for a class for a while now. It is an implementation of a linked list (here called AddressList, containing simple nodes called ListNode). The catch is that everything would have to be done with recursive algorithms. I was able to do everythi...
I was chatting to someone the other day who suggested that Rails and PHP are the most suitable platforms for web applications, and to avoid Java. My background is mainly Java, and I know that it is considered by some to be too verbose and "heavyweight", but is used occasionally (e.g. by LinkedIn). So I'm wondering whet...
Java has certainly evolved over the years, and while it may have a reputation for being "verbose" and "heavyweight," many developers have successfully built and deployed web applications using Java-based frameworks and technologies. Here are some insights based on recent trends and experiences: ### Success Stories Usi...
42,676
[ { "from": "human", "value": "I was chatting to someone the other day who suggested that Rails and PHP are the most suitable platforms for web applications, and to avoid Java. My background is mainly Java, and I know that it is considered by some to be too verbose and \"heavyweight\", but is used occasionall...
I have encountered a rather odd error that I do not understand. I created a C# console application that was designed to just be a test to see if my web service was working from outside my network. All it did was try and connect to the webservice, output each stage to the console and write it to a text file so they co...
The error you're encountering, "The NTVDM CPU has encountered an illegal instruction," suggests that the system is trying to run a 16-bit application on a 64-bit version of Windows or that there are issues related to the Windows Virtual DOS Machine (NTVDM), which is responsible for running 16-bit applications. ### Pos...
42,207
[ { "from": "human", "value": "I have encountered a rather odd error that I do not understand. I created a C# console application that was designed to just be a test to see if my web service was working from outside my network. All it did was try and connect to the webservice, output each stage to the conso...
This is a follow on to this question. I am trying to avoid using the x509 certificate method as that makes my client installs more complex. If basicHttpBinding is not the only option, where are some samples of other binding methods. My clients are on .Net 2.0, I don't have access to System.ServiceModel namespace as...
Given your scenario where you have clients built on .NET 2.0 and a web service built on .NET 3.5 using WCF, it’s important to choose a binding that is compatible with the client framework while still providing the required functionality. Since the `System.ServiceModel` namespace is not available in .NET 2.0, you will n...
24,098
[ { "from": "human", "value": "This is a follow on to this question. I am trying to avoid using the x509 certificate method as that makes my client installs more complex. If basicHttpBinding is not the only option, where are some samples of other binding methods. \nMy clients are on .Net 2.0, I don't have ...
I'm researching Open Source GIS resources - and wonder out of all the Open Source tools that are out there - what people are actually using / finding useful. http://en.wikipedia.org/wiki/GIS_software
There are several popular open-source GIS tools that users find particularly useful in various applications. Here’s a list of some of the most widely used and appreciated open-source GIS resources: 1. **QGIS (Quantum GIS)**: - QGIS is one of the most popular open-source desktop GIS applications. It is user-friendl...
41,264
[ { "from": "human", "value": "I'm researching Open Source GIS resources - and wonder out of all the Open Source tools that are out there - what people are actually using / finding useful.\nhttp://en.wikipedia.org/wiki/GIS_software\n" }, { "from": "gpt", "value": "There are several popular open-so...
I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I know there are many!) to use carriage returns to format the tooltip. To add the tip I'm using the title attribute. I've looked around the usual sites and using the basic template of: <a title='Tool...
Unfortunately, the `title` attribute in HTML does not support HTML formatting or line breaks. The content of the `title` attribute is intended for a simple tooltip and is rendered as plain text by most browsers. As such, you can't use HTML tags like `<br />` or any escape sequences to create line breaks. If you want t...
43,710
[ { "from": "human", "value": "I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I know there are many!) to use carriage returns to format the tooltip.\nTo add the tip I'm using the title attribute. I've looked around the usual sites and u...
Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string? For example: asimpletest -> Asimpletest aSimpleTest -> ASimpleTest I would like to be able to do all string lengths as well.
You can achieve this easily in Python by using string manipulation methods. Here’s a simple way to capitalize just the first letter of a string while keeping the rest of the string unchanged: ```python def capitalize_first_letter(s): if not s: # Check if the string is empty return s return s[0].upper(...
44,422
[ { "from": "human", "value": "Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string?\nFor example:\nasimpletest -> Asimpletest\naSimpleTest -> ASimpleTest\n\nI would like to be able to do all string lengths as wel...
Is it possible to use EventListener to Listen to a variable and detect when the value of that variable changes? Thanks.
In JavaScript, you cannot directly use `EventListener` to listen to changes in a variable, as the event system is primarily designed for listening to events on DOM elements rather than variable changes. However, you can achieve similar behavior by employing several techniques. Here are a few common approaches: ### 1. ...
40,781
[ { "from": "human", "value": "Is it possible to use EventListener to Listen to a variable and detect when the value of that variable changes? Thanks.\n" }, { "from": "gpt", "value": "In JavaScript, you cannot directly use `EventListener` to listen to changes in a variable, as the event system is ...
While trying to answer a question in the vicinity 'Unit Testing WPF Bindings' I had the following niggling question.. What's the best way to find if you have WPF Data Binding wiring setup incorrectly (or you just broke something that was wired up correctly) ? Although the unit-testing approach seems to be like Joel's '...
Debugging WPF data binding issues can indeed be tricky, especially because binding errors often don't surface until runtime, and the error messages can sometimes be cryptic. Here are some effective strategies and tools to help you identify if your WPF data bindings are set up incorrectly or if something has broken: ##...
42,684
[ { "from": "human", "value": "While trying to answer a question in the vicinity 'Unit Testing WPF Bindings' I had the following niggling question..\nWhat's the best way to find if you have WPF Data Binding wiring setup incorrectly (or you just broke something that was wired up correctly) ?\nAlthough the unit...
I'm looking for a single line regex which does the following: Given a HTML tag with the "name" attribute, I want to replace it with my own attribute. If that tag lacks the name attribute, I want to implant my own attribute. The result should look like this: <IMG name="img1" ...> => <IMG name="myImg1" ...> <IMG ...> => ...
Yes, you can achieve this with a single line regex using a substitution approach. Here is a regex pattern that does what you need: ```regex <(\w+)([^>]*)\s*(name="([^"]*)"\s*)?([^>]*)> ``` And you can replace it with: ``` <$1$2 name="myImg1"$5> ``` ### Explanation: - `<(\w+)`: Captures the opening tag name (like `I...
44,240
[ { "from": "human", "value": "I'm looking for a single line regex which does the following:\nGiven a HTML tag with the \"name\" attribute, I want to replace it with my own attribute. If that tag lacks the name attribute, I want to implant my own attribute. The result should look like this:\n<IMG name=\"img1\...
I would like to set up some WMV Video Streaming, using Windows 2003's Streaming Media Server and Silverlight. Now, unfortunately Silverlight only supports HTTP, which means that people can just download the videos. While that in itself is not a problem, I wonder what options there are to prevent them being playable out...
Setting up a WMV video streaming solution with DRM on Windows Server 2003 and Silverlight involves several components. Here's a general outline of what you'll need and how to proceed: ### Components Needed 1. **Windows Server 2003 with Streaming Media Services**: Ensure you have the Streaming Media Server installed a...
42,758
[ { "from": "human", "value": "I would like to set up some WMV Video Streaming, using Windows 2003's Streaming Media Server and Silverlight.\nNow, unfortunately Silverlight only supports HTTP, which means that people can just download the videos. While that in itself is not a problem, I wonder what options th...
How can I play two or more video files/streams in different windows with frame-level synchronism? What tools, libraries or APIs could I use to do that? By frame-level synchronism I mean that my solution must guarantee that each frame of each video file must be shown at the same time its corresponding frames (from the o...
To achieve frame-level synchronization of multiple video files or streams across different windows, you will need to consider several aspects, including video decoding, timing, and rendering. Here’s a general approach along with tools and libraries you can use: ### Approach 1. **Common Time Reference**: Use a common ...
37,172
[ { "from": "human", "value": "How can I play two or more video files/streams in different windows with frame-level synchronism?\nWhat tools, libraries or APIs could I use to do that?\nBy frame-level synchronism I mean that my solution must guarantee that each frame of each video file must be shown at the sam...
As a followup to this question on absolute positioning within a table cell, I'm trying to get something working in Firefox. Once again, I'm about 95% there, and there's just 1 little thing that's keeping me from declaring victory. Using the follow sample markup: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN...
To ensure that the `.wrap` div fills the table cell and pushes the `.manage` area to the bottom, you can modify your CSS as follows: 1. Set the `.wrap` div to have a `display: flex` layout. 2. Set `flex-direction: column` to arrange the children (the paragraph and the management area) vertically. 3. Use `justify-conte...
40,863
[ { "from": "human", "value": "As a followup to this question on absolute positioning within a table cell, I'm trying to get something working in Firefox. Once again, I'm about 95% there, and there's just 1 little thing that's keeping me from declaring victory. Using the follow sample markup:\n<!DOCTYPE htm...
I am completely stumped as to why this code does not get any SDL keypress events. The other SDL events (removed for clarity) work fine. It does not work on my XP or Vista machines. No compile/link errors, just never recieve a keydown event. #include "SDL/SDL.h" // Yes SDL.lib and SDLmain.lib are linked Uint32 TimeL...
It seems that you're not receiving key press events in your SDL application. Here are a few potential issues to check and troubleshoot: 1. **SDL Video Subsystem Initialization**: If you're using SDL for input events, you should also initialize the video subsystem. You can modify your `SDL_Init` call to `SDL_Init(SD...
41,372
[ { "from": "human", "value": "I am completely stumped as to why this code does not get any SDL keypress events. The other SDL events (removed for clarity) work fine. It does not work on my XP or Vista machines. No compile/link errors, just never recieve a keydown event.\n#include \"SDL/SDL.h\"\n// Yes SDL...
Currently our dev team set up all the websites they're working on in IIS on their local machine. We're thinking of switching to using the built in ASP.NET development server instead. Is this a good idea? What are the pros / cons of using the ASP.NET dev Server? Are there any gotchas we should be aware of? Thanks. NB: R...
Switching from IIS to the ASP.NET Development Server (commonly known as Cassini) can have its pros and cons. Here’s a breakdown of what to consider when making this decision: ### Pros of Using Cassini: 1. **Simplicity**: Cassini is straightforward to set up and requires no configuration like IIS. It's integrated dire...
39,716
[ { "from": "human", "value": "Currently our dev team set up all the websites they're working on in IIS on their local machine. We're thinking of switching to using the built in ASP.NET development server instead.\nIs this a good idea? What are the pros / cons of using the ASP.NET dev Server? Are there any go...
I am writing a scraper that downloads all the image files from a HTML page and saves them to a specific folder. All the images are part of the HTML page.
To create a web scraper that downloads all image files from a given HTML page and saves them to a specified folder, you can use Python with libraries like `requests` for making HTTP requests and `BeautifulSoup` for parsing HTML. Additionally, the `os` library will help manage directories for saving the images. Here's ...
41,613
[ { "from": "human", "value": "I am writing a scraper that downloads all the image files from a HTML page and saves them to a specific folder. All the images are part of the HTML page.\n" }, { "from": "gpt", "value": "To create a web scraper that downloads all image files from a given HTML page an...
Are there ways to programmatically simulate connection problems (slow connection, response does not complete, connection gets dropped, etc.) when using the HttpWebRequest class? Thanks EDIT: To elaborate more, I need this for debugging but would want to turn it into a test eventually. I'm using the async methods BeginG...
When it comes to simulating connection problems programmatically for testing purposes, especially while using `HttpWebRequest`, there are several strategies you can consider. Each of these methods can help you simulate different types of network conditions, such as slow connections, dropped connections, or incomplete r...
30,007
[ { "from": "human", "value": "Are there ways to programmatically simulate connection problems (slow connection, response does not complete, connection gets dropped, etc.) when using the HttpWebRequest class?\nThanks\nEDIT: To elaborate more, I need this for debugging but would want to turn it into a test eve...
There's an open source library that I would like to use for my iPhone app. The library is written in C and compiles with Makefiles. I would like to use a static library. If I add the .a file to my project dependencies, it works well with the simulator, but it doesn't link when targeting the iPhone SDK (certainly beca...
To compile a static library for the iPhone SDK, you'll need to ensure that you are targeting the correct architecture for iOS devices. For modern iOS development, you will typically want to build your library for the `arm64` architecture (for newer devices) or a combination of architectures, including `armv7` and `armv...
41,422
[ { "from": "human", "value": "There's an open source library that I would like to use for my iPhone app. The library is written in C and compiles with Makefiles. I would like to use a static library.\nIf I add the .a file to my project dependencies, it works well with the simulator, but it doesn't link whe...
What is the difference and what should go in each? If I understand the theory correctly, the query optimizer should be able to use both interchangeably. (Note: this question is not a duplicate of Explicit vs Implicit SQL Joins. The answer may be related (or even the same) but the question is different.)
Your question appears to relate to the differences between explicit joins (like `INNER JOIN`, `LEFT JOIN`, etc.) and implicit joins (using the WHERE clause to specify join conditions) in SQL. Although the query optimizer can often treat them similarly and produce equivalent execution plans, there are some key differenc...
42,906
[ { "from": "human", "value": "What is the difference and what should go in each?\nIf I understand the theory correctly, the query optimizer should be able to use both interchangeably.\n(Note: this question is not a duplicate of Explicit vs Implicit SQL Joins.\nThe answer may be related (or even the same) but...