instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I've seen a couple of font topics on SO and it seems a majority of people use monospace fonts for programming tasks. I have been using Verdana for programming for a couple of years and I really like the enhanced readability, without missing anything monospace related.
Why do you use a monospace font?
| Using a monospace font for programming tasks has several advantages that cater specifically to the needs of developers. Here are some reasons why monospace fonts are commonly preferred:
1. **Alignment**: Monospace fonts ensure that each character occupies the same amount of horizontal space, which helps with aligning ... | 25,398 | [
{
"from": "human",
"value": "I've seen a couple of font topics on SO and it seems a majority of people use monospace fonts for programming tasks. I have been using Verdana for programming for a couple of years and I really like the enhanced readability, without missing anything monospace related.\nWhy do yo... |
In my web app, my parameters can contain all sorts of crazy characters (russian chars, slashes, spaces etc) and can therefor not always be represented as-is in a URL.
Sending them on their merry way will work in about 50% of the cases. Some things like spaces are already encoded somewhere (I'm guessing in the Html.Buil... | It looks like you're running into an issue with URL encoding in ASP.NET MVC where certain characters in your query parameters are not being escaped as expected. Let's break down what's happening and how to address it.
### 1. Understanding URL Encoding
URL encoding is the process of converting characters into a format... | 27,466 | [
{
"from": "human",
"value": "In my web app, my parameters can contain all sorts of crazy characters (russian chars, slashes, spaces etc) and can therefor not always be represented as-is in a URL.\nSending them on their merry way will work in about 50% of the cases. Some things like spaces are already encode... |
I'm having trouble with a custom tag:-
org.apache.jasper.JasperException: /custom_tags.jsp(1,0) Unable to find setter method for attribute : firstname
This is my TagHandler class:
package com.cg.tags;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;... | The issue you are encountering is due to a mismatch between the names of the attributes in your TLD file and the corresponding setter methods in your `NameTag` class. In your TLD file, you have defined the attributes as `firstname` and `lastname`, but your setter methods in the `NameTag` class are named `setFirstName` ... | 32,529 | [
{
"from": "human",
"value": "I'm having trouble with a custom tag:-\norg.apache.jasper.JasperException: /custom_tags.jsp(1,0) Unable to find setter method for attribute : firstname\nThis is my TagHandler class:\npackage com.cg.tags;\n\nimport javax.servlet.jsp.JspException;\nimport javax.servlet.jsp.JspWrit... |
Does Java Connection.close rollback into a finally block?.
I know .Net SqlConnection.close does it.
With this I could make try/finally blocks without catch...
Example:
try {
conn.setAutoCommit(false);
ResultSet rs = executeQuery(conn, ...);
....
executeNonQuery(conn, ...);
....
conn.commit();
}... | In Java, when you close a database connection using the `Connection.close()` method, it does **not** automatically rollback any uncommitted transactions. Therefore, if you close a connection in a `finally` block without calling `commit()` or `rollback()`, any uncommitted changes will be lost, and the behavior depends o... | 24,700 | [
{
"from": "human",
"value": "Does Java Connection.close rollback into a finally block?.\nI know .Net SqlConnection.close does it.\nWith this I could make try/finally blocks without catch...\nExample:\ntry {\n conn.setAutoCommit(false);\n ResultSet rs = executeQuery(conn, ...);\n ....\n executeNo... |
I want to display a thumbnail image in a cell of tableViewController, this thumbnail image is located at some remote place (URL of address is in XML file) so which format of image is cost effective?
| When displaying thumbnail images in a `UITableViewController`, especially when these images are being fetched from a remote location, there are several factors to consider regarding the image format that would be cost-effective:
1. **Image Size and Compression**:
- **JPEG**: This format is widely used for photogra... | 30,147 | [
{
"from": "human",
"value": "I want to display a thumbnail image in a cell of tableViewController, this thumbnail image is located at some remote place (URL of address is in XML file) so which format of image is cost effective?\n"
},
{
"from": "gpt",
"value": "When displaying thumbnail images in... |
I've used HttpWebRequests to post data to HTTPS websites before, and I've never had todo anything different than a regular HTTP Post.
Does anyone know if there are any tricks involved that I missed to ensure that this is done properly?
| When using `HttpWebRequest` in .NET to make an HTTPS request, you generally do not need to do anything significantly different than making an HTTP request. However, there are a few best practices and considerations to ensure that the request is handled properly and securely. Here are some key points:
1. **Use the HTTP... | 24,903 | [
{
"from": "human",
"value": "I've used HttpWebRequests to post data to HTTPS websites before, and I've never had todo anything different than a regular HTTP Post.\nDoes anyone know if there are any tricks involved that I missed to ensure that this is done properly?\n"
},
{
"from": "gpt",
"value"... |
Is there such a thing as too many stored procedures?
I know there is not a limit to the number you can have but is this any performance or architectural reason not to create hundreds, thousands??
| Yes, while there is no technical limit to the number of stored procedures you can create in a database, there are several performance, architectural, and maintainability reasons to be cautious about creating too many.
### Performance Considerations
1. **Overhead**: Each stored procedure takes up space in the database... | 26,375 | [
{
"from": "human",
"value": "Is there such a thing as too many stored procedures?\nI know there is not a limit to the number you can have but is this any performance or architectural reason not to create hundreds, thousands??\n"
},
{
"from": "gpt",
"value": "Yes, while there is no technical limi... |
I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?
I realize I could delete the folder, but I'd like to do this through configuration if possible.... | Yes, you can exclude a specific folder from being compiled in a project by modifying your build configuration depending on the build tool you are using. Here are a few common tools and how you can achieve this:
### For Maven
You can exclude a folder from compilation by modifying the `pom.xml` file. You can configure t... | 30,091 | [
{
"from": "human",
"value": "I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?\nI realize I could delete the folder, but I'd like to ... |
I use Struts v1.3 and have following input form:
In struts-config.xml:
<form-bean name="testForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="displayName" type="java.lang.String" />
</form-bean>
In validation.xml:
<form name="testForm">
<field ... | In Struts 1.3, to trim the values of input fields such as `displayName` before validation and processing, you can achieve this by overriding the `reset` method in your DynaValidatorForm class or using a custom interceptor.
Here’s a step-by-step approach to trim the `displayName` and potentially all `java.lang.String` ... | 27,579 | [
{
"from": "human",
"value": "I use Struts v1.3 and have following input form:\nIn struts-config.xml:\n <form-bean name=\"testForm\" \n type=\"org.apache.struts.validator.DynaValidatorForm\">\n <form-property name=\"displayName\" type=\"java.lang.String\" />\n </form-bean>\n\nIn va... |
Can someone tell me why I don't have all of the dev studio windows available to me when I develop on a 64-bit platform? I upgraded my dev desktop box to server 2003 x64 to match our deployment platform. Since then (I'm using VS2005) I've noticed that several windows aren't available. I can't view Processes (which is... | The issues you are encountering when using Visual Studio 2005 on Windows Server 2003 x64, as compared to Windows XP x64, are not uncommon. Here are some insights into the limitations and considerations when developing on a 64-bit platform, especially with older versions of Visual Studio.
### Limitations in Visual Stud... | 28,434 | [
{
"from": "human",
"value": "Can someone tell me why I don't have all of the dev studio windows available to me when I develop on a 64-bit platform? I upgraded my dev desktop box to server 2003 x64 to match our deployment platform. Since then (I'm using VS2005) I've noticed that several windows aren't ava... |
I know how to create an array of structs but with a predefined size. However is there a way to create a dynamic array of structs such that the array could get bigger?
For example:
typedef struct
{
char *str;
} words;
main()
{
words x[100]; // I do not want to use this, I want to dyn... | You're trying to implement a dynamic array of structs in C, and there are a few key issues in your code that are causing it to behave incorrectly. Let's go through your code step by step to address these problems and provide a working solution.
### Issues in Your Code
1. **Dynamic Memory Management**: The variable `w... | 27,845 | [
{
"from": "human",
"value": "I know how to create an array of structs but with a predefined size. However is there a way to create a dynamic array of structs such that the array could get bigger?\nFor example:\n typedef struct\n {\n char *str;\n } words;\n\n main()\n {\n words x... |
I have a ClickOnce deployed application I want to launch from VBScript, similar to launching Microsoft Word in the following example:
Dim word
Set word = CreateObject("Word.Application")
word.Visible = True
The problem is I don't know what parameter to pass into the CreateObject function to launch my application. Wher... | To launch a ClickOnce application using VBScript, you cannot use `CreateObject` directly because ClickOnce applications don't have COM objects associated with them. Instead, ClickOnce applications are typically launched using their deployment URL.
Here's how you can launch a ClickOnce application from VBScript:
1. **... | 27,621 | [
{
"from": "human",
"value": "I have a ClickOnce deployed application I want to launch from VBScript, similar to launching Microsoft Word in the following example:\nDim word\nSet word = CreateObject(\"Word.Application\")\nword.Visible = True\n\nThe problem is I don't know what parameter to pass into the Crea... |
I've had significant success with NSURL, NSURL[Mutable]Request, NSURLConnection with my iPhone applications. When trying to compile a stand alone Cocoa application, 10 line program to make a simple HTTP request, there are zero compiler errors or warnings. The program compiles fine, yet the HTTP Request is never made to... | The issue you're encountering is likely related to the lifecycle of your application. In a Cocoa application, the event loop must be running to handle asynchronous operations like network requests. When you create a `NSURLConnection`, it will try to communicate with the server asynchronously, but if your application ex... | 29,664 | [
{
"from": "human",
"value": "I've had significant success with NSURL, NSURL[Mutable]Request, NSURLConnection with my iPhone applications. When trying to compile a stand alone Cocoa application, 10 line program to make a simple HTTP request, there are zero compiler errors or warnings. The program compiles fi... |
I created a new project in VS2008. Project type
Visual C# > Office > 2007 > Word 2007 Document
Added some code.. got Word to do a few jumps through some custom hoops.. all fine. Now I need to reference another assembly (CopyLocal as false) which is not signed. So I add the project reference. Now the project will not ... | When working with Visual Studio Tools for Office (VSTO) and trying to reference an unsigned assembly in a project that requires strong naming, you may encounter the challenges you've described. Here's how to address the issue based on your situation:
### Understanding the Issue:
1. **Strong Naming Requirement**: VSTO ... | 28,048 | [
{
"from": "human",
"value": "I created a new project in VS2008. Project type \nVisual C# > Office > 2007 > Word 2007 Document\n\nAdded some code.. got Word to do a few jumps through some custom hoops.. all fine. Now I need to reference another assembly (CopyLocal as false) which is not signed. So I add the ... |
The following have been proposed for an upcoming C++ project.
C++ Coding Standards, by Sutter and Alexandrescu
JSF Air Vehicle C++ coding standards
The Elements of C++ Style
Effective C++ 3rd Edition, by Scott Meyers
Are there other choices? Or is the list above what be should used on a C++ project?
Some related lin... | The list you've proposed includes several well-respected references for C++ coding standards and best practices. However, there are additional resources and considerations that could also be beneficial for your C++ project. Here are some additional choices:
### Additional Books and Resources
1. **C++ Core Guidelines**... | 27,201 | [
{
"from": "human",
"value": "The following have been proposed for an upcoming C++ project.\n\nC++ Coding Standards, by Sutter and Alexandrescu\nJSF Air Vehicle C++ coding standards\nThe Elements of C++ Style\nEffective C++ 3rd Edition, by Scott Meyers\n\nAre there other choices? Or is the list above what b... |
Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*nix/Mac)?
| To determine the number of CPU cores in a platform-independent way in C/C++, you can utilize the C++11 standard library, which provides a portable mechanism to query the number of threads supported by the implementation using `std::thread::hardware_concurrency()`. However, note that this function may not directly corre... | 26,735 | [
{
"from": "human",
"value": "Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*nix/Mac)?\n"
},
{
"from": "gpt",
"value": "To determine the number of CPU cores in a platform-... |
I have been using ASP.net MVC for a new website.
I have found a minor nagging issue with having views with the same name but are in different folders i.e. Views/Home/Index.aspx and Views/Account/Index.aspx
The codebehind files act as if they are partial classes when there is a definition for the same event or function ... | The issue you are encountering with ASP.NET MVC is not specifically a bug but rather a consequence of how ASP.NET handles namespaces and class definitions. When you have multiple views with the same name in different folders, they are compiled into the same assembly, and if they have the same class name (e.g., `Index`)... | 29,881 | [
{
"from": "human",
"value": "I have been using ASP.net MVC for a new website.\nI have found a minor nagging issue with having views with the same name but are in different folders i.e. Views/Home/Index.aspx and Views/Account/Index.aspx\nThe codebehind files act as if they are partial classes when there is a... |
Does anyone know how to build an install project without it deleting/overwriting the _svn folders?
I have a VB .NET 2005 Winform Application and each time I do an Installer Build, it deletes/overwrites the _svn folder in the directories. How can I stop this from happening?
Any and all help is appreciated!
Thanks!
JFV
| When building an installer project in VB .NET, particularly when using tools like Visual Studio, the process can sometimes inadvertently overwrite or delete version control folders such as `_svn` (used by Subversion). To prevent this from happening, you can try a few different strategies:
### Strategies to Prevent Del... | 30,067 | [
{
"from": "human",
"value": "Does anyone know how to build an install project without it deleting/overwriting the _svn folders?\nI have a VB .NET 2005 Winform Application and each time I do an Installer Build, it deletes/overwrites the _svn folder in the directories. How can I stop this from happening?\nAn... |
I have a data set whose elements are displayed as rows in a DataGrid. The sort order for the rows changes in response to external events.
My initial thought was to store the rows as an ObservableCollection and resort the collection after updates. However I ran into two problems:
1) the ObservableCollection does not ... | It sounds like you're facing a common challenge when working with data bindings and collections in WPF or similar frameworks. You've identified that `ObservableCollection<T>` does not have built-in sorting functionality, and directly modifying its elements can lead to exceptions because the underlying collection does n... | 23,641 | [
{
"from": "human",
"value": "I have a data set whose elements are displayed as rows in a DataGrid. The sort order for the rows changes in response to external events. \nMy initial thought was to store the rows as an ObservableCollection and resort the collection after updates. However I ran into two probl... |
The Emacs Wiki lists several modes for supporting mercurial inside of Emacs, including the built-in VC mode. Is it worth exploring any of the other modes, such as the one distributed with mercurial itself?
| Whether or not to explore other modes for supporting Mercurial in Emacs largely depends on your specific needs and preferences as a user. Here's a brief overview of the options and considerations to help you decide:
1. **VC Mode (built-in)**:
- Pros: Integrated into Emacs, stable, and provides a good level of funct... | 30,770 | [
{
"from": "human",
"value": "The Emacs Wiki lists several modes for supporting mercurial inside of Emacs, including the built-in VC mode. Is it worth exploring any of the other modes, such as the one distributed with mercurial itself?\n"
},
{
"from": "gpt",
"value": "Whether or not to explore o... |
In C# how do you make the columns in a DataGrid AutoFit Column Width like you can in Excel? Currently my five columns are fixed width but the column headers can change so I would like the columns to autofit to the width of the column.
Thanks
| In C#, if you're using a `DataGrid` (for example in a WPF application), you can make the columns automatically adjust their width based on the content and headers by setting the `Width` property of each column to `Auto`. This allows the columns to resize dynamically according to the content size. Here's how you can ach... | 29,816 | [
{
"from": "human",
"value": "In C# how do you make the columns in a DataGrid AutoFit Column Width like you can in Excel? Currently my five columns are fixed width but the column headers can change so I would like the columns to autofit to the width of the column.\nThanks\n"
},
{
"from": "gpt",
"... |
How do you add a page break into a document with XSL-FO? I'm using Apache FOP to create PDFs, if that makes a difference.
| In XSL-FO (Extensible Stylesheet Language Formatting Objects), you can insert a page break using the `fo:block` or `fo:leader` element. Here are a couple of methods to add a page break when generating PDFs with Apache FOP:
### Method 1: Using `fo:block`
You can add a page break before or after a block by using the `b... | 30,476 | [
{
"from": "human",
"value": "How do you add a page break into a document with XSL-FO? I'm using Apache FOP to create PDFs, if that makes a difference.\n"
},
{
"from": "gpt",
"value": "In XSL-FO (Extensible Stylesheet Language Formatting Objects), you can insert a page break using the `fo:block` ... |
I have been maintaining an installation for a while but I am not really an expert. now I've been asked to come up with a solution for this:
Our software is always sold together with a computer as it has to be run in a very controlled environment. The installer needs administrative privileges to be executed. So far we h... | To allow users to install software that requires administrative privileges without giving them full administrative access, there are a few approaches you can consider. However, programmatically elevating user privileges during installation and then dropping them back down is not straightforward due to security concerns... | 30,286 | [
{
"from": "human",
"value": "I have been maintaining an installation for a while but I am not really an expert. now I've been asked to come up with a solution for this:\nOur software is always sold together with a computer as it has to be run in a very controlled environment. The installer needs administrat... |
I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW.
So each app should act like this:
main()
// I don't know if another a... | Using named pipes (FIFO) could work for communication between the two processes, but it’s not the best approach for handling initialization locks and reference counting. Named pipes are primarily designed for message passing, and managing state between two processes can be complex and error-prone.
A more suitable appr... | 26,046 | [
{
"from": "human",
"value": "I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW. \nSo each app should act like thi... |
Would it be possible to write a class that is virtually indistinguishable from an actual PHP array by implementing all the necessary SPL interfaces? Are they missing anything that would be critical?
I'd like to build a more advanced Array object, but I want to make sure I wouldn't break an existing app that uses arrays... | Creating a custom class in PHP that behaves like an array is certainly possible. PHP provides several interfaces through the Standard PHP Library (SPL) that can help you achieve this. However, while you can implement many of the functionalities of an array, there are some limitations and considerations to keep in mind.... | 25,727 | [
{
"from": "human",
"value": "Would it be possible to write a class that is virtually indistinguishable from an actual PHP array by implementing all the necessary SPL interfaces? Are they missing anything that would be critical?\nI'd like to build a more advanced Array object, but I want to make sure I would... |
Does a print version of the Java >= 1.5 API exist? Where can I buy it online? Preferably in Canada, but just a title is great.
| Yes, a print version of the Java API, specifically for Java 1.5 (also known as Java 5), exists. One of the well-known versions is titled "Java 2 Platform Standard Edition 5.0 API Specification." You can often find this book or similar editions on various online platforms.
Here are a couple of options where you might b... | 32,664 | [
{
"from": "human",
"value": "Does a print version of the Java >= 1.5 API exist? Where can I buy it online? Preferably in Canada, but just a title is great.\n"
},
{
"from": "gpt",
"value": "Yes, a print version of the Java API, specifically for Java 1.5 (also known as Java 5), exists. One of the ... |
I'm interested in using an Object-Relational Mapping package for an upcoming project. This project will begin as an ASP.NET application but will have lots of functionality that will eventually be shared with WinForms applications. Can anyone suggest some good, free ORM packages that work well in both ASP.NET and WinF... | There are several popular Object-Relational Mapping (ORM) frameworks that you can consider for your ASP.NET and WinForms project. Here are a few good, free options:
1. **Entity Framework Core**:
- **Description**: A lightweight and extensible version of Entity Framework designed for modern app development. It supp... | 30,304 | [
{
"from": "human",
"value": "I'm interested in using an Object-Relational Mapping package for an upcoming project. This project will begin as an ASP.NET application but will have lots of functionality that will eventually be shared with WinForms applications. Can anyone suggest some good, free ORM package... |
i've never created a shopping cart, or forum in php. aside from viewing and analyzing another persons project or viewing tutorials that display how to make such a project or how to being such a project. how would a person know how to design the database structure to create such a thing? im guessing its probbably throug... | Designing a database structure for a shopping cart or a forum in PHP (or any other language) can indeed involve a good deal of trial and error, but there are also best practices, principles, and common patterns you can follow to make the process more manageable and efficient. Here’s a structured approach to help you de... | 25,321 | [
{
"from": "human",
"value": "i've never created a shopping cart, or forum in php. aside from viewing and analyzing another persons project or viewing tutorials that display how to make such a project or how to being such a project. how would a person know how to design the database structure to create such ... |
I am trying to get data from my server, used RemoteObject to accomplish it.
When I run the application on my localhost it works great but when iam using it on my server i get a Channel.Security.Error(Security Error accessing URL).
On the server side logs there is a mention about cross domain .
77.127.194.4 - - [23/Oct/... | The issue you're encountering is related to cross-domain security policies in Flash (or similar technologies) where you are trying to access resources from a different domain. This is enforced by the browser to prevent unauthorized access to sensitive data.
When you see the `Channel.Security.Error` and the log mention... | 29,108 | [
{
"from": "human",
"value": "I am trying to get data from my server, used RemoteObject to accomplish it.\nWhen I run the application on my localhost it works great but when iam using it on my server i get a Channel.Security.Error(Security Error accessing URL).\nOn the server side logs there is a mention abo... |
I could not find any pointers on how to create a menubar icon on OSX using wx. I originally thought that the wxTaskBarIcon class would do, but it actually creates an icon on the Dock. On Windows, wxTaskBarIcon creates a Systray icon and associated menu, and I would think that on mac osx it would create a menubar icon, ... | Creating a menu bar icon (also known as a status item) in macOS using wxPython is indeed a bit different compared to how it’s done in Windows. wxPython does not provide direct support for a menu bar icon, but you can achieve this using the `wx.adv.TaskBarIcon` class along with some specific macOS behaviors.
Here's a b... | 30,181 | [
{
"from": "human",
"value": "I could not find any pointers on how to create a menubar icon on OSX using wx. I originally thought that the wxTaskBarIcon class would do, but it actually creates an icon on the Dock. On Windows, wxTaskBarIcon creates a Systray icon and associated menu, and I would think that on... |
I tried to use OPTION (MAXRECURSION 0) in a view to generate a list of dates.
This seems to be unsupported. Is there a workaround for this issue?
EDIT to Explain what I actually want to do:
I have 2 tables.
table1: int weekday, bool available
table2: datetime date, bool available
I want the result:
view1: date (here al... | Using a recursive CTE (Common Table Expression) to generate a list of dates can be a common requirement in SQL, especially when you want to create a series of dates within a specific range. However, as you noticed, the `OPTION (MAXRECURSION 0)` clause cannot be applied directly to a view.
Since you want to generate a ... | 28,895 | [
{
"from": "human",
"value": "I tried to use OPTION (MAXRECURSION 0) in a view to generate a list of dates.\nThis seems to be unsupported. Is there a workaround for this issue?\nEDIT to Explain what I actually want to do:\nI have 2 tables.\ntable1: int weekday, bool available\ntable2: datetime date, bool ava... |
I'm starting a project using a Restful architecture implemented in Java (using the new JAX-RS standard)
We are planning to develop the GUI with a Flex application. I have already found some problems with this implementation using the HTTPService component (the response error codes, headers access...).
Any of you guys h... | Yes, using a RESTful architecture with JAX-RS in Java along with a Flex-based GUI can be a feasible project. However, there are several considerations and potential challenges that you may encounter along the way. Here are some insights and tips based on common experiences:
### 1. **CORS (Cross-Origin Resource Sharing... | 27,854 | [
{
"from": "human",
"value": "I'm starting a project using a Restful architecture implemented in Java (using the new JAX-RS standard)\nWe are planning to develop the GUI with a Flex application. I have already found some problems with this implementation using the HTTPService component (the response error co... |
Given an object:
let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI",
"regex": "^http://.*"
};
How do I remove the property regex to end up with the following myObject?
let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI"
};
| You can remove the `regex` property from the `myObject` using the `delete` operator in JavaScript. Here’s how you can do it:
```javascript
let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI",
"regex": "^http://.*"
};
// Remove the property 'regex'
delete myObject.regex;
// Now myObject is:
console.log(m... | 31,262 | [
{
"from": "human",
"value": "Given an object:\nlet myObject = {\n \"ircEvent\": \"PRIVMSG\",\n \"method\": \"newURI\",\n \"regex\": \"^http://.*\"\n};\n\nHow do I remove the property regex to end up with the following myObject?\nlet myObject = {\n \"ircEvent\": \"PRIVMSG\",\n \"method\": \"newURI\"\n};... |
Which is a better format to store graphic assets for a Flex application, SWF or SWC?
Are there any real differences, and if so what are they?
| When deciding between SWF and SWC formats for storing graphic assets in a Flex application, it's important to understand the differences between the two formats, as they serve different purposes.
### SWF (Shockwave Flash)
- **Definition**: SWF is a binary file format used for multimedia, vector graphics, and ActionScr... | 28,272 | [
{
"from": "human",
"value": "Which is a better format to store graphic assets for a Flex application, SWF or SWC?\nAre there any real differences, and if so what are they?\n"
},
{
"from": "gpt",
"value": "When deciding between SWF and SWC formats for storing graphic assets in a Flex application,... |
I'm getting the memory leak message upon shutdown, saying that I'm leaking 3 of a certain object. Two problems with that, though.
It only happens intermittently. I can run my program, go through the exact same series of steps, (open a data file, display it, and shut down again,) and sometimes the message will show u... | The memory leak message you’re encountering, along with the intermittent nature of the issue, suggests a few possibilities to consider. Memory management issues can be tricky, and while you seem confident in your object management, there are several reasons why a leak detection tool might report a leak even if the code... | 29,090 | [
{
"from": "human",
"value": "I'm getting the memory leak message upon shutdown, saying that I'm leaking 3 of a certain object. Two problems with that, though.\n\nIt only happens intermittently. I can run my program, go through the exact same series of steps, (open a data file, display it, and shut down ag... |
I have a ASP.Net Menu Control with three levels and flyouts enabled.
I want to highlight the parent items (right upto the top level parent) whenever a user hovers over the menu items.
I do not want to use a client side solution as described here:
http://www.codeproject.com/KB/webforms/AspMenuParentHighlighting.aspx
Is ... | Certainly! To achieve parent item highlighting in an ASP.NET Menu Control without relying on client-side scripting, you can implement a server-side solution by dynamically setting the CSS classes based on the current menu item.
Here’s a step-by-step approach to implement this:
1. **CSS Class for Highlighting**: Defin... | 27,151 | [
{
"from": "human",
"value": "I have a ASP.Net Menu Control with three levels and flyouts enabled.\nI want to highlight the parent items (right upto the top level parent) whenever a user hovers over the menu items.\nI do not want to use a client side solution as described here:\nhttp://www.codeproject.com/KB... |
[TestMethod]
public void Memory()
{
var wr = new WeakReference("aaabbb");
Assert.IsTrue(wr.IsAlive);
GC.Collect();
GC.Collect();
GC.Collect();
GC.Collect();
GC.Collect();
Assert.IsFalse(wr.IsAlive); //<-- fails here
}
It's .NET 3.5 SP1
Can anyone can tell me why this test fails?
Edit: T... | The reason your original test fails is due to the behavior of string interning in .NET. When you create a string literal like `"aaabbb"`, .NET maintains a pool of interned strings. This means that the string you created is stored in memory and will not be collected by the garbage collector, even when you use a `WeakRef... | 32,362 | [
{
"from": "human",
"value": "[TestMethod]\npublic void Memory()\n{\n var wr = new WeakReference(\"aaabbb\");\n Assert.IsTrue(wr.IsAlive);\n GC.Collect();\n GC.Collect();\n GC.Collect();\n GC.Collect();\n GC.Collect();\n Assert.IsFalse(wr.IsAlive); //<-- fails here\n}\n\nIt's .NET 3.5... |
Ok
I'm working on a little project at the moment, the Report expects an int but the ReportParameter class only lets me have a value that's a string or a string[]
How can I pass an int?
thanks
dan
| If you're working with a reporting system that requires a string value for a `ReportParameter` but you have an integer that you need to pass, you can convert the integer to a string before setting it as a parameter.
Here’s a quick example of how you can do this in C#:
```csharp
using Microsoft.Reporting.WebForms;
/... | 31,540 | [
{
"from": "human",
"value": "Ok\nI'm working on a little project at the moment, the Report expects an int but the ReportParameter class only lets me have a value that's a string or a string[]\nHow can I pass an int?\nthanks\ndan\n"
},
{
"from": "gpt",
"value": "If you're working with a reporting... |
I'm unable to make a remote connection to an Oracle XE install (through TOAD / SQL Developer). Here's the deal.
I set up a new server (windows 2003). The goal was to make a new image with several applications preinstalled, Oracle XE being one of them. Got Oracle installed no problem, connected locally, remotely and ... | It sounds like you've gone through a lot of troubleshooting already. Here are several steps you can take to diagnose and resolve your issues connecting remotely to your Oracle XE instance:
### 1. Verify Listener Configuration
Ensure that the Oracle listener is running and configured to allow remote connections. You c... | 27,777 | [
{
"from": "human",
"value": "I'm unable to make a remote connection to an Oracle XE install (through TOAD / SQL Developer). Here's the deal.\nI set up a new server (windows 2003). The goal was to make a new image with several applications preinstalled, Oracle XE being one of them. Got Oracle installed no... |
I work on a app which has only one way to get a working DB connection: a function that returns a MySQL connection resource.
Is there any way for me to convert that MySQL connection to a PDO MySQL connection?
I don't have access to the MySQL server in any other way, no username, password, nothing. I can't see/get the fi... | It is not directly possible to convert a MySQL connection resource into a PDO connection because they are fundamentally different interfaces. However, you can still utilize the existing MySQL connection in a way that allows you to use PDO, but you'll have to work within the constraints of the MySQL extension you're usi... | 27,998 | [
{
"from": "human",
"value": "I work on a app which has only one way to get a working DB connection: a function that returns a MySQL connection resource.\nIs there any way for me to convert that MySQL connection to a PDO MySQL connection?\nI don't have access to the MySQL server in any other way, no username... |
I'm addicted to Vim, it's now my de facto way of editing text files.
Being that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps?
Some questions I have:
How do I invoke a maven task without leaving vi?
Can I get code completion?
How's the syntax highlig... | It's great to hear that you're enjoying using Vim! It can be quite powerful for editing text files, including for Java development. Here are some tips to enhance your Java development experience in Vim, along with answers to your questions:
### Invoking Maven Tasks
You can run Maven tasks without leaving Vim by using... | 27,118 | [
{
"from": "human",
"value": "I'm addicted to Vim, it's now my de facto way of editing text files.\nBeing that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps?\nSome questions I have:\n\nHow do I invoke a maven task without leaving vi?\nCan I... |
Is there a way you can run your UnitTest project against a compiled DLL outside of the IDE? Basically we have testing procedures to validate code before moving into production.
I would not want to run the tests inside the IDE. I would want to have the compiled code ready to move to production and be able to run a fin... | Yes, you can run your Unit Test project against a compiled DLL outside of the IDE by using command-line utilities. If you are using a .NET testing framework like MSTest, NUnit, or xUnit, you can execute your tests from the command line.
### Using the Command-Line for Unit Testing
1. **MSTest**:
If you're using MST... | 26,088 | [
{
"from": "human",
"value": "Is there a way you can run your UnitTest project against a compiled DLL outside of the IDE? Basically we have testing procedures to validate code before moving into production.\nI would not want to run the tests inside the IDE. I would want to have the compiled code ready to m... |
I'm desperately searching for a tool allowing me to copy documents with their old versions from a SharePoint 2003 to a SharePoint 2007 site.
Do you know about any simple (and preferably free) tool which does this?
| Transferring documents along with their version history from SharePoint 2003 to SharePoint 2007 can be a bit complex due to the differences in architecture and features between the two versions. While there are some tools available, many of them can be costly. However, there are a few options you can consider, includin... | 31,048 | [
{
"from": "human",
"value": "I'm desperately searching for a tool allowing me to copy documents with their old versions from a SharePoint 2003 to a SharePoint 2007 site.\nDo you know about any simple (and preferably free) tool which does this?\n"
},
{
"from": "gpt",
"value": "Transferring docume... |
I believe in OO, but not to the point where inappropriate designs/implementations should be used just to be "OO Compliant".
So, how to deal with the Serlvet/EJB/DataContainer layered architecture:
Servlets receive requests and call a "business layer" (e.g. session EJBs)
The business layer locates DataContainers from t... | The concerns you've raised about the layered architecture are common when dealing with business logic, data management, and ensuring that the code remains organized, maintainable, and adheres to principles of object-oriented programming. Here are some strategies to help you organize your business layer better while kee... | 27,608 | [
{
"from": "human",
"value": "I believe in OO, but not to the point where inappropriate designs/implementations should be used just to be \"OO Compliant\".\nSo, how to deal with the Serlvet/EJB/DataContainer layered architecture:\n\nServlets receive requests and call a \"business layer\" (e.g. session EJBs)\... |
What's the best way to unit test protected and private methods in Ruby, using the standard Ruby Test::Unit framework?
I'm sure somebody will pipe up and dogmatically assert that "you should only unit test public methods; if it needs unit testing, it shouldn't be a protected or private method", but I'm not really intere... | In Ruby, while it's generally considered best practice to only test public methods, there are situations where testing protected or private methods can be justified. If you have complex logic in private or protected methods and want to ensure they are working correctly, there are a few approaches you can take using the... | 29,753 | [
{
"from": "human",
"value": "What's the best way to unit test protected and private methods in Ruby, using the standard Ruby Test::Unit framework?\nI'm sure somebody will pipe up and dogmatically assert that \"you should only unit test public methods; if it needs unit testing, it shouldn't be a protected or... |
In WPF, we are creating custom controls that inherit from button with completely drawn-from-scratch xaml graphics. We have a border around the entire button xaml and we'd like to use that as the location for updating the background when MouseOver=True in a trigger. What we need to know is how do we update the backgro... | To update the background of a border in a WPF custom button control when the mouse hovers over it, you can define a `Trigger` in the `ControlTemplate` of your button. You'll be using the `VisualStateManager` or simple triggers to change the `Background` property of the `Border`. Here's how you can accomplish this with ... | 26,158 | [
{
"from": "human",
"value": "In WPF, we are creating custom controls that inherit from button with completely drawn-from-scratch xaml graphics. We have a border around the entire button xaml and we'd like to use that as the location for updating the background when MouseOver=True in a trigger. What we nee... |
I have no trouble building 1.35.0, as well as 1.36.0 on the timesys arm-gcc toolchain, both statically (link-static) as well as dynamically (.so, default option).
However, when I try to link a simple sample filesystem app:
#include <boost/filesystem.hpp>
#include <iostream>
namespace fs = boost::filesystem;
int main(... | The linker errors you're encountering are related to the atomic operations used in the Boost library. Specifically, the `__sync_fetch_and_add_4` functions are built-in functions provided by GCC for atomic operations, but they may not be available or supported in the version of the GCC toolchain you are using.
Here are... | 30,443 | [
{
"from": "human",
"value": "I have no trouble building 1.35.0, as well as 1.36.0 on the timesys arm-gcc toolchain, both statically (link-static) as well as dynamically (.so, default option).\nHowever, when I try to link a simple sample filesystem app:\n#include <boost/filesystem.hpp>\n#include <iostream>\n... |
I have one application which uses the standard .NET forms authentication cookie, now I need to get this cookie from an application hosted on the same domain but one folder down with it's own application.
I can't seem to find any trace of the cookie using Request.Cookies.AllKeys, there must be a reason why because when ... | In ASP.NET, cookies have a `Path` attribute that determines the scope of the cookie; that is, which URLs can access the cookie. If your cookie is set with a `Path` of `/`, it should indeed be accessible from any folder within the same domain. However, there are a few reasons why you might not be able to retrieve the co... | 29,279 | [
{
"from": "human",
"value": "I have one application which uses the standard .NET forms authentication cookie, now I need to get this cookie from an application hosted on the same domain but one folder down with it's own application.\nI can't seem to find any trace of the cookie using Request.Cookies.AllKeys... |
What are the technologies and programming decisions that make Google able to serve a query so fast?
Every time I search something (one of the several times per day) it always amazes me how they serve the results in near or less than 1 second time. What sort of configuration and algorithms could they have in place that... | Google's ability to serve search results in near-instantaneous time hinges on a combination of advanced technologies, algorithms, and infrastructure. Here’s a deeper look into the key components that contribute to this remarkable performance:
### 1. **Distributed Architecture**
- **Cluster Computing:** Google emplo... | 22,297 | [
{
"from": "human",
"value": "What are the technologies and programming decisions that make Google able to serve a query so fast? \nEvery time I search something (one of the several times per day) it always amazes me how they serve the results in near or less than 1 second time. What sort of configuration an... |
I been trying to get sqlcachedependecy working, but it doesn't appear to work
I got the proper settings in my web.config and also global.asa, however when I run this query and the changes are made to the database from either with in or outside the web site the cached objects are not updated please someone help? I know... | When working with `SqlCacheDependency` in ASP.NET, it's essential to ensure that several configurations and practices are followed for it to work correctly. Here are steps to troubleshoot and fix the issues you're experiencing:
1. **Check your Web.config Settings**: Ensure that you have correctly configured SQL Server... | 28,507 | [
{
"from": "human",
"value": "I been trying to get sqlcachedependecy working, but it doesn't appear to work \nI got the proper settings in my web.config and also global.asa, however when I run this query and the changes are made to the database from either with in or outside the web site the cached objects a... |
I saw this question asked about C# I would like an answer for PHP. I have some old code that has 4 pages of foreach loops and conditions which just makes it hard to read and follow. How would I make this more OO? I was thinking of using SPL Functions but don't fully understand whats involved yet.
| Refactoring old code with a large number of `foreach` loops and conditions into a more object-oriented (OO) approach can significantly improve readability and maintainability. Here’s a general guide on how to approach this refactoring using PHP.
### Step 1: Identify the Data Structures
Examine your existing code and ... | 22,915 | [
{
"from": "human",
"value": "I saw this question asked about C# I would like an answer for PHP. I have some old code that has 4 pages of foreach loops and conditions which just makes it hard to read and follow. How would I make this more OO? I was thinking of using SPL Functions but don't fully understand w... |
we have users in each region of the world. I would like to create an environment picker that shows up a map on the form and has a link for each region. So if i was in NY i would click NY and would get the NY environment. Any ideas of doing this dynamically in winforms as opposed to having a static map image.
| Creating a dynamic environment picker in a WinForms application can be a fun project! Instead of using a static map image, you can use controls to create an interactive interface where users can select their region. Here's a simple approach to achieve this:
### 1. Using a Map Control:
You can use a third-party library... | 26,959 | [
{
"from": "human",
"value": "we have users in each region of the world. I would like to create an environment picker that shows up a map on the form and has a link for each region. So if i was in NY i would click NY and would get the NY environment. Any ideas of doing this dynamically in winforms as oppo... |
Trends data from Twitter Search API in JSON.
Grabbing the file using:
$jsonurl = "http://search.twitter.com/trends.json";
$json = file_get_contents($jsonurl,0,null,null);
$json_output = json_decode($json);
How do I work with data from this object. As an array? Only really need to extract data from the [name] values.
J... | To work with the data you retrieved from the Twitter Search API, you can access the elements in the JSON object like you would with a standard PHP object. Since you only need the `[name]` values from the `trends` array, you can loop through that array and extract the `name` property of each `stdClass` object.
Here’s h... | 30,463 | [
{
"from": "human",
"value": "Trends data from Twitter Search API in JSON.\nGrabbing the file using:\n$jsonurl = \"http://search.twitter.com/trends.json\";\n$json = file_get_contents($jsonurl,0,null,null);\n$json_output = json_decode($json);\n\nHow do I work with data from this object. As an array? Only real... |
My MFC application using the "ESRI MapObjects LT2" ActiveX plugin throws an ASSERT at me when closing it.
The error occurs in cmdtarg.cpp:
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1); //<--- Fa... | The assertion failure you’re encountering in the destructor of `CCmdTarget` suggests that the reference count (`m_dwRef`) for the ActiveX object is not being managed correctly in your application, leading to it being greater than expected during destruction.
Here are several potential reasons and suggestions to troubl... | 23,633 | [
{
"from": "human",
"value": "My MFC application using the \"ESRI MapObjects LT2\" ActiveX plugin throws an ASSERT at me when closing it.\nThe error occurs in cmdtarg.cpp:\nCCmdTarget::~CCmdTarget()\n{\n#ifndef _AFX_NO_OLE_SUPPORT\n if (m_xDispatch.m_vtbl != 0)\n ((COleDispatchImpl*)&m_xDispatch)->... |
This was an job placement interview I faced. They asked whether we can realloc Array, I told yes. Then They asked - then why we need pointers as most of the people give reason that it wastes memory space. I could not able to give satisfactory answer. If any body can give any satisfactory answer, I'll be obliged. Please... | In a job interview scenario, the question about reallocating an array and the role of pointers can lead to a deeper discussion about memory management, efficiency, and the specific use cases for pointers versus using dynamically allocated arrays. Here’s a breakdown of the concepts and a satisfactory answer to the quest... | 29,513 | [
{
"from": "human",
"value": "This was an job placement interview I faced. They asked whether we can realloc Array, I told yes. Then They asked - then why we need pointers as most of the people give reason that it wastes memory space. I could not able to give satisfactory answer. If any body can give any sat... |
I was recently put in charge of the wiki for the development team. The wiki is still in its infancy, so I have a lot of room to work with. It goal is to house internal to the development team. Currently, the main piece of information that the wiki holds is Coding Standards.
What are some best practices your dev team ... | Creating and maintaining a development team wiki can significantly enhance communication, knowledge sharing, and collaboration. Here are some best practices, important information to include, potential pitfalls, and organizational strategies to consider:
### Best Practices for a Dev Wiki
1. **Keep It Up to Date**: As... | 25,211 | [
{
"from": "human",
"value": "I was recently put in charge of the wiki for the development team. The wiki is still in its infancy, so I have a lot of room to work with. It goal is to house internal to the development team. Currently, the main piece of information that the wiki holds is Coding Standards. \n\n... |
So for this one project, we have a bunch of queries that are executed on a regular basis (every minute or so. I used the "Analyze Query in Database Engine " to check on them.
They are pretty simple:
select * from tablex where processed='0'
There is an index on processed, and each query should return <1000 rows on a ta... | In SQL Server, statistics are objects that help the query optimizer create efficient query execution plans. They provide the optimizer with information about the distribution of data within a column or a set of columns. When you have queries that filter or sort data based on a certain column (in your case, the `process... | 27,502 | [
{
"from": "human",
"value": "So for this one project, we have a bunch of queries that are executed on a regular basis (every minute or so. I used the \"Analyze Query in Database Engine \" to check on them. \nThey are pretty simple:\nselect * from tablex where processed='0'\nThere is an index on processed, a... |
I have a J2EE based web application.
In one of the pages there is a button labeled "Print".
My problem is something like this:
User enters tool names for e.g:
ToolName1
ToolName2
ToolName3
Then clicks on "Print".
The intended action is that tool details of the 3 tools are retrieved from db and then printed one tool per... | To implement a feature that allows users to print tool details from a J2EE-based web application, you'll need to follow a series of steps to retrieve the necessary data, format it for printing, and initiate the print process. Here’s a step-by-step guide to achieve this:
### Step 1: User Input
Ensure you have a form w... | 28,034 | [
{
"from": "human",
"value": "I have a J2EE based web application.\nIn one of the pages there is a button labeled \"Print\".\nMy problem is something like this:\nUser enters tool names for e.g:\nToolName1\nToolName2\nToolName3\nThen clicks on \"Print\".\nThe intended action is that tool details of the 3 tool... |
I have a SQL Server 2000 database instance that is rarely updated. I also have a database table which has no columns holding each row's created date or modified date.
Is there any way that I can determine the last time an update or insert was performed on the database as a whole, so that I can at least put a bound o... | In SQL Server 2000, there isn't a built-in, direct way to track the last update or insert timestamps for the entire database, especially when your tables do not contain any audit columns like `CreatedDate` or `ModifiedDate`. However, you can consider a few approaches to infer when the last transaction occurred:
### 1.... | 30,011 | [
{
"from": "human",
"value": "I have a SQL Server 2000 database instance that is rarely updated. I also have a database table which has no columns holding each row's created date or modified date. \nIs there any way that I can determine the last time an update or insert was performed on the database as a w... |
I am trying to get a list of rates for all available services from FedEx using 1 call, and having a tough time with their documentation. Anyone have some code snippets of how you interfaced with them? .Net code is preferable but anything will help more than their crapping code samples!
Thanks
| Sure! To get a list of rates for all available services from FedEx using a single API call, you need to use the FedEx Rate Service API. Below, I'll provide a simple example of how you might accomplish this using .NET (C#).
Before you begin, make sure you have the following:
1. A FedEx account and access to the FedEx ... | 23,030 | [
{
"from": "human",
"value": "I am trying to get a list of rates for all available services from FedEx using 1 call, and having a tough time with their documentation. Anyone have some code snippets of how you interfaced with them? .Net code is preferable but anything will help more than their crapping code s... |
I'm trying to determine the reason for a stalled process on Linux. It's a telecom application, running under fairly heavy load. There is a separate process for each of 8 T1 spans. Every so often, one of the processes will get very unresponsive - up to maybe 50 seconds before an event is noted in the normally very bu... | When trying to diagnose a stalled or unresponsive process in a high-load environment, several tools and techniques can be useful to gather insights while being as unobtrusive as possible. Here are some suggestions:
### 1. **`strace`**
`strace` can trace system calls made by a process, which can help you understand if ... | 22,567 | [
{
"from": "human",
"value": "I'm trying to determine the reason for a stalled process on Linux. It's a telecom application, running under fairly heavy load. There is a separate process for each of 8 T1 spans. Every so often, one of the processes will get very unresponsive - up to maybe 50 seconds before ... |
For a in-house hardware monitoring utility, I need to use gauges and charts to help visualize various metrics. Is there any good open source or free charting and gauge library available for .NET? I am not interested in purchasing any components (which excludes components such as Dundas Charts & Graph, which I know woul... | Certainly! There are several open-source and free charting and gauge libraries available for .NET that can be used in your in-house hardware monitoring utility. Here are some notable options:
1. **LiveCharts**:
- **Website**: [LiveCharts](https://lvcharts.net/)
- **Description**: LiveCharts is an open-source cha... | 30,465 | [
{
"from": "human",
"value": "For a in-house hardware monitoring utility, I need to use gauges and charts to help visualize various metrics. Is there any good open source or free charting and gauge library available for .NET? I am not interested in purchasing any components (which excludes components such as... |
Here's the scenario:
I have a textbox and a button on a web page. When the button is clicked, I want a popup window to open (using Thickbox) that will show all items that match the value entered in the textbox. I am currently using the IFrame implementation of Thickbox. The problem is that the URL to show is hardcod... | To achieve your goal of dynamically generating the URL for the Thickbox popup based on the value entered in the textbox, you can use jQuery to capture the button click event and construct the URL accordingly. This way, you won't need to hardcode the URL in the `alt` attribute. Below is a solution that demonstrates how ... | 28,962 | [
{
"from": "human",
"value": "Here's the scenario:\nI have a textbox and a button on a web page. When the button is clicked, I want a popup window to open (using Thickbox) that will show all items that match the value entered in the textbox. I am currently using the IFrame implementation of Thickbox. The ... |
One of the tenets of SOA is: "Services Are Autonomous".
I have 2 services. Service A depends on Service B. Service A cannot serve clients unless Service B is up and running. Do I violate the tenet here?
Or if autonomous must mean "decoupled", do I satisfy the tenet if I have a failsafe (say another instance of Servi... | The tenet "Services Are Autonomous" in Service-Oriented Architecture (SOA) generally emphasizes that services should be able to operate independently, manage their own state, and be resilient to the availability of other services. Let's break down your scenario to clarify the concept of autonomy in this context.
1. **... | 30,351 | [
{
"from": "human",
"value": "One of the tenets of SOA is: \"Services Are Autonomous\".\nI have 2 services. Service A depends on Service B. Service A cannot serve clients unless Service B is up and running. Do I violate the tenet here?\nOr if autonomous must mean \"decoupled\", do I satisfy the tenet if I... |
We have an application that downloads some files in the background. Our application pops up when an Internet connection is made, and after prompting the user to accept the downloads, we'd like to switch back to the home screen while we do our stuff.
We can't work out how to do to this. We can emulate pressing "back" a ... | To achieve the functionality of switching back to the home screen after prompting the user for downloads in an Android application, you can use the following approaches:
1. **Launching Home Screen Activity**:
You can programmatically launch the home screen or the launcher activity by creating an intent. However, no... | 29,950 | [
{
"from": "human",
"value": "We have an application that downloads some files in the background. Our application pops up when an Internet connection is made, and after prompting the user to accept the downloads, we'd like to switch back to the home screen while we do our stuff.\nWe can't work out how to do ... |
I keep seeing references to the visitor pattern in blogs but I've got to admit, I just don't get it. I read the wikipedia article for the pattern and I understand its mechanics but I'm still confused as to when I'd use it.
As someone who just recently really got the decorator pattern and is now seeing uses for it abso... | The Visitor pattern is one of the behavioral design patterns that can help you manage operations on a collection of objects with different types, allowing you to add new operations without modifying the existing class structures. Here's a breakdown of when and how you might use the Visitor pattern, along with an intuit... | 26,691 | [
{
"from": "human",
"value": "I keep seeing references to the visitor pattern in blogs but I've got to admit, I just don't get it. I read the wikipedia article for the pattern and I understand its mechanics but I'm still confused as to when I'd use it.\nAs someone who just recently really got the decorator ... |
I am writing a simple xml string to an MSMQ from a VB6 app, but when I attempt to read the message off the queue in C# using the XmlMessageFormatter I get the following error:
"Name cannot begin with the '.' character"
How do I successfully read these messages using .Net code?
| The error message "Name cannot begin with the '.' character" that you're encountering when using the `XmlMessageFormatter` in C# suggests that the XML structure of your message being sent from the VB6 application might not adhere to the rules of well-formed XML as expected by the .NET framework.
Here are some steps an... | 28,586 | [
{
"from": "human",
"value": "I am writing a simple xml string to an MSMQ from a VB6 app, but when I attempt to read the message off the queue in C# using the XmlMessageFormatter I get the following error:\n\"Name cannot begin with the '.' character\"\nHow do I successfully read these messages using .Net cod... |
Magento shopping cart is built on the Zend Framework in PHP. This is the first time I've dealt with the Zend framework and I'm having the following difficulty...
I'm creating a custom module that will allow users to upload images whenever they purchase products.
I can overload the addAction() method whenever a user at... | You're on the right track by overriding the `addAction` method in your custom module. To implement a file upload feature in Magento during the add-to-cart process, you will need to integrate a form for image uploads and validate it before proceeding with the addition to the cart.
Here's a step-by-step approach on how ... | 26,831 | [
{
"from": "human",
"value": "Magento shopping cart is built on the Zend Framework in PHP. This is the first time I've dealt with the Zend framework and I'm having the following difficulty...\nI'm creating a custom module that will allow users to upload images whenever they purchase products. \nI can overloa... |
I'm on a project which is trying to write what amounts to a Mailing List app in Django, and we're running into a couple of problems/questions.
The code we have so far doesn't set various List headers, and re-sets the To header to be the person we're sending it to, instead of the list address.
Now, we can work our way t... | Hi Blake,
Creating a mailing list application in Django that handles email headers properly can indeed be tricky. Below are some guidelines, example code, and relevant sections from the RFCs that may help you set the necessary headers correctly for your mailing list.
### Key Headers for Mailing Lists
1. **List-Id**:... | 28,568 | [
{
"from": "human",
"value": "I'm on a project which is trying to write what amounts to a Mailing List app in Django, and we're running into a couple of problems/questions.\nThe code we have so far doesn't set various List headers, and re-sets the To header to be the person we're sending it to, instead of th... |
I have an AdvancedDataGrid that uses customer grouping of data. Not all of the groups will be at the same level in the hierarchy, and groups can contain both groups and members. We have a sort callback, but it's not being called except for groups at the leaf-most levels. See code below for an example -- expand all of t... | The issue you're experiencing with the `sortCompareFunction` not being called for groups and group members at the same level in your `AdvancedDataGrid` is likely due to how the sorting mechanism works in conjunction with hierarchical data.
In an `AdvancedDataGrid`, the sorting is typically applied to the leaf-level da... | 20,430 | [
{
"from": "human",
"value": "I have an AdvancedDataGrid that uses customer grouping of data. Not all of the groups will be at the same level in the hierarchy, and groups can contain both groups and members. We have a sort callback, but it's not being called except for groups at the leaf-most levels. See cod... |
I need to impersonate myself as a domain user in a ASP.NET application running on VMWare machine. Since the VMWare machine is not itself in the domain, ASP.NET is unable to resolve the user token (specified in web.config). Is there a way to do that?
Thanks in advance,
Petr
| Impersonating a domain user in an ASP.NET application when the hosting environment (like a VMware machine) is not part of the domain can be challenging, as the application won't have the necessary access to authenticate and retrieve user tokens directly from Active Directory.
However, you can consider several options ... | 29,946 | [
{
"from": "human",
"value": "I need to impersonate myself as a domain user in a ASP.NET application running on VMWare machine. Since the VMWare machine is not itself in the domain, ASP.NET is unable to resolve the user token (specified in web.config). Is there a way to do that?\nThanks in advance,\nPetr\n"
... |
I believe there is a discussion on this very topic somewhere on the net but I lost the url and I am unable to find it via googling.
What I might try right now would be:
ISessionFactoryHolder factoryHolder = ActiveRecordMediator<EntityClass>.GetSessionFactoryHolder();
ISession session = factoryHolder.CreateSession(typeo... | Your code snippet shows a way to execute a stored procedure using NHibernate or a similar ORM framework that utilizes session management. However, there are some best practices and improvements you can apply to ensure better code quality, error handling, and resource management. Here's a revised version of your approac... | 31,197 | [
{
"from": "human",
"value": "I believe there is a discussion on this very topic somewhere on the net but I lost the url and I am unable to find it via googling.\nWhat I might try right now would be:\nISessionFactoryHolder factoryHolder = ActiveRecordMediator<EntityClass>.GetSessionFactoryHolder();\nISession... |
I'm starting a new project; I wish to follow a DDD approach. We have talked to the business and achieved some insight into the domain in some detail (internet TV).
The team is five strong and distributed. We have adopted the repository pattern for data-access. We are following a service-based approach overall; servi... | You're tackling some common challenges when implementing Domain-Driven Design (DDD) and ORM practices in a development team. Here’s a breakdown of how you might approach these questions.
### 1st Question: Changing Their Minds
Changing the minds of your colleagues, especially when they're set on a particular architect... | 28,767 | [
{
"from": "human",
"value": "I'm starting a new project; I wish to follow a DDD approach. We have talked to the business and achieved some insight into the domain in some detail (internet TV).\nThe team is five strong and distributed. We have adopted the repository pattern for data-access. We are followi... |
The message defined in the title of this post, along with the HResult 0x8007007A occasionally occurs while creating an instance of a Windows Workflow Foundation Runtime.
The error text is pretty self explanitory, and using Reflector over the Workflow Foundation assemblies I have narrowed down the problem to one of the ... | The HResult `0x8007007A` corresponds to the Windows error code `ERROR_NOT_ENOUGH_MEMORY`. This error indicates that a function call failed due to insufficient memory resources to complete the operation.
In the context of the Windows Workflow Foundation (WF) Runtime, this issue may arise when trying to allocate resour... | 31,771 | [
{
"from": "human",
"value": "The message defined in the title of this post, along with the HResult 0x8007007A occasionally occurs while creating an instance of a Windows Workflow Foundation Runtime.\nThe error text is pretty self explanitory, and using Reflector over the Workflow Foundation assemblies I hav... |
I'm consuming a third-party resource (a .dll) in a web service, and my problem is, that invoking this resource (calling a method) is done asynchronous - I need to subscribe to an event, to get the answer for my request. How do I do that in a c# web service?
Update:
With regard to Sunny's answer:
I don't want to make my... | To consume a third-party asynchronous resource in a C# web service without making the service itself asynchronous, you'll need to use a synchronous method that subscribes to the event of the resource. This typically involves waiting for the event to be raised before returning a response.
Here’s a general approach you... | 27,061 | [
{
"from": "human",
"value": "I'm consuming a third-party resource (a .dll) in a web service, and my problem is, that invoking this resource (calling a method) is done asynchronous - I need to subscribe to an event, to get the answer for my request. How do I do that in a c# web service?\nUpdate:\nWith regard... |
I was just browsing through questions on stack overflow, and i've come up to a post where it suggests of deploying database by simply copying the mdf file in the app_data folder and modifying your connection string.
I know that some people do create an mdf file in the app_code during development, but for going live, i... | Using the `.mdf` file in the `App_Data` folder for database deployment is a method that can work in certain scenarios, particularly for small applications or development environments. However, there are several considerations and best practices you should keep in mind when deciding whether to use this approach for prod... | 27,931 | [
{
"from": "human",
"value": "I was just browsing through questions on stack overflow, and i've come up to a post where it suggests of deploying database by simply copying the mdf file in the app_data folder and modifying your connection string. \nI know that some people do create an mdf file in the app_code... |
I want to write my own file copy program that will run when the user chooses 'Paste' / (Ctrl+V) in Windows Explorer. Some programs like CopyHandler and SuperCopier are doing this. But I don't know how.
Please help.
| Creating a custom file copy program that runs when a user chooses "Paste" (or uses Ctrl+V) in Windows Explorer requires interaction with the Windows Shell and the clipboard. Here’s a general guide on how to approach this task.
### Overview
1. **Understand the Clipboard**: You will need to access the clipboard to retr... | 22,462 | [
{
"from": "human",
"value": "I want to write my own file copy program that will run when the user chooses 'Paste' / (Ctrl+V) in Windows Explorer. Some programs like CopyHandler and SuperCopier are doing this. But I don't know how.\nPlease help.\n"
},
{
"from": "gpt",
"value": "Creating a custom ... |
I want to set some attributes just before the object is serialized, but as it can be serialized from several locations, is there a way to do this using the OnSerializing method (or similar) for Xml serialization - my class is largely like this - but the On... methods are not being called...:
[Serializable]
[XmlRoot(Ele... | In your provided code snippet, it looks like you're trying to use the `OnSerializing`, `OnSerialized`, `OnDeserializing`, and `OnDeserialized` attributes. However, these attributes are part of the `System.Runtime.Serialization` namespace and are specifically intended for use with binary and XML serialization provided b... | 26,314 | [
{
"from": "human",
"value": "I want to set some attributes just before the object is serialized, but as it can be serialized from several locations, is there a way to do this using the OnSerializing method (or similar) for Xml serialization - my class is largely like this - but the On... methods are not bei... |
This may not be possible, but I figured I'd ask...
Is there any way anyone can think of to track whether or not an automatic variable has been deleted without modifying the class of the variable itself? For example, consider this code:
const char* pStringBuffer;
{
std::string sString( "foo" );
pStringBuffer = s... | What you're trying to achieve is inherently challenging in C++ due to the language's design around automatic (stack) variable lifetimes and the lack of built-in mechanisms to manage the validity of references or pointers post their object lifetimes. However, we can explore a few approaches that might help you track the... | 22,949 | [
{
"from": "human",
"value": "This may not be possible, but I figured I'd ask...\nIs there any way anyone can think of to track whether or not an automatic variable has been deleted without modifying the class of the variable itself? For example, consider this code:\nconst char* pStringBuffer;\n{\n std::s... |
Previously, I asked the question.
The problem is the demands of our file structure are very high.
For instance, we're trying to create a container with up to 4500 files and 500mb data.
The file structure of this container consists of
SQLite DB (under 1mb)
Text based xml-like file
Images inside a dynamic folder struc... | Creating a container that efficiently stores a large number of files while maintaining fast access and retrieval can be a complex problem. Given your requirements, it sounds like you're facing challenges with traditional archiving methods like Tar or Zip. Here are some strategies you can consider to improve performance... | 29,164 | [
{
"from": "human",
"value": "Previously, I asked the question.\nThe problem is the demands of our file structure are very high.\nFor instance, we're trying to create a container with up to 4500 files and 500mb data.\nThe file structure of this container consists of \n\nSQLite DB (under 1mb)\nText based xml-... |
What would be the best way to port an existing Drupal site to a Django application?
I have around 500 pages (mostly books module) and around 50 blog posts. I'm not using any 3rd party modules.
I would like to keep the current URLS (for SEO purposes) and migrate database to Django. I will create a simple blog applicatio... | Migrating a Drupal site to a Django application involves several steps, especially when you want to maintain the current URLs and manage content effectively. Below are the recommended steps to achieve this:
### Step 1: Set Up Your Django Project
1. **Create a New Django Project**: Start by setting up a new Django pro... | 22,673 | [
{
"from": "human",
"value": "What would be the best way to port an existing Drupal site to a Django application?\nI have around 500 pages (mostly books module) and around 50 blog posts. I'm not using any 3rd party modules.\nI would like to keep the current URLS (for SEO purposes) and migrate database to Dja... |
Rather than scraping a Ruby version of this algorithm off the net I wanted to create my own based on its description here. However I cannot figure out two things
def primeSieve(n)
primes = Array.new
for i in 0..n-2
primes[i] = i+2
end
index = 0
while Math.sqrt(primes.last).ceil > primes[index]
(prime... | Your implementation of the Sieve of Eratosthenes in Ruby has a couple of issues that are causing it to not work as expected. Let's address the problems one by one.
### 1. Array Modification during Iteration
You're correct that modifying the array while iterating through it can lead to unexpected behavior, including s... | 30,693 | [
{
"from": "human",
"value": "Rather than scraping a Ruby version of this algorithm off the net I wanted to create my own based on its description here. However I cannot figure out two things\ndef primeSieve(n)\n primes = Array.new\n\n for i in 0..n-2\n primes[i] = i+2\n end\n\n index = 0\n while Math... |
My WCF Service uses wsHttpBinding and works fine from the client when the service is gerenated by the client using the default options as follows:
RServiceClient R = new RServiceClient();
However, at some point I'll need to be able to specify the location of the service, presumably by changing the endpoint address as ... | The `SecurityNegotiationException` that you're encountering suggests that there is a mismatch in the expected security settings between the WCF client and the WCF service when you modify the endpoint address.
Since you mentioned that your service is running on IIS with anonymous access enabled, there are a few potenti... | 25,988 | [
{
"from": "human",
"value": "My WCF Service uses wsHttpBinding and works fine from the client when the service is gerenated by the client using the default options as follows:\nRServiceClient R = new RServiceClient();\n\nHowever, at some point I'll need to be able to specify the location of the service, pre... |
I'm fairly new to Visual Studio and am wondering how best to plan for translation in a new project I'm starting. I need to provide English, German and French.
I have used Eclipse a lot in the past and there I just developed a new app and when it was complete I could just start a wizard to externalise strings into a res... | Planning for translation in Visual Studio (VS) can be quite straightforward, especially if you establish a strategy early in the development process. While VS2005 Express has some limitations compared to the full versions, you can still manage localization effectively. Here’s a step-by-step guide to help you prepare yo... | 27,950 | [
{
"from": "human",
"value": "I'm fairly new to Visual Studio and am wondering how best to plan for translation in a new project I'm starting. I need to provide English, German and French.\nI have used Eclipse a lot in the past and there I just developed a new app and when it was complete I could just start ... |
I am wondering if there are any alternatives to using the Expand key word when performing an LINQ to ADO.net Data Services query. The expand method does get me the data I am interested in, but it requires me to know all of the sub-objects that I am going to be working with in advance. My absolute preference would be ... | In ADO.NET Data Services (now known as OData), the behavior of eager loading (via `Expand`) and lazy loading can be a bit restrictive compared to other ORM frameworks like Entity Framework that support lazy loading more seamlessly. Here are some strategies and alternatives you might consider:
### 1. **Manual Lazy Load... | 25,902 | [
{
"from": "human",
"value": "I am wondering if there are any alternatives to using the Expand key word when performing an LINQ to ADO.net Data Services query. The expand method does get me the data I am interested in, but it requires me to know all of the sub-objects that I am going to be working with in a... |
Via command line, I usually do this:
cp -rRp /path/to/a\_folder/. /path/to/another\_folder
This copies just the contents underneath a_folder to another_folder. In SVN I need to do the same thing, but can't figure it out. I always end up with this:
/path/to/another\_folder/a\_folder
SVN throws up even when I try this:... | In SVN, the `svn copy` command does not support wildcard copying of files or folders like the command line `cp` does. Instead, you have to specify the source and destination explicitly. To copy the contents of the `1.1` folder under the `vendor` directory directly into the `trunk` without including the `1.1` folder its... | 27,625 | [
{
"from": "human",
"value": "Via command line, I usually do this:\ncp -rRp /path/to/a\\_folder/. /path/to/another\\_folder\n\nThis copies just the contents underneath a_folder to another_folder. In SVN I need to do the same thing, but can't figure it out. I always end up with this:\n/path/to/another\\_folde... |
we're currently planning a larger WPF LoB application and i wonder what others think being the best practice for storing lots of UI settings e.g.
Expander States
Menu orders
Sizing Properties
etc...
i don't like the idea of having dozens of stored values using the delivered SettingsProvider (i.e. App.config file) alt... | When designing a WPF Line of Business (LoB) application that requires storing numerous user interface settings (such as expander states, menu orders, sizing properties, etc.), there are several best practices and approaches to consider. Here are some recommendations based on common patterns and practices in the WPF com... | 27,623 | [
{
"from": "human",
"value": "we're currently planning a larger WPF LoB application and i wonder what others think being the best practice for storing lots of UI settings e.g.\n\nExpander States\nMenu orders\nSizing Properties\netc...\n\ni don't like the idea of having dozens of stored values using the deliv... |
I realize that this would be COMPLETELY bad practice in normal situations, but this is just for a test app that needs to be taking input from a bar code scanner (emulating a keyboard). The problem is that I need to start up some scripts while scanning, so I need the window to regain focus directly after I click the sc... | Regaining focus to your application after running a script from Windows Explorer can indeed be tricky due to the way Windows manages focus between applications. Here are several approaches you can try:
### 1. Use a Timer
Consider using a timer in your application that checks for focus and tries to regain it after a sh... | 30,079 | [
{
"from": "human",
"value": "I realize that this would be COMPLETELY bad practice in normal situations, but this is just for a test app that needs to be taking input from a bar code scanner (emulating a keyboard). The problem is that I need to start up some scripts while scanning, so I need the window to r... |
How do I split strings in J2ME in an effective way?
There is a StringTokenizer or String.split(String regex) in the standard edition (J2SE), but they are absent in the micro edition (J2ME, MIDP).
| In J2ME (Java 2 Micro Edition), the `StringTokenizer` and `String.split(String regex)` methods available in standard Java (J2SE) are not present. However, you can implement string splitting using other methods. Here are a couple of effective ways to split strings in J2ME:
### Method 1: Using `String.indexOf` and `Stri... | 29,039 | [
{
"from": "human",
"value": "How do I split strings in J2ME in an effective way?\nThere is a StringTokenizer or String.split(String regex) in the standard edition (J2SE), but they are absent in the micro edition (J2ME, MIDP).\n"
},
{
"from": "gpt",
"value": "In J2ME (Java 2 Micro Edition), the `... |
Kinda long title, but anyways...
I've been looking at these examples, specifically on the parts on writing and reading the size of the message to the byte streams
http://doc.trolltech.com/4.4/network-fortuneclient-client-cpp.html
http://doc.trolltech.com/4.4/network-fortuneserver-server-cpp.html
But I can't seem to fig... | To handle reading and writing messages with a specified size in C#, you can utilize the `NetworkStream` directly to send and receive byte arrays. Instead of using `StreamWriter`, you should convert your string data into a byte array and manage the length explicitly.
Here’s an example of how you can write and read mess... | 28,359 | [
{
"from": "human",
"value": "Kinda long title, but anyways...\nI've been looking at these examples, specifically on the parts on writing and reading the size of the message to the byte streams\nhttp://doc.trolltech.com/4.4/network-fortuneclient-client-cpp.html\nhttp://doc.trolltech.com/4.4/network-fortunese... |
Is there any meaningful distinction between:
class A(object):
foo = 5 # some default value
vs.
class B(object):
def __init__(self, foo=5):
self.foo = foo
If you're creating a lot of instances, is there any difference in performance or space requirements for the two styles? When you read the code, do... | Yes, there are meaningful distinctions between the two styles you presented, both in terms of functionality and semantics, as well as potential implications for performance and memory usage.
### Functional Differences:
1. **Class Variable vs Instance Variable**:
- In `class A`, `foo` is a class variable. This mean... | 30,019 | [
{
"from": "human",
"value": "Is there any meaningful distinction between:\nclass A(object):\n foo = 5 # some default value\n\nvs.\nclass B(object):\n def __init__(self, foo=5):\n self.foo = foo\n\nIf you're creating a lot of instances, is there any difference in performance or space requireme... |
I have a Tapestry PropertyModel for gender. Right now the dropdown just shows Male and Female because those are the only values in my model. I'd like to add a "Choose an Option" option. Is there a standard way to do this without having to add a fake value to my model? I'd also like it to be smart enough to know that... | Certainly! To add a "Choose an Option" entry to your dropdown in a Tapestry application without altering your model, you can implement a custom option list in your dropdown component. Here’s how you can achieve this:
### Step 1: Modify the Dropdown Component
Assuming you're using a `DropDown` component in your Tapest... | 27,685 | [
{
"from": "human",
"value": "I have a Tapestry PropertyModel for gender. Right now the dropdown just shows Male and Female because those are the only values in my model. I'd like to add a \"Choose an Option\" option. Is there a standard way to do this without having to add a fake value to my model? I'd a... |
NOTE: I mention the next couple of paragraphs as background. If you just want a TL;DR, feel free to skip down to the numbered questions as they are only indirectly related to this info.
I'm currently writing a python script that does some stuff with POSIX dates (among other things). Unit testing these seems a little... | Your approach to unit testing using randomized inputs is a reasonable strategy, particularly when dealing with complex date and time manipulations. Randomized testing can help you uncover edge cases that you might not think to test explicitly. Here are answers to your questions:
### 1. What types of code are good cand... | 27,383 | [
{
"from": "human",
"value": "NOTE: I mention the next couple of paragraphs as background. If you just want a TL;DR, feel free to skip down to the numbered questions as they are only indirectly related to this info.\nI'm currently writing a python script that does some stuff with POSIX dates (among other t... |
I have a situation where another developer is including source files from a project that I maintain in a project that he maintains. The nature of the files is such that each source file registers a "command" in an interpretive environment so all you have to do is link in a new source file to register a new "command". ... | It sounds like you're dealing with a situation where you need to ensure that the linker retains certain source files to register commands in an interpretive environment. There are a few strategies you could consider to achieve this without falling prey to linker optimizations. Below are some suggestions:
### 1. **Comp... | 26,618 | [
{
"from": "human",
"value": "I have a situation where another developer is including source files from a project that I maintain in a project that he maintains. The nature of the files is such that each source file registers a \"command\" in an interpretive environment so all you have to do is link in a ne... |
Alright, I know how the fieldset/legend works out in HTML. Say you have a form with some fields:
<form>
<fieldset>
<legend>legend</legend>
<input name="input1" />
</fieldset>
</form>
What should I use the legend for? It's being displayed as a title, but isn't a legend semantically an explanatio... | You've touched on an interesting aspect of HTML semantics and the use of `fieldset` and `legend`. The `legend` element is indeed intended to provide a caption or title for the content within a `fieldset`. Semantically, it acts as a way to group related form elements together, and the `legend` gives context to that grou... | 27,051 | [
{
"from": "human",
"value": "Alright, I know how the fieldset/legend works out in HTML. Say you have a form with some fields:\n<form>\n <fieldset>\n <legend>legend</legend>\n <input name=\"input1\" />\n </fieldset>\n</form>\n\nWhat should I use the legend for? It's being displayed as a t... |
I have a really long 3 column table. I would like to
<table>
<tr><td>Column1</td><td>Column2</td></tr>
<tr><td>Column1</td><td>Column2</td></tr>
<tr><td>Start</td><td>Hiding</td></tr>
<tr><td>Column1</td><td>Column2</td></tr>
<tr><td>Column1</td><td>Column2</td></tr>
<tr><td>Column1</td><td>Col... | Certainly! To achieve the effect of showing only certain parts of your table with a "Show Full Table" link in jQuery, you can follow the example below. I've adjusted the structure a bit to better suit the functionality you want. This example will hide the middle rows and provide a way to show/hide them.
Here's the com... | 28,185 | [
{
"from": "human",
"value": "I have a really long 3 column table. I would like to \n<table>\n <tr><td>Column1</td><td>Column2</td></tr>\n <tr><td>Column1</td><td>Column2</td></tr>\n <tr><td>Start</td><td>Hiding</td></tr>\n <tr><td>Column1</td><td>Column2</td></tr>\n <tr><td>Column1</td><td>Co... |
For features comparison of Web Canoo Web Functional Test and Selenium software, it would be good have an assessment, in terms of integration to Java platform applications, speed, how quick is it to deploy Tests, execute, and analyze results, JavaScript support etc.
I am using Canoo project, it is pretty good.
Tatyan... | Certainly! Below is a comparison of Canoo WebFunctional Test (often referred to as Canoo WebTest) and Selenium, focusing on integration with Java, speed, deployment, execution, analysis of results, and JavaScript support.
### Features Comparison: Canoo WebTest vs. Selenium
| Feature | Canoo ... | 27,838 | [
{
"from": "human",
"value": "For features comparison of Web Canoo Web Functional Test and Selenium software, it would be good have an assessment, in terms of integration to Java platform applications, speed, how quick is it to deploy Tests, execute, and analyze results, JavaScript support etc. \nI am using... |
We have a TIBCO EMS solution that uses built-in server failover in a 2-4 server environment. If the TIBCO admins fail-over services from one EMS server to another, connections are supposed to be transfered to the new server automatically at the EMS service level. For our C# applications using the EMS service, this is... | Implementing a reconnection strategy in your C# application using TIBCO EMS can significantly enhance reliability during server failover situations. Since you're currently using a single connection approach at application startup, you'll need to build in a mechanism that can periodically check the connection state and ... | 27,816 | [
{
"from": "human",
"value": "We have a TIBCO EMS solution that uses built-in server failover in a 2-4 server environment. If the TIBCO admins fail-over services from one EMS server to another, connections are supposed to be transfered to the new server automatically at the EMS service level. For our C# ap... |
At a previous place where I worked a colleague figured out how to configure MediaWiki so that, for example, a string like #12345 in the wiki markup could be expanded into a hypertext link to ticket 12345 in the ticket system.
I would like to do something similar in TWiki. I have not yet figured out how, though. So, i... | To achieve similar functionality in TWiki, you can use a combination of regular expressions and custom plugins or include hooks. The goal is to automatically transform any string matching a specific pattern (like `#12345`) into a hypertext link to your ticket system.
Here's a high-level overview of how you can impleme... | 23,582 | [
{
"from": "human",
"value": "At a previous place where I worked a colleague figured out how to configure MediaWiki so that, for example, a string like #12345 in the wiki markup could be expanded into a hypertext link to ticket 12345 in the ticket system.\nI would like to do something similar in TWiki. I ha... |
Calling all PHP gurus!
I understand that you can use getimagesize() to get the actual pixel height and width of an image in PHP. However, if you open an image in photoshop and look at the image size dialog, you notice that there is a resolution value that determines the print size of the image.
Given an arbitrary jpg i... | To retrieve the resolution information from a JPG file using PHP, you can utilize the GD library in conjunction with the `exif_read_data()` function, which allows you to access the metadata embedded in the image file. The resolution is usually stored in the EXIF data, and the relevant tags for DPI (Dots Per Inch) are `... | 29,097 | [
{
"from": "human",
"value": "Calling all PHP gurus!\nI understand that you can use getimagesize() to get the actual pixel height and width of an image in PHP. However, if you open an image in photoshop and look at the image size dialog, you notice that there is a resolution value that determines the print s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.