instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I've just introduced a friend to GNU Screen and they're having a hard time getting used to it. That makes me think about the essential things he needs to know about the excellent Screen utility, the same things that you'd think worthwhile to teach someone, a beginner, from the ground up. What are some analogies and han...
Introducing a friend to GNU Screen can be a rewarding experience! Here’s a guide that includes essential concepts, analogies, handy tips for remembering commands, and some useful binds. ### Essential Concepts 1. **Sessions**: Think of a session as a virtual workspace where you can run processes and commands. Multiple...
10,041
[ { "from": "human", "value": "I've just introduced a friend to GNU Screen and they're having a hard time getting used to it. That makes me think about the essential things he needs to know about the excellent Screen utility, the same things that you'd think worthwhile to teach someone, a beginner, from the g...
I have normally hand written xml like this: <tag><?= $value ?></tag> Having found tools such as simpleXML, should I be using those instead? What's the advantage of doing it using a tool like that?
Using tools like SimpleXML in PHP for working with XML offers several advantages over manually crafting XML strings, especially when it comes to maintainability, readability, and ease of manipulation. Here are some key benefits: 1. **Ease of Use**: SimpleXML provides a straightforward and intuitive interface for readi...
13,971
[ { "from": "human", "value": "I have normally hand written xml like this:\n<tag><?= $value ?></tag>\n\nHaving found tools such as simpleXML, should I be using those instead? What's the advantage of doing it using a tool like that?\n" }, { "from": "gpt", "value": "Using tools like SimpleXML in PHP...
Is it possible to test the use of a given layout using RSpec with Rails, for example I'd like a matcher that does the following: response.should use_layout('my_layout_name') I found a use_layout matcher when Googling but it doesn't work as neither the response or controller seem to have a layout property that matcher ...
In RSpec for Rails, you can indeed test whether a specific layout is being used in your controller responses, but there isn't a built-in matcher like `use_layout`. Instead, you can define a custom matcher or directly assert the layout being rendered in your controller specs. Here's a simple approach to check the layou...
10,717
[ { "from": "human", "value": "Is it possible to test the use of a given layout using RSpec with Rails, for example I'd like a matcher that does the following:\nresponse.should use_layout('my_layout_name')\n\nI found a use_layout matcher when Googling but it doesn't work as neither the response or controller ...
I wrote a Java program to add and retrieve data from an MS Access. At present it goes sequentially through ~200K insert queries in ~3 minutes, which I think is slow. I plan to rewrite it using threads with 3-4 threads handling different parts of the hundred thousands records. I have a compound question: Will this help...
Using threads to handle the insertion of records into a database can indeed help speed up the process, but the extent of the improvement depends on several factors related to the database's architecture, the nature of the workload, and how the database handles concurrent connections and transactions. ### Key Considera...
13,697
[ { "from": "human", "value": "I wrote a Java program to add and retrieve data from an MS Access. At present it goes sequentially through ~200K insert queries in ~3 minutes, which I think is slow. I plan to rewrite it using threads with 3-4 threads handling different parts of the hundred thousands records. I ...
This is a segment of code from an app I've inherited, a user got a Yellow screen of death: Object reference not set to an instance of an object on the line: bool l_Success ... Now I'm 95% sure the faulty argument is ref l_Monitor which is very weird considering the object is instantiated a few lines before. Anyone...
The "Object reference not set to an instance of an object" error you're encountering typically indicates that you are trying to access a member on an object that is null. In the context of your provided code, it looks like `l_Monitor` is being instantiated, but one of its properties, or perhaps one of the parameters be...
14,466
[ { "from": "human", "value": "This is a segment of code from an app I've inherited, a user got a Yellow screen of death:\n\nObject reference not set to an instance of an object\n\non the line: \nbool l_Success ... \n\nNow I'm 95% sure the faulty argument is ref l_Monitor which is very weird considering the o...
Does anyone know of a freely available java 1.5 package that provides a list of ISO 3166-1 country codes as a enum or EnumMap? Specifically I need the "ISO 3166-1-alpha-2 code elements", i.e. the 2 character country code like "us", "uk", "de", etc. Creating one is simple enough (although tedious), but if there's a st...
While there may not be a specific Java package that meets your exact criteria for Java 1.5 and provides ISO 3166-1 alpha-2 codes as an `enum` or `EnumMap`, you can certainly create a simple solution yourself. However, if you still prefer to use an existing library, consider using the **Apache Commons Locale** library w...
16,113
[ { "from": "human", "value": "Does anyone know of a freely available java 1.5 package that provides a list of ISO 3166-1 country codes as a enum or EnumMap? Specifically I need the \"ISO 3166-1-alpha-2 code elements\", i.e. the 2 character country code like \"us\", \"uk\", \"de\", etc. Creating one is simp...
In your opinion, what are the best options for adding video to a website assuming it would be rendered as FLV. What are the key considerations? Would you use a 3rd party service (youtube.com, vimeo.com, etc.) or host yourself? Why? If you used a service, which one? If you hosted yourself is it as simple as using an ...
When considering adding video to a website rendered as FLV (Flash Video), there are several options and key considerations to keep in mind. ### Key Considerations: 1. **Compatibility**: FLV format is primarily supported by Flash Player, which has been phased out on many platforms due to security concerns and a push t...
13,810
[ { "from": "human", "value": "In your opinion, what are the best options for adding video to a website assuming it would be rendered as FLV. What are the key considerations?\nWould you use a 3rd party service (youtube.com, vimeo.com, etc.) or host yourself? Why?\nIf you used a service, which one? If you h...
I'm running into a perplexing problem with an ActiveX control I'm writing - sometimes, Internet Explorer appears to fail to properly unload the control on process shutdown. This results in the control instance's destructor not being called. The control is written in C++, uses ATL and it's compiled using Visual Studio 2...
The issue you're encountering with your ActiveX control not being unloaded properly when Internet Explorer (IE) is closed is indeed a perplexing problem, and it can arise from various factors, particularly given the complexity of dynamic HTML and how it interacts with ActiveX controls. Here are some potential causes an...
12,482
[ { "from": "human", "value": "I'm running into a perplexing problem with an ActiveX control I'm writing - sometimes, Internet Explorer appears to fail to properly unload the control on process shutdown. This results in the control instance's destructor not being called.\nThe control is written in C++, uses A...
Does anyone know of any tools capable of defining a declarative mapping from T-Box structures from one ontology to another, which when executed can effect translation of A-Box instance data from one ontology's form to another's? I have recently written such a tool to meet my needs, but I was wondering if I reinvented...
Yes, there are several tools and frameworks designed to facilitate the mapping and translation between different ontologies, particularly in the context of T-Box (terminological box) and A-Box (assertional box) structures. These tools typically allow users to define mappings between the two ontologies, which can then b...
17,196
[ { "from": "human", "value": "Does anyone know of any tools capable of defining a declarative mapping from T-Box structures from one ontology to another, which when executed can effect translation of A-Box instance data from one ontology's form to another's? \nI have recently written such a tool to meet my ...
If you have a site which sends out emails to the customer, and you want to save a copy of the mail, what is an effective strategy? If you save it to a table in your database (e.g. create a table called Mail), it gets very large very quickly. Some strategies I've seen are: Save it to the file system Run a scheduled tas...
Saving email copies efficiently while managing database size is a common challenge. Here are several strategies that can be effective, along with their pros and cons: ### 1. **File System Storage** - **Description**: Save the email content as files in the file system and keep a reference in the database (like file ...
12,032
[ { "from": "human", "value": "If you have a site which sends out emails to the customer, and you want to save a copy of the mail, what is an effective strategy?\nIf you save it to a table in your database (e.g. create a table called Mail), it gets very large very quickly.\nSome strategies I've seen are:\n\nS...
Here are a few possibilities to get the conversation started: Escape all input upon initialization. Escape each value, preferably when generating the SQL. The first solution is suboptimal, because you then need to unescape each value if you want to use it in anything other than SQL, like outputting it on a web page. ...
You're bringing up an important topic regarding data handling and security in database interactions, particularly when it comes to SQL injection prevention and data output handling. Let's explore the points you mentioned: ### 1. Input Escaping vs. Output Escaping - **Input Escaping upon Initialization**: Escaping inp...
14,400
[ { "from": "human", "value": "Here are a few possibilities to get the conversation started:\n\nEscape all input upon initialization.\nEscape each value, preferably when generating the SQL.\n\nThe first solution is suboptimal, because you then need to unescape each value if you want to use it in anything othe...
What guidelines can you give for rich HTML formatting in emails while maintaining good visual stability across many clients and web based email interfaces? An unrelated answer on a question on Stack Overflow suggested: http://www.campaignmonitor.com/blog/archives/2008/05/2008_email_design_guidelines.html Which contains...
Creating visually appealing HTML emails that render consistently across various email clients can be quite challenging due to the limited and sometimes inconsistent support for HTML and CSS. Below is a comprehensive list of guidelines that can help you design effective and stable HTML emails: ### General Guidelines 1....
10,543
[ { "from": "human", "value": "What guidelines can you give for rich HTML formatting in emails while maintaining good visual stability across many clients and web based email interfaces?\nAn unrelated answer on a question on Stack Overflow suggested:\nhttp://www.campaignmonitor.com/blog/archives/2008/05/2008_...
It appears the Python signal module doesn't have anything similar to the sighold and sigrelse functions found in C, using signal.h. Are there Python equivalents of any sort? Many thanks!
In Python, the `signal` module provides a way to handle asynchronous events (signals) from the operating system, but it does not have direct equivalents of the C functions `sighold` and `sigrelse` found in the `signal.h` header. The functions `sighold` and `sigrelse` are used in C to block and unblock specific signal...
15,159
[ { "from": "human", "value": "It appears the Python signal module doesn't have anything similar to the sighold and sigrelse functions found in C, using signal.h. Are there Python equivalents of any sort?\nMany thanks!\n" }, { "from": "gpt", "value": "In Python, the `signal` module provides a way ...
Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or is it up to the endpoint to layer idempotency logic above it? Please reference specific paragraphs from the TCP/IP specification if possible.
TCP/IP does not inherently prevent multiple copies of the same packet from reaching the destination; instead, it relies on the endpoint to handle the potential for duplicate packets, often by implementing idempotency logic at the application layer. ### TCP's Behavior with Duplicates TCP, which operates at the transpo...
16,396
[ { "from": "human", "value": "Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or is it up to the endpoint to layer idempotency logic above it?\nPlease reference specific paragraphs from the TCP/IP specification if possible.\n" }, { "from": "gpt", "value": "TC...
Using Prototype 1.6's "new Element(...)" I am trying to create a <table> element with both a <thead> and <tbody> but nothing happens in IE6. var tableProto = new Element('table').update('<thead><tr><th>Situation Task</th><th>Action</th><th>Result</th></tr></thead><tbody><tr><td>a</td><td>b</td><td>c</td></tr></tbody>')...
Creating and manipulating DOM elements in IE6 can be tricky, particularly with table elements, since IE6 has more stringent requirements for valid markup than modern browsers. Here’s how you can create a table with a `<thead>` and `<tbody>` that should work in IE6 and other browsers using Prototype: ### Step 1: Create...
15,237
[ { "from": "human", "value": "Using Prototype 1.6's \"new Element(...)\" I am trying to create a <table> element with both a <thead> and <tbody> but nothing happens in IE6.\nvar tableProto = new Element('table').update('<thead><tr><th>Situation Task</th><th>Action</th><th>Result</th></tr></thead><tbody><tr><...
Does anyone know of a good tool for debugging JSPs from within Eclipse? I'd like to be able to set and watch breakpoints, step through the Java code/tags, etc within Eclipse while the app is running (under JBoss in my case). Presumably, it's reasonably straightforward to debug the servlet class that's generated from a ...
Debugging JSPs in Eclipse can be accomplished using the built-in debugging features, but it requires some setup to make it work seamlessly with your application server (in your case, JBoss). Here’s a step-by-step guide to help you debug JSPs effectively: ### Prerequisites 1. **Eclipse IDE** - Ensure you have the lates...
14,652
[ { "from": "human", "value": "Does anyone know of a good tool for debugging JSPs from within Eclipse? I'd like to be able to set and watch breakpoints, step through the Java code/tags, etc within Eclipse while the app is running (under JBoss in my case).\nPresumably, it's reasonably straightforward to debug ...
I'm a Mac user and I've decided to learn Emacs. I've read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard? Also, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/option key to invoke meta instead? update: Whi...
To swap the Control and Caps Lock keys on macOS Leopard, you can do the following: 1. Open **System Preferences**. 2. Click on **Keyboard**. 3. Click on the **Modifier Keys...** button. 4. In the Modifier Keys dialog, select your keyboard (if not already selected) from the dropdown. 5. Change the setting for the **Cap...
15,572
[ { "from": "human", "value": "I'm a Mac user and I've decided to learn Emacs. I've read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard?\nAlso, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/opti...
I need to create a database to store simulation results. What resources are out there to help me design this? EDIT: For those who want more details... We work with a discrete event simulation used by the military. Important simulation events are thus when weapons are fired, when kills occur, and also when weapons fai...
Designing a database to store simulation results from a discrete event simulation can be quite involved, especially given the complexity of the events and the need for statistical analysis. Here are some resources and guidance on how to structure your database effectively: ### 1. **Database Design Principles** - **...
12,117
[ { "from": "human", "value": "I need to create a database to store simulation results. What resources are out there to help me design this?\nEDIT: For those who want more details...\nWe work with a discrete event simulation used by the military. Important simulation events are thus when weapons are fired, ...
DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in IIS) and get a response, but so far I've been unable to construct something that works properly. Does anyone have a...
Interfacing with a WCF service from VBScript, especially using WinHTTP, can be a bit tricky due to the requirement for proper message formatting, particularly when using bindings like `BasicHttpBinding` or `WsHttpBinding`. Below, I will provide an example that demonstrates how to structure your XML message to be sent t...
12,354
[ { "from": "human", "value": "DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem.\nIdeally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in IIS) and get a response, but so far I've been unable to construct somethi...
I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml. Is there a way to run a method/class only on Tomcat startup?
Yes, you can execute a method or class at Tomcat startup by leveraging Spring's application lifecycle management features. One common approach is to use the `@PostConstruct` annotation in a Spring-managed bean or implement `ApplicationListener<ContextRefreshedEvent>`. Below are two methods you can use: ### Method 1: U...
13,857
[ { "from": "human", "value": "I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml.\nIs there a way to run a method/class only on Tomcat startup?\n" }, { "from": "gpt", "value": "Yes, you can execute a method or class at Tomcat...
My normal IDE is Visual Studio, but I'm currently doing some development in Eclipse for the first time. If you press Ctrl-X with text selected in either program, it cuts the text and puts on the clipboard exactly as you'd expect. If press Ctrl-X with no text selected in Visual Studio, it cuts the current line. In Ec...
Eclipse has different default behavior for text cutting and copying compared to Visual Studio. By default, Eclipse does not cut the current line if no text is selected. However, you can customize key bindings and other settings to achieve a similar workflow. Here are a few options to modify Eclipse's behavior to better...
16,249
[ { "from": "human", "value": "My normal IDE is Visual Studio, but I'm currently doing some development in Eclipse for the first time. If you press Ctrl-X with text selected in either program, it cuts the text and puts on the clipboard exactly as you'd expect. If press Ctrl-X with no text selected in Visual...
I'm planning to write a program in Ruby to analyse some data which has come back from an online questionnaire. There are hundreds of thousands of responses, and each respondent answers about 200 questions. Each question is multiple-choice, so there are a fixed number of possible responses to each. The intention is to u...
Your project sounds interesting, and you have a solid plan for analyzing the data! Here are some suggestions regarding how to store the data in the database and how to manipulate it for your machine learning tasks: ### 1. Database Design **Storage Format: One Row per Respondent vs. One Row per Response:** - **One Ro...
12,168
[ { "from": "human", "value": "I'm planning to write a program in Ruby to analyse some data which has come back from an online questionnaire. There are hundreds of thousands of responses, and each respondent answers about 200 questions. Each question is multiple-choice, so there are a fixed number of possible...
Good day. I have a program thats launches an external application. That external app has a right click sub menu on it which I need to disable. Is it possible (without modifying the external app) to disable the right click? Maybe permission or group policies and etc. Thanks.
Disabling right-click functionality in an external application without modifying that application is quite challenging. However, there are a few approaches you could explore, depending on your specific environment and requirements. Here are some potential methods: ### 1. **Group Policy Settings (for Windows Environmen...
15,054
[ { "from": "human", "value": "Good day.\nI have a program thats launches an external application. That external app has a right click sub menu on it which I need to disable. Is it possible (without modifying the external app) to disable the right click? Maybe permission or group policies and etc.\nThanks.\n"...
We've got some problems with an external company trying in integrate into a WCF service we expose and they are a Java shop. I was wondering if there are more than one toolkit that they can try to solve their issues and would like a list to suggest to them but I'm not familiar with the Java world at all. Essentially the...
Integrating a WCF (Windows Communication Foundation) service with Java can sometimes lead to challenges, especially when it comes to serialization, security protocols, and network communication. If the external company is experiencing issues, there are various libraries and toolkits they can use to help resolve problem...
14,092
[ { "from": "human", "value": "We've got some problems with an external company trying in integrate into a WCF service we expose and they are a Java shop. I was wondering if there are more than one toolkit that they can try to solve their issues and would like a list to suggest to them but I'm not familiar wi...
In a project of mine the SQL statements that are executed against a SQL Server are failing for some unknown reason. Some of the code is already used in production so debugging it is not an easy task. Therefore I need a way to see in the database itself what SQL statements are used, as the statements are generated at ru...
To monitor and log the incoming SQL statements on a SQL Server 2005 database, you have several options. Given the age of SQL Server 2005, some features might not be as advanced as in later versions, but you can still effectively track and troubleshoot SQL statements. Here are some approaches you can consider: ### 1. S...
14,454
[ { "from": "human", "value": "In a project of mine the SQL statements that are executed against a SQL Server are failing for some unknown reason. Some of the code is already used in production so debugging it is not an easy task. Therefore I need a way to see in the database itself what SQL statements are us...
Is it better to do this: try { ... } catch (Exception ex) { ... throw; } Or this: try { ... } catch (Exception ex) { ... throw ex; } Do they do the same thing? Is one better than the other?
The two code snippets you provided are not equivalent, and one is generally considered better practice than the other. ### Snippet 1: ```csharp try { ... } catch (Exception ex) { ... throw; // Rethrows the original exception } ``` ### Snippet 2: ```csharp try { ... } catch (Exception ex) { ... ...
17,734
[ { "from": "human", "value": "Is it better to do this:\ntry\n{\n ...\n}\ncatch (Exception ex)\n{\n ...\n throw;\n}\n\nOr this:\ntry\n{\n ...\n}\ncatch (Exception ex)\n{\n ...\n throw ex;\n}\n\nDo they do the same thing? Is one better than the other?\n" }, { "from": "gpt", "value...
I know about the "cooperative" threading of ruby using green threads. How can I create real "OS-level" threads in my application in order to make use of multiple cpu cores for processing?
In Ruby, the traditional threading model relies on green threads, which means that the threads are managed by the Ruby interpreter itself rather than the operating system. This can lead to limitations in terms of concurrency, especially with CPU-bound tasks. However, you can achieve true parallelism and utilize multipl...
14,674
[ { "from": "human", "value": "I know about the \"cooperative\" threading of ruby using green threads. How can I create real \"OS-level\" threads in my application in order to make use of multiple cpu cores for processing?\n" }, { "from": "gpt", "value": "In Ruby, the traditional threading model r...
Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore. Does anyone know if there is a patch or some way to make it work with SP1? Thanks.
It sounds like you're encountering a compatibility issue with the SQL Anywhere provider after installing Visual Studio SP1. This is not uncommon when updates to Visual Studio change the way certain providers or extensions function. Here are some steps you can take to try to resolve this issue: 1. **Reinstall the SQL A...
18,385
[ { "from": "human", "value": "Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore.\nDoes anyone know if there is a patch or some way to make it work with SP1?\...
Consider: int testfunc1 (const int a) { return a; } int testfunc2 (int const a) { return a; } Are these two functions the same in every aspect or is there a difference? I'm interested in an answer for the C language, but if there is something interesting in the C++ language, I'd like to know as well.
In C, there is no functional difference between the two function signatures you've provided. Both function declarations, `int testfunc1 (const int a)` and `int testfunc2 (int const a)`, indicate that the integer parameter `a` is treated as a constant within the scope of the function. However, it’s worth noting a few po...
14,557
[ { "from": "human", "value": "Consider:\nint testfunc1 (const int a)\n{\n return a;\n}\n\nint testfunc2 (int const a)\n{\n return a;\n}\n\nAre these two functions the same in every aspect or is there a difference?\nI'm interested in an answer for the C language, but if there is something interesting in the...
I wrote the wrong thing in a commit message. How can I change the message? The commit has not been pushed yet.
If you haven't pushed your commit yet and you want to change the commit message, you can use the `git commit --amend` command. Here's how you can do it: 1. Open your terminal. 2. Navigate to your Git repository directory if you're not already there. 3. Run the following command: ```bash git commit --amend -m "Y...
18,552
[ { "from": "human", "value": "I wrote the wrong thing in a commit message.\nHow can I change the message? The commit has not been pushed yet.\n" }, { "from": "gpt", "value": "If you haven't pushed your commit yet and you want to change the commit message, you can use the `git commit --amend` comm...
I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a JavaScript and a PHP solution so I can provide live previews as we...
To support both Textile and Markdown formats in your project and provide automatic detection, you can implement a strategy based on specific syntax characteristics of each markup language. Below, I will outline a general approach for auto-detection and provide solutions in both JavaScript and PHP. ### Step 1: Detectin...
11,530
[ { "from": "human", "value": "I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a JavaScript and a PHP solu...
I have been tasked with implementing a PKI library in C# for a company project, and have been unable to find a good implementation of it. There appear to be multiple libraries, and many broken links pointing to MSDN libraries that have been removed. I've seen people using Crypt32.dll, people building their own librarie...
Implementing a PKI library for encryption and decryption in C# can indeed be a complex task, but there are several libraries and approaches that can help simplify the process. Below are some recommendations and considerations based on your requirements: ### Recommended Libraries 1. **BouncyCastle**: - **Overview**...
12,818
[ { "from": "human", "value": "I have been tasked with implementing a PKI library in C# for a company project, and have been unable to find a good implementation of it. There appear to be multiple libraries, and many broken links pointing to MSDN libraries that have been removed. I've seen people using Crypt3...
I cannot understand the Oracle documentation. :-( Does anybody know how to fetch multiple rows of simple data from Oracle via OCI? I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT/4-byte ints) and then fetch a single row at a time with OCIStmtExecute/OCIS...
To efficiently fetch multiple rows of data from an Oracle database using the OCI (Oracle Call Interface) API, you can indeed use `OCIDefineByPos` to define arrays of variables and the `OCIBindArrayOfStruct` function to bind them for array fetching. This allows you to retrieve multiple rows in a single fetch call, signi...
10,545
[ { "from": "human", "value": "I cannot understand the Oracle documentation. :-(\nDoes anybody know how to fetch multiple rows of simple data from Oracle via OCI?\nI currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT/4-byte ints) and then fetch a si...
I am using the open source Javascript WYSIWYG from OpenWebWare and Asp.Net RequiredFieldValidator on the TextBox which I am calling the WYSIWYG for. Everything works fine, but the first time I try to submit the form, I get the server-side RFV ErrorMessage "Required", but if I submit a second time, it goes through. Am ...
When using a WYSIWYG editor with ASP.NET's `RequiredFieldValidator`, you may encounter issues where the editor doesn't properly update the underlying input field's value, especially on the first submission. This often happens because the WYSIWYG editor may not be correctly syncing the editor's content back to the origi...
12,798
[ { "from": "human", "value": "I am using the open source Javascript WYSIWYG from OpenWebWare and Asp.Net RequiredFieldValidator on the TextBox which I am calling the WYSIWYG for. Everything works fine, but the first time I try to submit the form, I get the server-side RFV ErrorMessage \"Required\", but if I...
We are running Selenium regression tests against our existing code base, and certain screens in our web app use pop-ups for intermediate steps. Currently we use the commands in the test: // force new window to open at this point - so we can select it later selenium().getEval("this.browserbot.getCurrentWindow().open('',...
Dealing with pop-ups in Selenium can be tricky, especially in older browsers like IE6 and IE7. The `Permission denied` error you’re encountering when using `waitForPopUp` could be caused by various issues such as timing, browser settings, or even focus problems. Here are a few strategies you can consider to make your t...
13,822
[ { "from": "human", "value": "We are running Selenium regression tests against our existing code base, and certain screens in our web app use pop-ups for intermediate steps.\nCurrently we use the commands in the test:\n// force new window to open at this point - so we can select it later\nselenium().getEval(...
fellow anthropoids and lily pads and paddlewheels! I'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project to install the app. My app requires read/modify/write access to a SQLCE database file (...
To achieve your goal of installing files to the shared application data folder (i.e., `C:\ProgramData` for Vista and `C:\Documents and Settings\All Users\Application Data` for XP) in your Visual Studio 2008 Setup Project, you can follow these steps: 1. **Use a Custom Action**: Since the Visual Studio Installer Project...
11,382
[ { "from": "human", "value": "fellow anthropoids and lily pads and paddlewheels!\nI'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project to install the app.\nMy app requires read/mod...
I need to consume a wcf service dynamically when all i know is its URL. I do not have the option of creating a service reference or web reference as my client side code picks up the URL from a config file. What classes and methods can i use from the System.ServiceModel namespace for doing so.
To consume a WCF service dynamically using only the URL, you can utilize the `ChannelFactory<T>` class from the `System.ServiceModel` namespace. This approach allows you to create a proxy to the service at runtime, enabling you to call the service methods without generating a service reference. Here's a high-level ove...
13,053
[ { "from": "human", "value": "I need to consume a wcf service dynamically when all i know is its URL. I do not have the option of creating a service reference or web reference as my client side code picks up the URL from a config file. What classes and methods can i use from the System.ServiceModel namespace...
I have an object that I'm passing in a method call. Say I'm using a language that only allows you to pass objects by reference, like Java or PHP. If the method makes changes to the object, it will affect the caller. I don't want this to happen. So it seems like I need to make a copy of the object. My question is: whose...
In scenarios like the one you've described, where you want to ensure that a method does not modify the original object, the responsibility for cloning the object can be approached in different ways, and there are pros and cons to each. Here are some considerations: ### 1. **Callee Responsibility:** **Pros:** - Encaps...
16,409
[ { "from": "human", "value": "I have an object that I'm passing in a method call. Say I'm using a language that only allows you to pass objects by reference, like Java or PHP. If the method makes changes to the object, it will affect the caller. I don't want this to happen. So it seems like I need to make a ...
On the page http://msdn.microsoft.com/en-us/library/bb202066.aspx If references something called "POLL Driver V2" however this is the only place I can see that talks about this. I'm extermely interested in the GPSSetDeviceParam: GPS_QUERY_FIX call but after searching for about 2 hours on this, I couldn't find any i...
It looks like you are looking for information about the "POLL Driver V2" and specifically the `GPSSetDeviceParam` function with the `GPS_QUERY_FIX` parameter. Unfortunately, the link you provided is not an active or up-to-date resource anymore, which makes finding information a bit tricky. Here are a few suggestions t...
15,359
[ { "from": "human", "value": "On the page\nhttp://msdn.microsoft.com/en-us/library/bb202066.aspx\nIf references something called \"POLL Driver V2\" however this is the only \nplace I can see that talks about this. I'm extermely interested in the \nGPSSetDeviceParam: GPS_QUERY_FIX call but after searching fo...
I have been playing with Haml recently and really like the way the resulting code looks to me...the developer. I'm also not too worried about a designer being able to consume or change it...we're a small team. That said, beginning work on a project we believe will generate quite a bit of traffic (who doesn't?). I'm co...
Haml (HTML Abstraction Markup Language) offers a cleaner and more concise way to write HTML compared to ERB (Embedded Ruby). However, there are several considerations to keep in mind when using Haml, especially for a project anticipated to have a significant amount of traffic. ### Pros and Cons of Haml vs. ERB #### P...
9,111
[ { "from": "human", "value": "I have been playing with Haml recently and really like the way the resulting code looks to me...the developer. I'm also not too worried about a designer being able to consume or change it...we're a small team. \nThat said, beginning work on a project we believe will generate qui...
I need to alter the length of a column column_length in say more than 500 tables and the tables might have no of records ranging from 10 records to 3 or 4 million records. The column may just be a normal column CREATE TABLE test(column_length varchar(10)) The column might contain non-clustered index on it. CREATE ...
Your assumption is mostly correct but let’s break it down more clearly to cover all the scenarios you're dealing with. ### Altering a Column Length In SQL Server (and many other RDBMS), you can generally alter the length of a column without dropping indexes or primary keys. However, there are some considerations you ...
15,091
[ { "from": "human", "value": "I need to alter the length of a column column_length in say more than 500 tables and the tables might have no of records ranging from 10 records to 3 or 4 million records.\n\nThe column may just be a normal column\n\nCREATE TABLE test(column_length varchar(10))\n\n\nThe column m...
I'm trying to setup some friendly URLs on a SharePoint website. I know that I can do the ASP.Net 2.0 friendly URLs using RewritePath, but I was wondering if it was possible to make use of the System.Web.Routing that comes with ASP.NET 3.5 SP1. I think I've figured out how to get my route table loaded, but I'm not clea...
In ASP.NET, especially when working with SharePoint, setting up friendly URLs using the `System.Web.Routing` namespace can be a bit tricky, but it is indeed possible. To handle routing in ASP.NET 3.5 SP1, you will need to follow these steps to configure your routes and get the correct `IHttpHandler` for the requests. ...
15,982
[ { "from": "human", "value": "I'm trying to setup some friendly URLs on a SharePoint website. I know that I can do the ASP.Net 2.0 friendly URLs using RewritePath, but I was wondering if it was possible to make use of the System.Web.Routing that comes with ASP.NET 3.5 SP1. \nI think I've figured out how to g...
I have a compiled GUI application. I need to learn whether it is programmed using MFC libraries. Depends.exe does not return any dependency to MFC42*.dll. Is there any tool to get additional information about executables? (If possible not just the libraries, but the compiler being used, etc..)
To gather more information about a compiled GUI application and determine whether it uses MFC (Microsoft Foundation Class) libraries, there are several tools and techniques you can use. Here are some recommended tools and methods: 1. **Dependency Walker (depends.exe)**: While you mentioned that `depends.exe` does not ...
16,267
[ { "from": "human", "value": "I have a compiled GUI application. I need to learn whether it is programmed using MFC libraries. Depends.exe does not return any dependency to MFC42*.dll. Is there any tool to get additional information about executables? (If possible not just the libraries, but the compiler bei...
When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions. The Question is should these exceptions be in a separate project to the (for example) Model classes? I tend to put th...
Organizing your Visual Studio solution and structuring your projects effectively can greatly enhance maintainability and clarity in your codebase. When it comes to user-defined exceptions, here are some considerations to help you decide whether to place them in a separate project or keep them within the Model project: ...
15,230
[ { "from": "human", "value": "When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions.\nThe Question is should these exceptions be in a separate project to the (fo...
I am working with a legacy ASP Classic solution which is load balanced (via external hardware and has an IIS site the home directory of which is an UNC path. I've been told that the following issues with this setup currently exist: When using an UNC path as home directory, there is an "index" somewhere in IIS which "...
The issues you're describing with using a UNC path as the home directory for an IIS site on Windows Server 2003 are known challenges, particularly with legacy ASP Classic applications. Each of the issues you've mentioned has implications that can affect the performance and reliability of your application. Let's look at...
15,033
[ { "from": "human", "value": "I am working with a legacy ASP Classic solution which is load balanced (via external hardware and has an IIS site the home directory of which is an UNC path. I've been told that the following issues with this setup currently exist: \n\nWhen using an UNC path as home directory, t...
Is global memory initialized in C++? And if so, how? (Second) clarification: When a program starts up, what is in the memory space which will become global memory, prior to primitives being initialized? I'm trying to understand if it is zeroed out, or garbage for example. The situation is: can a singleton reference be ...
In C++, global and static variables are initialized automatically when a program starts up. The C++ standard specifies that: 1. **Global variables** are initialized to zero (or a corresponding zero-equivalent value) before any constructors for global objects are called. 2. **Static variables** (those defined inside fu...
13,900
[ { "from": "human", "value": "Is global memory initialized in C++? And if so, how?\n(Second) clarification:\nWhen a program starts up, what is in the memory space which will become global memory, prior to primitives being initialized? I'm trying to understand if it is zeroed out, or garbage for example.\nThe...
Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non .net app. I think the procedure would have to be something like: steps: Get dialog parent HWND or CWnd* Get the rect of the parent window and draw an overlay with a translucency over that window allow the dialog to do it...
To implement a lightbox-style modal dialog in an MFC application, you'll need to create an overlay that dims the background while displaying the modal dialog. This involves a few steps, and while there are no direct libraries for this specific purpose in MFC, you can achieve this with some custom code. Here’s a step-by...
13,563
[ { "from": "human", "value": "Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non .net app.\nI think the procedure would have to be something like:\nsteps:\n\nGet dialog parent HWND or CWnd* \nGet the rect of the parent window and draw an overlay with a translucenc...
My company is heavily invested in the MS BI Stack (SQL Server Reporting Services, -Analysis Services and -Integration Services), but I want to have a look at what the seemingly most talked about open-source alternative Pentaho is like. I've installed a version, and I got it up and running quite painlessly. So that's go...
Certainly! Comparing Pentaho with Microsoft's Business Intelligence (BI) stack, which includes SQL Server Reporting Services (SSRS), SQL Server Analysis Services (SSAS), and SQL Server Integration Services (SSIS), can provide insights into the strengths and weaknesses of each platform. Here’s a general overview of the ...
14,983
[ { "from": "human", "value": "My company is heavily invested in the MS BI Stack (SQL Server Reporting Services, -Analysis Services and -Integration Services), but I want to have a look at what the seemingly most talked about open-source alternative Pentaho is like.\nI've installed a version, and I got it up ...
When reading some answers to aquestion on clearing cache for JS files, somebody pointed to this part of the http spec. It basically says that URLS containing a ? should not be pulled from the cache, unless a specific expiry date is given. How do query string absent URLs which are so common with MVC websites (RoR, ASP...
The HTTP caching behavior is influenced by both the URL structure and the HTTP headers sent by the server. URLs containing query strings (e.g., `example.com/script.js?v=1.0`) can be cached, but their caching depends on various factors, including caching directives from the server and the browser's caching policies. ##...
15,712
[ { "from": "human", "value": "When reading some answers to aquestion on clearing cache for JS files, somebody pointed to this part of the http spec. It basically says that URLS containing a ? should not be pulled from the cache, unless a specific expiry date is given. How do query string absent URLs which ...
I would like to be able to say things like cd [.fred] and have my default directory go there, and my prompt change to indicate the full path to my current location.
To achieve what you've described—changing to a specific directory using a shorthand command like `cd [.fred]` and having your prompt display the full path—there are a few steps you can follow, depending on the shell you are using. Below, I’ll provide instructions for both Bash and Zsh, as these are the most common shel...
14,322
[ { "from": "human", "value": "I would like to be able to say things like\ncd [.fred] and have my default directory go there, \nand my prompt change to indicate the full path to my current location.\n" }, { "from": "gpt", "value": "To achieve what you've described—changing to a specific directory ...
I have 3 .net projects. Project1.dll is generated by a VS2008 project. Project2.dll is generated by a VS2005 project that references Project1.dll. Project3.dll is generated by a VS2008 project that references both Project1.dll and Project2.dll. Right now, I build Project1.dll, and manually copy it to the place wher...
Managing references across different versions of Visual Studio can indeed be challenging, especially when there are version constraints. Since you cannot upgrade Project2 to Visual Studio 2008 or downgrade Project1 and Project3 to Visual Studio 2005, you’ll need to establish a workflow to automate the copying of the re...
13,740
[ { "from": "human", "value": "I have 3 .net projects.\nProject1.dll is generated by a VS2008 project. \nProject2.dll is generated by a VS2005 project that references Project1.dll. \nProject3.dll is generated by a VS2008 project that references both Project1.dll and Project2.dll.\nRight now, I build Project...
For example, imagine a simple mutator that takes a single boolean parameter: void SetValue(const bool b) { my_val_ = b; } Does that const actually have any impact? Personally I opt to use it extensively, including parameters, but in this case I wonder if it makes any difference. I was also surprised to learn that you ...
In C++, the `const` qualifier has specific implications for parameters, but it behaves differently depending on the type of the parameter. Let's break down your questions: 1. **Impact of `const` on primitive types like `bool`:** When you declare a function parameter as `const`, it primarily serves as a promise that...
17,251
[ { "from": "human", "value": "For example, imagine a simple mutator that takes a single boolean parameter:\nvoid SetValue(const bool b) { my_val_ = b; }\n\nDoes that const actually have any impact? Personally I opt to use it extensively, including parameters, but in this case I wonder if it makes any differe...
I have a JavaScript widget which provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created. I've added an Ajax call into this function using jQuery: beforecreate: function (node, targetNode, type, to) { jQuery.get('http://example.com/ca...
While it’s generally not recommended to use synchronous AJAX requests because they can block the browser's main thread and create a poor user experience, there is a way to achieve this with jQuery using the `async: false` option in the AJAX settings. However, be aware that this method is deprecated in modern browsers a...
13,471
[ { "from": "human", "value": "I have a JavaScript widget which provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created. \nI've added an Ajax call into this function using jQuery:\nbeforecreate: function (node, targetNode, type...
I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this?
Of course! In PL/SQL, cursors are a fundamental concept used to handle the retrieval of rows from a database query. Here's a brief overview of the cursor-related terminology and concepts you might find helpful: ### Types of Cursors 1. **Implicit Cursor**: - Automatically created by PL/SQL when a SQL statement is e...
12,901
[ { "from": "human", "value": "I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this?\n" }, { "from": "gpt", "value": "Of course! In PL/SQL, cursors are a fundamental concept used to handle the retrieval of rows from a database query. Here's a brief overview of the cursor-related termino...
On Linux/NPTL, threads are created as some kind of process. I can see some of my process have a weird cmdline: cat /proc/5590/cmdline hald-addon-storage: polling /dev/scd0 (every 2 sec) Do you have an idea how I could do that for each thread of my process? That would be very helpful for debugging.
In Linux, threads are treated as lightweight processes, and each thread has its own unique PID (Process ID) and a corresponding entry in the `/proc` filesystem. To get the command line of each thread in a given process, you can use the `/proc/[PID]/task/` directory, where `[PID]` is the process ID of the main process. ...
16,010
[ { "from": "human", "value": "On Linux/NPTL, threads are created as some kind of process.\nI can see some of my process have a weird cmdline:\ncat /proc/5590/cmdline \nhald-addon-storage: polling /dev/scd0 (every 2 sec)\n\nDo you have an idea how I could do that for each thread of my process? That would be v...
When I'm in Windows, I use the excellent MicroOLAP Database Designer for PostgreSQL, but its not open source or multiplataform. Do you know or can recommend me an alternative to this software, that I can use in Linux? EDIT: Just to clarify, I don't want to use wine to emulate MicroOlap for PostgreSQL, it doesn't work t...
Certainly! Here are some alternatives to MicroOLAP Database Designer for PostgreSQL that are either native to Linux or Java-based: 1. **pgModeler**: - pgModeler is a powerful open-source data modeling tool specifically designed for PostgreSQL. It allows you to create and modify database schemas easily. It runs nati...
12,387
[ { "from": "human", "value": "When I'm in Windows, I use the excellent MicroOLAP Database Designer for PostgreSQL, but its not open source or multiplataform.\nDo you know or can recommend me an alternative to this software, that I can use in Linux?\nEDIT: Just to clarify, I don't want to use wine to emulate ...
I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a programmer), however I expect 1-2 programmers to join t...
When naming classes, it's important to choose names that are clear, concise, and convey the purpose of the class effectively. Given your context, here are a few suggestions based on common conventions in Python: 1. **MyAlgOptions**: This is a good choice because it clearly associates the options with the `MyAlg` algor...
18,218
[ { "from": "human", "value": "I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a programmer), h...
Is it the case that the entire restful verb is under a single all encompassing transaction? That is to say, if I raise a Error in the validation or callbacks at any point in the handling of a UPDATE, DELETE, or CREATE operation, is every database operation that I may have performed in previous callbacks also rolled bac...
In a typical RESTful API implementation, especially when using frameworks that support database transactions, the behavior you described is often achievable but depends on the specific setup and configuration of your application. When you perform operations like UPDATE, DELETE, or CREATE, many frameworks and ORMs (Obj...
18,451
[ { "from": "human", "value": "Is it the case that the entire restful verb is under a single all encompassing transaction? That is to say, if I raise a Error in the validation or callbacks at any point in the handling of a UPDATE, DELETE, or CREATE operation, is every database operation that I may have perfor...
We are currently using the ExtJS tree view in an application - a requirement has arisen requiring a user to select multiple nodes (which the tree view supports currently through a pluggable selection model) - but you can not then drag the multiple selections to another part of the tree. Does anyone know of an ajax cont...
In ExtJS, enabling drag and drop for multiple selected nodes in a tree view is not straightforward, as the default behavior does not support this out of the box. However, you can extend the functionality to achieve this. To enable drag-and-drop for multiple selections in an ExtJS tree view, you will need to implement ...
14,398
[ { "from": "human", "value": "We are currently using the ExtJS tree view in an application - a requirement has arisen requiring a user to select multiple nodes (which the tree view supports currently through a pluggable selection model) - but you can not then drag the multiple selections to another part of t...
When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone?
To implement a system where different users upload files to their designated folders in an ASP.NET application, you can use roles or profiles to manage which folder each user is associated with. Below is a basic outline of how you can set this up, along with sample code for an ASP.NET MVC application. ### Steps to Imp...
10,309
[ { "from": "human", "value": "When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone?\n" }, { "from": "gpt", "value": "To implement a system where different users upload files to their de...
I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually it works just fine. The files are appare...
If you're having trouble with Ant not being able to delete files during a clean operation, there are several potential causes and solutions that you can try: 1. **Check File Permissions**: Ensure that your user account has the necessary permissions to delete the files. You can check the file properties in the operatin...
14,977
[ { "from": "human", "value": "I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually...
Is it possible to detect when the user clicks on the browser's back button? I have an Ajax application and if I can detect when the user clicks on the back button I can display the appropriate data back Any solution using PHP, JavaScript is preferable. Hell a solution in any language is fine, just need something that I...
Detecting when a user clicks the browser's back button is a common challenge in web development, especially in single-page applications (SPAs) that use AJAX. There are several techniques you can use to handle this effectively, primarily leveraging JavaScript. Here are a couple of methods you can explore: ### Method 1:...
12,897
[ { "from": "human", "value": "Is it possible to detect when the user clicks on the browser's back button?\nI have an Ajax application and if I can detect when the user clicks on the back button I can display the appropriate data back\nAny solution using PHP, JavaScript is preferable. Hell a solution in any l...
I have a serial hardware device that I'd like to share with multiple applications, that may reside on different machines within or spanning multiple networks. A key requirement is that the system must support bi-directional communication, such that clients/serial device can exist behind firewalls and/or on different n...
The use of XMPP with the Openfire server and Smack API is a valid approach for your use case. It provides a lightweight protocol for real-time messaging and can facilitate bi-directional communication. However, there are several other solutions you could consider, each with its own strengths and weaknesses. Here are so...
9,052
[ { "from": "human", "value": "I have a serial hardware device that I'd like to share with multiple applications, that may reside on different machines within or spanning multiple networks. A key requirement is that the system must support bi-directional communication, such that clients/serial device can exi...
I have a number of code value tables that contain a code and a description with a Long id. I now want to create an entry for an Account Type that references a number of codes, so I have something like this: insert into account_type_standard (account_type_Standard_id, tax_status_id, recipient_id) ( select account_type_s...
To achieve your goal of inserting a row into the `account_type_standard` table while handling the nullable `recipient_code`, you can use a LEFT JOIN instead of the implicit join you have in your current query. This way, you can include the scenario where the `recipient_code` is `NULL`, and still get the desired result....
16,320
[ { "from": "human", "value": "I have a number of code value tables that contain a code and a description with a Long id.\nI now want to create an entry for an Account Type that references a number of codes, so I have something like this:\ninsert into account_type_standard (account_type_Standard_id,\ntax_stat...
In an environment with multiple windows servers what is the best way to ensure patch compliance accross all systems? Is there a simple tool (some sort of client/server app?) that allows reports to be generated showing the status of all the systems so any that aren't automatically patching themselves can be fixed with...
Ensuring patch compliance across multiple Windows Servers in an environment can be effectively managed using various tools and strategies. Here are some options you might consider: ### 1. **Windows Server Update Services (WSUS)** - **Description**: WSUS is a Microsoft tool that allows IT administrators to manage th...
13,345
[ { "from": "human", "value": "In an environment with multiple windows servers what is the best way to ensure patch compliance accross all systems? \nIs there a simple tool (some sort of client/server app?) that allows reports to be generated showing the status of all the systems so any that aren't automatic...
Does anyone have some numbers on this? I am just looking for a percentage, a summary will be better. Standards compliance: How does the implementation stack up to the standard language specification? For those still unclear: I place emphasis on current. The IronPython link provided below has info that was last edited m...
As of my last knowledge update in October 2023, IronPython is known for its partial implementation of the Python language specification, particularly concerning compatibility with the CPython reference implementation. However, specific percentages on standards compliance can vary depending on the version of IronPython ...
16,801
[ { "from": "human", "value": "Does anyone have some numbers on this? I am just looking for a percentage, a summary will be better.\nStandards compliance: How does the implementation stack up to the standard language specification?\nFor those still unclear: I place emphasis on current. The IronPython link pro...
I'm currently trying ElementTree and it looks fine, it escapes HTML entities and so on and so forth. Am I missing something truly wonderful I haven't heard of? This is similar to what I'm actually doing: import xml.etree.ElementTree as ET root = ET.Element('html') head = ET.SubElement(root,'head') script = ET.SubElemen...
It looks like you're doing great with the `xml.etree.ElementTree` module for generating XML/HTML documents in Python. It's a handy library for creating and manipulating XML trees. However, if you are looking for alternatives or additional features, here are a few libraries and techniques that you might find wonderful o...
15,423
[ { "from": "human", "value": "I'm currently trying ElementTree and it looks fine, it escapes HTML entities and so on and so forth. Am I missing something truly wonderful I haven't heard of?\nThis is similar to what I'm actually doing:\nimport xml.etree.ElementTree as ET\nroot = ET.Element('html')\nhead = ET....
I have drawn an image in the device context using python and I want to move it smoothly/animate either vertically or horizontally. What algorithm should I use? Where can I get info for this kind of tasks in python?
To animate a drawing in Python, you can use various techniques depending on the libraries you're working with and the complexity of the animation you want to achieve. Here are a few common approaches and libraries you might consider: ### Libraries 1. **Pygame**: - Pygame is a popular library for creating games and...
11,239
[ { "from": "human", "value": "I have drawn an image in the device context using python and I want to move it smoothly/animate either vertically or horizontally.\nWhat algorithm should I use? Where can I get info for this kind of tasks in python?\n" }, { "from": "gpt", "value": "To animate a drawi...
I'd like to automatically change my database connection settings on a per-vhost basis, so that I don't have to edit any PHP code as it moves from staging to live and yet access different databases. This is on a single dedicated server. So I was wondering, can I set a PHP variable or constant in httpd.conf as part of th...
Yes, you can certainly achieve this by using the Apache configuration file (`httpd.conf` or individual virtual host configuration files) to set environment variables or PHP constants that your application can then use to determine which database to connect to. ### Method 1: Using Apache Environment Variables You can ...
11,814
[ { "from": "human", "value": "I'd like to automatically change my database connection settings on a per-vhost basis, so that I don't have to edit any PHP code as it moves from staging to live and yet access different databases. This is on a single dedicated server.\nSo I was wondering, can I set a PHP variab...
I notice that Rails 2.2 (currently edge) supports setting HttpOnly on the session cookie. Is there a way of setting it on a Rails 2.1 application without moving to edge/2.2?
In Rails 2.1, the ability to set the `HttpOnly` flag on cookies was not natively supported in the same way it was in Rails 2.2 and later versions. However, you can still implement this feature by directly modifying the cookie in the controller or middleware. Here’s how you can set the `HttpOnly` flag on the session co...
16,932
[ { "from": "human", "value": "I notice that Rails 2.2 (currently edge) supports setting HttpOnly on the session cookie.\nIs there a way of setting it on a Rails 2.1 application without moving to edge/2.2?\n" }, { "from": "gpt", "value": "In Rails 2.1, the ability to set the `HttpOnly` flag on coo...
I would like to code a little program which visually illustrates the behavior of the volatile keyword. Ideally, it should be a program which performs concurrent access to a non volatile static field and which gets incorrect behavior because of that. Adding the volatile keyword in the same program should fix the proble...
Certainly! The `volatile` keyword in Java is used to ensure that a variable's value is always read from and written to the main memory, rather than being cached by threads. This helps avoid issues with visibility when multiple threads are accessing a shared variable. The behavior you're trying to observe often requires...
13,370
[ { "from": "human", "value": "I would like to code a little program which visually illustrates the behavior of the volatile keyword. Ideally, it should be a program which performs concurrent access to a non volatile static field and which gets incorrect behavior because of that. \nAdding the volatile keyword...
I am creating a component and want to expose a color property as many flex controls do, lets say I have simple component like this, lets call it foo_label: <mx:Canvas> <mx:Script> [Bindable] public var color:uint; </mx:Script> <mx:Label text="foobar" color="{color}" /> </mx:Canvas> and then add ...
In Flex, when you create a custom component and expose properties, you need to ensure that the property you expose is able to handle values as expected. The issue you are encountering is due to the fact that when you define a property of type `uint`, it does not automatically handle string color values like "red", "blu...
15,693
[ { "from": "human", "value": "I am creating a component and want to expose a color property as many flex controls do, lets say I have simple component like this, lets call it foo_label:\n\n\n<mx:Canvas>\n <mx:Script>\n [Bindable] public var color:uint;\n </mx:Script>\n <mx:Label text=\"foobar...
I am going to be starting up a new project at work and want to get into unit testing. We will be using Visual Studio 2008, C#, and the ASP.NET MVC stuff. I am looking at using either NUnit or the built-in test projects that Visual Studio 2008 has, but I am open to researching other suggestions. Is one system better tha...
It's great to hear that you're interested in implementing unit testing in your new project! When it comes to unit testing in Visual Studio 2008 with C# and ASP.NET MVC, both NUnit and the built-in testing framework (which is based on MSTest) have their advantages and can effectively help you achieve your goals. Let's b...
9,541
[ { "from": "human", "value": "I am going to be starting up a new project at work and want to get into unit testing. We will be using Visual Studio 2008, C#, and the ASP.NET MVC stuff. I am looking at using either NUnit or the built-in test projects that Visual Studio 2008 has, but I am open to researching ot...
I need to count and check how much of some images is placed in folder od web server. Example- images get names from user_id, and on example I have user_id 27, and my images are: 27_1.jpg, 27_2.jpg, 27_3.jpg, ... How to check and write to database this thing? Thanks
To check and count how many images are stored in a folder on your web server for a specific user (identified by user_id) and then write that information to a database, you can follow these steps: ### Step 1: Count Images in the Directory You can use PHP (or any server-side language) to read the directory where the im...
11,457
[ { "from": "human", "value": "I need to count and check how much of some images is placed in folder od web server.\nExample- images get names from user_id, and on example I have user_id 27, and my images are:\n27_1.jpg, 27_2.jpg, 27_3.jpg, ...\n\nHow to check and write to database this thing?\nThanks\n" },...
I use the screen command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don't want it sitting there anymore?
In the `screen` command-line utility, you can clear the scrollback buffer for the current window (or tab) using the following key combination: 1. First, press `Ctrl-a` to initiate a command sequence in `screen`. 2. Then press `:`, which allows you to enter a command. 3. Type `clear` and then press `Enter`. This will ...
16,645
[ { "from": "human", "value": "I use the screen command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don't want it sitting there anymore?\n" }, { "from": "gpt", "value": "...
Pretty much what the title says really. We have some code that is .NET 1.1 based and no real desire to up-convert it. However, we are looking to add developers to the team and they will need copies of Visual Studio. My understanding is that they will need VS 2003 - as this is the only IDE that supports .NET 1.1 but I ...
As of my last knowledge update in October 2023, Visual Studio 2003, which supports .NET Framework 1.1, is considered quite outdated and is no longer officially sold or supported by Microsoft. While you may be able to find copies of Visual Studio 2003 through third-party vendors, online marketplaces, or auction sites, t...
17,725
[ { "from": "human", "value": "Pretty much what the title says really.\nWe have some code that is .NET 1.1 based and no real desire to up-convert it. However, we are looking to add developers to the team and they will need copies of Visual Studio.\nMy understanding is that they will need VS 2003 - as this is...
I'm implementing a custom control and in this control I need to write a bunch of links to the current page, each one with a different query parameter. I need to keep existing query string intact, and add (or modify the value of ) an extra query item (eg. "page"): "Default.aspx?page=1" "Default.aspx?page=2" "Default.as...
In ASP.NET, you can simplify the task of manipulating URLs with query string parameters by using the `UriBuilder` class combined with `HttpUtility`. The `UriBuilder` class makes it easier to manipulate the URL, while `HttpUtility` can help with encoding and decoding query string parameters. Here’s how you can create a...
14,441
[ { "from": "human", "value": "I'm implementing a custom control and in this control I need to write a bunch of links to the current page, each one with a different query parameter. I need to keep existing query string intact, and add (or modify the value of ) an extra query item (eg. \"page\"):\n\"Default.a...
I have an ASP.Net GridView control that I need to remain a fixed size whether there are 0 records or n records in the grid. The header and the footer should remain in the same position regardless of the amount of data in the grid. Obviously, I need to implement paging for larger datasets but how would I achieve this ...
To create a fixed-size `GridView` control in ASP.NET that maintains a consistent appearance, regardless of the number of records, you can achieve this using CSS for styling and control layout, as well as implementing paging for larger datasets. Below, I’ll provide you with a step-by-step guide to create a reusable cont...
10,727
[ { "from": "human", "value": "I have an ASP.Net GridView control that I need to remain a fixed size whether there are 0 records or n records in the grid. The header and the footer should remain in the same position regardless of the amount of data in the grid. Obviously, I need to implement paging for larg...
In the past I've worked with a number of programmers who have worked exclusively writing GUI applications. And I've been given the impression that they have almost universally minimised the use of multiple threads in their applications. In some cases they seem to have gone to extreme lengths to ensure that they use a s...
Yes, it is indeed common for GUI application developers to minimize the use of multiple threads. This design philosophy is generally accepted for several reasons: ### 1. **Simplicity and Maintainability:** - **Complexity Management:** Multithreading introduces complexity due to the need to manage shared resources a...
15,490
[ { "from": "human", "value": "In the past I've worked with a number of programmers who have worked exclusively writing GUI applications.\nAnd I've been given the impression that they have almost universally minimised the use of multiple threads in their applications. In some cases they seem to have gone to e...
2 tables: Employees - EmployeeID - LeadCount Leads - leadID - employeeID I want to update the Employees.LeadCount column by counting the # of leads in the Leads table that have the same EmployeeID. Note: There may be more than 1 lead with the same employeeID, so I have to do a DISTINCT(SUM(employeeID)).
To update the `LeadCount` column in the `Employees` table with the count of leads from the `Leads` table that match each employee's ID, you can use a SQL statement that involves a subquery or a common table expression (CTE). However, your note about using `DISTINCT(SUM(employeeID))` is a bit misleading; instead, you sh...
18,143
[ { "from": "human", "value": "2 tables: \nEmployees\n- EmployeeID\n- LeadCount\n\n\nLeads\n- leadID\n- employeeID\n\nI want to update the Employees.LeadCount column by counting the # of leads in the Leads table that have the same EmployeeID.\nNote: There may be more than 1 lead with the same employeeID, so ...
I'm searching for UUIDs in blocks of text using a regex. Currently I'm relying on the assumption that all UUIDs will follow a patttern of 8-4-4-4-12 hexadecimal digits. Can anyone think of a use case where this assumption would be invalid and would cause me to miss some UUIDs?
Your assumption that UUIDs will follow the standard format of 8-4-4-4-12 hexadecimal digits (which corresponds to the canonical representation of a UUID) is generally valid for most UUIDs. However, there are several use cases and scenarios where this assumption might not hold, potentially causing you to miss UUIDs: 1....
16,269
[ { "from": "human", "value": "I'm searching for UUIDs in blocks of text using a regex. Currently I'm relying on the assumption that all UUIDs will follow a patttern of 8-4-4-4-12 hexadecimal digits.\nCan anyone think of a use case where this assumption would be invalid and would cause me to miss some UUIDs?\...
What is the best way to detect if a user leaves a web page? The onunload JavaScript event doesn't work every time (the HTTP request takes longer than the time required to terminate the browser). Creating one will probably be blocked by current browsers.
Detecting when a user leaves a web page can be challenging due to the limitations of browser events and the way browsers handle resource unloading. While the `onunload` event is available, it may not always work reliably for tracking user activity, especially if there's a delay in handling HTTP requests. Here are som...
14,309
[ { "from": "human", "value": "What is the best way to detect if a user leaves a web page?\nThe onunload JavaScript event doesn't work every time (the HTTP request takes longer than the time required to terminate the browser).\nCreating one will probably be blocked by current browsers.\n" }, { "from":...
The Eclipse projects are all stored in the Eclipse Foundation CVS servers. Using the source is a great way to debug your code and to figure out how to do new things. Unfortunately in a large software project like BIRT, it can be difficult to know which projects and versions are required for a particular build. So w...
To get the source for a specific build of a large software project like BIRT (Business Intelligence and Reporting Tools) from the Eclipse Foundation's CVS servers, you can follow these steps: 1. **Identify the Build Version**: Determine the exact version of BIRT you want to work with. This information can usually be f...
9,448
[ { "from": "human", "value": "The Eclipse projects are all stored in the Eclipse Foundation CVS servers. Using the source is a great way to debug your code and to figure out how to do new things. \nUnfortunately in a large software project like BIRT, it can be difficult to know which projects and versions...
I've read and followed YUI's tutorial for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following refuses to work // oMenuBar is a MenuBar instance with submenus var buyMenu = oMenuBar.getSubmenus()[1]; // this works buyMenu.subscribe('sho...
It looks like you're having trouble subscribing to events on a YUI MenuBar instance, specifically regarding the `mouseOver` and `keyPress` events. Here's a quick summary and some tips to address your issue: 1. **Understanding Events**: In YUI, not all events are available for every widget. The `mouseOver` event you a...
14,167
[ { "from": "human", "value": "I've read and followed YUI's tutorial for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following refuses to work\n// oMenuBar is a MenuBar instance with submenus\nvar buyMenu = oMenuBar.getSubmenus(...
I am trying to get started writing scalable, telecom-grade applications with Asterisk and Ruby. I had originally intended to use the Adhearsion framework for this, but it does not have the required maturity and its documentation is severely lacking. AsteriskRuby seems to be a good alternative, as it's well documented...
Deploying AGI (Asterisk Gateway Interface) based IVR (Interactive Voice Response) applications can be quite rewarding, and there are several frameworks and libraries you can use depending on your requirements and familiarity with different programming languages. ### Ruby Options 1. **AsteriskRuby**: - As you've m...
10,988
[ { "from": "human", "value": "I am trying to get started writing scalable, telecom-grade applications with Asterisk and Ruby. I had originally intended to use the Adhearsion framework for this, but it does not have the required maturity and its documentation is severely lacking. AsteriskRuby seems to be a ...
What algorithm does twitter use to determine the 10 topics that you can see at search.twitter.com? I would like to implement that algorithm and I would also like to show the 50 most popular topics (instead of 10). Can you describe the most efficient algorithm? Thanks! (Twitters API can be found at- http://apiwiki.twitt...
Twitter's trending topics algorithm is not publicly disclosed in detail, and it likely incorporates various factors, including tweet volume, engagement rates (likes, retweets), user activity, and geographic factors. However, to create a simplified version of a trending topics algorithm, you can follow these general ste...
11,796
[ { "from": "human", "value": "What algorithm does twitter use to determine the 10 topics that you can see at search.twitter.com? I would like to implement that algorithm and I would also like to show the 50 most popular topics (instead of 10). Can you describe the most efficient algorithm?\nThanks!\n(Twitter...
I have defined a Delphi TTable object with calculated fields, and it is used in a grid on a form. I would like to make a copy of the TTable object, including the calculated fields, open that copy, do some changes to the data with the copy, close the copy, and then refresh the original copy and thusly the grid view. Is...
Copying a `TTable` object, including its properties and calculated fields, in Delphi isn't directly supported, as Delphi doesn't provide a built-in method for cloning datasets. However, you can implement a utility function that will create a new `TTable` and replicate the properties and calculated fields from an existi...
11,662
[ { "from": "human", "value": "I have defined a Delphi TTable object with calculated fields, and it is used in a grid on a form. I would like to make a copy of the TTable object, including the calculated fields, open that copy, do some changes to the data with the copy, close the copy, and then refresh the or...
If you have the following: $var = 3; // we'll say it's set to 3 for this example if ($var == 4) { // do something } else if ($var == 5) { // do something } else if ($var == 2) { // do something } else if ($var == 3) { // do something } else { // do something } If say 80% of the time $var is 3, do y...
In scenarios where a conditional structure (like a series of `if` statements) is evaluated frequently, such as thousands of times per second, performance can indeed become a concern, especially if the branching logic is complex or involves expensive operations. In your specific example, you have a series of `if...else...
16,159
[ { "from": "human", "value": "If you have the following:\n$var = 3; // we'll say it's set to 3 for this example\nif ($var == 4) {\n // do something\n} else if ($var == 5) {\n // do something\n} else if ($var == 2) {\n // do something\n} else if ($var == 3) {\n // do something\n} else {\n // do...
Besides open-sourcing your project and legislation, are there ways to prevent, or at least minimize the damages of code leaking outside your company/group? We obviously can't block Internet access (to prevent emailing the code) because programmer's need their references. We also can't block peripheral devices (USB, Fir...
You are correct that preventing code leakage is primarily about human processes and organizational culture. While there are technical measures to reduce the risk of leakage, fostering a security-conscious environment is equally important. Here are several strategies that can help prevent or minimize the damage of code ...
15,259
[ { "from": "human", "value": "Besides open-sourcing your project and legislation, are there ways to prevent, or at least minimize the damages of code leaking outside your company/group?\nWe obviously can't block Internet access (to prevent emailing the code) because programmer's need their references. We als...
I'd like to know if there's an easier way to insert a record if it doesn't already exist in a table. I'm still trying to build my LINQ to SQL skills. Here's what I've got, but it seems like there should be an easier way. public static TEntity InsertIfNotExists<TEntity> ( DataContext db, Table<TEntity> table, ...
Your implementation of `InsertIfNotExists` is on the right track, but there are indeed ways to make it cleaner and more efficient, especially if you're using LINQ to SQL. Here's a slightly simplified version of your code that focuses on clarity and maintains the core functionality. ### Revised `InsertIfNotExists` Meth...
16,763
[ { "from": "human", "value": "I'd like to know if there's an easier way to insert a record if it doesn't already exist in a table. I'm still trying to build my LINQ to SQL skills. \nHere's what I've got, but it seems like there should be an easier way.\npublic static TEntity InsertIfNotExists<TEntity>\n(\n ...
In C# WinForms, what's the proper way to get the backward/forward history stacks for the System.Windows.Forms.WebBrowser?
In C# WinForms, the `WebBrowser` control does not directly expose a history stack for backward and forward navigation. However, you can implement your own backward and forward history management by keeping track of the URLs you navigate to. Here’s a basic way to manage a simple history stack using two lists for backwa...
12,261
[ { "from": "human", "value": "In C# WinForms, what's the proper way to get the backward/forward history stacks for the System.Windows.Forms.WebBrowser?\n" }, { "from": "gpt", "value": "In C# WinForms, the `WebBrowser` control does not directly expose a history stack for backward and forward navig...
For an embedded system I need to place a few data structures at fixed addresses, so that a separate control CPU can access them at a known location. I'm using linker scripts for the embedded target to accomplish this, plus #defines of those same addresses for the control CPU. It bothers me that these address constants ...
To keep your address constants defined in a single location when using linker scripts and headers, there are a few strategies you might consider: 1. **Using Include Directives in Linker Scripts**: You can use the `INCLUDE` directive in your linker script to include a file that contains your address definitions. This w...
12,703
[ { "from": "human", "value": "For an embedded system I need to place a few data structures at fixed addresses, so that a separate control CPU can access them at a known location. I'm using linker scripts for the embedded target to accomplish this, plus #defines of those same addresses for the control CPU.\nI...
There is no summary available of the big O notation for operations on the most common data structures including arrays, linked lists, hash tables etc.
Here’s a summary of the Big O notation for common operations on various data structures, including arrays, linked lists, hash tables, trees, and more: ### 1. **Arrays** - **Access**: O(1) (Direct access via index) - **Search**: O(n) (Linear search, O(log n) if sorted with binary search) - **Insertion**: O(n) (If ins...
12,153
[ { "from": "human", "value": "There is no summary available of the big O notation for operations on the most common data structures including arrays, linked lists, hash tables etc.\n" }, { "from": "gpt", "value": "Here’s a summary of the Big O notation for common operations on various data struct...
I seem to always have problems with converting data to and from XML in C#. It always wants you to create a full XMLDocument object even when you think you shouldn't have to. In this case I have a SQLXML column in a MS SQL 2005 server that I am trying to pull out and push into a function that requires an XMLNode as a pa...
Working with XML in C# can be tricky, especially when dealing with SQLXML from a SQL Server database. I'll walk you through both scenarios you've described: converting a SQLXML object to an `XmlNode` and extracting an `XmlNode` from an `XmlReader`. ### 1. Converting SQLXML to XmlNode Since you have already obtained t...
9,347
[ { "from": "human", "value": "I seem to always have problems with converting data to and from XML in C#. It always wants you to create a full XMLDocument object even when you think you shouldn't have to. In this case I have a SQLXML column in a MS SQL 2005 server that I am trying to pull out and push into a ...
How can I elegantly print the date in RFC822 format in Perl?
In Perl, you can use the `DateTime` module to create and format dates elegantly, including outputting in RFC822 format. Here's how you can do that: 1. First, ensure that you have the `DateTime` module installed. If you haven't installed it yet, you can do so via CPAN or your package manager. 2. Use the following code...
15,396
[ { "from": "human", "value": "How can I elegantly print the date in RFC822 format in Perl?\n" }, { "from": "gpt", "value": "In Perl, you can use the `DateTime` module to create and format dates elegantly, including outputting in RFC822 format. Here's how you can do that:\n\n1. First, ensure that ...
I would like to listen to method calls. For example, when an element is appended by anything to the document, I would like to be passed that element to act on it, like: //somewhere aParent.appendChild(aChild); //when the former, a function I defined as listener is called with the aChild as argument Does anybody know h...
To listen for method calls such as `appendChild` on a DOM element in JavaScript, you can override the native method to include your custom listener functionality. This approach involves creating a wrapper function around the original `appendChild` method, and then calling your listener function with the element you wan...
16,890
[ { "from": "human", "value": "I would like to listen to method calls.\nFor example, when an element is appended by anything to the document, I would like to be passed that element to act on it, like:\n//somewhere\naParent.appendChild(aChild);\n\n//when the former, a function I defined as listener is called w...
On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had the time to get my hands dirty on XSL-FO. I'm thinking of implementing ...
XSL-FO (Extensible Stylesheet Language Formatting Objects) is a powerful tool for formatting XML data for output to various formats like PDF, HTML, and others. Since you’re already familiar with the FOP (Formatting Objects Processor), you’re in a good position to build on that knowledge. Here are some resources where y...
10,161
[ { "from": "human", "value": "On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO.\nMy task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had the time to get my hands dirt...
I'm learning XML, currently of Wikibooks, but that is kinda huge and not oversee-able... anybody know a better place?
If you're looking for a more concise resource to learn XML, there are several alternatives you can explore: 1. **W3Schools**: Their XML tutorial is straightforward and covers the basics with examples. You can find it here: [W3Schools XML Tutorial](https://www.w3schools.com/xml/). 2. **MDN Web Docs**: Mozilla Develope...
18,627
[ { "from": "human", "value": "I'm learning XML, currently of Wikibooks, but that is kinda huge and not oversee-able...\nanybody know a better place?\n" }, { "from": "gpt", "value": "If you're looking for a more concise resource to learn XML, there are several alternatives you can explore:\n\n1. *...
How can I get Emacs style key bindings in Visual Studio? Is it available in Settings? Do I need a Plug-in?
To get Emacs-style key bindings in Visual Studio, you typically need to use a plug-in, as Visual Studio does not natively support Emacs key bindings in its settings. Here’s how you can do it: ### 1. Use a Key Binding Extension While there may not be a specific "Emacs key bindings" extension, you can use general keyboa...
17,517
[ { "from": "human", "value": "How can I get Emacs style key bindings in Visual Studio? Is it available in Settings? Do I need a Plug-in?\n" }, { "from": "gpt", "value": "To get Emacs-style key bindings in Visual Studio, you typically need to use a plug-in, as Visual Studio does not natively sup...
A friend of mine has embedded a google earth plugin into a C# user control. All works fine but when you close the window we recieve and "Unspecified Error" with the option to continue running the scripts or not. From our tracking it down it appears this is being cause by a script that google is dropping onto the page. ...
The "Unspecified Error" you're encountering when closing a window with the Google Earth plugin embedded in a C# user control is likely due to issues with how the embedded JavaScript interacts with the lifecycle of the control. This kind of error often arises when scripts are still executing or trying to access elements...
16,155
[ { "from": "human", "value": "A friend of mine has embedded a google earth plugin into a C# user control. All works fine but when you close the window we recieve and \"Unspecified Error\" with the option to continue running the scripts or not. From our tracking it down it appears this is being cause by a scr...