instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm looking for a relativity cheap .NET Micro Framework development board for use on a personal robotics project. I'd don't need much for I/O, but I want at least one serial port and one Ethernet port.
I would prefer not to have to spend more than US$300 on the board, but if there is an obvious reason to get a better ... | The SJJ Embedded Micro Solutions development board is a solid choice for a .NET Micro Framework project, especially in the context of robotics. However, experiences may vary based on your specific use case and the board's compatibility with the libraries and features you plan to use.
When considering this board, you ... | 26,332 | [
{
"from": "human",
"value": "I'm looking for a relativity cheap .NET Micro Framework development board for use on a personal robotics project. I'd don't need much for I/O, but I want at least one serial port and one Ethernet port. \nI would prefer not to have to spend more than US$300 on the board, but if t... |
I'm trying to set up Eclipse for php web development. What I would like to do is preview a php web page from within Eclipse, but I cannot figure out how to do this. Is there an integrated web server of some sort that allows this, or do I have to set up IIS/Apache to do it? If so, do I have to have my php files in th... | To set up Eclipse for PHP web development and preview PHP web pages, you generally have a couple of options. Eclipse doesn't come with a built-in web server for PHP by default, so you will typically need to configure an external web server like Apache or IIS. Here's how you can do this:
### Setting Up a Web Server (Ap... | 24,270 | [
{
"from": "human",
"value": "I'm trying to set up Eclipse for php web development. What I would like to do is preview a php web page from within Eclipse, but I cannot figure out how to do this. Is there an integrated web server of some sort that allows this, or do I have to set up IIS/Apache to do it? If... |
How do you post data to an iframe?
| Posting data to an iframe can be accomplished through various methods depending on your requirements, such as whether you want to send data through a form submission or use JavaScript. Here are two common methods:
### Method 1: Using a Form Submission
You can use a form that targets an iframe. This method involves cr... | 21,287 | [
{
"from": "human",
"value": "How do you post data to an iframe?\n"
},
{
"from": "gpt",
"value": "Posting data to an iframe can be accomplished through various methods depending on your requirements, such as whether you want to send data through a form submission or use JavaScript. Here are two c... |
I was wondering if it is possible to generate a "core" file, copy if to another machine and then continue execution of the a core file on that machine?
I have seen the gcore utility that will make a core file from a running process. But I do not think gdb can continue execution based on a core file.
Is there any way to... | Generating a "core" file, which typically captures the memory state of a process at a specific point in time, and then continuing execution of that process on another machine is not straightforward and generally not supported. Let's break down your questions and explore the related concepts:
### Core Files and gcore
-... | 24,736 | [
{
"from": "human",
"value": "I was wondering if it is possible to generate a \"core\" file, copy if to another machine and then continue execution of the a core file on that machine?\nI have seen the gcore utility that will make a core file from a running process. But I do not think gdb can continue executi... |
I have a web user control that contains several other (web user) controls and subscribes to events the children raise.
I saw someone somewhere in a similar situation providing Dispose() on the containing control and unregistering the events it had subscribed to.
Isn't it all going to be blown away when the request pr... | In ASP.NET, web user controls and other server-side components are created and destroyed with each request. When a request is processed, the ASP.NET page lifecycle handles the instantiation and disposal of the controls involved. Once the page lifecycle is completed, the controls are typically disposed of and their reso... | 24,354 | [
{
"from": "human",
"value": "I have a web user control that contains several other (web user) controls and subscribes to events the children raise.\nI saw someone somewhere in a similar situation providing Dispose() on the containing control and unregistering the events it had subscribed to. \nIsn't it all... |
I have many items inside a list control. I want each item to have a different item template depending on the type of the item. So the first item in the list is a ObjectA type and so I want it to be rendered with ItemTemplateA. Second item is a ObjectB type and so I want it to have ItemTemplateB for rendering. At the mo... | Yes, you can achieve this by using a DataTemplateSelector in WPF or similar frameworks that support data templating. A DataTemplateSelector allows you to choose different templates based on the type or properties of your data items at runtime.
Here's how you can implement this:
### Step 1: Define Your Data Templates
... | 23,545 | [
{
"from": "human",
"value": "I have many items inside a list control. I want each item to have a different item template depending on the type of the item. So the first item in the list is a ObjectA type and so I want it to be rendered with ItemTemplateA. Second item is a ObjectB type and so I want it to ha... |
I need to pivot one column (Numbers column).
example need this data:
a 1
a 2
b 3
b 4
c 5
d 6
d 7
d 8
d 9
e 10
e 11
e 12
e 13
e 14
Look like this
a 1 2
b 3 4
c 5
d 6 7 8 9
e 10 11 12 13 14
any help would be greatly appreciated...
| To achieve the desired output, you can use a programming language like Python with the Pandas library, or you can do this in Excel using formulas or Pivot Tables. Below are examples of both methods.
### Using Python with Pandas
If you have the data in a CSV or DataFrame format, you can follow these steps:
1. Install... | 23,705 | [
{
"from": "human",
"value": "I need to pivot one column (Numbers column).\nexample need this data:\na 1\na 2\nb 3\nb 4\nc 5\nd 6\nd 7\nd 8\nd 9\ne 10\ne 11\ne 12\ne 13\ne 14\n\nLook like this\na 1 2\nb 3 4\nc 5\nd 6 7 8 9\ne 10 11 12 13 14\n\nany help would be greatly appreciated...\n"
},
{
"from": ... |
I've seen a few COM controls which wrap the Gecko rendering engine (GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll). Is there a wrapper for Webkit that can be included in a .NET Winform application?
| Yes, there are a few options for using WebKit in a .NET WinForms application. One of the popular choices is **CefSharp**, which is a .NET binding for the Chromium Embedded Framework (CEF). While CEF is based on Chromium rather than WebKit, it provides a modern web rendering engine that supports a similar feature set, i... | 16,522 | [
{
"from": "human",
"value": "I've seen a few COM controls which wrap the Gecko rendering engine (GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll). Is there a wrapper for Webkit that can be included in a .NET Winform application?\n"
},
{
"from": "gpt",
"value": "Yes, there are a ... |
At least the libsigc++2 project is hit by OS X headers defining nil on the preprocessor level, outside of namespaces etc. At least 10.5.5 and XCode 3.1 have this. Note that it is in effect not only in Objective-C sources but C++ as well.
Short question: why?
http://ardour.sourcearchive.com/documentation/2.5/functor__tr... | The definition of `nil` in the OS X headers is primarily for use in Objective-C, where `nil` represents a null pointer for Objective-C objects. However, the reason this definition extends into other languages like C++ in certain environments is due to how the Apple development environment is structured.
1. **Global Pr... | 25,377 | [
{
"from": "human",
"value": "At least the libsigc++2 project is hit by OS X headers defining nil on the preprocessor level, outside of namespaces etc. At least 10.5.5 and XCode 3.1 have this. Note that it is in effect not only in Objective-C sources but C++ as well.\nShort question: why?\nhttp://ardour.sour... |
Does anyone know of a Jabber library for Lua? I've found the 'Lua Messaging Library' for AIM, although I can't find a download for it, it appears to be abandoned.
Something like that for Lua would be helpful.
I'm sorry I didn't state this originally, I meant a 'pure Lua' library.
I'm familiar with Verse, but don't ha... | If you're specifically looking for a pure Lua library for Jabber (XMPP), your options may be somewhat limited since most XMPP libraries tend to be implemented in C or other languages for performance reasons. However, here are a few suggestions that might be helpful for your requirements:
1. **LuaXMPP**: This is a pure... | 20,654 | [
{
"from": "human",
"value": "Does anyone know of a Jabber library for Lua? I've found the 'Lua Messaging Library' for AIM, although I can't find a download for it, it appears to be abandoned.\nSomething like that for Lua would be helpful.\n\nI'm sorry I didn't state this originally, I meant a 'pure Lua' li... |
Evil or not evil?
public static void Raise(this EventHandler handler, object sender, EventArgs args)
{
if (handler != null)
{
handler(sender, args);
}
}
// Usage:
MyButtonClicked.Raise(this, EventArgs.Empty);
// This works too! Evil?
EventHandler handler = null;
handler.Raise(this, EVentArgs.Empty);
N... | The extension method `Raise` you've provided is a common pattern used in C# for raising events safely. It effectively checks if the event handler is `null` before invoking it, which avoids a `NullReferenceException`. This practice is generally considered good because it helps prevent errors related to uninitialized eve... | 25,325 | [
{
"from": "human",
"value": "Evil or not evil?\npublic static void Raise(this EventHandler handler, object sender, EventArgs args)\n{\n if (handler != null)\n {\n handler(sender, args);\n }\n}\n\n// Usage:\nMyButtonClicked.Raise(this, EventArgs.Empty);\n\n// This works too! Evil?\nEventHandler ha... |
Is there a way to get the Unicode Block of a character in python? The unicodedata module doesn't seem to have what I need, and I couldn't find an external library for it.
Basically, I need the same functionality as Character.UnicodeBlock.of() in java.
| Yes, you can obtain the Unicode block of a character in Python using the `unicodedata` module in conjunction with some additional string processing. The `unicodedata` module does not directly provide the Unicode block, but you can determine it by checking the Unicode category of the character and using a predefined map... | 24,777 | [
{
"from": "human",
"value": "Is there a way to get the Unicode Block of a character in python? The unicodedata module doesn't seem to have what I need, and I couldn't find an external library for it.\nBasically, I need the same functionality as Character.UnicodeBlock.of() in java.\n"
},
{
"from": "g... |
I have a set of Visual Studio Team System unit (integration really) tests that talk to a remote database. The tests are getting too slow and unwieldy. I'd like to replace the entire set of tests with mocked out versions. The problem is it's painful to write all the expect statements that mimic what an entire databas... | Creating mocked versions of your integration tests can indeed improve their speed and reliability. While there might not be a specific tool that automatically generates mocked statements based on existing tests, there are some strategies and tools that can help you streamline the process:
### 1. **Use a Mocking Framew... | 24,409 | [
{
"from": "human",
"value": "I have a set of Visual Studio Team System unit (integration really) tests that talk to a remote database. The tests are getting too slow and unwieldy. I'd like to replace the entire set of tests with mocked out versions. The problem is it's painful to write all the expect sta... |
How do you protect your commercial application from being installed on multiple computers from people who only own one license?
Do you think it's a good idea to have more than just a serial based scheme?
| Protecting a commercial application from unauthorized installations and usage can be quite challenging, especially in environments where software piracy is prevalent. Here are several strategies to consider, along with thoughts on the pros and cons of relying solely on serial-based schemes:
### Strategies for Protecti... | 25,112 | [
{
"from": "human",
"value": "How do you protect your commercial application from being installed on multiple computers from people who only own one license?\nDo you think it's a good idea to have more than just a serial based scheme?\n"
},
{
"from": "gpt",
"value": "Protecting a commercial appli... |
I remember seeing the code for a Highpass filter a few days back somewhere in the samples, however I can't find it anywhere now! Could someone remember me where the Highpass filter implementation code was?
Or better yet post the algorithm?
Thanks!
| Certainly! A high-pass filter is used to allow high-frequency signals to pass through while attenuating (reducing the amplitude of) low-frequency signals. The implementation can vary based on the type of data (audio, image, etc.) and the programming language being used. Below, I'll provide a simple example of a high-pa... | 23,891 | [
{
"from": "human",
"value": "I remember seeing the code for a Highpass filter a few days back somewhere in the samples, however I can't find it anywhere now! Could someone remember me where the Highpass filter implementation code was?\nOr better yet post the algorithm?\nThanks!\n"
},
{
"from": "gpt"... |
Within emacs, what are the best options out there for navigating to a specific function whose name might show up across several different files? Within etags, you are only allowed to cycle through the tags one-at-a-time which could take a while if the function name you are looking for is popular.
| In Emacs, there are several options for efficiently navigating to a specific function, especially when dealing with a function name that might appear across multiple files. Here are some of the best options:
1. **Helm or Ivy with `ggtags` or `Projectile`:**
- **Helm**: Install the Helm package and use `helm-gtags` ... | 21,742 | [
{
"from": "human",
"value": "Within emacs, what are the best options out there for navigating to a specific function whose name might show up across several different files? Within etags, you are only allowed to cycle through the tags one-at-a-time which could take a while if the function name you are look... |
In my main page (call it index.aspx) I call
<%Html.RenderPartial("_PowerSearch", ViewData.Model);%>
Here the viewdata.model != null
When I arrive at my partial:
<%=ViewData.Model%>
Says viewdata.model == null
What gives?!
| The issue you are encountering is likely due to how you're passing the model to the partial view and how you're accessing it within that partial view.
When you call `Html.RenderPartial("_PowerSearch", ViewData.Model);`, you are correctly passing the model to the partial view. However, in your partial view, you are try... | 23,080 | [
{
"from": "human",
"value": "In my main page (call it index.aspx) I call \n<%Html.RenderPartial(\"_PowerSearch\", ViewData.Model);%>\n\nHere the viewdata.model != null\nWhen I arrive at my partial:\n<%=ViewData.Model%>\n\nSays viewdata.model == null\nWhat gives?!\n"
},
{
"from": "gpt",
"value":... |
Selenium Remote Control has a method of "get_html_source", which returns the source of the current page as a string.
AFAIK, this method works in all cases in Firefox and Safari. But when it's invoked in Internet Explorer, it returns an incorrect source.
Does anyone know if this is a bug with Selenium or Internet Explor... | The behavior you're experiencing with Selenium Remote Control (RC) and Internet Explorer is a known issue. In general, Internet Explorer has different handling of HTML documents compared to other browsers like Firefox and Safari. This can lead to discrepancies in the HTML source returned by Selenium, particularly in ho... | 25,426 | [
{
"from": "human",
"value": "Selenium Remote Control has a method of \"get_html_source\", which returns the source of the current page as a string.\nAFAIK, this method works in all cases in Firefox and Safari. But when it's invoked in Internet Explorer, it returns an incorrect source.\nDoes anyone know if t... |
I have been using the CSLA framework for couple of years now for windows applications. With ASP .NET MVC / AJAX / jQuery out now, would there be any use for the CSLA framework (which is strongly Object Oriented ) in web apps?
| Yes, the CSLA (Component-based Scalable Logical Architecture) framework can still be very useful for web applications, including those built with ASP.NET MVC, AJAX, and jQuery. Here are a few reasons why CSLA might be beneficial in your web app development:
1. **Business Logic Layer**: CSLA helps you organize business... | 24,118 | [
{
"from": "human",
"value": "I have been using the CSLA framework for couple of years now for windows applications. With ASP .NET MVC / AJAX / jQuery out now, would there be any use for the CSLA framework (which is strongly Object Oriented ) in web apps?\n"
},
{
"from": "gpt",
"value": "Yes, the... |
In WinForms, I can design a form and have a TabValue to control which control is selected each time the user hits 'Tab'. My question, in a Webform, is there a mechanism for doing the same thing?
Edit: Does the same apply to an Ajax heavy application?
| In ASP.NET Web Forms, the behavior of tabbing through controls is inherently different from WinForms. However, you can control the tab order in Web Forms and similarly in AJAX-heavy applications. Here’s how you can do it in both scenarios:
### Setting the Tab Order in ASP.NET Web Forms
1. **Using the `TabIndex` Prope... | 24,004 | [
{
"from": "human",
"value": "In WinForms, I can design a form and have a TabValue to control which control is selected each time the user hits 'Tab'. My question, in a Webform, is there a mechanism for doing the same thing? \nEdit: Does the same apply to an Ajax heavy application?\n"
},
{
"from": ... |
As you can see this is a question from a non web developer. I would like to have an ASPX page which, under certain circumstances, can generate a 401 error from code. Ideally it would show the IIS standard page.
| To generate a 401 Unauthorized error response from an ASPX page in an ASP.NET application, you can directly set the HTTP response status code to 401. Below is a simple example of how to do this. When the specified condition is met, the page will return a 401 status, which should trigger the IIS default 401 error page i... | 22,576 | [
{
"from": "human",
"value": "As you can see this is a question from a non web developer. I would like to have an ASPX page which, under certain circumstances, can generate a 401 error from code. Ideally it would show the IIS standard page.\n"
},
{
"from": "gpt",
"value": "To generate a 401 Unaut... |
Is there a good, up-to-date listing anywhere that maps User-Agent HTTP Header strings --> operating systems?
| Yes, there are several resources and libraries that help map User-Agent strings to operating systems, though it may not always be 100% up-to-date due to the frequent changes in User-Agent formats. Here are some options to consider:
1. **BrowserStack User-Agent Data**: They provide a comprehensive list of User-Agent st... | 26,001 | [
{
"from": "human",
"value": "Is there a good, up-to-date listing anywhere that maps User-Agent HTTP Header strings --> operating systems?\n"
},
{
"from": "gpt",
"value": "Yes, there are several resources and libraries that help map User-Agent strings to operating systems, though it may not alway... |
I have a VB6.0 project with MDI parent and child form. Now I need to check spelling and grammar in few text boxes on that child form.
Please help with code example.
| To implement spell checking in a VB6 MDI application, you can use the `Microsoft Word Object Library` for accessing Word's spell-checking capabilities. Below is a simple example of how you can achieve this in your child form.
### Step 1: Add a Reference to Microsoft Word Object Library
1. In the VB6 IDE, go to `Projec... | 22,921 | [
{
"from": "human",
"value": "I have a VB6.0 project with MDI parent and child form. Now I need to check spelling and grammar in few text boxes on that child form. \nPlease help with code example.\n"
},
{
"from": "gpt",
"value": "To implement spell checking in a VB6 MDI application, you can use t... |
Say I've got a class like this:
class Test
{
int x;
SomeClass s;
}
And I instantiate it like this:
Test* t = new Test;
Is x on the stack, or the heap? What about s?
| In C++, when you instantiate an object of a class using the `new` operator (as you did with `Test* t = new Test;`), the entire object is allocated on the heap.
In your class `Test`, you have two members:
1. `int x;` - This is a primitive data type, and it is part of the `Test` object. Since the `Test` object itself i... | 27,037 | [
{
"from": "human",
"value": "Say I've got a class like this:\nclass Test\n{\n int x;\n SomeClass s;\n}\n\nAnd I instantiate it like this:\nTest* t = new Test;\n\nIs x on the stack, or the heap? What about s?\n"
},
{
"from": "gpt",
"value": "In C++, when you instantiate an object of a class usi... |
I am running GNU Emacs on Windows so entering:
M-x shell
launches the Windows command-line DOS shell. However, I would like to instead be able to run the Cygwin Bash Shell (or any other non-Windows shell) from within Emacs. How can this be easily done?
| To run the Cygwin Bash shell or any other non-Windows shell from within GNU Emacs on Windows, you can customize the `shell-file-name` and set up an appropriate shell configuration. Here are the steps to set this up:
### Method 1: Using Emacs Customization
1. **Find the Cygwin Installation Path**: Make sure you know w... | 24,509 | [
{
"from": "human",
"value": "I am running GNU Emacs on Windows so entering:\nM-x shell\n\nlaunches the Windows command-line DOS shell. However, I would like to instead be able to run the Cygwin Bash Shell (or any other non-Windows shell) from within Emacs. How can this be easily done?\n"
},
{
"from"... |
I've installed the MSDN Library for Visual Studio 2008 SP1, however, dynamic help in Visual Studio still spawns the RTM Document Explorer. Anyone know how to change it to the SP1 version?
| If your Visual Studio 2008 SP1 is still launching the RTM Document Explorer instead of the SP1 version after installing the MSDN Library for Visual Studio 2008 SP1, you can try the following steps to resolve the issue:
### Steps to Change the Dynamic Help Source:
1. **Verify Installation**:
Ensure that the MSDN Li... | 17,296 | [
{
"from": "human",
"value": "I've installed the MSDN Library for Visual Studio 2008 SP1, however, dynamic help in Visual Studio still spawns the RTM Document Explorer. Anyone know how to change it to the SP1 version?\n"
},
{
"from": "gpt",
"value": "If your Visual Studio 2008 SP1 is still launch... |
Suppose I have the following code:
while(TRUE) {
pthread_t *thread = (pthread_t *) malloc(sizeof(pthread_t));
pthread_create(thread, NULL, someFunction, someArgument);
pthread_detach(*thread);
sleep(10);
}
Will the detached thread free the memory allocated by malloc, or is that something I now have to do?
| In your code snippet, you are allocating memory for the `pthread_t` pointer using `malloc`, but the memory allocated for the `pthread_t` itself will not be automatically freed when the thread is detached. Here's a breakdown of how it works:
1. You allocate memory for a `pthread_t` variable dynamically using `malloc`. ... | 26,135 | [
{
"from": "human",
"value": "Suppose I have the following code:\nwhile(TRUE) {\n pthread_t *thread = (pthread_t *) malloc(sizeof(pthread_t));\n pthread_create(thread, NULL, someFunction, someArgument);\n pthread_detach(*thread);\n sleep(10);\n}\n\nWill the detached thread free the memory allocated by ma... |
I want to offer credit card payment on my website and was wondering whats the best (or prefered) way to do so?
I know I could use Google checkout, paypal, etc. but this is not what i am looking for. I am looking for a simple basic CC payment which supports all the different credit cards only.
| If you're looking to implement a straightforward credit card payment solution on your website, here are several approaches you can consider:
### 1. **Payment Processors**
Using a payment processor allows you to handle credit card payments directly on your site. Here are a few popular options:
- **Stripe**: Stripe is ... | 25,504 | [
{
"from": "human",
"value": "I want to offer credit card payment on my website and was wondering whats the best (or prefered) way to do so?\nI know I could use Google checkout, paypal, etc. but this is not what i am looking for. I am looking for a simple basic CC payment which supports all the different cre... |
I have a TreeView control in my WinForms .NET application that has multiple levels of childnodes that have childnodes with more childnodes, with no defined depth. When a user selects any parent node (not necessarily at the root level), how can I get a list of all the nodes beneith that parent node?
For example, I start... | To handle an arbitrary number of levels in a TreeView control, you can use a recursive approach. Recursion allows you to define a method that calls itself to traverse all child nodes, regardless of their depth.
Here's how you can implement this in VB.NET:
```vb
Dim nodes As New List(Of String)()
' Call the recursive... | 25,102 | [
{
"from": "human",
"value": "I have a TreeView control in my WinForms .NET application that has multiple levels of childnodes that have childnodes with more childnodes, with no defined depth. When a user selects any parent node (not necessarily at the root level), how can I get a list of all the nodes benei... |
Is there a way to change the default pages used to edit/create/view a Sharepoint list item without using SharePoint designer? Since I've already created the aspx files on the development machine, it seem's a bit silly to have to install SharePoint designer on the customers server just to set a few default pages.
| Yes, you can change the default pages used to edit/create/view a SharePoint list item without using SharePoint Designer by using SharePoint's built-in functionality and configuration options. Here are some methods you can use:
### 1. **Using the List Settings:**
For some list types, you can use list settings to specif... | 25,634 | [
{
"from": "human",
"value": "Is there a way to change the default pages used to edit/create/view a Sharepoint list item without using SharePoint designer? Since I've already created the aspx files on the development machine, it seem's a bit silly to have to install SharePoint designer on the customers serve... |
It seems that Groovy does not support break and continue from within a closure. What is the best way to simulate this?
revs.eachLine { line ->
if (line ==~ /-{28}/) {
// continue to next line...
}
}
| In Groovy, closures don't have their own scope for `break` and `continue`, which means you can't use those statements directly within a closure. To simulate `continue` behavior, you can use a `return` statement within the closure to skip to the next iteration. However, since you can't use `break`, you'll typically need... | 26,490 | [
{
"from": "human",
"value": "It seems that Groovy does not support break and continue from within a closure. What is the best way to simulate this?\nrevs.eachLine { line -> \n if (line ==~ /-{28}/) {\n // continue to next line...\n }\n}\n\n"
},
{
"from": "gpt",
"value": "In Groovy,... |
I'd like to be able to read the mac address from the first active network adapter using VB.net or C# (using .NET 3.5 SP1) for a winform application
| You can retrieve the MAC address of the first active network adapter using either VB.NET or C#. Below, I've provided examples in both languages that you can use in a WinForms application targeting .NET Framework 3.5 SP1.
### C# Example
```csharp
using System;
using System.Linq;
using System.Net.NetworkInformation;
us... | 24,672 | [
{
"from": "human",
"value": "I'd like to be able to read the mac address from the first active network adapter using VB.net or C# (using .NET 3.5 SP1) for a winform application\n"
},
{
"from": "gpt",
"value": "You can retrieve the MAC address of the first active network adapter using either VB.N... |
I have a Java client that calls a web service at the moment using the Http protocol.
When i try to use the Https protocol i keep getting this error
java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.
Any ideas what could be up?
Thanks
Damien
| The error message you are encountering, `java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big`, suggests that there is an issue with parsing the response or input stream when using HTTPS. This usually indicates a problem with the data format or the way the Java client is set up to handle SSL/TLS conn... | 22,854 | [
{
"from": "human",
"value": "I have a Java client that calls a web service at the moment using the Http protocol.\nWhen i try to use the Https protocol i keep getting this error\njava.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.\nAny ideas what could be up?\nThanks\nDamien\n"
},
{... |
I have a char in c#:
char foo = '2';
Now I want to get the 2 into an int. I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2. The following will work:
int bar = Convert.ToInt32(new string(foo, 1));
int.parse only works on strings as well.
Is there no native function in C... | In C#, there is indeed no direct method to convert a `char` representing a digit into an `int` without first converting it to a string. However, you can achieve this conversion by simply subtracting the character representation of '0' from your character.
Here's how you can do it:
```csharp
char foo = '2';
int bar =... | 26,919 | [
{
"from": "human",
"value": "I have a char in c#:\nchar foo = '2';\n\nNow I want to get the 2 into an int. I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2. The following will work:\nint bar = Convert.ToInt32(new string(foo, 1));\n\nint.parse only works on stri... |
I know that it does in PHP, and I'm pretty sure it does in Java. I haven't used the latest versions of .NET, so I won't speak for them. It seems very awkward, but I was wondering if there was an underlying reason for this.
| It sounds like you're discussing the concept of "truthiness" in programming languages, where certain values are evaluated as true or false in conditional statements. Both PHP and Java have specific behaviors related to how they handle truthiness, and .NET (particularly C#) has its own rules as well.
### Truthiness in ... | 18,129 | [
{
"from": "human",
"value": "I know that it does in PHP, and I'm pretty sure it does in Java. I haven't used the latest versions of .NET, so I won't speak for them. It seems very awkward, but I was wondering if there was an underlying reason for this.\n"
},
{
"from": "gpt",
"value": "It sounds l... |
for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux?
Is there any library?
| In Linux, the `python-docx` library is a popular choice for working with MS Word (.docx) files. Unlike `python-win32`, which is specifically designed for Windows and its COM interface, `python-docx` is cross-platform and allows you to create, modify, and extract information from Word documents without requiring Windows... | 24,517 | [
{
"from": "human",
"value": "for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux?\nIs there any library?\n"
},
{
"from": "gpt",
"value": "In Linux, the `python-docx` library is a popular choice for working with M... |
Given that a function a_method has been defined like
def a_method(arg1, arg2):
pass
Starting from a_method itself, how can I get the argument names - for example, as a tuple of strings, like ("arg1", "arg2")?
| You can get the argument names of a function in Python by using the `inspect` module, specifically the `signature` function. Here's how you can do it:
```python
import inspect
def a_method(arg1, arg2):
pass
# Get the signature of the function
signature = inspect.signature(a_method)
# Extract the parameter names... | 25,396 | [
{
"from": "human",
"value": "Given that a function a_method has been defined like\ndef a_method(arg1, arg2):\n pass\n\nStarting from a_method itself, how can I get the argument names - for example, as a tuple of strings, like (\"arg1\", \"arg2\")?\n"
},
{
"from": "gpt",
"value": "You can get ... |
If the amount of data stored within a given field of a database is unknown, and could be very large, should I store it in an external file rather than within a field in the database?
| When deciding whether to store large or unknown amounts of data within a database field or in an external file, there are several factors to consider:
### Pros of Storing Data in an External File
1. **Performance**: If the data is very large (e.g., multimedia files, large documents), storing it externally can improve... | 24,468 | [
{
"from": "human",
"value": "If the amount of data stored within a given field of a database is unknown, and could be very large, should I store it in an external file rather than within a field in the database?\n"
},
{
"from": "gpt",
"value": "When deciding whether to store large or unknown amo... |
I've found a couple of references (for example) that suggest using final as much as possible and I'm wondering how important that is. This is mainly in the the context of method parameters and local variables, not final methods or classes. For constants, it makes obvious sense.
On one hand, the compiler can make some o... | Using `final` for method parameters and local variables in Java (or similar languages) can be a matter of coding style and clarity, and whether you should make an effort to remember it depends on your context and preferences.
Here are some considerations for using `final` in these situations:
### Benefits of Using `f... | 21,017 | [
{
"from": "human",
"value": "I've found a couple of references (for example) that suggest using final as much as possible and I'm wondering how important that is. This is mainly in the the context of method parameters and local variables, not final methods or classes. For constants, it makes obvious sense.\... |
How can I read an Open Office 3.0 spreadsheet (.ods) from Groovy? I'd like to select specific columns from a named worksheet. Ideally, it would be useful to add a 'where' clause, or other criteria clause.
| Reading an OpenOffice 3.0 spreadsheet (.ods) file in Groovy can be accomplished using the Apache ODF Toolkit, which is a popular library for handling ODF (Open Document Format) files. Here's how you can use it to read a spreadsheet, select specific columns, and apply criteria to filter your data.
### Step 1: Add Depen... | 24,003 | [
{
"from": "human",
"value": "How can I read an Open Office 3.0 spreadsheet (.ods) from Groovy? I'd like to select specific columns from a named worksheet. Ideally, it would be useful to add a 'where' clause, or other criteria clause.\n"
},
{
"from": "gpt",
"value": "Reading an OpenOffice 3.0 s... |
It's easy to get the value of a key from a .NET generic Dictionary:
Dictionary<int, string> greek = new Dictionary<int, string>();
greek.Add(1, "Alpha");
greek.Add(2, "Beta");
string secondGreek = greek[2]; // Beta
But trying to get the keys given a value is not as straightforward because there could be multiple keys... | To retrieve keys from a `Dictionary<TKey, TValue>` based on a specific value in .NET, you would typically need to iterate through the dictionary and check each entry's value. Since a `Dictionary` does not support direct lookups by value, you can use LINQ to achieve this in a concise manner.
Here's an example of how to... | 26,729 | [
{
"from": "human",
"value": "It's easy to get the value of a key from a .NET generic Dictionary:\nDictionary<int, string> greek = new Dictionary<int, string>();\ngreek.Add(1, \"Alpha\");\ngreek.Add(2, \"Beta\");\nstring secondGreek = greek[2]; // Beta\n\nBut trying to get the keys given a value is not as s... |
Will their be a new release of the compact framework with VS2010 and .net 4.0 and if so what new features will it include?
WPF?
linq to SQL?
etc
| The .NET Compact Framework, which is a subset of the full .NET Framework designed for resource-constrained devices, did not receive a new release alongside Visual Studio 2010 and .NET 4.0. As of my last knowledge update in October 2023, Microsoft had effectively phased out the Compact Framework in favor of other techno... | 27,188 | [
{
"from": "human",
"value": "Will their be a new release of the compact framework with VS2010 and .net 4.0 and if so what new features will it include? \nWPF? \nlinq to SQL?\netc\n"
},
{
"from": "gpt",
"value": "The .NET Compact Framework, which is a subset of the full .NET Framework designed fo... |
To present user specific data, where do I store the userID of the user currently logged in? the Session?
| Yes, using a session is a common and effective way to store the user ID of the currently logged-in user. Here are a few details to consider when using sessions:
1. **Session Management**: When a user logs in, you can create a session for that user and store their user ID (and any other relevant information) in the ses... | 27,371 | [
{
"from": "human",
"value": "To present user specific data, where do I store the userID of the user currently logged in? the Session?\n"
},
{
"from": "gpt",
"value": "Yes, using a session is a common and effective way to store the user ID of the currently logged-in user. Here are a few details t... |
ModRewrite can easily handle stripping the www off the front of my domain.
In .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301... | To avoid issues with SSL certificates when redirecting from `www` to the non-`www` version of your domain, you have a couple of options:
### Option 1: Use a Single SSL Certificate for the Domain
If you do not want to buy a separate SSL certificate for the `www` subdomain, consider obtaining a single SSL certificate t... | 21,360 | [
{
"from": "human",
"value": "ModRewrite can easily handle stripping the www off the front of my domain.\nIn .htaccess:\nRewriteEngine On\nRewriteCond %{HTTPS} on\nRewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]\nRewriteRule ^(.*)$ https://%1/$1 [R=301,L]\nRewriteCond %{HTTPS} off\nRewriteCond %{HTTP_HOST} ^www\\... |
I don't care what the differences are. I just want to know whether the contents are different.
| Sure! If you provide me with the contents you're comparing, I can help determine whether they are different or not. Please share the text or information you'd like me to analyze. | 30,175 | [
{
"from": "human",
"value": "I don't care what the differences are. I just want to know whether the contents are different.\n"
},
{
"from": "gpt",
"value": "Sure! If you provide me with the contents you're comparing, I can help determine whether they are different or not. Please share the text ... |
A friend of mine was recently asked in a job interview to tell the difference between a standard singleton and a mono singleton. I have never heard the term before and a simple google search does not return any meaningful results.
My friend suggested that it is an object where the constructor is public but all the mem... | The term "mono singleton" is not a widely recognized concept in software engineering or programming, and it doesn't have a standard definition that is universally accepted. It is possible that your friend's interview question was either a misunderstanding or a miscommunication regarding some common software design patt... | 25,122 | [
{
"from": "human",
"value": "A friend of mine was recently asked in a job interview to tell the difference between a standard singleton and a mono singleton. I have never heard the term before and a simple google search does not return any meaningful results. \nMy friend suggested that it is an object where... |
Is there any alternative for WPF (windows presentation foundation) in python?
http://msdn.microsoft.com/en-us/library/aa970268.aspx#Programming_with_WPF
| Yes, there are several alternatives to WPF (Windows Presentation Foundation) for building desktop applications in Python. Here are some popular options:
1. **PyQt/PySide**:
- **PyQt** is a set of Python bindings for the Qt application framework, which is widely used for building cross-platform applications. It off... | 26,017 | [
{
"from": "human",
"value": "Is there any alternative for WPF (windows presentation foundation) in python? \nhttp://msdn.microsoft.com/en-us/library/aa970268.aspx#Programming_with_WPF \n"
},
{
"from": "gpt",
"value": "Yes, there are several alternatives to WPF (Windows Presentation Foundation) f... |
Is there in Ruby some functionality/syntax to compare two floats with delta? Something similar to assert_in_delta(expected_float, actual_float, delta) from test/unit but returning Boolean?
| In Ruby, you can create a simple method to compare two floats with a delta (or tolerance) and return a Boolean value. While there isn't a built-in method like `assert_in_delta` that returns a Boolean, you can easily implement this functionality yourself. Here's a simple method you can use:
```ruby
def floats_within_de... | 28,050 | [
{
"from": "human",
"value": "Is there in Ruby some functionality/syntax to compare two floats with delta? Something similar to assert_in_delta(expected_float, actual_float, delta) from test/unit but returning Boolean?\n"
},
{
"from": "gpt",
"value": "In Ruby, you can create a simple method to co... |
I am using link to sql, I have a connected set of objects.
I start out and do a linq statement like this
Dim L= from II in context.InventoryItems select II
Dim L2 = L.tolist
The second line was so that I could narrow down where the problem was occuring. When the second line is hit I get an error "The EntitySet is alre... | The error message "The EntitySet is already loaded and the source cannot be changed" typically occurs when you're working with an Entity Framework context that has already loaded an entity set (like `InventoryItems` in your case), and you're trying to modify or re-query it in a way that Entity Framework does not suppor... | 23,178 | [
{
"from": "human",
"value": "I am using link to sql, I have a connected set of objects.\nI start out and do a linq statement like this\nDim L= from II in context.InventoryItems select II\nDim L2 = L.tolist\n\nThe second line was so that I could narrow down where the problem was occuring. When the second lin... |
I created a report model using SSRS (2005) and published to the local server. But when I tried to run the report for the model I published using report builder I get the following error.
Report execution error:The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)
| The error message you are seeing indicates that the user account you are using does not have the necessary permissions to access the report or the data source associated with it. Here are several steps you can take to troubleshoot and resolve the issue:
1. **Check User Permissions in SSRS:**
- Open SQL Server Manag... | 25,315 | [
{
"from": "human",
"value": "I created a report model using SSRS (2005) and published to the local server. But when I tried to run the report for the model I published using report builder I get the following error. \n\nReport execution error:The permissions granted to user are insufficient for performing t... |
I am using java language,I have a method that is supposed to return an object if it is found.
If it is not found, should I:
return null
throw an exception
other
Which is the best practise or idiom?
| In Java, whether to return `null`, throw an exception, or use another approach largely depends on the specific use case and design principles of your application. Here are the common practices and considerations for each option:
### Returning `null`
- **Pros**: It is straightforward and can signal to the caller that t... | 24,513 | [
{
"from": "human",
"value": "I am using java language,I have a method that is supposed to return an object if it is found.\nIf it is not found, should I:\n\nreturn null\nthrow an exception\nother\n\nWhich is the best practise or idiom?\n"
},
{
"from": "gpt",
"value": "In Java, whether to return ... |
Was just wondering if there was a way to edit the CPU registers (i.e. EAX, EBX, ECX, etc) or flags (OV, UP, erc) from within the Visual Studio IDE. I know you can view them using the Registers pane (ctrl-shift-G) and you can cycle through them with TAB or ENTER, but I don't seem to be able to change any of them while ... | In Visual Studio, while you can view the CPU registers and flags during debugging, direct editing of CPU registers is not natively supported in the same way it might have been in older versions like VC++6. However, there are a few ways you can manipulate or change register values during a debugging session:
### Using ... | 25,771 | [
{
"from": "human",
"value": "Was just wondering if there was a way to edit the CPU registers (i.e. EAX, EBX, ECX, etc) or flags (OV, UP, erc) from within the Visual Studio IDE. I know you can view them using the Registers pane (ctrl-shift-G) and you can cycle through them with TAB or ENTER, but I don't see... |
I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let them write.
What I want to do is turn off impersonation for just a couple... | In a scenario where you need to selectively disable impersonation for specific operations in your application, you can accomplish this by managing the impersonation context directly.
Here's an approach that you can use in C# with ASP.NET:
1. **Capture the current context** before performing any operation requiring se... | 23,539 | [
{
"from": "human",
"value": "I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let them write. \nWhat I want to do i... |
I'm looking for an open-source library for editing AAC metadata in M4A files (as appearing in iTunes). Specifically, I need to be able to add an album art tag. It should be something similar to id3lib, which works with ID3 tags on MP3 files.
| For editing AAC metadata in M4A files, you can use several open-source libraries. One of the most popular options for manipulating metadata in audio files, including M4A (which is often used for AAC), is **TagLib**. TagLib is a library designed to read and edit the metadata of several audio formats, including M4A files... | 21,418 | [
{
"from": "human",
"value": "I'm looking for an open-source library for editing AAC metadata in M4A files (as appearing in iTunes). Specifically, I need to be able to add an album art tag. It should be something similar to id3lib, which works with ID3 tags on MP3 files.\n"
},
{
"from": "gpt",
... |
Is there an efficient way to store the compiled regexes (compiled via regcomp(), PCRE) in a binary file, so that later I can just read from the file and call regexec()?
Or is it just a matter of dumping the compiled regex_t structs to the file and reading them back when needed?
| Storing compiled regular expressions efficiently for later use can be done, but it requires careful handling. When using the POSIX `regcomp()` and `regexec()` functions, the compiled regex is stored in a `regex_t` structure. This structure is not guaranteed to be portable across different systems, or even different ver... | 25,148 | [
{
"from": "human",
"value": "Is there an efficient way to store the compiled regexes (compiled via regcomp(), PCRE) in a binary file, so that later I can just read from the file and call regexec()?\nOr is it just a matter of dumping the compiled regex_t structs to the file and reading them back when needed?... |
This seems trivial, but I've never had to worry about it before and my Google skills are failing me. How far-reaching is the in-process session bucket for ASP.NET/IIS6, in the sense that you can call Session["whatever"] and get the same value back? Obviously it can't stretch across different servers or application pool... | In ASP.NET and IIS 6, the session state is managed in a way that has specific scope limitations. Here’s a breakdown of how session state works in various scenarios:
1. **Session State Across Different Servers**:
- You're correct that session variables cannot be shared across different servers unless you are using ... | 24,934 | [
{
"from": "human",
"value": "This seems trivial, but I've never had to worry about it before and my Google skills are failing me. How far-reaching is the in-process session bucket for ASP.NET/IIS6, in the sense that you can call Session[\"whatever\"] and get the same value back? Obviously it can't stretch a... |
I have a HTML page that scrolls up and down (not a lot, but it does scroll). How can I set the scroll position in the page after executing some JavaScript?
I'm using jQuery to inject some additional HTML at the bottom of the page and I'd like to programmatically scroll to the position of that new content after it's add... | To programmatically scroll to a specific position on a page after injecting new HTML content using jQuery, you can use the `scrollTop` method to set the scroll position. After you append the new content, you can calculate the position where you want to scroll to and then use `$('html, body').animate()` to create a smoo... | 22,035 | [
{
"from": "human",
"value": "I have a HTML page that scrolls up and down (not a lot, but it does scroll). How can I set the scroll position in the page after executing some JavaScript?\nI'm using jQuery to inject some additional HTML at the bottom of the page and I'd like to programmatically scroll to the p... |
I'm trying to do a subselect in pgsql aka postgresql and the example I found doesn't work:
SELECT id FROM (SELECT * FROM table);
| The syntax you've used in your subquery is almost correct but misses an alias for the subquery result. In PostgreSQL, every subquery must have an alias. Here's how you can properly structure your query:
```sql
SELECT id FROM (SELECT * FROM table_name) AS subquery_alias;
```
Replace `table_name` with the actual name o... | 28,632 | [
{
"from": "human",
"value": "I'm trying to do a subselect in pgsql aka postgresql and the example I found doesn't work:\nSELECT id FROM (SELECT * FROM table);\n\n"
},
{
"from": "gpt",
"value": "The syntax you've used in your subquery is almost correct but misses an alias for the subquery result.... |
Could someone provide a good description of what a Lambda is? We have a tag for them and they're on the secrets of C# question, but I have yet to find a good definition and explanation of what they are in the first place.
| Certainly! In programming, particularly in C#, a **lambda expression** is a concise way to represent an anonymous function (a function that doesn’t have a name). Lambdas are particularly useful when you want to pass a block of code as a delegate or as part of a LINQ (Language Integrated Query) operation.
### Definiti... | 24,260 | [
{
"from": "human",
"value": "Could someone provide a good description of what a Lambda is? We have a tag for them and they're on the secrets of C# question, but I have yet to find a good definition and explanation of what they are in the first place.\n"
},
{
"from": "gpt",
"value": "Certainly! ... |
For example, if I have a network spec like 172.20.10.0/24, "24" is the bitcount. What's the best way to convert that to a netmask like 0xffffff00 ?
| To convert a CIDR notation like `172.20.10.0/24` to a netmask in hexadecimal format (e.g., `0xffffff00`), you can follow these steps:
1. **Understand CIDR Notation**: The `/24` indicates that the first 24 bits of the address are the network part, which means the remaining 8 bits are for host addresses.
2. **Construct... | 25,391 | [
{
"from": "human",
"value": "For example, if I have a network spec like 172.20.10.0/24, \"24\" is the bitcount. What's the best way to convert that to a netmask like 0xffffff00 ?\n"
},
{
"from": "gpt",
"value": "To convert a CIDR notation like `172.20.10.0/24` to a netmask in hexadecimal format ... |
I see that the SML/NJ includes a queue structure. I can't figure out how to use it. How do I use the additional libraries provided by SML/NJ?
| In Standard ML of New Jersey (SML/NJ), the additional libraries, including the queue structure, are provided in the `Basis` library. To use them, you need to ensure that you have the proper environment set up and understand how to access these modules.
Here’s a basic guide on how to use the queue structure in SML/NJ:
... | 24,788 | [
{
"from": "human",
"value": "I see that the SML/NJ includes a queue structure. I can't figure out how to use it. How do I use the additional libraries provided by SML/NJ?\n"
},
{
"from": "gpt",
"value": "In Standard ML of New Jersey (SML/NJ), the additional libraries, including the queue structu... |
I've got a CSV file containing latitude and longitude values, such as:
"25°36'55.57""E","45°39'12.52""N"
Anyone have a quick and simple piece of C# code to convert this to double values?
Thanks
| Certainly! You can convert latitude and longitude values in the format you've provided to double values in C# by parsing the degrees, minutes, and seconds and then converting them to decimal format. Here’s a simple method you can use to perform the conversion:
```csharp
using System;
using System.Globalization;
class... | 13,193 | [
{
"from": "human",
"value": "I've got a CSV file containing latitude and longitude values, such as:\n\n\"25°36'55.57\"\"E\",\"45°39'12.52\"\"N\"\n\nAnyone have a quick and simple piece of C# code to convert this to double values?\nThanks\n"
},
{
"from": "gpt",
"value": "Certainly! You can conver... |
I've seen several products that will track the sales rank of an item on Amazon. Does Amazon have any web-services published that I can use to get the sales rank of a particular item?
I've looked through the AWS and didn't see anything of that nature.
| Amazon does not provide a direct web service specifically for retrieving sales rank data for individual items. However, there are a few alternatives you might consider:
1. **Amazon Product Advertising API**: This API provides access to a wide range of product information on Amazon, including sales rank. You need to ha... | 26,247 | [
{
"from": "human",
"value": "I've seen several products that will track the sales rank of an item on Amazon. Does Amazon have any web-services published that I can use to get the sales rank of a particular item? \nI've looked through the AWS and didn't see anything of that nature.\n"
},
{
"from": "g... |
I'd like to do something like this:
Dim Foo as String = "a,b,c,d,e"
Dim Boo as List(of String) = Foo.Split(","c)
Of course Foo.Split returns a one-dimensional array of String, not a generic List. Is there a way to do this without iterating through the array to turn it into a generic List?
| In VB.NET, you can convert an array to a `List(Of String)` directly using the `ToList` method from `System.Linq`. This eliminates the need to manually iterate through the array to create a list. Here's how you can do it:
```vb.net
Imports System.Linq
Module Module1
Sub Main()
Dim Foo As String = "a,b,c,d,... | 26,715 | [
{
"from": "human",
"value": "I'd like to do something like this:\nDim Foo as String = \"a,b,c,d,e\"\nDim Boo as List(of String) = Foo.Split(\",\"c)\n\nOf course Foo.Split returns a one-dimensional array of String, not a generic List. Is there a way to do this without iterating through the array to turn it i... |
What are your usage of delegates in C#?
| In C#, delegates are a powerful feature that allows developers to encapsulate method references in a type-safe manner. They enable you to pass methods as parameters, define callback methods, and create event-driven programming models. Here are some common usages of delegates in C#:
1. **Method References**:
- Deleg... | 20,958 | [
{
"from": "human",
"value": "What are your usage of delegates in C#?\n"
},
{
"from": "gpt",
"value": "In C#, delegates are a powerful feature that allows developers to encapsulate method references in a type-safe manner. They enable you to pass methods as parameters, define callback methods, and... |
Does anybody know if there is a built-in function in Mathematica for getting the lhs of downvalue rules (without any holding)? I know how to write the code to do it, but it seems basic enough for a built-in
For example:
a[1]=2;
a[2]=3;
BuiltInIDoNotKnowOf[a] returns {1,2}
| In Mathematica, you can use the `DownValues` function to access the downvalues of a symbol, and then extract the left-hand sides (lhs) of those rules. However, `DownValues` returns the rules in a held form. To get the lhs without holding, you can apply the `First` function and `ReplaceAll` to each downvalue rule.
Here... | 25,718 | [
{
"from": "human",
"value": "Does anybody know if there is a built-in function in Mathematica for getting the lhs of downvalue rules (without any holding)? I know how to write the code to do it, but it seems basic enough for a built-in\nFor example:\na[1]=2;\na[2]=3;\n\nBuiltInIDoNotKnowOf[a] returns {1,2}... |
I'm in need of a lightweight library for 2d & 3d vectors and 3x3 & 4x4 matrices. In basic C.
Just so I don't reinvent the wheel suboptimally.
Any suggestions?
| There are several lightweight libraries in C that provide functionality for 2D and 3D vectors as well as 3x3 and 4x4 matrices. Here are a few options that you may find suitable:
1. **GLM** (OpenGL Mathematics):
- GLM is a header-only mathematics library for graphics software based on the OpenGL Shading Language (GL... | 25,503 | [
{
"from": "human",
"value": "I'm in need of a lightweight library for 2d & 3d vectors and 3x3 & 4x4 matrices. In basic C.\nJust so I don't reinvent the wheel suboptimally.\nAny suggestions?\n"
},
{
"from": "gpt",
"value": "There are several lightweight libraries in C that provide functionality f... |
I don't quite understand how Silverlight code works within the browser. Are the assemblies downloaded to the client machine? Is there any chance of the code getting decompiled using Reflector or some similar tool? If so, what options does one have to protect the code? Do .net obfuscators work with Silverlight?
| Silverlight is a framework for building rich internet applications that was developed by Microsoft. It enables developers to create applications that run in a web browser and can incorporate various types of content, such as graphics, video, and interactive features. Here’s how it works in relation to your questions ab... | 24,955 | [
{
"from": "human",
"value": "I don't quite understand how Silverlight code works within the browser. Are the assemblies downloaded to the client machine? Is there any chance of the code getting decompiled using Reflector or some similar tool? If so, what options does one have to protect the code? Do .net ob... |
Can someone explain what this means?
int (*data[2])[2];
| The declaration `int (*data[2])[2];` can be broken down to understand its components and what it represents in C or C++.
1. **Array Declaration**: The first part `data[2]` indicates that `data` is an array with 2 elements.
2. **Pointer Declaration**: The part `(*data[2])` signifies that each element of the array `dat... | 25,474 | [
{
"from": "human",
"value": "Can someone explain what this means?\nint (*data[2])[2];\n\n"
},
{
"from": "gpt",
"value": "The declaration `int (*data[2])[2];` can be broken down to understand its components and what it represents in C or C++.\n\n1. **Array Declaration**: The first part `data[2]` ... |
I need to pad the output of an integer to a given length.
For example, with a length of 4 digits, the output of the integer 4 is "0004" instead of "4". How can I do this in C# 2.0?
| In C# 2.0, you can pad an integer to a specified length using the `String.PadLeft` method. This method will add spaces (or any specified character) to the left of the string representation of the integer until it reaches the desired length.
To achieve zero-padding for an integer, you can convert the integer to a strin... | 27,307 | [
{
"from": "human",
"value": "I need to pad the output of an integer to a given length.\nFor example, with a length of 4 digits, the output of the integer 4 is \"0004\" instead of \"4\". How can I do this in C# 2.0?\n"
},
{
"from": "gpt",
"value": "In C# 2.0, you can pad an integer to a specified... |
I've got a save dialog box which pops up when i press a button. However i dont want to save a file at that point, i want to take the name and place it in the text box next to the button, for the name to be used later.
Can anybody tell me how to obtain the file path from the save dialog box to use it later?
| Certainly! If you want to display the file name (or path) selected in a save dialog box in a text box without actually saving a file at that moment, you can typically achieve this using a graphical user interface (GUI) toolkit, such as Tkinter in Python. Below is an example of how you might implement this in Python usi... | 25,625 | [
{
"from": "human",
"value": "I've got a save dialog box which pops up when i press a button. However i dont want to save a file at that point, i want to take the name and place it in the text box next to the button, for the name to be used later. \nCan anybody tell me how to obtain the file path from the sa... |
ColdFusion 8 Standard Edition on OS X Leopard.
Developing a new website.
What is the best database to use in conjunction with ColdFusion?
Will be storing simple Credit Card operations, registration information, CRM info for an indie software company
| When working with ColdFusion 8 Standard Edition on OS X Leopard, you have several database options, each with its own strengths. Here are some of the best databases to consider for your use case involving credit card operations, registration information, and CRM data:
1. **MySQL**:
- **Pros**: Open-source, widely ... | 24,366 | [
{
"from": "human",
"value": "ColdFusion 8 Standard Edition on OS X Leopard.\nDeveloping a new website.\nWhat is the best database to use in conjunction with ColdFusion?\nWill be storing simple Credit Card operations, registration information, CRM info for an indie software company\n"
},
{
"from": "g... |
I was wondering if there's a way to see the output of any command,
straight inside vim, rather than first redirecting it into a file and
then opening that file.
E.x. I need something like
$ gvim < diff -r dir1/ dir2/
This gives ambiguous redirect error message
I just want to see the diffs between dir1 and dir2 straig... | Yes, you can see the output of a command directly inside Vim without needing to redirect it to a file first. You can do this by using the `:r !` command in Vim, which allows you to read the output of an external command directly into the buffer.
Here's how you can do it for your example with the `diff` command:
1. Op... | 24,537 | [
{
"from": "human",
"value": "I was wondering if there's a way to see the output of any command,\nstraight inside vim, rather than first redirecting it into a file and\nthen opening that file.\nE.x. I need something like\n$ gvim < diff -r dir1/ dir2/\nThis gives ambiguous redirect error message\nI just wan... |
Given a model's instance object, how can I get the database table's name?
I don't want to specify names explicitly in the Meta class.
| In Django, you can get the name of the database table associated with a model instance by accessing the `_meta` attribute of the model. The `_meta` attribute contains a lot of information about the model's configuration, including the database table name.
Here’s how you can do it:
```python
# Assuming `instance` is ... | 28,812 | [
{
"from": "human",
"value": "Given a model's instance object, how can I get the database table's name?\nI don't want to specify names explicitly in the Meta class.\n"
},
{
"from": "gpt",
"value": "In Django, you can get the name of the database table associated with a model instance by accessing... |
Is it possible to suppress warnings in Eclipse for JDK1.4 project?
EDIT:
Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove some warning notifications in some specific ... | In Eclipse, while you cannot use `@SuppressWarnings` in JDK 1.4 because the annotation was introduced in Java 5, there are still a few ways to manage warnings for specific classes or methods in your JDK 1.4 project.
1. **Eclipse Preferences for Warnings**:
You can configure Eclipse to suppress specific types of war... | 25,292 | [
{
"from": "human",
"value": "Is it possible to suppress warnings in Eclipse for JDK1.4 project?\nEDIT:\nLonger version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove s... |
Does anyone know how to tell VS(2008) where to save the obj folder when building the solution? We have it save the bin folder to another path in order to keep the source file folders small (ie. emailable), but can't find any way to tell it to do the same with obj...
| In Visual Studio 2008, you can change the output directory for the `obj` folder by modifying the project settings. Here's how you can do it:
1. **Open your project in Visual Studio 2008.**
2. **Right-click on the project in the Solution Explorer** and select **"Properties"** from the context menu.
3. In the project ... | 28,154 | [
{
"from": "human",
"value": "Does anyone know how to tell VS(2008) where to save the obj folder when building the solution? We have it save the bin folder to another path in order to keep the source file folders small (ie. emailable), but can't find any way to tell it to do the same with obj...\n"
},
{
... |
I have a DataGridView control in a TabPage, and I listen for the SelectionChanged event. When the TabPage is selected, the DataGridView selects the first row and fires the SelectionChanged event. How can I stop it from automatically selecting a row?
| To prevent the `DataGridView` from automatically selecting a row when the `TabPage` is selected, you can handle the `TabPage`'s `Enter` event (or the `Selected` event) and set the current cell to `null`. This way, you can avoid the `SelectionChanged` event firing due to the automatic row selection.
Here's how you can ... | 26,407 | [
{
"from": "human",
"value": "I have a DataGridView control in a TabPage, and I listen for the SelectionChanged event. When the TabPage is selected, the DataGridView selects the first row and fires the SelectionChanged event. How can I stop it from automatically selecting a row?\n"
},
{
"from": "gp... |
I would like to use my laptop as a web development (PHP, Python, etc.) machine, but I'm hesitant to do this unless I can ensure that it can not be accessed by the outside world.
I'm guessing that something more than a firewall is necessary, such as configurations to the Apache configuration files, but I'm not sure what... | Securing your laptop for web development to ensure that it cannot be accessed from the outside world requires multiple layers of security. Here’s a step-by-step guide to help you achieve a secure environment:
### 1. **Disable Unused Services**
- Ensure that only essential services are running on your machine. Disab... | 13,589 | [
{
"from": "human",
"value": "I would like to use my laptop as a web development (PHP, Python, etc.) machine, but I'm hesitant to do this unless I can ensure that it can not be accessed by the outside world.\nI'm guessing that something more than a firewall is necessary, such as configurations to the Apache ... |
At work here, we have a box serving XML feeds to business partners. Requests for our feeds are customized by specifying query string parameters and values. Some of these parameters are required, but many are not.
For example, we've require all requests to specify a GUID to identify the partner, and a request can either... | Mapping complex query strings to more user-friendly RESTful URLs can indeed be a challenge, especially when you have multiple parameters with dependencies and exclusivities. Here are some recommended practices, conventions, and patterns to consider for structuring your URLs:
### 1. **Use Path Variables for Required Pa... | 22,477 | [
{
"from": "human",
"value": "At work here, we have a box serving XML feeds to business partners. Requests for our feeds are customized by specifying query string parameters and values. Some of these parameters are required, but many are not.\nFor example, we've require all requests to specify a GUID to iden... |
I've got two directories containing ~20 GB of music files (mostly mp3, some ogg), and I would like to detect all duplicate songs. There are two complicating factors:
A song may have different filenames in the two directories.
Two files containing the same song may have different ID3 tags and thus have different checks... | Detecting duplicate songs across two directories with different filenames and varying ID3 tags is a challenging task, but it can be tackled effectively. Here’s a structured approach you can take:
### Steps to Detect Duplicate Songs
1. **Normalize Audio Files**:
- Convert the audio files to a common format and bit... | 22,173 | [
{
"from": "human",
"value": "I've got two directories containing ~20 GB of music files (mostly mp3, some ogg), and I would like to detect all duplicate songs. There are two complicating factors:\n\nA song may have different filenames in the two directories.\nTwo files containing the same song may have diffe... |
I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe ... | The HTTP headers that a web server receives can vary significantly based on the user's operating system, browser, and various user-specific configurations. Below are examples of HTTP request headers from different combinations of operating systems and browsers. Keep in mind that headers can also change based on browser... | 21,428 | [
{
"from": "human",
"value": "I'm looking for all the current standard header values a web server would generally receive. An example would be things like \"what will the header look like when coming from a Mac running OS X Leopard and Camino installed?\" or \"what will the header look like when coming from... |
How can I read the colors of an image with python using google app engine?
Example: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it.
| To read the colors of an image using Python on Google App Engine, you can utilize libraries such as `PIL` (Python Imaging Library, available as `Pillow`) for image processing and `numpy` for numerical operations. The following steps outline how you can achieve this:
1. **Set Up Your Google App Engine Environment**: Ma... | 17,739 | [
{
"from": "human",
"value": "How can I read the colors of an image with python using google app engine?\nExample: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it.\n"
},
{
"from": "gpt",
"value": "To read the colors of an imag... |
i want to write code for unit test to test my application code. I have different methods and now want to test these methods one by one in python script.
but i do not how to i write. can any one give me example of small code for unit testing in python.
i am thankful
| Certainly! In Python, the built-in module `unittest` is commonly used for writing and running unit tests. Below is a simple example to illustrate how to write a unit test for a Python application.
### Sample Application Code
Let's say you have a simple calculator application with a few methods that you want to test:
... | 23,618 | [
{
"from": "human",
"value": "i want to write code for unit test to test my application code. I have different methods and now want to test these methods one by one in python script.\nbut i do not how to i write. can any one give me example of small code for unit testing in python.\ni am thankful \n"
},
... |
I currently have a silverlight application which rotates through several graphs of live data. Each page has two user controls though: one for an info box at the top and another for the graph to display. I have tried to add a background image to the master page that they are displayed on so that the image is behind ever... | To ensure that a background image in a Silverlight application is displayed behind your user controls, you can take a few steps to properly set up your layout. The main idea is to make sure your controls do not obscure the background image. Here are some possible approaches:
### 1. Set Background on the Root Container... | 24,854 | [
{
"from": "human",
"value": "I currently have a silverlight application which rotates through several graphs of live data. Each page has two user controls though: one for an info box at the top and another for the graph to display. I have tried to add a background image to the master page that they are disp... |
Below are lines from "the c++ programming language"
template<class T > T sqrt(T );
template<class T > complex<T> sqrt(complex<T>);
double sqrt(double);
void f(complex<double> z )
{
s q r t (2 ); // sqrt<int>(int)
sqrt(2.0) ; // sqrt(double)
sqrt(z) ; // sqrt<double>(complex<double>)
}
I dont understand why sqrt(z) ; c... | To understand why `sqrt(z)` calls `sqrt<double>(complex<double>)`, let's go through the key points of template specialization and function overloading in C++.
### Function Templates and Overloading
In C++, when you define a function template, you can create general forms of functions that can operate on any data type... | 23,619 | [
{
"from": "human",
"value": "Below are lines from \"the c++ programming language\"\ntemplate<class T > T sqrt(T );\ntemplate<class T > complex<T> sqrt(complex<T>);\ndouble sqrt(double);\nvoid f(complex<double> z )\n{\ns q r t (2 ); // sqrt<int>(int)\nsqrt(2.0) ; // sqrt(double)\nsqrt(z) ; // sqrt<double>(co... |
I'm experimenting with an updated build system at work; currently, I'm trying to find a good way to set compiler & flags depending on the target platform.
What I would like to do is something like
switch $(PLATFORM)_$(BUILD_TYPE)
case "Linux_x86_release"
CFLAGS = -O3
case "Linux_x86_debug"
CFLAGS = -O0 -... | Certainly! Instead of using separate files for each platform and build type, you can organize your GNU Makefile using a more structured approach. One way to accomplish this is to use a combination of conditional statements and variable definitions within a single Makefile. This can help you keep everything organized an... | 25,016 | [
{
"from": "human",
"value": "I'm experimenting with an updated build system at work; currently, I'm trying to find a good way to set compiler & flags depending on the target platform. \nWhat I would like to do is something like\nswitch $(PLATFORM)_$(BUILD_TYPE)\n case \"Linux_x86_release\"\n CFLAGS = -... |
I want to be able to introduce new 'tag lines' into a database that are shown 'randomly' to users. (These tag lines are shown as an introduction as animated text.)
Based upon the number of sales that result from those taglines I'd like the good ones to trickle to the top, but still show the others less frequently.
I co... | To create a statistically sound method for dynamically displaying taglines based on their conversion rates, you can use a simple algorithm that combines both exploration and exploitation strategies. This is often referred to as a multi-armed bandit problem in machine learning and optimization contexts. Here’s a suggest... | 21,967 | [
{
"from": "human",
"value": "I want to be able to introduce new 'tag lines' into a database that are shown 'randomly' to users. (These tag lines are shown as an introduction as animated text.)\nBased upon the number of sales that result from those taglines I'd like the good ones to trickle to the top, but s... |
We need to provide a solution to do performance testing for our Web Services residing in our development environment. We were planning to create the test scripts using the object model of Microsoft Web Application Stress Tool. I have researched and not been able to find any examples.
Can anyone, who may have perhaps u... | The Microsoft Web Application Stress Tool (WAST) is a legacy tool designed for performance testing of web applications. While it was once a common choice, it's worth noting that it hasn't been actively maintained for quite some time. Given its age and the rapid evolution of web technologies, you may want to consider mo... | 22,212 | [
{
"from": "human",
"value": "We need to provide a solution to do performance testing for our Web Services residing in our development environment. We were planning to create the test scripts using the object model of Microsoft Web Application Stress Tool. I have researched and not been able to find any exam... |
Is there a way to upload a file to a FTP server when behind an HTTP proxy ?
It seems that uploading a file is not supported behind an HTTP Proxy using .Net Webclient. (http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.proxy.aspx).
If there is no workaround ? If not, do you know a good and free FTP librar... | Uploading files to an FTP server when behind an HTTP proxy can indeed be challenging, as traditional FTP is not designed to work with HTTP proxies. However, there are a few approaches you can consider:
### Workarounds
1. **Use an FTP Proxy**: While you've mentioned that you don't have access to an FTP proxy, this is ... | 23,877 | [
{
"from": "human",
"value": "Is there a way to upload a file to a FTP server when behind an HTTP proxy ?\nIt seems that uploading a file is not supported behind an HTTP Proxy using .Net Webclient. (http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.proxy.aspx).\nIf there is no workaround ? If ... |
I need a way to represent a 2-D array (a dense matrix) of doubles in C++, with absolute minimum accessing overhead.
I've done some timing on various linux/unix machines and gcc versions. An STL vector of vectors, declared as:
vector<vector<double> > matrix(n,vector<double>(n));
and accessed through matrix[i][j] is be... | If you're looking for a way to represent a 2D array (dense matrix) of doubles in C++ using STL while minimizing access overhead, there are a few alternatives to `std::vector<std::vector<double>>` that maintain the benefits of STL without the access inefficiencies. Here are some recommendations:
1. **Use a 1D `std::vec... | 24,187 | [
{
"from": "human",
"value": "I need a way to represent a 2-D array (a dense matrix) of doubles in C++, with absolute minimum accessing overhead. \nI've done some timing on various linux/unix machines and gcc versions. An STL vector of vectors, declared as:\nvector<vector<double> > matrix(n,vector<double>(n)... |
This should a quick question for some easy rep.
I'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automatically uploading the PHP file I'm working on to my hosting... | Creating a batch file to automate FTP uploads is definitely feasible and can work well for your needs. Here’s a basic outline of how you can set it up:
1. **Create a Batch File**:
You can create a `.bat` file that uses the built-in Windows FTP command to connect to your server and upload files. Below is a simple ex... | 25,270 | [
{
"from": "human",
"value": "This should a quick question for some easy rep.\nI'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automatically uploading... |
The system I'm working on contains an address book. I am looking for sample code that will synchronize addresses with the current users address book through MAPI. I need two-way sync.
If you know of any open-source library with easy to use functions for this, I'd be glad to hear about it. If you know of a library that ... | Implementing a two-way sync with MAPI (Messaging Application Programming Interface) can be complex, especially if you want to support features like publishing an address book via a MAPI provider. Below are some recommendations for libraries as well as a simple example of how to interact with MAPI using vanilla code.
#... | 17,784 | [
{
"from": "human",
"value": "The system I'm working on contains an address book. I am looking for sample code that will synchronize addresses with the current users address book through MAPI. I need two-way sync.\nIf you know of any open-source library with easy to use functions for this, I'd be glad to hea... |
I am writing a program that has an AIR front-end, but a back-end written in another language (Python, in this case). Since AIR can't invoke other executables, the relationship has to be the other way around, with Python running an AIR subprocess. How can I locate the user's AIR runtime? I'd like to be able to do thi... | To locate the Adobe AIR runtime on various operating systems, you can follow the below guidelines for each platform (Mac, Windows, and Linux). Each OS has a standard location for installed applications, and you can typically find the AIR runtime in those directories.
### Windows
For Windows, the Adobe AIR runtime is u... | 24,432 | [
{
"from": "human",
"value": "I am writing a program that has an AIR front-end, but a back-end written in another language (Python, in this case). Since AIR can't invoke other executables, the relationship has to be the other way around, with Python running an AIR subprocess. How can I locate the user's AI... |
mysql5.0 with a pair of databases "A" and "B", both with large innodb tables. "drop database A;" freezes database "B" for a couple minutes. Nothing is using "A" at that point, so why is this such an intensive operation?
Bonus points: Given that we use "A", upload data into "B", and then switch to using "B", how can we ... | When you execute `DROP DATABASE A;` in MySQL, particularly with InnoDB storage engine, several factors can lead to a freeze or significant delay in operations on other databases, such as "B". Here are some reasons why this might happen:
1. **Locks and Transactions**: InnoDB uses a multi-version concurrency control (MV... | 23,413 | [
{
"from": "human",
"value": "mysql5.0 with a pair of databases \"A\" and \"B\", both with large innodb tables. \"drop database A;\" freezes database \"B\" for a couple minutes. Nothing is using \"A\" at that point, so why is this such an intensive operation?\nBonus points: Given that we use \"A\", upload da... |
I am receiving an error from the Oracle JDBC driver (ojdbc14_g.jar) when trying to obtain a connection to a 10g database. The driver has an oracle.jdbc.driver.OracleLog class which could help but the Oracle documentation is unclear how best to use it. Has anyone had any success using this class? If so, some guidance on... | The error message you are encountering, `java.sql.SQLException: No more data to read from socket`, typically indicates a network-related issue, a problem with the database configuration, or a version mismatch between the Oracle JDBC driver and the Oracle Database. Given that you are using `ojdbc14_g.jar` with a 10g dat... | 21,146 | [
{
"from": "human",
"value": "I am receiving an error from the Oracle JDBC driver (ojdbc14_g.jar) when trying to obtain a connection to a 10g database. The driver has an oracle.jdbc.driver.OracleLog class which could help but the Oracle documentation is unclear how best to use it. Has anyone had any success ... |
I'm trying to find a way to force Windows to reboot, and I am running into issues. I've tried
Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _
& "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_
& "Primary=true")
for each OpSys in OpSysSet
retVal = OpSys.Reboot()
nex... | If you're encountering issues with both the WMI method and the `shutdown` command not forcing the reboot as expected, you may need to try a few alternative approaches. Here are some suggestions you can implement in a script to force a reboot:
### 1. Using the Taskkill Command
If there are programs that prevent the re... | 17,149 | [
{
"from": "human",
"value": "I'm trying to find a way to force Windows to reboot, and I am running into issues. I've tried \nSet OpSysSet = GetObject(\"winmgmts:{authenticationlevel=Pkt,\" _\n & \"(Shutdown)}\").ExecQuery(\"select * from Win32_OperatingSystem where \"_\n & \"Primary=true\")\nfor e... |
I'm guessing this won't apply to 99.99% of anyone that sees this. I've been doing some Sawtooth survey programming at work and I've been needing to create a webpage that shows some aggregate data from the completed surveys. I was just wondering if anyone else has done this using the flat files that Sawtooth generates a... | Creating a webpage to display aggregate data from Sawtooth survey results can be done even with basic knowledge of Perl. Since your server does not support PHP, you can rely on Perl for processing and generating the HTML page.
Here’s a general approach you can follow:
### 1. **Understand Sawtooth Output Files**
- ... | 22,380 | [
{
"from": "human",
"value": "I'm guessing this won't apply to 99.99% of anyone that sees this. I've been doing some Sawtooth survey programming at work and I've been needing to create a webpage that shows some aggregate data from the completed surveys. I was just wondering if anyone else has done this using... |
There are a whole raft of questions regarding payment processors for web applications but I haven't seen one yet for desktop applications. What are your experiences?
Perhaps to put this into a little context, the requirements:
Should be customisable
Should be available in Australia at least, if not world wide (less cr... | When it comes to integrating payment processors for desktop applications, there are several options to consider that meet your requirements. Here are some recommendations based on your criteria:
### 1. **Stripe**
- **Customizable:** Stripe provides extensive APIs and SDKs that allow for high customization to fit your ... | 24,114 | [
{
"from": "human",
"value": "There are a whole raft of questions regarding payment processors for web applications but I haven't seen one yet for desktop applications. What are your experiences?\nPerhaps to put this into a little context, the requirements:\n\nShould be customisable\nShould be available in A... |
I developing ASP.NET application using a Swedish version of Windows XP and Visual studio Professional. When ever i get an error aka. "yellow screen of death" the error message is in swedish, making it a bit hard to search for info about it.
How can i change what language the error messages in ASP.NET uses?
I have no la... | To change the language of the error messages in your ASP.NET application from Swedish to English, you can try the following steps:
1. **Set the Culture and UI Culture in Web.config**: You already have set the `uiCulture` to `en-US`. However, make sure that you also set the `culture` attribute as well. Update your `<sy... | 25,550 | [
{
"from": "human",
"value": "I developing ASP.NET application using a Swedish version of Windows XP and Visual studio Professional. When ever i get an error aka. \"yellow screen of death\" the error message is in swedish, making it a bit hard to search for info about it.\nHow can i change what language the ... |
Using Vim, I'm trying to pipe text selected in visual mode to a UNIX command and have the output appended to the end of the current file. For example, say we have a SQL command such as:
SELECT * FROM mytable;
I want to do something like the following:
<ESC>
V " select text
:'<,'>!mysql -uuser -ppass my... | To achieve your goal of piping text selected in visual mode to a UNIX command and appending the output to the end of the current file in Vim, you can use a combination of commands. Specifically, after executing your SQL command, you will need to append the output to the file instead of replacing the selected text.
Her... | 23,964 | [
{
"from": "human",
"value": "Using Vim, I'm trying to pipe text selected in visual mode to a UNIX command and have the output appended to the end of the current file. For example, say we have a SQL command such as:\nSELECT * FROM mytable;\n\nI want to do something like the following:\n<ESC>\nV ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.