instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
In the next few months I will be resurrecting a project which made extensive use of Orpheus and SysTools. The development system I used is long gone, so would like to update the libraries to my current development environment.
My question(s): is anyone porting, or has anyone ported the TurboPower libraries to Tiburon, ... | As of my last knowledge update in October 2023, there hasn’t been an extensive, organized effort to port TurboPower libraries like Orpheus and SysTools specifically to Delphi 2009 (Tiburon). However, the community around Delphi has often been proactive about maintaining and updating legacy libraries, especially those t... | 12,950 | [
{
"from": "human",
"value": "In the next few months I will be resurrecting a project which made extensive use of Orpheus and SysTools. The development system I used is long gone, so would like to update the libraries to my current development environment.\nMy question(s): is anyone porting, or has anyone po... |
I've tried this, but get a ClassNotFoundException when calling:
Class.forName("com.AClass", false, mySpecialLoader)
| A `ClassNotFoundException` indicates that the Java Virtual Machine (JVM) or the class loader (in this case, `mySpecialLoader`) is unable to locate the class `com.AClass`. Here are some steps to troubleshoot and resolve the issue:
1. **Verify Class Name and Package**:
Ensure that the class name and package are corre... | 10,224 | [
{
"from": "human",
"value": "I've tried this, but get a ClassNotFoundException when calling:\nClass.forName(\"com.AClass\", false, mySpecialLoader)\n\n"
},
{
"from": "gpt",
"value": "A `ClassNotFoundException` indicates that the Java Virtual Machine (JVM) or the class loader (in this case, `mySp... |
I've been trying to figure out how to print in Adobe AIR. I know the standard javascript functions don't work. The AIRforJSDev guide says:
"The window.print() method is not supported within Adobe
AIR 1.0. There are other methods available via the exposed AIRAPIs that give you access to printing within the runtime"
But... | In Adobe AIR, the `window.print()` method is indeed not supported, and printing must be handled differently using the AIR APIs. For printing in Adobe AIR, you can use the `flash.printing.PrintJob` class, which provides methods to create and manage print jobs.
Here's a basic example of how to use the `PrintJob` class t... | 13,067 | [
{
"from": "human",
"value": "I've been trying to figure out how to print in Adobe AIR. I know the standard javascript functions don't work. The AIRforJSDev guide says:\n\"The window.print() method is not supported within Adobe \nAIR 1.0. There are other methods available via the exposed AIRAPIs that give yo... |
I want to convert various location/date/times in history from GMT to local time. It seems that SystemTimeToTzSpecificLocalTime is better than FileTimeToLocalFileTime. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at ftp://ftp.iana.org/tz/releases — was ftp://... | Handling historical time zone data and converting between GMT and local times can indeed be quite complex, especially when you need to account for variations over time, such as Daylight Saving Time changes and local time zone definitions. Unfortunately, the Windows API provides limited support for historical time zone ... | 6,366 | [
{
"from": "human",
"value": "I want to convert various location/date/times in history from GMT to local time. It seems that SystemTimeToTzSpecificLocalTime is better than FileTimeToLocalFileTime. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at ft... |
My team has a command parsing library for console apps. Each team around us has their own as well. There isn't anything in the BCL so I suppose this is natural.
I've looked at the the module in Mono, which seems solid, and the one on CodePlex looks fine as well. There are probably others out there that will work (and I... | Standardizing on a single command parsing library across teams can provide significant benefits, such as reducing duplication of effort, ensuring consistency in how commands are handled, and simplifying maintenance. Here are some steps you can take to facilitate this process:
1. **Identify the Benefits**: Start by out... | 13,785 | [
{
"from": "human",
"value": "My team has a command parsing library for console apps. Each team around us has their own as well. There isn't anything in the BCL so I suppose this is natural.\nI've looked at the the module in Mono, which seems solid, and the one on CodePlex looks fine as well. There are proba... |
I am toying with the idea of creating an completely new operating system and would like to hear what everyone on this forums take is on that? First is it too late are the big boys so entrenched in our lives that we will never be able to switch (wow - what a terrible thought...). But if this is not the case, what shou... | Creating a new operating system is an ambitious and exciting project! Here are some thoughts to consider regarding your idea:
### 1. **Market Viability and Competition**
- **Established Giants:** Yes, the major operating systems (Windows, macOS, and Linux distributions) are very entrenched. However, there is always ro... | 13,088 | [
{
"from": "human",
"value": "I am toying with the idea of creating an completely new operating system and would like to hear what everyone on this forums take is on that? First is it too late are the big boys so entrenched in our lives that we will never be able to switch (wow - what a terrible thought...)... |
I basically have an xml column, and I need to find and replace one tag value in each record.
| If you're working with an XML column in a SQL database and you want to find and replace the value of a specific tag in each record, you can typically use the built-in XML manipulation functions provided by your database management system (DBMS).
Here's a general approach for SQL Server, PostgreSQL, and Oracle.
### SQ... | 14,773 | [
{
"from": "human",
"value": "I basically have an xml column, and I need to find and replace one tag value in each record.\n"
},
{
"from": "gpt",
"value": "If you're working with an XML column in a SQL database and you want to find and replace the value of a specific tag in each record, you can t... |
I'm using jQuery to add an additional row to a table as the last row.
I have done it this way:
$('#myTable').append('<tr><td>my data</td><td>more data</td></tr>');
Are there limitations to what you can add to a table like this (such as inputs, selects, number of rows)? Is there a different way to do it?
| Using jQuery's `append()` method to add a new row to a table works perfectly fine, and you can indeed include various HTML elements within the table cells, such as `<input>`, `<select>`, and others. However, there are some considerations to keep in mind regarding what you can add, how you add it, and potential limitati... | 14,601 | [
{
"from": "human",
"value": "I'm using jQuery to add an additional row to a table as the last row.\nI have done it this way:\n$('#myTable').append('<tr><td>my data</td><td>more data</td></tr>');\n\nAre there limitations to what you can add to a table like this (such as inputs, selects, number of rows)? Is t... |
People keep giving me examples with carp instead of warn. Why? What makes carp better than warn?
| It seems there might be a misunderstanding in the context of your question. The terms "carp" and "warn" serve different functions and meanings, which could lead to confusion if they are used interchangeably.
- **Carp**: As a verb, "carp" means to complain or find fault in a petty or nagging way. It can imply a constan... | 17,190 | [
{
"from": "human",
"value": "People keep giving me examples with carp instead of warn. Why? What makes carp better than warn?\n"
},
{
"from": "gpt",
"value": "It seems there might be a misunderstanding in the context of your question. The terms \"carp\" and \"warn\" serve different functions a... |
I have the need to be able to cycle my linksys router via a program, the reason I want to do this is complex, so let's just assume there is no better option.
Is there anyway to do this? I think there is because when I install a firmware update to the router via the admin console, it cycles the router.
| Yes, it's possible to programmatically cycle your Linksys router by performing a reboot operation through the router's web interface. Depending on the model of your Linksys router, you can achieve this by using different methods, such as HTTP requests or utilizing SSH/Telnet if your router supports it. Below are a coup... | 12,362 | [
{
"from": "human",
"value": "I have the need to be able to cycle my linksys router via a program, the reason I want to do this is complex, so let's just assume there is no better option.\nIs there anyway to do this? I think there is because when I install a firmware update to the router via the admin conso... |
I'm maintaining the Perl Beginners' Site and used a modified template from Open Source Web Designs. Now, the problem is that I still have an undesired artifact: a gray line on the left side of the main frame, to the left of the navigation menu. Here's an image highlighting the undesired effect.
How can I fix the CSS to... | To remove the gray line on the left side of the main frame, you'll need to inspect the CSS that is applied to the navigation menu and the surrounding elements. Here are some common steps to troubleshoot and fix this issue:
1. **Inspect the Element**: Use your browser’s developer tools (right-click on the gray line and... | 13,705 | [
{
"from": "human",
"value": "I'm maintaining the Perl Beginners' Site and used a modified template from Open Source Web Designs. Now, the problem is that I still have an undesired artifact: a gray line on the left side of the main frame, to the left of the navigation menu. Here's an image highlighting the u... |
I need to match and remove all tags using a regular expression in Perl. I have the following:
<\\??(?!p).+?>
But this still matches with the closing </p> tag. Any hint on how to match with the closing tag as well?
Note, this is being performed on xhtml.
| To match and remove all tags except for the `<p>` tags in XHTML using a regular expression in Perl, you can modify your regex to account for both the opening and closing tags. The original regex `<\\??(?!p).+?>` is designed to match opening tags but does not cover closing tags effectively.
Here is a revised regex patt... | 9,161 | [
{
"from": "human",
"value": "I need to match and remove all tags using a regular expression in Perl. I have the following:\n<\\\\??(?!p).+?>\n\nBut this still matches with the closing </p> tag. Any hint on how to match with the closing tag as well?\nNote, this is being performed on xhtml.\n"
},
{
... |
Just bought a 2.4GHz Intel Core 2 Duo iMac with 2GB of memory and a 320GB hard drive. I plan on doing some .net development on it using a BootCamp/VMWare combo since VMWare grants access to the bootcamp partition.
What is a recommended size for a BootCamp partition and how much memory should I give VMWare? Any pitfalls... | Setting up a Boot Camp partition along with VMWare on your iMac can be a good way to run Windows applications and perform .NET development. Here are some recommendations regarding partition size, memory allocation, and potential pitfalls:
### Recommended Boot Camp Partition Size
1. **Size**: A good starting point for ... | 8,191 | [
{
"from": "human",
"value": "Just bought a 2.4GHz Intel Core 2 Duo iMac with 2GB of memory and a 320GB hard drive. I plan on doing some .net development on it using a BootCamp/VMWare combo since VMWare grants access to the bootcamp partition.\nWhat is a recommended size for a BootCamp partition and how much... |
I have an XML file in the following format:
<categories>
<category id="1"></category>
<category id="2">
<category id="3"></category>
<category id="4">
<category id="5"></category>
</category>
</category>
</categories>
Can anyone please give me some direction on how I might traverse the file usi... | To traverse an XML file in C#, you can utilize the `System.Xml` namespace which provides classes such as `XmlDocument`, `XmlNode`, and `XmlNodeList`. Below is an example of how you can load the XML content and traverse it using `XmlDocument`.
### Step 1: Load the XML
You can load the XML file into an `XmlDocument`. I... | 14,391 | [
{
"from": "human",
"value": "I have an XML file in the following format:\n<categories>\n <category id=\"1\"></category>\n <category id=\"2\">\n <category id=\"3\"></category>\n <category id=\"4\">\n <category id=\"5\"></category>\n </category>\n </category>\n</categories>\n\nCan anyone plea... |
I'm posting this in the spirit of answering your own questions.
The question I had was: How can I implement the Levenshtein algorithm for calculating edit-distance between two strings, as described here, in Delphi?
Just a note on performance:
This thing is very fast. On my desktop (2.33 Ghz dual-core, 2GB ram, WinXP),... | Implementing the Levenshtein algorithm in Delphi is quite straightforward. The algorithm calculates the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one string into another. Here's a Delphi implementation of the Levenshtein algorithm that you can use:
```delphi
... | 12,391 | [
{
"from": "human",
"value": "I'm posting this in the spirit of answering your own questions.\nThe question I had was: How can I implement the Levenshtein algorithm for calculating edit-distance between two strings, as described here, in Delphi?\nJust a note on performance:\nThis thing is very fast. On my d... |
For example, I have an ASP.NET form that is called by another aspx:
string url = "http://somewhere.com?P1=" + Request["param"];
Response.Write(url);
I want to do something like this:
string url = "http://somewhere.com?P1=" + Request["param"];
string str = GetResponse(url);
if (str...) {}
I need to get whatever Respon... | To achieve the functionality where you want to make an HTTP request to a URL and manipulate the response in an ASP.NET application, you can use the `HttpClient` class available in .NET. This allows you to send HTTP requests and receive HTTP responses from a resource identified by a URI.
Here's how you can implement th... | 11,795 | [
{
"from": "human",
"value": "For example, I have an ASP.NET form that is called by another aspx:\nstring url = \"http://somewhere.com?P1=\" + Request[\"param\"];\nResponse.Write(url);\n\nI want to do something like this:\nstring url = \"http://somewhere.com?P1=\" + Request[\"param\"];\nstring str = GetRespo... |
I mean, how does Java decide which protocols are available? I run some code from inside Eclipse, and it works just fine. Then I run the same code from outside Eclipse, and I get "unknown protocol" MalformedURLException. Probably it has to do with the code base, or something? Any hints would be helpful.
Thanks!
| The issue you're encountering with the "unknown protocol" `MalformedURLException` is likely related to how your Java environment is configured, including the classpath and the availability of protocol handlers.
### Here are a few things to consider:
1. **Classpath Differences**:
- When you run your code inside Ecl... | 12,702 | [
{
"from": "human",
"value": "I mean, how does Java decide which protocols are available? I run some code from inside Eclipse, and it works just fine. Then I run the same code from outside Eclipse, and I get \"unknown protocol\" MalformedURLException. Probably it has to do with the code base, or something? A... |
I know this is a dumb question. For some reason my mind is blank on this. Any ideas?
Sorry should have been more clear.
Using a HtmlGenericControl to pull in link description as well as image.
private void InternalCreateChildControls()
{
if (this.DataItem != null && this.Relationships.Count > 0)
... | It's completely understandable to feel stuck sometimes, especially when working with code! It looks like you're trying to create a list of items with both an image and a description (the `DisplayName`) in a web control. I can help guide you on how to incorporate an image along with the link and any additional descripti... | 13,344 | [
{
"from": "human",
"value": "I know this is a dumb question. For some reason my mind is blank on this. Any ideas?\nSorry should have been more clear. \nUsing a HtmlGenericControl to pull in link description as well as image. \n private void InternalCreateChildControls()\n {\n if (this.DataItem != ... |
I want to change the standard "3D" look of the standard asp.net checkbox to say solid 1px. If I try to apply the styling to the Border for example it does just that - draws the standard checkbox with a border around it - which is valid I guess.
Anyway, is there a way to change how the actual textbox is styled?
| To change the appearance of a standard ASP.NET checkbox (or any checkbox in HTML) to look more like a solid checkbox with a 1px solid border, you'll need to apply some custom CSS. However, it's important to note that checkbox elements are rendered by the browser, and their appearance can vary. Because of this, it may n... | 13,048 | [
{
"from": "human",
"value": "I want to change the standard \"3D\" look of the standard asp.net checkbox to say solid 1px. If I try to apply the styling to the Border for example it does just that - draws the standard checkbox with a border around it - which is valid I guess.\nAnyway, is there a way to chang... |
When I commit I get this error from Subversion:
bash-2.05b$ svn commit -m "testing subversion, still"
Adding baz
svn: Commit failed (details follow):
svn: MKCOL of '/viper/!svn/wrk/6b9bcd38-b2fe-0310-95ff-9d1a44098866/sandboxes/ohammersmith/trunk/baz': 405 Method Not Allowed (http://svn.example.com)
| The error message you're encountering during the Subversion (SVN) commit operation indicates that the server is not allowing the `MKCOL` method, which is used to create a new collection (directory) in Subversion's versioning system. Here's how you can troubleshoot and potentially resolve this issue:
1. **Check Server ... | 14,835 | [
{
"from": "human",
"value": "When I commit I get this error from Subversion:\nbash-2.05b$ svn commit -m \"testing subversion, still\"\nAdding baz\nsvn: Commit failed (details follow):\nsvn: MKCOL of '/viper/!svn/wrk/6b9bcd38-b2fe-0310-95ff-9d1a44098866/sandboxes/ohammersmith/trunk/baz': 405 Method N... |
I have VB6 application , I want to put some good error handling finction in it which can tell me what was the error and exact place when it happened , can anyone suggest the good way to do this
| Adding robust error handling to a VB6 application can significantly improve your ability to diagnose issues when they arise. Below are steps and examples to implement effective error handling:
### 1. Basic Structure of Error Handling in VB6
VB6 provides the `On Error` statement for error handling. The general structu... | 10,072 | [
{
"from": "human",
"value": "I have VB6 application , I want to put some good error handling finction in it which can tell me what was the error and exact place when it happened , can anyone suggest the good way to do this \n"
},
{
"from": "gpt",
"value": "Adding robust error handling to a VB6 ... |
Beside the obvious person to person instant message chat, What else have you used a Jabber server's functionality to enable?
Edit: links to working code to really show it off are particularly useful - and will be more likely to be voted up.
| Jabber (also known as XMPP - Extensible Messaging and Presence Protocol) servers can be used for a variety of functionalities beyond just instant messaging. Here are a few interesting applications of Jabber/XMPP server capabilities, along with links to working code examples:
### 1. **Group Chat Rooms (Multi-User Chat)... | 12,378 | [
{
"from": "human",
"value": "Beside the obvious person to person instant message chat, What else have you used a Jabber server's functionality to enable?\nEdit: links to working code to really show it off are particularly useful - and will be more likely to be voted up.\n"
},
{
"from": "gpt",
"v... |
I'm wondering how you'd implement the following use-case in REST. Is it even possible to do without compromising the conceptual model?
Read or update multiple resources within the scope of a single transaction. For example, transfer $100 from Bob's bank account into John's account.
As far as I can tell, the only way to... | You've touched on a nuanced aspect of REST and its relationship to transactions, particularly in use cases like transferring money between accounts. Let's dive into your concerns and explore possible approaches while considering the principles of REST.
### RESTful Principles
REST (Representational State Transfer) is ... | 13,055 | [
{
"from": "human",
"value": "I'm wondering how you'd implement the following use-case in REST. Is it even possible to do without compromising the conceptual model?\nRead or update multiple resources within the scope of a single transaction. For example, transfer $100 from Bob's bank account into John's acco... |
I want to know if people here typically disable SELinux on installations where it is on by default? If so can you explain why, what kind of system it was, etc?
I'd like to get as many opinions on this as possible.
| Disabling SELinux (Security-Enhanced Linux) is a topic that generates varied opinions within the Linux community. Below are some common reasons why administrators might choose to disable SELinux, along with insights into the contexts in which this might happen:
### Reasons for Disabling SELinux:
1. **Simplicity and U... | 10,615 | [
{
"from": "human",
"value": "I want to know if people here typically disable SELinux on installations where it is on by default? If so can you explain why, what kind of system it was, etc?\nI'd like to get as many opinions on this as possible.\n"
},
{
"from": "gpt",
"value": "Disabling SELinux (... |
I figured someone can answer the question generally but if anyone wants to get specific I am trying to use:
using System.Web.Security.SingleSignOn;
using System.Web.Security.SingleSignOn.Authorization;
I've googled my brains out and this is the closest answer I found:
"We discussed this offline, but it looks like the A... | The confusion you're experiencing seems to stem from the use of certain assemblies that are included in the Global Assembly Cache (GAC) but not easily accessible in your development environment. Here's a breakdown of the steps you might need to take to use the `System.Web.Security.SingleSignOn` and related namespaces i... | 14,171 | [
{
"from": "human",
"value": "I figured someone can answer the question generally but if anyone wants to get specific I am trying to use:\nusing System.Web.Security.SingleSignOn;\nusing System.Web.Security.SingleSignOn.Authorization;\nI've googled my brains out and this is the closest answer I found:\n\"We d... |
Do you know how I can switch on/off (blink) Macbook keyboard led (caps lock,numlock) under Mac OS X (preferably Tiger)?
I've googled for this, but have got no results, so I am asking for help.
I would like to add this feature as notifications (eg. new message received on Adium, new mail received).
I would prefer apples... | Unfortunately, macOS, including older versions like Tiger, does not provide an official way to control the keyboard LED indicators (such as Caps Lock and Num Lock) programmatically through AppleScript or Python. The behavior of these LEDs is generally managed by the system hardware and drivers, and there's no public AP... | 15,279 | [
{
"from": "human",
"value": "Do you know how I can switch on/off (blink) Macbook keyboard led (caps lock,numlock) under Mac OS X (preferably Tiger)?\nI've googled for this, but have got no results, so I am asking for help.\nI would like to add this feature as notifications (eg. new message received on Adium... |
How do I set an attribute on a field anywhere in my assembly, then reflect on those field attributes in my entire assembly and get/set the field values that the attribute is attached too?
| To set an attribute on a field anywhere in your assembly and then reflect on those field attributes, you can follow these steps:
1. **Define a custom attribute**.
2. **Apply the attribute to fields** in your classes.
3. **Use reflection** to inspect the fields and their attributes, and retrieve or set the values of th... | 12,697 | [
{
"from": "human",
"value": "How do I set an attribute on a field anywhere in my assembly, then reflect on those field attributes in my entire assembly and get/set the field values that the attribute is attached too?\n"
},
{
"from": "gpt",
"value": "To set an attribute on a field anywhere in you... |
I've created a ListBox to display items in groups, where the groups are wrapped right to left when they can no longer fit within the height of the ListBox's panel. So, the groups would appear similar to this in the listbox, where each group's height is arbitrary (group 1, for instance, is twice as tall as group 2):
[ 1... | The issue you're encountering arises from the fact that the `Height` property binding you've set for the `WrapPanel` can lead to the scrollable area being incorrectly calculated, causing the vertical scrollbar not to appear when necessary. The `WrapPanel` effectively has its height constrained to the height of the `Lis... | 13,284 | [
{
"from": "human",
"value": "I've created a ListBox to display items in groups, where the groups are wrapped right to left when they can no longer fit within the height of the ListBox's panel. So, the groups would appear similar to this in the listbox, where each group's height is arbitrary (group 1, for in... |
I am fascinated by the performance of applications such as "Rollercoaster Tycoon" and "The Sims" and FPS games. I would like to know more about the basic application architecture. (Not so concerned with the UI - I assume MVC/MVP piriciples apply here. Nor am I concerned with the math and physics at this point.)
My ma... | In games like "Rollercoaster Tycoon," "The Sims," and many FPS (First-Person Shooter) games, managing a large number of entities—such as characters, vehicles, and items—efficiently is crucial for performance and a smooth user experience. Here’s an overview of how these entities are typically handled in terms of archite... | 10,993 | [
{
"from": "human",
"value": "I am fascinated by the performance of applications such as \"Rollercoaster Tycoon\" and \"The Sims\" and FPS games. I would like to know more about the basic application architecture. (Not so concerned with the UI - I assume MVC/MVP piriciples apply here. Nor am I concerned wi... |
I have an ASP.Net 2.0 web site, using the DotNetNuke framework (4.09), and it will not compile, but when I hit the site in a browser, it works. Even the parts that don't compile will work. How is IIS able to compile and run this site, when Visual Studio can't? Everything is the same in both places... I copied the entir... | The scenario you're experiencing is related to how ASP.NET and IIS (Internet Information Services) manage compilation and execution of web applications. Here are several key points that might explain why your site runs on IIS despite not compiling in Visual Studio:
1. **Dynamic Compilation**: ASP.NET uses a feature ca... | 11,591 | [
{
"from": "human",
"value": "I have an ASP.Net 2.0 web site, using the DotNetNuke framework (4.09), and it will not compile, but when I hit the site in a browser, it works. Even the parts that don't compile will work. How is IIS able to compile and run this site, when Visual Studio can't? Everything is the ... |
I got this síngleton cache object and it exposes an IEnumerable property which just returns a private IEnumerable variable.
I have a static method on my singleton object that updates this member variable (that exists on the single 'Instance' instance of this cache object).
Let's say some thread is currently iterating ... | In your implementation of `SektionCache`, you've established a pattern to update a private `IEnumerable<Sektion>` variable safely, using a new local variable for the updated data and then assigning that to the private variable. However, your concern regarding threads iterating over the `IEnumerable` while it is being u... | 9,224 | [
{
"from": "human",
"value": "I got this síngleton cache object and it exposes an IEnumerable property which just returns a private IEnumerable variable.\nI have a static method on my singleton object that updates this member variable (that exists on the single 'Instance' instance of this cache object).\nLe... |
My Google-fu is failing me on this question.
I have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like var.
He has the 3.0 and 3.5 frameworks installed, as well as the Visual Stu... | Unfortunately, Visual Studio 2005 does not support C# 3.0 features, which were introduced in Visual Studio 2008. The `var` keyword and other C# 3.0 features like extension methods, anonymous types, and LINQ will cause compilation errors in Visual Studio 2005, as it only supports up to C# 2.0.
Since Visual Studio 2005 ... | 14,851 | [
{
"from": "human",
"value": "My Google-fu is failing me on this question.\nI have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like var.\nHe has the 3.0 and 3.5 fram... |
I'm looking for a free, preferably open source, http image processing server. I.e. I would send it a request like this:
http://myimageserver/rotate?url=http%3A%2F%2Fstackoverflow.com%2FContent%2FImg%2Fstackoverflow-logo-250.png&angle=90
and it would return that image rotated. Features wanted:
Server-side caching
Seve... | You have several options for setting up a free and open-source HTTP image processing server with the features you're looking for. Here are a few popular choices that can be configured to meet your requirements:
1. **ImageMagick with a Custom Web Server**:
- **Description**: ImageMagick is a powerful command-line to... | 12,780 | [
{
"from": "human",
"value": "I'm looking for a free, preferably open source, http image processing server. I.e. I would send it a request like this:\nhttp://myimageserver/rotate?url=http%3A%2F%2Fstackoverflow.com%2FContent%2FImg%2Fstackoverflow-logo-250.png&angle=90\n\nand it would return that image rotated... |
With the new approach of having the get/set within the attribut of the class like that :
public string FirstName {
get; set;
}
Why simply not simply put the attribute FirstName public without accessor?
| Using properties (like `public string FirstName { get; set; }`) instead of public fields (like `public string FirstName;`) in C# has several advantages. Here are some reasons why properties are preferred:
1. **Encapsulation**: Properties allow you to encapsulate the behavior of getting and setting a value. You can add... | 15,461 | [
{
"from": "human",
"value": "With the new approach of having the get/set within the attribut of the class like that :\npublic string FirstName {\n get; set;\n }\n\nWhy simply not simply put the attribute FirstName public without accessor?\n"
},
{
"from": "gpt",
"value": "Using properti... |
I have a matrix in SQL reporting and I would like it to print on an A4 page. If the matrix has less than 4 columns then it fits but for more than 4 columns I would like the matrix to wrap and show only 4 columns per page. Is this possible? I am using SQL Reporting 2005 in localmode.
| In SQL Server Reporting Services (SSRS) 2005, achieving a layout where a matrix wraps around and displays only a certain number of columns per page (in your case, 4 columns) can be a bit tricky. SSRS does not provide built-in functionality for automatic wrapping of matrix columns based on the page size or constraints d... | 12,002 | [
{
"from": "human",
"value": "I have a matrix in SQL reporting and I would like it to print on an A4 page. If the matrix has less than 4 columns then it fits but for more than 4 columns I would like the matrix to wrap and show only 4 columns per page. Is this possible? I am using SQL Reporting 2005 in localm... |
I need to display additional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.
I now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList, using OnSelectedIndexChanged and AutoPostBack. What I would like to do, is trig... | To achieve the functionality of displaying additional information in a tooltip when a user hovers over an item in a `RadioButtonList`, you can use a combination of JavaScript (or jQuery) for mouse events and ASP.NET for the data handling. Since you're aiming to display a tooltip with around 500-600 characters, it's cru... | 11,859 | [
{
"from": "human",
"value": "I need to display additional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.\nI now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList, using OnSelectedIndexChanged and Auto... |
The set up for apache-jmeter allows for a URL to be sent to a web-server on multiple threads. I'm interested in first determining if the response codes are 200-500 and then whether the returned content is the expected content. Is this detailed configuration possible?
| Yes, Apache JMeter is capable of performing such detailed testing and validation of web server responses. You can configure JMeter to send requests to a web server using multiple threads and check both the response codes and the content of the responses. Below are the steps to set up this configuration:
### Step 1: Do... | 11,943 | [
{
"from": "human",
"value": "The set up for apache-jmeter allows for a URL to be sent to a web-server on multiple threads. I'm interested in first determining if the response codes are 200-500 and then whether the returned content is the expected content. Is this detailed configuration possible?\n"
},
... |
I use the recent Ganymede release of Eclipse, specifically the distro for Java EE and web developers. I have installed a few additional plugins (e.g. Subclipse, Spring, FindBugs) and removed all the Mylyn plugins.
I don't do anything particularly heavy-duty within Eclipse such as starting an app server or connecting t... | Eclipse can indeed consume a considerable amount of memory, and there are several factors that can contribute to its high memory usage, including the number of installed plugins, the complexity of the projects you're working with, and the way Java manages memory. Here are some suggestions to help you reduce Eclipse's m... | 11,283 | [
{
"from": "human",
"value": "I use the recent Ganymede release of Eclipse, specifically the distro for Java EE and web developers. I have installed a few additional plugins (e.g. Subclipse, Spring, FindBugs) and removed all the Mylyn plugins. \nI don't do anything particularly heavy-duty within Eclipse such... |
With a huge influx of newbies to Xcode, I'm sure there are lots of Xcode tips and tricks to be shared.
What are yours?
| Absolutely! Xcode can be quite a complex IDE, especially for newcomers. Here are some tips and tricks to help you navigate it more effectively:
### General Tips:
1. **Keyboard Shortcuts**: Familiarize yourself with Xcode's keyboard shortcuts to speed up your workflow. For example:
- `Command + B`: Build the project... | 11,741 | [
{
"from": "human",
"value": "With a huge influx of newbies to Xcode, I'm sure there are lots of Xcode tips and tricks to be shared.\nWhat are yours? \n"
},
{
"from": "gpt",
"value": "Absolutely! Xcode can be quite a complex IDE, especially for newcomers. Here are some tips and tricks to help you... |
(The original question was asked there : http://www.ogre3d.org/phpBB2/viewtopic.php?t=44832 )
Someone asked :
"While I would like to build everything in vs2008 (VC9), the PhysX SDK is built with vs2005 (VC8). Would this cause any problems, using all vc9 compiled libs and used in combination with this vc8 lib?"
I answe... | The compatibility of libraries compiled with different versions of Visual Studio (VC8 for VS2005 and VC9 for VS2008) can indeed be problematic due to changes in the runtime library, name mangling, and other factors. Here’s a breakdown of some important points regarding this issue:
1. **Binary Compatibility**: Microsof... | 15,207 | [
{
"from": "human",
"value": "(The original question was asked there : http://www.ogre3d.org/phpBB2/viewtopic.php?t=44832 )\nSomeone asked : \n\"While I would like to build everything in vs2008 (VC9), the PhysX SDK is built with vs2005 (VC8). Would this cause any problems, using all vc9 compiled libs and use... |
I've got an asp.net ajax style AccordionPane control that I am trying to get/set based on some user interactions. However it seems not let me do this with javascript:
function navPanelMove() {
var aPane = $get('ctl00_Accordion1_AccordionExtender_ClientState');
openPaneID = aPane.get_SelectedIndex(); // doesn't... | The problem you're facing may arise because the `AccordionPane` control might not expose its selected index directly through the client-side object model. In ASP.NET AJAX, sometimes the client-side objects are not well-documented, and you might need to find the right property or method to access the currently selected ... | 13,639 | [
{
"from": "human",
"value": "I've got an asp.net ajax style AccordionPane control that I am trying to get/set based on some user interactions. However it seems not let me do this with javascript:\nfunction navPanelMove() { \n var aPane = $get('ctl00_Accordion1_AccordionExtender_ClientState'); \n openPan... |
I am having a bit of a problem.
I get a RAW char* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times.
The buffer data I receive from the camera does not contain any EXIF information, a... | If you need to add EXIF metadata directly to a RAW `char*` buffer from a camera without writing it to disk first, you can do this by modifying the buffer directly. However, this requires a good understanding of the file format of the RAW image and how EXIF data is structured within it.
Here’s a general outline of how ... | 9,345 | [
{
"from": "human",
"value": "I am having a bit of a problem.\nI get a RAW char* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times.\nThe buffer data I receive from the came... |
If by some miracle a segfault occurs in our program, I want to catch the SIGSEGV and let the user (possibly a GUI client) know with a single return code that a serious problem has occurred. At the same time I would like to display information on the command line to show which signal was caught.
Today our signal handle... | Yes, handling signals in C++ (especially POSIX signals like `SIGSEGV`) can be tricky, primarily due to the limitations on what can be safely executed within a signal handler. In your current implementation, calling `std::cerr` from a signal handler is indeed problematic because `std::cerr` is not a reentrant function. ... | 15,048 | [
{
"from": "human",
"value": "If by some miracle a segfault occurs in our program, I want to catch the SIGSEGV and let the user (possibly a GUI client) know with a single return code that a serious problem has occurred. At the same time I would like to display information on the command line to show which s... |
My everyday IDE is Eclipse which has a wonderful Open Resource feature (CTRL+SHIFT+R or Navigate > Open Resource) which allows the user to search for files/resources across multiple projects.
I can't find a similar feature in SQL Server Management Studio, is there one?
| SQL Server Management Studio (SSMS) does not have a direct equivalent to Eclipse's "Open Resource" feature that allows you to search for files across multiple projects. However, there are some ways you can work around this limitation:
1. **Object Explorer**: You can use the Object Explorer in SSMS to browse databases ... | 16,048 | [
{
"from": "human",
"value": "My everyday IDE is Eclipse which has a wonderful Open Resource feature (CTRL+SHIFT+R or Navigate > Open Resource) which allows the user to search for files/resources across multiple projects.\nI can't find a similar feature in SQL Server Management Studio, is there one?\n"
},
... |
Using the Sun Java VM 1.5 or 1.6 on Windows, I connect a non-blocking socket. I then fill a ByteBuffer with a message to output, and attempt to write() to the SocketChannel.
I expect the write to complete only partially if the amount to be written is greater than the amount of space in the socket's TCP output buffer (... | The behavior you're encountering when using the Java NIO `SocketChannel` and writing to it can be a little misleading, especially if you expect that the write operation will behave similarly to how you may expect with standard blocking I/O operations.
Here are a few key points to understand:
1. **Non-Blocking vs. Blo... | 13,663 | [
{
"from": "human",
"value": "Using the Sun Java VM 1.5 or 1.6 on Windows, I connect a non-blocking socket. I then fill a ByteBuffer with a message to output, and attempt to write() to the SocketChannel.\nI expect the write to complete only partially if the amount to be written is greater than the amount of... |
When designing a database to use MVCC (Multi-Version Concurrency Control), you create tables with either a boolean field like "IsLatest" or an integer "VersionId", and you never do any updates, you only insert new records when things change.
MVCC gives you automatic auditing for applications that require a detailed h... | When considering an MVCC (Multi-Version Concurrency Control) design for a database schema, you'll indeed run into challenges with typical ORM (Object-Relational Mapping) frameworks due to their usual expectations around single records being updated rather than multiple versions being tracked. Here's how some prevalent ... | 11,271 | [
{
"from": "human",
"value": "When designing a database to use MVCC (Multi-Version Concurrency Control), you create tables with either a boolean field like \"IsLatest\" or an integer \"VersionId\", and you never do any updates, you only insert new records when things change. \nMVCC gives you automatic audit... |
I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree.
XML example:
<?xml version="1.0" encoding="utf-8"?>
<node>
<attribute/>
<node>
<attribute/>
<node/>
</node>
</node>
Which is the best way to validate ... | When designing an XML schema (XSD) to validate a tree structure, especially when the depth and occurrences of elements can vary, you can indeed use recursion. XML Schema allows you to define complex types that can reference themselves, making it suitable for defining recursive structures.
Here’s a basic example of how... | 15,277 | [
{
"from": "human",
"value": "I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree.\nXML example:\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<node>\n <attribute/>\n <node>\n <attribute/>\n <node/> \n ... |
This free collection library comes from IT University of Copenhagen.
http://www.itu.dk/research/c5/
There is a video with one of the authors on Channel 9. I am trying to learn how to use these collections and I was wondering whether anyone has more experiences or what are your thoughts on this specific collection libra... | The C5 library from the IT University of Copenhagen is an interesting data structures library designed for .NET. It offers a variety of collections that extend the capabilities of the standard .NET collections with additional features and improved performance in certain scenarios. Here are some thoughts and experiences... | 14,493 | [
{
"from": "human",
"value": "This free collection library comes from IT University of Copenhagen.\nhttp://www.itu.dk/research/c5/\nThere is a video with one of the authors on Channel 9. I am trying to learn how to use these collections and I was wondering whether anyone has more experiences or what are your... |
I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)?
| Installing a font as part of your C# application using Visual Studio 2008's setup project can be accomplished, but it requires a few steps since the built-in installer does not have direct support for font installation. Below are the steps to achieve this:
### Step 1: Add the Font to Your Project
1. **Add the Font Fil... | 11,175 | [
{
"from": "human",
"value": "I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)?\n"
},
{
"from": "gpt",
"value": "Installing a font as part of your C# appli... |
What is the most efficient way given to raise an integer to the power of another integer in C?
// 2^3
pow(2,3) == 8
// 5^5
pow(5,5) == 3125
| In C, the most efficient way to raise an integer to the power of another integer, particularly when both the base and exponent are integers, is to implement a simple function using a loop or the exponentiation by squaring method. The `pow` function from `<math.h>` is designed for floating-point numbers and can be less ... | 14,128 | [
{
"from": "human",
"value": "What is the most efficient way given to raise an integer to the power of another integer in C?\n// 2^3\npow(2,3) == 8\n\n// 5^5\npow(5,5) == 3125\n\n"
},
{
"from": "gpt",
"value": "In C, the most efficient way to raise an integer to the power of another integer, part... |
I am trying to compile my apps (which uses 3rd party libraries) for the x64 platform. However selecting x64 from Build Configuration Manager from my VS2008 Pro doesn't seem to work. The binary does get created but my client wasn't able to get it to run on x64.
I wonder if the 3rd party DLLs could be the cause. Anyone ... | When dealing with the compilation of applications for the x64 platform in Visual Studio 2008, there are several factors to consider, especially regarding third-party libraries. Here are some steps and checks you can follow to ensure that your application runs successfully on x64:
1. **Verify Library Compatibility**: E... | 14,268 | [
{
"from": "human",
"value": "I am trying to compile my apps (which uses 3rd party libraries) for the x64 platform. However selecting x64 from Build Configuration Manager from my VS2008 Pro doesn't seem to work. The binary does get created but my client wasn't able to get it to run on x64. \nI wonder if the ... |
I populated a datagridview from a datatable. How do I read from the datagridview when the application is running?
| Reading data from a `DataGridView` in a WinForms application involves accessing its properties and rows. Here’s a simple guide on how to read data from a `DataGridView` during runtime.
### Example Code
Assuming you have a `DataGridView` called `dataGridView1`, here’s how you can retrieve values from it:
```csharp
pr... | 7,704 | [
{
"from": "human",
"value": "I populated a datagridview from a datatable. How do I read from the datagridview when the application is running?\n"
},
{
"from": "gpt",
"value": "Reading data from a `DataGridView` in a WinForms application involves accessing its properties and rows. Here’s a simple... |
I have a simple query:
SELECT u_name AS user_name FROM users WHERE user_name = "john";
I get Unknown Column 'user_name' in where clause. Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?
| In SQL, you cannot refer to an alias defined in the `SELECT` clause within the `WHERE` clause of the same query. The `WHERE` clause is processed before the `SELECT` clause, which means that at the time the `WHERE` clause is evaluated, the alias `user_name` does not yet exist.
To achieve what you are trying to do, you ... | 17,688 | [
{
"from": "human",
"value": "I have a simple query:\nSELECT u_name AS user_name FROM users WHERE user_name = \"john\";\n\nI get Unknown Column 'user_name' in where clause. Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?\n"
},
{
"from": "gpt",
... |
I need to create a PRIVATE message queue on a remote machine and I have resolved to fact that I can't do this with the .NET Framework in a straight forward manner. I can create a public message queue on a remote machine, but not a PRIVATE one. I can create a message queue (public or private) locally.
I am wondering if... | Creating a private message queue on a remote machine using .NET Framework directly is indeed not straightforward since it mainly supports creating public queues through the `System.Messaging` namespace. However, you can achieve this by leveraging Windows Management Instrumentation (WMI) to work with MSMQ.
Here’s a gen... | 12,894 | [
{
"from": "human",
"value": "I need to create a PRIVATE message queue on a remote machine and I have resolved to fact that I can't do this with the .NET Framework in a straight forward manner. I can create a public message queue on a remote machine, but not a PRIVATE one. I can create a message queue (publ... |
I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable?
More specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to cluster the points that are close together in order to remove clutt... | When clustering geographic points (latitude/longitude coordinates) on a map, several algorithms can be employed that are both efficient and scalable. Here are some commonly used algorithms that are suitable for clustering geographic data:
### 1. **DBSCAN (Density-Based Spatial Clustering of Applications with Noise)**
... | 12,030 | [
{
"from": "human",
"value": "I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable?\nMore specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to cluster the points that a... |
The following snippet of C# code:
int i = 1;
string result = String.Format("{0},{1},{2}", i++, i++, i++);
Console.WriteLine(result);
writes out: 1,2,3
Before I tried this in the compiler I was expecting the assignments to take place and then the evaluations, so my expected output was: 1,1,1
So my question is: Do... | The behavior you're observing in your C# code snippet is related to the order of evaluation of method arguments. In C#, the order in which method arguments are evaluated is unspecified. This means that while you might expect the arguments to be evaluated left to right, the C# compiler is free to choose the order in whi... | 16,038 | [
{
"from": "human",
"value": "The following snippet of C# code:\n int i = 1;\n string result = String.Format(\"{0},{1},{2}\", i++, i++, i++);\n Console.WriteLine(result);\n\nwrites out: 1,2,3\nBefore I tried this in the compiler I was expecting the assignments to take place and then the evaluations, so my... |
Does Mono .NET support and compile C++ / CLI?
If not, do you know if they have any plans of supporting it?
| Mono .NET does not fully support C++/CLI. C++/CLI is a language that is primarily designed to work with the .NET Framework on Windows, and it is closely tied to the Microsoft implementation of .NET. Mono, being an open-source cross-platform alternative, has historically focused on supporting C# and other .NET languages... | 16,453 | [
{
"from": "human",
"value": "Does Mono .NET support and compile C++ / CLI?\nIf not, do you know if they have any plans of supporting it?\n"
},
{
"from": "gpt",
"value": "Mono .NET does not fully support C++/CLI. C++/CLI is a language that is primarily designed to work with the .NET Framework on ... |
Is it possible to use overlapped I/O with an anonymous pipe? CreatePipe() does not have any way of specifying FILE_FLAG_OVERLAPPED, so I assume ReadFile() will block, even if I supply an OVERLAPPED-structure.
| Using overlapped I/O with anonymous pipes in Windows can indeed be a bit tricky because, as you mentioned, the `CreatePipe()` function does not support creating pipes with the `FILE_FLAG_OVERLAPPED` flag. This means that the handles you receive from `CreatePipe()` are not set up for overlapped I/O operations by default... | 13,873 | [
{
"from": "human",
"value": "Is it possible to use overlapped I/O with an anonymous pipe? CreatePipe() does not have any way of specifying FILE_FLAG_OVERLAPPED, so I assume ReadFile() will block, even if I supply an OVERLAPPED-structure. \n"
},
{
"from": "gpt",
"value": "Using overlapped I/O wit... |
What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred.
| For beginners looking to start with C++ programming, there are several free and open-source compilers and integrated development environments (IDEs) that are user-friendly and widely used in the community. Here are some recommendations:
1. **Code::Blocks**:
- Code::Blocks is an open-source IDE that supports multipl... | 13,532 | [
{
"from": "human",
"value": "What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred.\n"
},
{
"from": "gpt",
"value": "For beginners looking to start with C++ programming, there are several free and open-source compilers and integrated ... |
I was reading a book on programming skills wherein the author asks the interviewee, "How do you crash a JVM?" I thought that you could do so by writing an infinite for-loop that would eventually use up all the memory.
Anybody has any idea?
| Yes, you can crash a JVM (Java Virtual Machine) in several ways, and one common approach is indeed to exhaust its memory resources. Here are a few methods to do so:
1. **Infinite Loop**: As you mentioned, an infinite loop can consume CPU resources, but it won't necessarily crash the JVM unless it's also creating objec... | 13,177 | [
{
"from": "human",
"value": "I was reading a book on programming skills wherein the author asks the interviewee, \"How do you crash a JVM?\" I thought that you could do so by writing an infinite for-loop that would eventually use up all the memory.\nAnybody has any idea?\n"
},
{
"from": "gpt",
"... |
We have a Windows Service written in C#. The service spawns a thread that does this:
private void ThreadWorkerFunction()
{
while(false == _stop) // stop flag set by other thread
{
try
{
openConnection();
doStuff();
closeConnection();
}
catch (Exception ex)
{
log.Error(... | The issue you're encountering can stem from the way your service is handling exceptions and the state of the `SqlTransaction`. Let's break down a few potential reasons why your service might "hang" after encountering the `InvalidOperationException`.
### Potential Causes
1. **Transaction State**: The `InvalidOperation... | 9,104 | [
{
"from": "human",
"value": "We have a Windows Service written in C#. The service spawns a thread that does this: \nprivate void ThreadWorkerFunction()\n{\n while(false == _stop) // stop flag set by other thread\n {\n try\n {\n openConnection();\n\n doStuff();\n\n closeConnection();\n... |
How do I use Perl to create graphs?
I'm running scheduled job that creates text reports. I'd like to move this to the next step (for the management) and also create some graphs that go along with this. Is this possible / feasible? It'd be great if I could do this using Office some how.
update: solutions i'm going t... | Creating graphs in Perl is definitely feasible, and there are several libraries that can help you achieve this. Below are some options you can explore based on your preferences and requirements:
### 1. Spreadsheet::WriteExcel / Excel::Writer::XLSX
If you want to create graphs in Excel, `Spreadsheet::WriteExcel` (or it... | 8,010 | [
{
"from": "human",
"value": "How do I use Perl to create graphs?\nI'm running scheduled job that creates text reports. I'd like to move this to the next step (for the management) and also create some graphs that go along with this. Is this possible / feasible? It'd be great if I could do this using Offi... |
we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messages for all the individual merge operations look as i... | When using `git-svn` to manage branches in an SVN repository, you may encounter the issue where all merge commits show the committer as the person performing the merge (user Y) instead of the original author (user X) of the individual commits in the branch. This behavior is standard in Git because the author of a commi... | 11,376 | [
{
"from": "human",
"value": "we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messages for all ... |
Seems to me most of developers completely ignore this features. People prefer handling security exceptions as generic ones relying on standard windows roles and rights instead of learning to use CAS ways of enhancing security - probably because CAS is quite confusing in its logic and naming.
Can anyone suggest any gene... | Code Access Security (CAS) can be quite complex, and many developers tend to rely on simpler, more straightforward security measures provided by the operating system or by leveraging role-based security. However, when implemented correctly, CAS can provide a robust layer of security in .NET applications, especially in ... | 14,487 | [
{
"from": "human",
"value": "Seems to me most of developers completely ignore this features. People prefer handling security exceptions as generic ones relying on standard windows roles and rights instead of learning to use CAS ways of enhancing security - probably because CAS is quite confusing in its logi... |
For some reason, lately the *.UDL files on many of my client systems are no longer compatible as they were once saved as ANSI files, which is no longer compatible with the expected UNICODE file format. The end result is an error dialog which states "the file is not a valid compound file".
What is the easiest way to ... | To programmatically convert `.UDL` files from ANSI to Unicode, you can write a simple script in Python. This script will open the `.UDL` file, read its contents in ANSI encoding, and then save it as a Unicode file. Below is a sample Python script that accomplishes this:
### Python Script to Convert UDL Files
```pytho... | 13,879 | [
{
"from": "human",
"value": "For some reason, lately the *.UDL files on many of my client systems are no longer compatible as they were once saved as ANSI files, which is no longer compatible with the expected UNICODE file format. The end result is an error dialog which states \"the file is not a valid com... |
I have one hibernate sequence, that generates all sequence-numbers in my app. When I generate the schemas from hibernate (target Oracle10), it genererates:
create sequence hibernate_sequence;
I would like to change the configuration of the sequence. I have to use something like:
create sequence hibernate_sequence orde... | To customize the sequence generated by Hibernate, you can override the default behavior of the sequence generation using Hibernate's `@SequenceGenerator` annotation along with the `@GeneratedValue` annotation in your entity class. Specifically, you can specify the details of the sequence directly in the annotation para... | 14,928 | [
{
"from": "human",
"value": "I have one hibernate sequence, that generates all sequence-numbers in my app. When I generate the schemas from hibernate (target Oracle10), it genererates:\ncreate sequence hibernate_sequence;\n\nI would like to change the configuration of the sequence. I have to use something l... |
I need to create a custom membership user and provider for an ASP.NET mvc app and I'm looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can't figure out. How do I give it a valid provider name? Do I just need to add it to web... | To create a custom membership user and provider for your ASP.NET MVC application using Test-Driven Development (TDD), you indeed need to configure the membership provider correctly in your `web.config` file. However, since you're encountering issues with running tests without a full web context, there are some specific... | 11,424 | [
{
"from": "human",
"value": "I need to create a custom membership user and provider for an ASP.NET mvc app and I'm looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can't figure out. How do I give it a valid provid... |
Is there a way for me to add logging so that entering and exiting methods gets logged along with parameters automatically somehow for tracing purposes? How would I do so?
I am using Log4Net.
| Certainly! You can achieve automatic logging of entering and exiting methods, along with their parameters, by utilizing aspects in .NET through either AOP (Aspect-Oriented Programming) libraries like PostSharp or by creating a custom solution using .NET features like decorators or wrapper methods.
Below are two common... | 14,718 | [
{
"from": "human",
"value": "Is there a way for me to add logging so that entering and exiting methods gets logged along with parameters automatically somehow for tracing purposes? How would I do so?\nI am using Log4Net.\n"
},
{
"from": "gpt",
"value": "Certainly! You can achieve automatic loggi... |
As compared to say:
REPLICATE(@padchar, @len - LEN(@str)) + @str
| The expression you provided uses SQL Server's `REPLICATE` function to pad a string (`@str`) with a specified character (`@padchar`) until it reaches a certain length (`@len`). This is commonly used to ensure a string has a specific length by prepending characters.
Let's break down the expression:
```sql
REPLICATE(@pa... | 13,102 | [
{
"from": "human",
"value": "As compared to say:\nREPLICATE(@padchar, @len - LEN(@str)) + @str\n\n"
},
{
"from": "gpt",
"value": "The expression you provided uses SQL Server's `REPLICATE` function to pad a string (`@str`) with a specified character (`@padchar`) until it reaches a certain length ... |
I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller.
Each Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on my Person model to the Comment model. View is working great.
My... | In CakePHP, especially in versions like 1.2, it’s common to work within the conventions and structure that CakePHP provides for managing relationships and actions in your application. Since you have a `Person` model that has many `Comment` models, you're correct in thinking about how to handle adding comments in relati... | 8,260 | [
{
"from": "human",
"value": "I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller.\nEach Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on my Person model to th... |
I am working on a legacy project in VC++/Win32/MFC. Recently it became a requirement that the application work on a tablet pc, and this ushered in a host of new issues.
I have been able to work with, and around these issues, but am left with one wherein I could use some expert suggestions.
I have a particular bug that ... | Working with tablet PCs and stylus input can introduce a variety of new challenges, especially if the application was originally designed for mouse input only. Here's an overview of the issues you're facing and some suggestions for addressing them.
### Understanding Stylus Input Events
1. **What happens when a stylus... | 12,250 | [
{
"from": "human",
"value": "I am working on a legacy project in VC++/Win32/MFC. Recently it became a requirement that the application work on a tablet pc, and this ushered in a host of new issues.\nI have been able to work with, and around these issues, but am left with one wherein I could use some expert ... |
I have been seriously disappointed with WPF validation system. Anyway! How can I validate the complete form by clicking the "button"?
For some reason everything in WPF is soo complicated! I can do the validation in 1 line of code in ASP.NET which requires like 10-20 lines of code in WPF!!
I can do this using my own Va... | I understand that working with WPF (Windows Presentation Foundation) can sometimes feel cumbersome compared to web frameworks like ASP.NET, especially when dealing with validation. However, you can implement validation in a more streamlined way using WPF's features. Below is an example of how to validate a form in WPF ... | 9,800 | [
{
"from": "human",
"value": "I have been seriously disappointed with WPF validation system. Anyway! How can I validate the complete form by clicking the \"button\"? \nFor some reason everything in WPF is soo complicated! I can do the validation in 1 line of code in ASP.NET which requires like 10-20 lines of... |
I have an application with a REST style interface that takes XML documents via POST from clients. This application is written in Java and uses XML beans to process the posted message.
The XML schema definition for a field in the message looks like this:
<xs:element name="value" type="xs:string" nillable="true" />
How... | To send a null value in an XML document that adheres to the specified XML Schema Definition (XSD) for a field defined as `<xs:element name="value" type="xs:string" nillable="true" />`, you need to ensure that you include the correct namespace and attributes in your XML.
Here's the correct way to send a null value for ... | 13,988 | [
{
"from": "human",
"value": "I have an application with a REST style interface that takes XML documents via POST from clients. This application is written in Java and uses XML beans to process the posted message. \nThe XML schema definition for a field in the message looks like this:\n<xs:element name=\"val... |
I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like:
Public Function CreateHash(Value As String) As String
...
End Function
The function needs to work on an XP workstation with Excel 2003 installed, but otherwise must use no ... | Certainly! Below is an example of how to create a VBA function in Excel that utilizes the Windows CryptoAPI to compute the SHA-1 hash of a string. This code is designed to work in Excel 2003 on a Windows XP machine without the need for third-party components.
### Step 1: Declare necessary Windows API functions
You ne... | 10,620 | [
{
"from": "human",
"value": "I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like:\nPublic Function CreateHash(Value As String) As String\n...\nEnd Function\n\nThe function needs to work on an XP workstation with Ex... |
I can make Firefox not display the ugly dotted focus outlines on links with this:
a:focus {
outline: none;
}
But how can I do this for <button> tags as well? When I do this:
button:focus {
outline: none;
}
the buttons still have the dotted focus outline when I click on them.
(and yes, I know this is a usa... | To remove the dotted focus outline from `<button>` elements in Firefox, you can use the same CSS rule that you applied to your links. However, you may also need to ensure you're applying it correctly by considering various button types and states. Here's a more comprehensive approach:
```css
button:focus {
outline... | 13,834 | [
{
"from": "human",
"value": "I can make Firefox not display the ugly dotted focus outlines on links with this:\na:focus { \n outline: none; \n}\n\nBut how can I do this for <button> tags as well? When I do this:\nbutton:focus { \n outline: none; \n}\n\nthe buttons still have the dotted focus outline w... |
We have had SharePoint where I work for a little while now, but we've not done a lot with it. We have an intranet with hundreds of ASP/ASP.Net applications and I'm wondering what kind of things can be done to integrate with SharePoint to make a more seamless environment? We put documentation and production move request... | Integrating SharePoint into your existing intranet environment can provide a more cohesive and seamless experience for users, particularly if you have a plethora of ASP/ASP.Net applications. Here are several strategies and ideas to help you better integrate SharePoint and make it a more central part of your intranet:
... | 10,758 | [
{
"from": "human",
"value": "We have had SharePoint where I work for a little while now, but we've not done a lot with it. We have an intranet with hundreds of ASP/ASP.Net applications and I'm wondering what kind of things can be done to integrate with SharePoint to make a more seamless environment? We put ... |
I need to know how to turn on Code Coverage when running TFS builds on a solution with a .testrunconfig file.
There is an option in the testrunconfig file that is for code coverage, but when running a TFS build there is no code coverage results.
I am running my tests using the *Tests.dll mask and NOT using Test Lists... | To enable code coverage in a TFS (Team Foundation Server) build for a solution that uses a `.testrunconfig` file, you'll need to follow a few steps. It’s important to ensure that your build definition is configured correctly to collect code coverage data during the test execution. Here's how to achieve that:
### Step ... | 12,228 | [
{
"from": "human",
"value": "I need to know how to turn on Code Coverage when running TFS builds on a solution with a .testrunconfig file. \nThere is an option in the testrunconfig file that is for code coverage, but when running a TFS build there is no code coverage results.\nI am running my tests using t... |
I have a little routine that's run under Linux and Windows written in C and displays output on the console. I'm not linking in any form of curses or anything like that.
Currently I clear the screen using
#ifdef __WIN32
system( "cls" );
#else
system( "clear" );
#endif
Then I have a bunch of printf statements to upd... | To clear the console and reset the cursor position to the top-left corner (0,0) without using any external libraries or complex solutions, you can achieve this using ANSI escape codes. These codes work in many terminal emulators, including those found in Linux and in Windows if you're using a newer terminal like Window... | 16,143 | [
{
"from": "human",
"value": "I have a little routine that's run under Linux and Windows written in C and displays output on the console. I'm not linking in any form of curses or anything like that.\nCurrently I clear the screen using\n#ifdef __WIN32\n system( \"cls\" );\n#else\n system( \"clear\" );\n#end... |
In java, I could do this with the 'final' keyword. I don't see 'final' in C#. Is there a substitute?
| In C#, the equivalent of Java's `final` keyword can be achieved through different keywords depending on the context in which you want to restrict modification. Here's how you can use them:
1. **`readonly`**: If you want to declare a field that can only be assigned during declaration or within the constructor of the cl... | 15,544 | [
{
"from": "human",
"value": "In java, I could do this with the 'final' keyword. I don't see 'final' in C#. Is there a substitute?\n"
},
{
"from": "gpt",
"value": "In C#, the equivalent of Java's `final` keyword can be achieved through different keywords depending on the context in which you want... |
We have fairly large C++ application which is composed of about 60 projects in Visual Studio 2005. It currently takes 7 minutes to link in Release mode and I would like to try to reduce the time. Are there any tips for improving the link time?
Most of the projects compile to static libraries, this makes testing easier ... | Reducing link times in a large C++ application, especially one built using Visual Studio 2005, can be challenging, but there are several strategies you can consider to improve the situation:
1. **Use DLLs Instead of Static Libraries**: As you mentioned, using DLLs can help reduce link time. DLLs can benefit from incre... | 11,864 | [
{
"from": "human",
"value": "We have fairly large C++ application which is composed of about 60 projects in Visual Studio 2005. It currently takes 7 minutes to link in Release mode and I would like to try to reduce the time. Are there any tips for improving the link time?\nMost of the projects compile to st... |
I'm having an odd problem with my vs debugger. When running my program under the vs debugger, the debugger does not break on an unhandled exception. Instead control is returned to VS as if the program exited normally. If I look in the output tab, There is a first-chance exeption listed just before the thread termina... | It sounds like you're experiencing a frustrating issue with Visual Studio's exception handling during debugging. Here are some potential explanations and steps you can take to troubleshoot and resolve the issue:
1. **First-Chance vs. Unhandled Exceptions**: In .NET, a "first-chance exception" means the exception has b... | 13,232 | [
{
"from": "human",
"value": "I'm having an odd problem with my vs debugger. When running my program under the vs debugger, the debugger does not break on an unhandled exception. Instead control is returned to VS as if the program exited normally. If I look in the output tab, There is a first-chance exept... |
I'm having trouble coming up with the correct regex string to remove a sequence of multiple ? characters. I want to replace more than one sequential ? with a single ?, but which characters to escape...is escaping me.
Example input:
Is this thing on??? or what???
Desired output:
Is this thing on? or what?
I'm using ... | To achieve your goal of replacing multiple sequential question marks (`?`) with a single question mark (`?`) using a regular expression in PHP, you can use the `preg_replace()` function with the appropriate regex pattern.
### Regex Pattern
You want to target one or more `?` characters. In regex, you can use `+` to ma... | 16,649 | [
{
"from": "human",
"value": "I'm having trouble coming up with the correct regex string to remove a sequence of multiple ? characters. I want to replace more than one sequential ? with a single ?, but which characters to escape...is escaping me.\nExample input:\n\nIs this thing on??? or what???\n\nDesired o... |
When would you use a bigtabe/simpledb database vs a Relational database?
| Choosing between a NoSQL database like Bigtable or SimpleDB and a relational database depends on several factors, including the specific use case, data structure, scalability requirements, and access patterns. Here are some scenarios to consider for each type of database:
### When to Use Bigtable/SimpleDB (NoSQL)
1. ... | 12,077 | [
{
"from": "human",
"value": "When would you use a bigtabe/simpledb database vs a Relational database?\n"
},
{
"from": "gpt",
"value": "Choosing between a NoSQL database like Bigtable or SimpleDB and a relational database depends on several factors, including the specific use case, data structure... |
I want to know if responsetimes are good, not just if it scales. Anyone with experiences?
| When evaluating response times for a system or application, it's important to consider several factors that can influence performance. Here are some aspects you might want to consider based on experiences from different users:
1. **Benchmarking**: Compare response times against industry standards or benchmarks specifi... | 14,532 | [
{
"from": "human",
"value": "I want to know if responsetimes are good, not just if it scales. Anyone with experiences?\n"
},
{
"from": "gpt",
"value": "When evaluating response times for a system or application, it's important to consider several factors that can influence performance. Here are ... |
Is it a good idea to use while loop instead of a cursor?
What are the advantages/disadvantages of cursors?
| Using a `WHILE` loop instead of a cursor in SQL can depend on the specific scenario and requirements of your task. Here's a comparison of both approaches, including their advantages and disadvantages.
### While Loop vs Cursor
**While Loop:**
**Advantages:**
1. **Simplicity**: A `WHILE` loop can be simpler to underst... | 15,630 | [
{
"from": "human",
"value": "Is it a good idea to use while loop instead of a cursor?\nWhat are the advantages/disadvantages of cursors?\n"
},
{
"from": "gpt",
"value": "Using a `WHILE` loop instead of a cursor in SQL can depend on the specific scenario and requirements of your task. Here's a co... |
I've been looking into making applications suitable for multiple languages in C# since I need to work on a small project where this is the case. I have found basically two ways to do this:
Set a form's Localizable property to true, set the Language property, fill all the labels and such, and you're 'done'. The major dr... | When developing applications in C# that require support for multiple languages, there are indeed different approaches you can take depending on your specific needs. Let's break down the methods you've mentioned and discuss their use cases along with some best practices for both small and large applications.
### 1. Loc... | 12,208 | [
{
"from": "human",
"value": "I've been looking into making applications suitable for multiple languages in C# since I need to work on a small project where this is the case. I have found basically two ways to do this:\nSet a form's Localizable property to true, set the Language property, fill all the labels... |
In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects.
One thing that would make supporting each others code more helpful would be a LINTER that would check our code for common problems and assi... | Creating a linter for Verilog-AMS is a great way to ensure code quality and enforce team coding standards. Given your requirements and the need to potentially support custom rules, there are a couple of approaches you can consider. Let's break down your options:
### Option 1: Using Yacc/Bison
If you have the grammar ... | 10,896 | [
{
"from": "human",
"value": "In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects. \nOne thing that would make supporting each others code more helpful would be a LINTER that would c... |
I have a .NET application that is meant to be run on a local PC and started from a file share on the LAN.
It works fine on 32 bit Windows XP and Vista workstations.
But it fails with a System.InvalidOperationException on 64 bit Windows Server 2008.
It runs fine locally on all three configurations.
What could be the cau... | The issue you're encountering with your .NET application running from a file share on Windows Server 2008 (64-bit) could stem from several factors related to security, permissions, or the .NET framework's behavior with assemblies loaded from network locations. Here are some possibilities and troubleshooting steps:
1. ... | 15,401 | [
{
"from": "human",
"value": "I have a .NET application that is meant to be run on a local PC and started from a file share on the LAN.\nIt works fine on 32 bit Windows XP and Vista workstations.\nBut it fails with a System.InvalidOperationException on 64 bit Windows Server 2008.\nIt runs fine locally on all... |
Examples:
"1" yes
"-1" yes
"- 3" no
"1.2" yes
"1.2.3" no
"7e4" no (though in some cases you may want to allow scientific notation)
".123" yes
"123." yes
"." no
"-.5" yes
"007" yes
"00" yes
| Based on your examples, it appears you are looking for validation rules for numerical strings. Here’s a breakdown of the rules inferred from your examples:
1. **Valid Integer Formats:**
- Positive and negative integers are valid: `"1"`, `"-1"`, `"007"`, and `"00"`.
- Integers with leading zeros are acceptable if... | 14,599 | [
{
"from": "human",
"value": "Examples:\n\"1\" yes\n\"-1\" yes\n\"- 3\" no\n\"1.2\" yes\n\"1.2.3\" no\n\"7e4\" no (though in some cases you may want to allow scientific notation)\n\".123\" yes\n\"123.\" yes\n\".\" no\n\"-.5\" yes\n\"007\" yes\n\"00\" yes\n\n"
},
{
"from": "... |
How do you resolve an NT style device path, e.g. \Device\CdRom0, to its logical drive letter, e.g. G:\ ?
Edit: A Volume Name isn't the same as a Device Path so unfortunately GetVolumePathNamesForVolumeName() won't work.
| To resolve an NT-style device path (like `\Device\CdRom0`) to its corresponding logical drive letter (such as `G:\`), you can use the Windows API functions to enumerate the devices and match the device path to the appropriate drive letter. Here's a step-by-step guide on how you can achieve this in C++:
### Steps to Re... | 10,106 | [
{
"from": "human",
"value": "How do you resolve an NT style device path, e.g. \\Device\\CdRom0, to its logical drive letter, e.g. G:\\ ?\nEdit: A Volume Name isn't the same as a Device Path so unfortunately GetVolumePathNamesForVolumeName() won't work.\n"
},
{
"from": "gpt",
"value": "To resolve... |
I'm trying to put several images together into one big image, and am looking for an algorithm which determines the placing most optimally. The images can't be rotated or resized, but the position in the resulting image is not important.
edit: added no resize constraint
| To combine several images into one large image without resizing or rotating them, you can use a packing algorithm. The goal is to arrange the images in a way that minimizes the overall dimensions of the final image while keeping their original sizes. Since the position of the images in the final output is not important... | 10,457 | [
{
"from": "human",
"value": "I'm trying to put several images together into one big image, and am looking for an algorithm which determines the placing most optimally. The images can't be rotated or resized, but the position in the resulting image is not important.\nedit: added no resize constraint\n"
},
... |
Google created protocol buffers as a replacement for the bulky XML method of data transition. Faster XML processing was just not good enough. Most of the web has grown up as a hodge podge of different technologies that have been integrated to work within the browser or to generate html. JavaScript is separate from H... | Your question touches on a critical and evolving aspect of web technology—the ongoing quest for better ways to transmit and manage data across the internet. While you're correct that XML and JSON (which has largely supplanted XML) have their limitations, especially regarding performance and bandwidth, there are several... | 13,996 | [
{
"from": "human",
"value": "Google created protocol buffers as a replacement for the bulky XML method of data transition. Faster XML processing was just not good enough. Most of the web has grown up as a hodge podge of different technologies that have been integrated to work within the browser or to gener... |
For example, the standard division symbol '/' rounds to zero:
>>> 4 / 100
0
However, I want it to return 0.04. What do I use?
| In Python, the standard division operator `/` performs true division and will return a float result. If you're getting `0` from the expression `4 / 100`, it means you are likely using Python 2, where integer division would return an integer result that rounds toward zero.
If you want to ensure that you get a float res... | 17,096 | [
{
"from": "human",
"value": "For example, the standard division symbol '/' rounds to zero:\n>>> 4 / 100\n0\n\nHowever, I want it to return 0.04. What do I use?\n"
},
{
"from": "gpt",
"value": "In Python, the standard division operator `/` performs true division and will return a float result. If... |
I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance.
How ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN?
| SVN 1.5 introduced a number of improvements, one of which was the addition of merge tracking, which helps manage and simplify the process of merging branches in Subversion. This feature tracks which revisions have already been merged from one branch to another, making subsequent merges easier and preventing duplicate m... | 15,212 | [
{
"from": "human",
"value": "I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance.\nHow ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN?\n"
},
{
"from": "... |
I've got 256 colors working great in my terminal (test scripts here), but it stops working when I use ncurses (via Ruby-ncurses). Printing the escape sequences given on that page works fine, but when I initialize ncurses 'puts' stops working and I can't output the colors with any of the various ncurses color changing/s... | When working with `ncurses` in Ruby (or any language), there are some important considerations to keep in mind regarding color initialization and usage. Here are some steps to troubleshoot and potentially resolve your issue with 256 colors and `ncurses`.
### Step 1: Initialize Colors in `ncurses`
Before you can use a... | 14,838 | [
{
"from": "human",
"value": "I've got 256 colors working great in my terminal (test scripts here), but it stops working when I use ncurses (via Ruby-ncurses). Printing the escape sequences given on that page works fine, but when I initialize ncurses 'puts' stops working and I can't output the colors with an... |
I have several user controls, let's say A, B, C and D. Based on some random input, I need to generate a combination of these. For e.g. if input is 2a3d1a2c I need to show two of the A's, 3 D's after that, an A again, etc.
I will also need to stabilize clientid's in order for them to work correctly. Because each of thes... | To achieve your goal of dynamically generating user controls based on a string input (like "2a3d1a2c") and ensuring that their ClientIDs are stable, you can follow these steps:
1. **Parsing the Input String**: You can create a method to parse the input string and determine the quantity and type of each control needed.... | 9,644 | [
{
"from": "human",
"value": "I have several user controls, let's say A, B, C and D. Based on some random input, I need to generate a combination of these. For e.g. if input is 2a3d1a2c I need to show two of the A's, 3 D's after that, an A again, etc.\nI will also need to stabilize clientid's in order for th... |
I have a web app for commercial property management that needs spreadsheet-like functionality for doing budgets. I don't want to use Google Sheets because my users won't necessarily have a Google account.
So is there anything out there that I could use?
I looked and could only find SocialCalc which wasn't quite good e... | There are several options for incorporating spreadsheet-like functionality into your web app without relying on Google Sheets. Since you mentioned a few specific grid components, here are some additional suggestions, including their features and licensing options:
### 1. **Handsontable**
- **License**: Commercial and ... | 14,065 | [
{
"from": "human",
"value": "I have a web app for commercial property management that needs spreadsheet-like functionality for doing budgets. I don't want to use Google Sheets because my users won't necessarily have a Google account. \nSo is there anything out there that I could use?\nI looked and could onl... |
I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy for the browser to use in order to see what its sending?
I'm already using Fiddler to watch the traffic ... | Yes, you can programmatically set up a proxy for browser automation testing using tools that can capture HTTP requests without a UI. This can be particularly useful for continuous integration environments. Here are some approaches you can take:
### 1. **Using a Proxy Server with Automation Tools**
You can use a headl... | 10,242 | [
{
"from": "human",
"value": "I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy for the browser to use in order to see what its sending?\nI'm a... |
Convert a .doc or .pdf to an image and display a thumbnail in Ruby?
Does anyone know how to generate document thumbnails in Ruby (or C, python...)
| Generating document thumbnails in Ruby can be achieved by using libraries that handle the conversion of document formats (like .docx or .pdf) to images. Below are examples that show how to achieve this in Ruby, along with Python and C for completeness.
### Ruby Example
In Ruby, you can use the `MiniMagick` gem to cre... | 13,500 | [
{
"from": "human",
"value": "Convert a .doc or .pdf to an image and display a thumbnail in Ruby?\nDoes anyone know how to generate document thumbnails in Ruby (or C, python...)\n"
},
{
"from": "gpt",
"value": "Generating document thumbnails in Ruby can be achieved by using libraries that handle ... |
What serial communication bus would you use in a automotive embedded system if your main selection criteria were:
Electrically robust
Slow speed (32 kb/s)
Easy to program
Easy to interface with microcontrollers
It won't be transferring much data, but it will need to be transferred periodically at high speed... | Given your criteria for an automotive embedded system—specifically, needing an electrically robust communication bus that can operate at a slow speed (32 kb/s), is easy to program, and easy to interface with microcontrollers—CAN (Controller Area Network) is indeed a suitable choice.
### Reasons to Choose CAN:
1. **El... | 12,465 | [
{
"from": "human",
"value": "What serial communication bus would you use in a automotive embedded system if your main selection criteria were: \n\nElectrically robust \nSlow speed (32 kb/s) \nEasy to program \nEasy to interface with microcontrollers \n\nIt won't be transferring much data, but it will n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.