instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have a view that supports landscape and portrait viewing, with the controls all moving around when you switch from one to the other. I'm currently doing this by setting the .center of each one of my controls when the user rotates the phone. The problem is that this is tedious, and requires a lot of code, and seems to... | In Interface Builder (IB), you have several options for handling different layouts for landscape and portrait orientations. Here are some strategies you can consider:
### 1. Use Size Classes
iOS uses a system called Size Classes, which allows you to specify different layouts based on the width and height of the view. ... | 17,080 | [
{
"from": "human",
"value": "I have a view that supports landscape and portrait viewing, with the controls all moving around when you switch from one to the other. I'm currently doing this by setting the .center of each one of my controls when the user rotates the phone. The problem is that this is tedious,... |
How do you programmatically find the number of hosts that a netmask supports.
Eg, If you have a /30 , how do you find how many IP's are in it without using a lookup table?
Preferably would be able to work with the "/" notation, rather than 255.xxx.xxx.xxx notation.
| To programmatically calculate the number of usable IP addresses in a subnet given its CIDR notation (e.g., /30), you can use the following approach:
1. **Understand CIDR Notation**: In CIDR notation, the number following the slash (e.g., 30 in /30) indicates the number of bits used for the network part of the address.... | 13,252 | [
{
"from": "human",
"value": "How do you programmatically find the number of hosts that a netmask supports.\nEg, If you have a /30 , how do you find how many IP's are in it without using a lookup table?\nPreferably would be able to work with the \"/\" notation, rather than 255.xxx.xxx.xxx notation.\n"
},
... |
I have googled around and not seen any info. What format and icon color depths are used for applications?
| When it comes to applications, the format and color depths for icons can vary depending on the operating system and the specific requirements of the application. Here’s a general overview of common formats and color depths used for application icons:
### Common Icon Formats
1. **ICO (Windows Icon)**
- Used primaril... | 15,697 | [
{
"from": "human",
"value": "I have googled around and not seen any info. What format and icon color depths are used for applications?\n"
},
{
"from": "gpt",
"value": "When it comes to applications, the format and color depths for icons can vary depending on the operating system and the specifi... |
I'd like to write some (java) code that takes a PDF document, and creates named destinations from all of the bookmarks. I think the iText API is the easiest way of doing this, but I have never used the API before.
How would you go about writing this sort of code with the iText API? Can iText do the parsing needed to m... | iText is a powerful and popular library for creating and manipulating PDF documents in Java. It can indeed handle the tasks you mentioned: opening a PDF, finding bookmarks, creating named destinations, and saving the document.
Below is a simple example to guide you through the process of extracting bookmarks and creat... | 14,986 | [
{
"from": "human",
"value": "I'd like to write some (java) code that takes a PDF document, and creates named destinations from all of the bookmarks. I think the iText API is the easiest way of doing this, but I have never used the API before.\nHow would you go about writing this sort of code with the iText ... |
I was curious if anyone had any problems creating unit tests around using the ResourceManager. I am using Visual Studio test edition and it appears that the satellite assemblies don't get loaded during the test. When I try to get a resource for another culture, the test always fails and the resource manager always fa... | It sounds like you're encountering an issue related to how unit tests load satellite assemblies for localization. When you run unit tests in Visual Studio, the test context might not automatically load the satellite assemblies that your application needs for specific cultures, leading to a fallback to the default cultu... | 15,722 | [
{
"from": "human",
"value": "I was curious if anyone had any problems creating unit tests around using the ResourceManager. I am using Visual Studio test edition and it appears that the satellite assemblies don't get loaded during the test. When I try to get a resource for another culture, the test always... |
Is there any good bug tracker based on .NET which is free?
| Yes, there are several bug tracking systems that are based on .NET and are available for free. Here are a few options you might consider:
1. **Bugzilla**: While not built on .NET, it can be hosted on a .NET server with the right configuration. Bugzilla is a widely used bug tracking system that's open-source and can be... | 19,397 | [
{
"from": "human",
"value": "Is there any good bug tracker based on .NET which is free?\n"
},
{
"from": "gpt",
"value": "Yes, there are several bug tracking systems that are based on .NET and are available for free. Here are a few options you might consider:\n\n1. **Bugzilla**: While not built o... |
I know just the question is a bit of heresey, but I'm curious...
Sure, there are the express editions. But when Microsoft is effectively competing for 'hearts and minds' in an OSS world, it seems more than a bit counterproductive to charge devs who wholeheartedly support .NET high subscription fees for Microsoft softwa... | Your question touches on a relevant topic in the software development community, particularly concerning the adoption of platforms and tools like .NET in an increasingly open-source world. While specific instances where MSDN subscription rates have deterred teams from adopting .NET might not be widely documented or pub... | 15,991 | [
{
"from": "human",
"value": "I know just the question is a bit of heresey, but I'm curious...\nSure, there are the express editions. But when Microsoft is effectively competing for 'hearts and minds' in an OSS world, it seems more than a bit counterproductive to charge devs who wholeheartedly support .NET h... |
Can an XML attribute be the empty string?
In other words, is
<element att="" />
valid XML?
| Yes, an XML attribute can be an empty string. The example you provided:
```xml
<element att="" />
```
is valid XML. In this case, the attribute `att` is defined with an empty string as its value. XML allows attributes to have empty string values, and it is perfectly valid to use them in this way. | 21,158 | [
{
"from": "human",
"value": "Can an XML attribute be the empty string?\nIn other words, is\n<element att=\"\" />\n\nvalid XML?\n"
},
{
"from": "gpt",
"value": "Yes, an XML attribute can be an empty string. The example you provided:\n\n```xml\n<element att=\"\" />\n```\n\nis valid XML. In this ca... |
My company is looking to start distributing some software we developed and would like to be able to let people try the software out before buying. We'd also like to make sure it can't be copied and distributed to our customers' customers.
One model we've seen is tying a license to a MAC address so the software will on... | Creating a robust license key system for your software is essential to protect it from unauthorized use and to provide users with a trial experience. Here’s a step-by-step guide on how you can generate and validate license keys with embedded information such as MAC address, expiration date, and software restrictions.
... | 14,225 | [
{
"from": "human",
"value": "My company is looking to start distributing some software we developed and would like to be able to let people try the software out before buying. We'd also like to make sure it can't be copied and distributed to our customers' customers.\nOne model we've seen is tying a licens... |
I have two custom controls that are analogous to a node and the control that draws links between nodes.
I would like to have both controls written as much in xaml as possible. The link stores both nodes as dependency properties, and I use databinding to move the line between the nodes whenever the nodes move.
It wou... | To achieve dynamic updates to the stroke width of a line connecting two nodes in a WPF application using XAML and data binding, you'll want to utilize a combination of Dependency Properties, Data Binding, and possibly some kind of change notification mechanism to update properties based on distance.
Here's a basic out... | 10,714 | [
{
"from": "human",
"value": "I have two custom controls that are analogous to a node and the control that draws links between nodes. \nI would like to have both controls written as much in xaml as possible. The link stores both nodes as dependency properties, and I use databinding to move the line between... |
I want to detect users' screen size and pass this into a charting application (Chart Director by http://www.advsofteng.com) to control how big an image to display.
I have to use ASP, but I can only think to use JavaScript to detect screen-size and then pass this into the server-side script. Is there an easier way?
Than... | Detecting the user's screen size and passing that information to your ASP application typically involves a combination of JavaScript and server-side code (ASP in your case). Unfortunately, since server-side code like ASP executes before the page is sent to the client, it doesn't have direct access to client-side inform... | 14,615 | [
{
"from": "human",
"value": "I want to detect users' screen size and pass this into a charting application (Chart Director by http://www.advsofteng.com) to control how big an image to display.\nI have to use ASP, but I can only think to use JavaScript to detect screen-size and then pass this into the server... |
I am attempting to devise a system for packing integer values greater than 65535 into a ushort. Let me explain.
We have a system which generates Int32 values using an IDENTITY column from SQL Server and are limited by an in-production client API that overflows our Int32 IDs to ushorts. Fortunately the client only has... | Your problem involves translating `Int32` values (which can range from 0 to 2,147,483,647) into `ushort` values (which can only range from 0 to 65,535) while avoiding collisions and allowing for reconstruction of the original `Int32` values. Given your constraints, here are some thoughts on potential solutions:
### Ap... | 14,476 | [
{
"from": "human",
"value": "I am attempting to devise a system for packing integer values greater than 65535 into a ushort. Let me explain.\nWe have a system which generates Int32 values using an IDENTITY column from SQL Server and are limited by an in-production client API that overflows our Int32 IDs to... |
I've done some research into server push with javascript and have found the general consensus to be that what I'm looking for lies in the "Comet" design pattern. Are there any good implementations of this pattern built on top of jQuery? If not, are there any good implementations of this pattern at all? And regardless o... | Yes, you're right that the Comet design pattern is used for enabling server push capabilities in web applications. This pattern allows servers to push updates to the client over HTTP, effectively allowing for real-time communication.
### jQuery Implementations:
While there are not many direct jQuery plugins specifical... | 13,915 | [
{
"from": "human",
"value": "I've done some research into server push with javascript and have found the general consensus to be that what I'm looking for lies in the \"Comet\" design pattern. Are there any good implementations of this pattern built on top of jQuery? If not, are there any good implementatio... |
We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Why not? Is it possible to direct subdomains to either PHP... | You can indeed install Ruby and the Rails framework alongside your existing Apache, PHP, and MySQL setup on your RedHat server. Here are some considerations for doing so:
### 1. **Compatibility**:
- **Apache with Passenger**: The most common way to run Ruby on Rails applications alongside PHP in an Apache environment ... | 16,912 | [
{
"from": "human",
"value": "We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Why not? Is it po... |
What follows is a regular expression I have written to match multi-line pre-processor macros in C / C++ code. I'm by no means a regular expressions guru, so I'd welcome any advice on how I can make this better.
Here's the regex:
\s*#define(.*\\\n)+[\S]+(?!\\)
It should match all of this:
#define foo(x) if(x) \
doSomet... | Your regular expression is a good starting point, but it can certainly be improved for clarity, correctness, and robustness. Here’s a breakdown of your regex and some suggestions for improvement:
### Your Regex Breakdown
```regex
\s*#define(.*\\\n)+[\S]+(?!\\)
```
1. `\s*#define`: Matches optional whitespace followed... | 14,023 | [
{
"from": "human",
"value": "What follows is a regular expression I have written to match multi-line pre-processor macros in C / C++ code. I'm by no means a regular expressions guru, so I'd welcome any advice on how I can make this better.\nHere's the regex:\n\\s*#define(.*\\\\\\n)+[\\S]+(?!\\\\)\n\nIt shou... |
After reading this answer:
best way to pick a random subset from a collection?
It got me wondering, how does one pick a random seed in Java?
And don't say use System.currentTimeMillis() or System.nanoTime(). Read the article to see why not.
That's a hard question, but let me make it harder. Let's say you need to gene... | Generating a truly random seed in a completely deterministic environment without user input, internet connection, or hardware access is indeed a challenging task. However, there are some strategies to generate a reasonably unpredictable seed using available information in the Java environment.
Here are a few approache... | 17,178 | [
{
"from": "human",
"value": "After reading this answer:\nbest way to pick a random subset from a collection?\nIt got me wondering, how does one pick a random seed in Java?\nAnd don't say use System.currentTimeMillis() or System.nanoTime(). Read the article to see why not.\nThat's a hard question, but let m... |
How can you remove all of the trailing whitespace of an entire project? Starting at a root directory, and removing the trailing whitespace from all files in all folders.
Also, I want to to be able to modify the file directly, and not just print everything to stdout.
| You can remove trailing whitespace from all files in a project using a command-line tool like `find` combined with `sed` or `perl` to modify the files directly. Here's a method using a shell command in a Unix-like environment (Linux or macOS). Before you proceed, it's always a good idea to back up your project or use v... | 16,050 | [
{
"from": "human",
"value": "How can you remove all of the trailing whitespace of an entire project? Starting at a root directory, and removing the trailing whitespace from all files in all folders.\nAlso, I want to to be able to modify the file directly, and not just print everything to stdout.\n"
},
{... |
Please bear with me, I'm just learning C++.
I'm trying to write my header file (for class) and I'm running into an odd error.
cards.h:21: error: expected unqualified-id before ')' token
cards.h:22: error: expected `)' before "str"
cards.h:23: error: expected `)' before "r"
What does "expected unqualified-id before ')... | It looks like you've encountered a common issue related to missing type specifications in your constructor declarations. The error messages you're seeing—particularly the "expected unqualified-id before ')' token"—often point to a problem where the compiler cannot recognize the type of a parameter.
In your `Card` clas... | 17,138 | [
{
"from": "human",
"value": "Please bear with me, I'm just learning C++. \nI'm trying to write my header file (for class) and I'm running into an odd error.\ncards.h:21: error: expected unqualified-id before ')' token\ncards.h:22: error: expected `)' before \"str\"\ncards.h:23: error: expected `)' before \"... |
I'm trying to find the most reusable, yet elegant, piece of code possible for determining if an IEnumerable. In the ideal, this should be a function I can call absolutely any time I need to tell if an IEnumerable is empty.
While I have developed an answer for .NET 3.5 that has worked well for me so far, my current tho... | It's great that you’re exploring ways to determine if an `IEnumerable` is empty! You’re correct that `IEnumerable` can represent a range of types, some of which may yield items on-the-fly, which can complicate the determination of emptiness.
In modern .NET (since .NET Framework 3.5 and later), the most elegant and ef... | 17,818 | [
{
"from": "human",
"value": "I'm trying to find the most reusable, yet elegant, piece of code possible for determining if an IEnumerable. In the ideal, this should be a function I can call absolutely any time I need to tell if an IEnumerable is empty.\nWhile I have developed an answer for .NET 3.5 that has... |
I have some commits that I've decided, after the fact, are going to be more branch work then trunk work. How do I create the branch and revert the trunk while still ensuring merging isn't painful later?
Is it as simple as copying the current trunk to a branch and reverting the trunk? Or will this create headaches later... | When you realize that certain commits should be moved to a separate branch rather than remaining in the trunk (main branch), it's essential to handle this correctly to avoid complications with future merges. Here’s a step-by-step process to do this:
### 1. Create a New Branch
First, create a new branch from the curren... | 17,392 | [
{
"from": "human",
"value": "I have some commits that I've decided, after the fact, are going to be more branch work then trunk work. How do I create the branch and revert the trunk while still ensuring merging isn't painful later?\nIs it as simple as copying the current trunk to a branch and reverting the ... |
Why does tempuri.org exist? Why does each XML Webservice require its own namespace, unique from any other on the web?
| Tempuri.org is a placeholder namespace that was created for demonstration purposes in Microsoft's .NET Framework for XML Web Services, particularly for SOAP (Simple Object Access Protocol) services. It serves as a default namespace when developers are creating sample web services and need a namespace to use in their XM... | 18,364 | [
{
"from": "human",
"value": "Why does tempuri.org exist? Why does each XML Webservice require its own namespace, unique from any other on the web?\n"
},
{
"from": "gpt",
"value": "Tempuri.org is a placeholder namespace that was created for demonstration purposes in Microsoft's .NET Framework fo... |
I knew I should never have started using c++ io, the whole "type safety" argument is a red herring (does anyone really find that it's one of their most pressing problems?). Anyhow, I did, and discovered a strange difference between ifstreams and FILE*s and plain old file descriptors: ifstreams cannot read from a device... | The behavior you're observing with `std::ifstream` and `FILE*` regarding reading from device files in C++ is indeed rooted in the way these streams are designed and implemented, as well as how device files are treated in the filesystem.
1. **Device File Handling**:
- Device files (like `/dev/disk3` on Unix-like sys... | 15,258 | [
{
"from": "human",
"value": "I knew I should never have started using c++ io, the whole \"type safety\" argument is a red herring (does anyone really find that it's one of their most pressing problems?). Anyhow, I did, and discovered a strange difference between ifstreams and FILE*s and plain old file descr... |
Is it a problem if you use the global keyword on variables you don't end up using? Compare:
function foo() {
global $fu;
global $bah;
if (something()) {
$fu->doSomething();
} else {
$bah->doSomething();
}
}
function bar() {
if (something()) {
global $fu;
$fu->doS... | When you use the `global` keyword in PHP, you are essentially telling the function that you want to access a global variable that has been declared outside of the function's local scope.
In your example, both `foo` and `bar` functions declare global variables, but they do it in slightly different ways. Here’s a summa... | 18,952 | [
{
"from": "human",
"value": "Is it a problem if you use the global keyword on variables you don't end up using? Compare:\nfunction foo() {\n global $fu;\n global $bah;\n if (something()) {\n $fu->doSomething();\n } else {\n $bah->doSomething();\n }\n}\n\nfunction bar() {\n if... |
I have a solution that contains two projects. One project is an ASP.NET Web Application Project, and one is a class library. The web application has a project reference to the class library. Neither of these is strongly-named.
In the class library, which I'll call "Framework," I have an endpoint behavior (an IEndpointB... | The issue you're encountering with Visual Studio 2008 relates to how the IDE resolves custom WCF configuration elements during design time. While your configuration works at runtime, the wizard used to add new items (in this case, an AJAX-enabled WCF service) relies on being able to locate your custom configuration ele... | 16,620 | [
{
"from": "human",
"value": "I have a solution that contains two projects. One project is an ASP.NET Web Application Project, and one is a class library. The web application has a project reference to the class library. Neither of these is strongly-named.\nIn the class library, which I'll call \"Framework,\... |
There are numerous times you have an interface that accepts similar type arguments that have a separate domain logic meaning:
public static class Database
{
public static bool HasAccess(string userId, string documentId) { return true; }
}
Now it's quite easy to have someone key documentId instead of userId and vice... | Yes, abstracting types by creating distinct classes for `UserId` and `DocumentId` is a well-known technique to improve type safety in your code. This pattern is commonly referred to as the "Value Object" pattern or "Type-safe Identifier" pattern. By creating separate classes for different identifiers, you can prevent m... | 15,323 | [
{
"from": "human",
"value": "There are numerous times you have an interface that accepts similar type arguments that have a separate domain logic meaning:\npublic static class Database\n{\n public static bool HasAccess(string userId, string documentId) { return true; }\n}\n\nNow it's quite easy to have so... |
In my ASP.Net 1.1 application, i've added the following to my Web.Config (within the System.Web tag section):
<httpHandlers>
<add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" />
</httpHandlers>
This works fine, and the HTTPHandler kicks in for files of type .bcn, and does its thing.. ... | The issue you're experiencing is likely related to how the ASP.NET runtime processes HTTP handlers. When you add a catch-all handler (using `verb="*"` and `path="*.bcn"`), it might be intercepting requests that would otherwise go to the ASMX files as well. This means that when an ASMX file is requested, the request mig... | 16,097 | [
{
"from": "human",
"value": "In my ASP.Net 1.1 application, i've added the following to my Web.Config (within the System.Web tag section):\n<httpHandlers>\n <add verb=\"*\" path=\"*.bcn\" type=\"Internet2008.Beacon.BeaconHandler, Internet2008\" />\n</httpHandlers>\n\nThis works fine, and the HTTPHandler ki... |
I have a simple function that sends out emails, how would I go about using threads to speed email delivery?
Sample code would be ideal.
| Using threads in Python can help speed up email delivery by allowing multiple emails to be sent simultaneously. This can be done using the `threading` module or the `concurrent.futures` module for a more high-level interface.
Below is a simple example using `concurrent.futures.ThreadPoolExecutor` to send emails concur... | 13,405 | [
{
"from": "human",
"value": "I have a simple function that sends out emails, how would I go about using threads to speed email delivery?\nSample code would be ideal.\n"
},
{
"from": "gpt",
"value": "Using threads in Python can help speed up email delivery by allowing multiple emails to be sent s... |
He're an interesting problem that looks for the most Pythonic solution. Suppose I have a list of mappings {'id': id, 'url': url}. Some ids in the list are duplicate, and I want to create a new list, with all the duplicates removed. I came up with the following function:
def unique_mapping(map):
d = {}
for res i... | Your solution is quite efficient, and it uses a dictionary to ensure that duplicate IDs are handled correctly. However, if you're looking for a more concise and "Pythonic" way to achieve the same result, you can utilize the `dict` constructor directly along with a generator expression. Here’s one way to do that:
```py... | 19,583 | [
{
"from": "human",
"value": "He're an interesting problem that looks for the most Pythonic solution. Suppose I have a list of mappings {'id': id, 'url': url}. Some ids in the list are duplicate, and I want to create a new list, with all the duplicates removed. I came up with the following function:\ndef uni... |
I currently have a fairly robust server-side validation system in place, but I'm looking for some feedback to make sure I've covered all angles. Here is a brief outline of what I'm doing at the moment:
Ensure the input is not empty, or is too long
Escape query strings to prevent SQL injection
Using regular expressions... | Your server-side validation system sounds like it's on the right track! However, there are always a few more considerations and best practices to ensure comprehensive validation and security. Here are some recommendations to enhance your validation system:
### Additional Validation Checks
1. **Type Validation**: Ensu... | 12,635 | [
{
"from": "human",
"value": "I currently have a fairly robust server-side validation system in place, but I'm looking for some feedback to make sure I've covered all angles. Here is a brief outline of what I'm doing at the moment:\n\nEnsure the input is not empty, or is too long\nEscape query strings to pre... |
So for the past day or so I have been fixing a bug that is caused by a modal dialog. I work on an application which communicates with the server through the Windows message pump. When I use ShowDialog() to show a modal form, the message pump is blocked and none of my messages are processed, yet they do build up in th... | The behavior you're experiencing with modal dialogs in your C# application can be quite perplexing, particularly when interacting with the Windows message pump. Let's address the core of your question first.
### Why are messages processed when a modal form is opened through a menu item's click event?
When you display... | 16,935 | [
{
"from": "human",
"value": "So for the past day or so I have been fixing a bug that is caused by a modal dialog. I work on an application which communicates with the server through the Windows message pump. When I use ShowDialog() to show a modal form, the message pump is blocked and none of my messages ... |
Is there a way to tell SQL Server 2008 Express to log every query (including each and every SELECT Query!) into a file?
It's a Development machine, so the negative side effects of logging Select-Queries are not an issue.
Before someone suggests using the SQL Profiler: This is not available in Express (does anyone know ... | SQL Server Express does not come with the SQL Server Profiler, which makes tracking every single query somewhat more challenging. However, you can achieve query logging using a few different methods, although each has its own considerations.
### Method 1: Triggers
You can create triggers on your tables to log every `S... | 15,418 | [
{
"from": "human",
"value": "Is there a way to tell SQL Server 2008 Express to log every query (including each and every SELECT Query!) into a file?\nIt's a Development machine, so the negative side effects of logging Select-Queries are not an issue.\nBefore someone suggests using the SQL Profiler: This is ... |
This isn't legal:
public class MyBaseClass
{
public MyBaseClass() {}
public MyBaseClass(object arg) {}
}
public void ThisIsANoNo<T>() where T : MyBaseClass
{
T foo = new T("whoops!");
}
In order to do this, you have to do some reflection on the type object for T or you have to use Activator.CreateInstance. Bo... | You're correct that you cannot directly create an instance of a generic type parameter in C# using `new T()`, especially when the constructor you want to use requires parameters. The constraints on generics in C# do not allow you to specify which constructors the type `T` must have beyond having a parameterless constru... | 9,710 | [
{
"from": "human",
"value": "This isn't legal:\npublic class MyBaseClass\n{\n public MyBaseClass() {}\n public MyBaseClass(object arg) {}\n}\n\n\npublic void ThisIsANoNo<T>() where T : MyBaseClass\n{\n T foo = new T(\"whoops!\");\n}\n\nIn order to do this, you have to do some reflection on the type objec... |
I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the information about the System.Data.SqlClient.SqlCommand object.
I would like to be able to handle passing in SqlCommands, Tabl... | Creating a generic error handling and logging class that incorporates reflection to capture relevant details from exceptions and specific objects like `SqlCommand`, `TableAdapter`, and `SqlDataAdapter` can be very useful for diagnosing issues in your applications. Below is an outline of how you might implement such a c... | 11,103 | [
{
"from": "human",
"value": "I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the information about the System.Data.SqlClient.SqlCommand object.\nI would like to be a... |
I'm having some internationalisation woes:
My UTF-8 string fields are being rendered in the browser as ???? after being returned from the database.
After retrieval from the database using Hibernate, the String fields are presented correctly on inspection using the eclipse debugger.
However Struts2/Tiles is rendering th... | It sounds like you're facing an issue related to character encoding during the process of retrieving data from the database and rendering it in the browser. Here are some steps to troubleshoot and potentially resolve your issue with UTF-8 strings in a Struts2/Tiles application:
### 1. Database Configuration
Make sure... | 13,934 | [
{
"from": "human",
"value": "I'm having some internationalisation woes:\nMy UTF-8 string fields are being rendered in the browser as ???? after being returned from the database.\nAfter retrieval from the database using Hibernate, the String fields are presented correctly on inspection using the eclipse debu... |
I'm writing a routine to provide user definable keyboard short-cuts for any menu item in my Windows Mobile 5 application, which is in C++/MFC. To do this I am getting all of the available menu command IDs, and using the CWnd::PostMessage(WM_COMMAND,MyMenuID) to post it to the application. I use this technique to good... | When it comes to handling menu commands in an MFC application, using `PostMessage(WM_COMMAND, MyMenuID)` should generally work. However, there are some nuances that you might be running into, especially with keyboard shortcuts in a Windows Mobile 5 application. Here are a few points to consider:
1. **Message Handling*... | 15,320 | [
{
"from": "human",
"value": "I'm writing a routine to provide user definable keyboard short-cuts for any menu item in my Windows Mobile 5 application, which is in C++/MFC. To do this I am getting all of the available menu command IDs, and using the CWnd::PostMessage(WM_COMMAND,MyMenuID) to post it to the a... |
When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this?
I know I can do an "hg incoming -p" to see the patch sets of changes coming in, but it'd be nice to just directly see the actual changes for a particular file... | Certainly! If you're looking to compare the working copy of a file with the tip file in your default remote repository using Mercurial, there are a few different approaches you can take without having to resort to writing a custom script.
### Option 1: Using `hg fetch`
If your remote repository is set up correctly, y... | 12,686 | [
{
"from": "human",
"value": "When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this?\nI know I can do an \"hg incoming -p\" to see the patch sets of changes coming in, but it'd be nice to just directly ... |
Im using APACHE as my web server and using port 8080. Ive create a site called
(e.g. http://test.domain.com:8080). I have a Firewall (ISA Server 2006).
How am I suppose to establish "http://test.domain.com:8080"in ISA Server?
Will I just add "http://test.domain.com" as its public name or with this "http://test.domain.... | To establish access to your Apache web server running on port 8080 through your ISA Server 2006, you will need to configure a few settings. Here are the steps you should follow:
### 1. **Set Up Firewall Policy**
1. **Open the ISA Server Management Console.**
2. **Go to Firewall Policies**:
- Under `Firewall Policy... | 15,013 | [
{
"from": "human",
"value": "Im using APACHE as my web server and using port 8080. Ive create a site called \n(e.g. http://test.domain.com:8080). I have a Firewall (ISA Server 2006).\nHow am I suppose to establish \"http://test.domain.com:8080\"in ISA Server?\nWill I just add \"http://test.domain.com\" as i... |
Like the title says Where and How (i.e. if encrypted, with what method) does Windows XP store WEP/WPA Keys?
| Windows XP stores wireless network keys, including WEP and WPA keys, in the Windows registry. The specific keys are stored in different locations depending on the version of the Windows XP system and whether the network settings were configured using the built-in Windows wireless management tool or a third-party tool.
... | 17,272 | [
{
"from": "human",
"value": "Like the title says Where and How (i.e. if encrypted, with what method) does Windows XP store WEP/WPA Keys?\n"
},
{
"from": "gpt",
"value": "Windows XP stores wireless network keys, including WEP and WPA keys, in the Windows registry. The specific keys are stored in ... |
I have a class that looks like this
public class SomeClass
{
public SomeChildClass[] childArray;
}
which will output XML from the XMLSerializer like this:
<SomeClass>
<SomeChildClass>
...
</SomeChildClass>
<SomeChildClass>
...
</SomeChildClass>
</SomeClass>
But I want the XML to look like ... | Unfortunately, the built-in .NET `XmlSerializer` does not support adding custom attributes like an index automatically during the serialization process. However, there are a few alternative approaches you can take to achieve the desired XML output.
### Approach 1: Use a Custom Serialization Method
You can implement a... | 15,893 | [
{
"from": "human",
"value": "I have a class that looks like this\npublic class SomeClass\n{\n public SomeChildClass[] childArray;\n}\n\nwhich will output XML from the XMLSerializer like this:\n<SomeClass>\n <SomeChildClass>\n ...\n </SomeChildClass>\n <SomeChildClass>\n ...\n </SomeChil... |
Has anyone here given the Fantom programming language a whirl? (pun intended).
My first impression:
I like the ability to have the code run on either the .NET or Java VM.
The syntax is nice and clean and does not try anything fancy.
I have a belief that "the library is the language" and the developers of Fan believe t... | It's great to hear your thoughts on the Fantom programming language! Your observations capture some of its key features and goals. Here are some additional thoughts that may complement your impressions:
### Pros of Fantom:
1. **Cross-Platform**: As you mentioned, Fantom's ability to run on both the .NET and Java Virt... | 14,390 | [
{
"from": "human",
"value": "Has anyone here given the Fantom programming language a whirl? (pun intended).\nMy first impression:\n\nI like the ability to have the code run on either the .NET or Java VM.\nThe syntax is nice and clean and does not try anything fancy.\nI have a belief that \"the library is th... |
What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?
| A quick-and-dirty way to ensure that only one instance of a shell script is running at a time is to use a lock file. Here's a simple approach:
1. Create a temporary lock file.
2. Check if the lock file already exists; if it does, exit the script.
3. If it doesn't exist, create the lock file and proceed with the script... | 17,063 | [
{
"from": "human",
"value": "What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?\n"
},
{
"from": "gpt",
"value": "A quick-and-dirty way to ensure that only one instance of a shell script is running at a time is to use a lock file. Here's... |
I would like to create a blog where my Twitter updates essentially create blog posts, with a comment thread. If there isn't blog software that does this right now (I did some searching but couldn't find the commenting aspect) what would be the simplest approach and starting blog software to do this?
Potentially an alte... | Creating a blog that automatically pulls in your Twitter updates and allows for commenting is a great idea! While there may not be a perfect out-of-the-box solution, you can combine several tools and platforms to achieve this with minimal manual work. Here are a couple of approaches to consider:
### Option 1: Using Wo... | 17,561 | [
{
"from": "human",
"value": "I would like to create a blog where my Twitter updates essentially create blog posts, with a comment thread. If there isn't blog software that does this right now (I did some searching but couldn't find the commenting aspect) what would be the simplest approach and starting blog... |
I am looking for easy steps that are simple and effective in making a web application more secure.
What are your top tips for secure web applications, and what kind of attack will they stop?
| Securing a web application is crucial to protect sensitive data and maintain user trust. Here are some simple yet effective steps to enhance the security of your web application, along with the types of attacks they can help mitigate:
### 1. **Use HTTPS**
- **Tip**: Implement HTTPS across your entire site.
- **P... | 14,440 | [
{
"from": "human",
"value": "I am looking for easy steps that are simple and effective in making a web application more secure.\nWhat are your top tips for secure web applications, and what kind of attack will they stop?\n"
},
{
"from": "gpt",
"value": "Securing a web application is crucial to p... |
I've been searching and can't find the download files on opengl.org. can someone please point me to the right direction?
| If you're looking for OpenGL-related downloads, it's important to note that OpenGL itself is a specification and does not have a standalone downloadable package like some libraries or frameworks. However, you can find various resources and tools associated with OpenGL, such as drivers, SDKs, and additional libraries.
... | 15,965 | [
{
"from": "human",
"value": "I've been searching and can't find the download files on opengl.org. can someone please point me to the right direction?\n"
},
{
"from": "gpt",
"value": "If you're looking for OpenGL-related downloads, it's important to note that OpenGL itself is a specification and ... |
We used to use SourceSafe, and one thing I liked about it was that when you checked out a file, it automatically got you its latest version.
Now we work with Team System 2005, and it doesn't work that way - you have to "get latest version" before you start working on a file that you've checked out.
Is there a way to co... | In Team Foundation Server (TFS) 2005, there isn't a built-in feature that directly mimics the behavior of SourceSafe in automatically getting the latest version of a file when checking it out. When you check out a file in TFS, it does not automatically fetch the latest version; you need to explicitly perform a "Get Lat... | 16,144 | [
{
"from": "human",
"value": "We used to use SourceSafe, and one thing I liked about it was that when you checked out a file, it automatically got you its latest version.\nNow we work with Team System 2005, and it doesn't work that way - you have to \"get latest version\" before you start working on a file t... |
What is the best way for me to determine a controller variable's value during execution?
For example, is there a way I can insert a break in the code, and cause the value of the variable to be output to the screen (or the log)?
| To determine a controller variable's value during execution, you have several options, depending on the programming language and framework you are using. Here are some common methods to insert a breakpoint and output the variable's value:
### 1. Debugging Tools
Most integrated development environments (IDEs) have buil... | 14,519 | [
{
"from": "human",
"value": "What is the best way for me to determine a controller variable's value during execution?\nFor example, is there a way I can insert a break in the code, and cause the value of the variable to be output to the screen (or the log)?\n"
},
{
"from": "gpt",
"value": "To de... |
How do you set your Cocoa application as the default web browser?
I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.).
| To set your Cocoa application as the default web browser on macOS, you'll need to follow these steps:
### Step 1: Register your application as a URL handler
You need to define your app's capability to handle HTTP and HTTPS URLs in your app's `Info.plist` file. Here's how to do it:
1. Open your Xcode project.
2. Find... | 13,436 | [
{
"from": "human",
"value": "How do you set your Cocoa application as the default web browser?\nI want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.).\n"
},
{
"from": "gpt",
"value": "To set your Cocoa a... |
I have this modeless MFC dialog which embeds an Internet Explorer web browser control.
The control is derived straight from CWnd with ActiveX wrappers generated by Visual Studio, and I map it to the CDialog using only a DDX_Control(pDX, IDC_EXPLORER, m_explorer);.
I have 2 problems.
Problem #1:
Being modeless, I start ... | You have two distinct problems with your modeless MFC dialog containing an Internet Explorer web browser control. Let's tackle them one at a time.
### Problem #1: Stopping the Loading of Flash Videos
The issue of the web browser control continuing to load Flash videos even after the dialog is closed stems from the fa... | 15,150 | [
{
"from": "human",
"value": "I have this modeless MFC dialog which embeds an Internet Explorer web browser control.\nThe control is derived straight from CWnd with ActiveX wrappers generated by Visual Studio, and I map it to the CDialog using only a DDX_Control(pDX, IDC_EXPLORER, m_explorer);.\nI have 2 pro... |
Is anyone out there still using DataFlex? If so, what are you favorite tips and tricks for this venerable 4GL?
| Yes, there are still users and developers who actively use DataFlex, particularly in legacy systems and certain niche applications. While it's not as widely used as some modern programming languages, it has a dedicated community. Here are some tips and tricks for working with DataFlex:
1. **Utilize the DataFlex Docume... | 15,194 | [
{
"from": "human",
"value": "Is anyone out there still using DataFlex? If so, what are you favorite tips and tricks for this venerable 4GL?\n"
},
{
"from": "gpt",
"value": "Yes, there are still users and developers who actively use DataFlex, particularly in legacy systems and certain niche appli... |
Is there any open-source, PHP based, role-based access control system that can be used for CodeIgniter?
| Yes, there are several open-source PHP-based role-based access control (RBAC) systems that can be integrated with CodeIgniter. Here are a few options you can consider:
1. **CodeIgniter Auth**: This is a simple authentication library for CodeIgniter that supports role-based access control. It allows you to easily manag... | 18,011 | [
{
"from": "human",
"value": "Is there any open-source, PHP based, role-based access control system that can be used for CodeIgniter?\n"
},
{
"from": "gpt",
"value": "Yes, there are several open-source PHP-based role-based access control (RBAC) systems that can be integrated with CodeIgniter. Her... |
Given:
interface I
{
}
class B: I
{
}
class C: I
{
}
class A
{
public void Method(B arg)
{
}
public void Method(C arg)
{
}
public void Method(I arg)
{
// THIS is the method I want to simplify.
if (I is B)
{
this.Method(arg as B);
}
else ... | You can achieve a more elegant solution using generics combined with type constraints and a delegate. The idea is to define a generic method that takes a type and a delegate that specifies what to do with the argument once it is validated.
Here's an example of how you could simplify your `Method` by using a generic he... | 16,491 | [
{
"from": "human",
"value": "Given:\ninterface I\n{\n}\n\nclass B: I\n{\n}\n\nclass C: I\n{\n}\n\nclass A\n{\n\n public void Method(B arg)\n {\n }\n\n public void Method(C arg)\n {\n }\n\n public void Method(I arg)\n {\n // THIS is the method I want to simplify.\n if (I i... |
How do I determine if an object reference is null in C# w/o throwing an exception if it is null?
i.e. If I have a class reference being passed in and I don't know if it is null or not.
| In C#, you can determine if an object reference is `null` simply by using an `if` statement to check the reference against `null`. This does not throw an exception if the reference is `null`. Here’s how you can do it:
```csharp
public void ProcessObject(MyClass obj)
{
if (obj == null)
{
// Handle the c... | 19,217 | [
{
"from": "human",
"value": "How do I determine if an object reference is null in C# w/o throwing an exception if it is null?\ni.e. If I have a class reference being passed in and I don't know if it is null or not.\n"
},
{
"from": "gpt",
"value": "In C#, you can determine if an object reference ... |
I need to convert the punycode NIATO-OTABD to nñiñatoñ.
I found a text converter in JavaScript the other day, but the punycode conversion doesn't work if there's a dash in the middle.
Any suggestion to fix the "dash" issue?
| To convert a Punycode string like `NIATO-OTABD` to its Unicode equivalent (in this case `nñiñatoñ`), you'll need to take into account that Punycode strings are a way to represent Unicode characters in a way that can be used in domain names. The dash (`-`) in Punycode indicates a separation between different parts of th... | 16,513 | [
{
"from": "human",
"value": "I need to convert the punycode NIATO-OTABD to nñiñatoñ.\nI found a text converter in JavaScript the other day, but the punycode conversion doesn't work if there's a dash in the middle.\nAny suggestion to fix the \"dash\" issue?\n"
},
{
"from": "gpt",
"value": "To con... |
We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows (so it is taking 10 seconds to do 10 of these values).... | To optimize the performance of your logging process when dealing with a large dataset, you have several strategies you can consider. Here's a breakdown of potential solutions to improve your current approach:
### 1. Optimize the Database Query
- **Ensure Proper Indexing**: Review your indexing strategy. If you're fre... | 15,530 | [
{
"from": "human",
"value": "We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows (so it is tak... |
I have a large number of Enums that implement this interface:
/**
* Interface for an enumeration, each element of which can be uniquely identified by its code
*/
public interface CodableEnum {
/**
* Get the element with a particular code
* @param code
* @return
*/
public CodableEnum getBy... | You are correct that enums in Java cannot extend other classes, and since enums are implicitly final, you cannot inherit from them. However, you can implement a common pattern to reduce duplication without needing to rely on reflection. One common approach is to use a static method in the enum itself for looking up the... | 13,896 | [
{
"from": "human",
"value": "I have a large number of Enums that implement this interface:\n/**\n * Interface for an enumeration, each element of which can be uniquely identified by its code\n */\npublic interface CodableEnum {\n\n /**\n * Get the element with a particular code\n * @param code\n ... |
I want to build my own custom log4j (network) adapter to solve my problem that I posted here.
I have looked at the documentation on the log4j and I cant see where/if the developers go into how to do this.
Can anyone point me in the right direction to get started?
| Building a custom adapter for Log4j, particularly a network adapter, can be a rewarding project. Here’s a general roadmap and resources to get you started:
### 1. **Understand Log4j Architecture**
Before you start coding, familiarize yourself with the basic structure of Log4j, especially its core concepts, such as:
... | 14,409 | [
{
"from": "human",
"value": "I want to build my own custom log4j (network) adapter to solve my problem that I posted here.\nI have looked at the documentation on the log4j and I cant see where/if the developers go into how to do this.\nCan anyone point me in the right direction to get started?\n"
},
{
... |
This is pretty simple, I come from a swing/awt background.
I'm just wondering what the proper way to set the background color for a SWT widget is?
I've been trying:
widget.setBackground( );
Except I have no idea how to create the color Object in SWT?
| In SWT (Standard Widget Toolkit), you set the background color of a widget using the `setBackground(Color color)` method. To create a `Color` object in SWT, you need to use the `Display` class. Here's how you can do it:
1. Obtain the `Display` instance.
2. Create a `Color` object using the `Display` instance.
3. Set t... | 17,810 | [
{
"from": "human",
"value": "This is pretty simple, I come from a swing/awt background.\nI'm just wondering what the proper way to set the background color for a SWT widget is?\nI've been trying:\nwidget.setBackground( );\n\nExcept I have no idea how to create the color Object in SWT?\n"
},
{
"from"... |
I am involved in development of a tiered application that uses LINQ2SQL separated from the web server with a NET.TCP Binding on WCF.
My questions are:
What sort of measures should I take
to achieve the best performance?
Since the entity objects returned by
the LINQ need to be converted to a
IEnumerable list to be ... | To achieve the best performance in your tiered application using LINQ to SQL with WCF over NET.TCP binding, there are several measures you can take. Additionally, I’ll address the issue of serialization of entity objects. Here are some recommendations:
### Performance Optimization Measures
1. **Optimize LINQ Queries*... | 14,958 | [
{
"from": "human",
"value": "I am involved in development of a tiered application that uses LINQ2SQL separated from the web server with a NET.TCP Binding on WCF. \nMy questions are: \n\nWhat sort of measures should I take\nto achieve the best performance?\nSince the entity objects returned by\nthe LINQ ne... |
Would it be useful to include the class name and variable name in any NullPointerException message? I know that it might not always be possible because of changes made by a JIT but is seems like the info should be available often (class members, etc).
From: http://jamesjava.blogspot.com/2005/04/what-was-null.html
| Including the class name and variable name in a `NullPointerException` message can significantly enhance debugging and make it easier for developers to identify the source of the issue. Here are some reasons why this can be useful:
1. **Contextual Information**: When an exception occurs, knowing the class and variable... | 14,644 | [
{
"from": "human",
"value": "Would it be useful to include the class name and variable name in any NullPointerException message? I know that it might not always be possible because of changes made by a JIT but is seems like the info should be available often (class members, etc).\nFrom: http://jamesjava.bl... |
List Comprehension is a very useful code mechanism that is found in several languages, such as Haskell, Python, and Ruby (just to name a few off the top of my head). I'm familiar with the construct.
I find myself working on an Open Office Spreadsheet and I need to do something fairly common: I want to count all of the ... | OpenOffice Calc does not have a direct equivalent to list comprehensions found in programming languages like Python or Haskell. However, you can achieve similar functionality using built-in functions like `COUNTIFS` or by combining other functions.
If you want to count the values in a range that fall between two bound... | 19,783 | [
{
"from": "human",
"value": "List Comprehension is a very useful code mechanism that is found in several languages, such as Haskell, Python, and Ruby (just to name a few off the top of my head). I'm familiar with the construct.\nI find myself working on an Open Office Spreadsheet and I need to do something ... |
Say I have some javascript that if run in a browser would be typed like this...
<script type="text/javascript"
src="http://someplace.net/stuff.ashx"></script>
<script type="text/javascript">
var stuff = null;
stuff = new TheStuff('myStuff');
</script>
... and I want to use the javax.script package in java 1... | To run JavaScript code that depends on a remote source (like a `.ashx` file) in a Java application using the `javax.script` package, you would need to ensure that the JavaScript engine has access to the definitions and implementations provided by that remote script. The JavaScript engine itself does not inherently know... | 13,092 | [
{
"from": "human",
"value": "Say I have some javascript that if run in a browser would be typed like this...\n<script type=\"text/javascript\"\n src=\"http://someplace.net/stuff.ashx\"></script>\n\n<script type=\"text/javascript\">\n var stuff = null;\n stuff = new TheStuff('myStuff');\n</script>\n\n... |
I'm currently using default implementation of STL for VS2005 and I'm not really satisfied with it. Perhaps there is something better?
| If you're looking for alternatives to the default STL implementation in Visual Studio 2005, there are several options you can consider. Here are a few popular alternatives and libraries that might improve your experience:
1. **Boost**: Boost is a widely-used library that provides a variety of utility classes and funct... | 19,441 | [
{
"from": "human",
"value": "I'm currently using default implementation of STL for VS2005 and I'm not really satisfied with it. Perhaps there is something better?\n"
},
{
"from": "gpt",
"value": "If you're looking for alternatives to the default STL implementation in Visual Studio 2005, there ar... |
I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and quite bad latency, and a CVS update from there often takes 5-10 minutes even th... | Working with CVS over poor bandwidth and high latency can indeed be challenging. Here are some strategies and tools you can consider to improve performance and manage synchronization between CVS repositories across different sites:
### CVS Proxy Solutions
1. **CVS Proxy**: There are some proxy solutions available, suc... | 11,695 | [
{
"from": "human",
"value": "I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and quite bad latency, and a CVS update fr... |
When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init'er to return nil?)
It seems to me that a constructor should fail -- and thus refuse to create an object -- if the object isn't complete. I.e., the constructor should have a contract with its caller to ... | Your reasoning regarding constructors (or initializers in Objective-C) and the conditions under which they should throw exceptions (or return `nil`) is quite sound. Here are some guidelines to consider when determining whether it is appropriate for a constructor to fail:
### When to Throw Exceptions or Return `nil`
1... | 16,441 | [
{
"from": "human",
"value": "When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init'er to return nil?)\nIt seems to me that a constructor should fail -- and thus refuse to create an object -- if the object isn't complete. I.e., the constructor ... |
I'm wondering which languages support (or don't support) native multithreading, and perhaps get some details about the implementation. Hopefully we can produce a complete overview of this specific functionality.
| Multithreading support can vary significantly between programming languages, and it often depends on the language’s design, runtime environment, and standard libraries. Below is an overview of various programming languages, indicating whether they support native multithreading, along with some details about their imple... | 13,702 | [
{
"from": "human",
"value": "I'm wondering which languages support (or don't support) native multithreading, and perhaps get some details about the implementation. Hopefully we can produce a complete overview of this specific functionality.\n"
},
{
"from": "gpt",
"value": "Multithreading suppor... |
I am running a couple of databases on MySQL 5.0.45 and am trying to get my legacy database to sync with a revised schema, so I can run both side by side. I am doing this by adding triggers to the new database but I am running into problems with replication. My set up is as follows.
Server "master"
Database "legacydb"... | You're facing a common challenge when working with triggers and replication in MySQL, especially given the constraints of version 5.0.45. Here are some suggestions on how to approach this situation:
1. **Understand the Trigger Context**: As you noted, triggers execute in the context of the database they belong to. The... | 11,777 | [
{
"from": "human",
"value": "I am running a couple of databases on MySQL 5.0.45 and am trying to get my legacy database to sync with a revised schema, so I can run both side by side. I am doing this by adding triggers to the new database but I am running into problems with replication. My set up is as foll... |
I am designing an application that is going to consist of 3-4 services that run as separate processes and are linked by a suitable IPC. The system is going to have a web interface and I want to use whatever webserver is there.
The web interface should be accessed under some URL that allows to have other URLs on the sam... | Your application architecture raises a number of interesting considerations regarding performance, scalability, and design. Let's explore a few strategies to achieve your goals, focusing on efficient handling of requests in a web server environment.
### 1. Use a Web Application Framework
Instead of relying on CGI, wh... | 14,562 | [
{
"from": "human",
"value": "I am designing an application that is going to consist of 3-4 services that run as separate processes and are linked by a suitable IPC. The system is going to have a web interface and I want to use whatever webserver is there.\nThe web interface should be accessed under some URL... |
How do I find the location of my site-packages directory?
| The location of your site-packages directory can be determined in several ways, depending on your operating system and how Python is installed. Here are some methods you can use to find the site-packages directory:
### Method 1: Using Python Code
You can use Python itself to find the path to the site-packages directo... | 17,161 | [
{
"from": "human",
"value": "How do I find the location of my site-packages directory?\n"
},
{
"from": "gpt",
"value": "The location of your site-packages directory can be determined in several ways, depending on your operating system and how Python is installed. Here are some methods you can us... |
My team has been using SVN for a few years. We now have the option of switching to Perforce.
What would be the benefits (and pitfalls) of making such a switch?
| Switching from SVN (Subversion) to Perforce can offer several benefits and some potential pitfalls. Here’s a breakdown to help you understand the implications of such a transition:
### Benefits of Switching to Perforce
1. **Performance and Scalability**:
- **Handling Large Files**: Perforce is designed to manage l... | 13,324 | [
{
"from": "human",
"value": "My team has been using SVN for a few years. We now have the option of switching to Perforce.\nWhat would be the benefits (and pitfalls) of making such a switch?\n"
},
{
"from": "gpt",
"value": "Switching from SVN (Subversion) to Perforce can offer several benefits an... |
I need to store the user's password in my iphone app.
When posting an app to the app store, I have to tell Apple if there's encryption in the app for export purposes.
I don't want my app to be restricted to US only, but I also don't want to store or send passwords over the net in clear text.
So basically the question ... | When it comes to handling user passwords in your iPhone app, it's essential to follow best practices for security while also adhering to Apple's guidelines for encryption and export compliance.
### Key Points to Consider:
1. **Encryption Standards**: You can encrypt passwords using strong encryption methods (like AES... | 17,073 | [
{
"from": "human",
"value": "I need to store the user's password in my iphone app. \nWhen posting an app to the app store, I have to tell Apple if there's encryption in the app for export purposes.\nI don't want my app to be restricted to US only, but I also don't want to store or send passwords over the ne... |
My macro updates a large spreadsheet with numbers, but it runs very slowly as excel is rendering the result as it computes it. How do I stop excel from rendering the output until the macro is complete?
| To improve the performance of your macro and prevent Excel from rendering the output while your macro is running, you can use the following techniques:
### 1. Disable Screen Updating
You can turn off screen updating at the beginning of your macro and turn it back on at the end. This prevents Excel from refreshing the ... | 12,139 | [
{
"from": "human",
"value": "My macro updates a large spreadsheet with numbers, but it runs very slowly as excel is rendering the result as it computes it. How do I stop excel from rendering the output until the macro is complete?\n"
},
{
"from": "gpt",
"value": "To improve the performance of yo... |
I have unmanaged C++ calling a managed delegate via the function pointer provided by Marshal::GetFunctionPointerForDelegate. This delegate has the potential to throw an exception. I need to be able to properly handle this exception in my unmanaged C++ to ensure things like pointer cleanup, and potentially rethrow the... | Handling exceptions across the boundary between unmanaged C++ and managed C# can be tricky, especially when you are working with delegates that can throw exceptions. Here's a general outline of how you can achieve this while ensuring proper resource cleanup in your unmanaged code and allowing the exception to propagate... | 16,365 | [
{
"from": "human",
"value": "I have unmanaged C++ calling a managed delegate via the function pointer provided by Marshal::GetFunctionPointerForDelegate. This delegate has the potential to throw an exception. I need to be able to properly handle this exception in my unmanaged C++ to ensure things like poi... |
I have been trying to use routes.rb for creating a URL /similar-to-:product (where product is dynamic) for my website. The issue is that routes.rb readily supports URLs like /:product-similar but doesn't support the former because it requires :product to be preceded with a separator ('/' is a separator but '-' isn't). ... | You're correct that using the standard Rails routing DSL, you can't directly define a route with a segment followed by a hyphen without introducing conflicts or needing to change the routing behavior significantly.
To achieve a URL pattern like `/similar-to-:product`, you have a few options that still keep your routi... | 16,460 | [
{
"from": "human",
"value": "I have been trying to use routes.rb for creating a URL /similar-to-:product (where product is dynamic) for my website. The issue is that routes.rb readily supports URLs like /:product-similar but doesn't support the former because it requires :product to be preceded with a separ... |
Huge files take forever to load and work with in vim, due to syntax-highlighting.
I'm looking for a way to limit size of highlighted files, such that files larger than (say) 10MB will be colorless.
| You can achieve this in Vim by setting up an autocommand that checks the size of the file when you open it and disables syntax highlighting for files larger than a specified size. Here’s how you can do it:
1. Open your Vim configuration file. This is usually located at `~/.vimrc` or `~/.config/nvim/init.vim` if you're... | 17,515 | [
{
"from": "human",
"value": "Huge files take forever to load and work with in vim, due to syntax-highlighting.\nI'm looking for a way to limit size of highlighted files, such that files larger than (say) 10MB will be colorless.\n"
},
{
"from": "gpt",
"value": "You can achieve this in Vim by sett... |
I'm writing a Windows Forms application which is supposed to play three sound files and at the end of each sound file, it's to change the source of an image.
I can get it to play the sounds using System.Media.SoundPlayer. However, it seems to play the sound in a different thread, continuing on.
The net effect of this i... | In order to play sound files sequentially in a Windows Forms application without blocking the GUI, you can use asynchronous programming. Here’s a simple approach to achieving your goal using `async` and `await` along with `Task`. This way, you can play each sound file in sequence while updating the image after each sou... | 16,963 | [
{
"from": "human",
"value": "I'm writing a Windows Forms application which is supposed to play three sound files and at the end of each sound file, it's to change the source of an image.\nI can get it to play the sounds using System.Media.SoundPlayer. However, it seems to play the sound in a different threa... |
Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service's session when the service is started? Logging in as the service user and creating a persistent mapping will not establish the mapping in the context of the actual service.... | When dealing with Windows services, especially those that run under a specific user account, accessing mapped network drives can be challenging because the context in which services run does not typically maintain mapped drives like a user session does. Here are a few methods to make the drive mapping available to a Wi... | 16,022 | [
{
"from": "human",
"value": "Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service's session when the service is started? Logging in as the service user and creating a persistent mapping will not establish the mapp... |
I have some c(++) code that uses sprintf to convert a uint_64 to a string. This needs to be portable to both linux and Solaris.
On linux we use %ju, but there does not appear to be any equivalent on Solaris. The closest I can find is %lu, but this produces incorrect output. Some sample code:
#include <stdio.h>
#incl... | To handle the printing of a `uint64_t` value in a portable way across different operating systems, including Linux and Solaris, you need to ensure that you use the correct format specifier for `uint64_t`. The issue you're encountering is that Solaris does not recognize `%ju` and `%lu` is inappropriate for `uint64_t` as... | 18,792 | [
{
"from": "human",
"value": "I have some c(++) code that uses sprintf to convert a uint_64 to a string. This needs to be portable to both linux and Solaris.\nOn linux we use %ju, but there does not appear to be any equivalent on Solaris. The closest I can find is %lu, but this produces incorrect output. ... |
I am trying to uncompress some data created in VB6 using the zlib API.
I have read this is possible with the qUncompress function:
http://doc.trolltech.com/4.4/qbytearray.html#qUncompress
I have read the data in from QDataStream via readRawBytes into a char
array, which I then converted to a QByteArray for decompressio... | To use `qUncompress` from the Qt library to decompress data that was compressed using zlib in VB6, you need to follow specific steps, including correctly prepending the expected decompressed length in big-endian format.
Here's a breakdown of how to prepare the data and perform the decompression:
1. **Prepend the Deco... | 16,553 | [
{
"from": "human",
"value": "I am trying to uncompress some data created in VB6 using the zlib API.\nI have read this is possible with the qUncompress function:\nhttp://doc.trolltech.com/4.4/qbytearray.html#qUncompress\nI have read the data in from QDataStream via readRawBytes into a char\narray, which I th... |
Assuming I have an open source web server or proxy I can enhance, let's say apache or squid.
Is there a way to determine the time each client spends on a web page?
HTTP is of course stateless, so it's not trivial, but maybe someone has an idea on how to approach this problem?
| Determining the time each client spends on a web page is indeed challenging due to the stateless nature of HTTP. However, there are several approaches you can take to estimate this duration. Here are some methods you can consider:
### 1. **JavaScript-based Tracking**
One of the most common methods is to use JavaScript... | 13,739 | [
{
"from": "human",
"value": "Assuming I have an open source web server or proxy I can enhance, let's say apache or squid. \nIs there a way to determine the time each client spends on a web page?\nHTTP is of course stateless, so it's not trivial, but maybe someone has an idea on how to approach this problem?... |
When using the paginator helper in cakephp views, it doesnt remember parts of the url that are custom for my useage.
For example:
http://example.org/users/index/moderators/page:2/sort:name/dir:asc
here moderators is a parameter that helps me filter by that type. But pressing a paginator link will not include this lin... | In CakePHP, when you're using the Paginator helper, it does not automatically include custom parameters that aren't part of the default query parameters (like `page`, `sort`, and `dir`). To retain additional parameters (like `moderators` in your example) when generating pagination links, you need to explicitly pass tho... | 15,473 | [
{
"from": "human",
"value": "When using the paginator helper in cakephp views, it doesnt remember parts of the url that are custom for my useage.\nFor example: \nhttp://example.org/users/index/moderators/page:2/sort:name/dir:asc\n\nhere moderators is a parameter that helps me filter by that type. But pressi... |
What do the brackets do in a sql statement?
For example, in the statement:
insert into table1 ([columnname1], columnname2) values (val1, val2)
Also, what does it do if the table name is in brackets?
| In SQL, brackets (`[ ]`) are used to delimit identifiers such as table names, column names, and other database objects. They serve a few key purposes:
1. **Special Characters and Spaces**: If an identifier contains special characters (like spaces, hyphens, or punctuation) or is a reserved keyword in SQL, you can use b... | 18,931 | [
{
"from": "human",
"value": "What do the brackets do in a sql statement?\nFor example, in the statement: \ninsert into table1 ([columnname1], columnname2) values (val1, val2)\nAlso, what does it do if the table name is in brackets?\n"
},
{
"from": "gpt",
"value": "In SQL, brackets (`[ ]`) are u... |
I would like to break a long line of text assigned to the standard Label widget in GWT.
I was experimenting with inline <br /> elements but with no success.
Something like this:
label = "My very very very long<br />long long text"
| In GWT (Google Web Toolkit), the `Label` widget does not interpret HTML tags like `<br />` by default. Instead, it renders text as plain text, which means HTML tags won't be processed. If you want to include line breaks in a `Label`, you have a couple of options:
### Option 1: Use `HTML` Widget
If you want to include... | 20,080 | [
{
"from": "human",
"value": "I would like to break a long line of text assigned to the standard Label widget in GWT.\nI was experimenting with inline <br /> elements but with no success.\nSomething like this: \nlabel = \"My very very very long<br />long long text\"\n\n"
},
{
"from": "gpt",
"valu... |
I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I needed to do a truncate on a table and all ... | Truncating a table is a specific SQL operation that removes all rows from a table without logging individual row deletions, making it more efficient than a `DELETE` operation when dealing with large datasets. However, LINQ to SQL does not provide a direct method to perform a `TRUNCATE` operation because it's designed t... | 17,410 | [
{
"from": "human",
"value": "I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I ne... |
How do I write a cpp macro which expands to include newlines?
| In C++, you can define macros using the `#define` directive. If you want a macro to expand into multiple lines, including newlines in its expansion, you can use the backslash (`\`) at the end of each line to indicate that the macro continues on the next line.
Here's an example of how to create a macro that includes ne... | 13,384 | [
{
"from": "human",
"value": "How do I write a cpp macro which expands to include newlines?\n"
},
{
"from": "gpt",
"value": "In C++, you can define macros using the `#define` directive. If you want a macro to expand into multiple lines, including newlines in its expansion, you can use the backsla... |
I am looking into designing new features for Eclipse-based programming tools, from the requirements/ideas perspective. To really do this quickly, I would like to sketch UI elements without having to code things -- my concern is with the concepts and ideas right now, not the possible later realization. Are there any su... | For sketching UI elements and designing features quickly without diving into code, there are several tools and approaches that you can use within the Eclipse ecosystem. Here are some options that can help you visualize your ideas and concepts effectively:
1. **Eclipse Papyrus**: This is a graphical modeling tool that ... | 18,027 | [
{
"from": "human",
"value": "I am looking into designing new features for Eclipse-based programming tools, from the requirements/ideas perspective. To really do this quickly, I would like to sketch UI elements without having to code things -- my concern is with the concepts and ideas right now, not the poss... |
I'm writing a structural modeling tool for a civil enginering application. I have one huge model class representing the entire building, which include collections of nodes, line elements, loads, etc. which are also custom classes.
I have already coded an undo engine which saves a deep-copy after each modification to t... | Implementing an undo/redo mechanism for complex operations in a structural modeling tool can be achieved through a Command Pattern approach. This involves encapsulating each operation as an object that contains the logic for both applying the change and reverting it. Here’s a general approach you could take to manage c... | 15,373 | [
{
"from": "human",
"value": "I'm writing a structural modeling tool for a civil enginering application. I have one huge model class representing the entire building, which include collections of nodes, line elements, loads, etc. which are also custom classes. \nI have already coded an undo engine which save... |
The maintenance problems that uninitialised locals cause (particularly pointers) will be obvious to anyone who has done a bit of c/c++ maintenance or enhancement, but I still see them and occasionally hear performance implications given as their justification.
It's easy to demonstrate in c that redundant initialisation... | Mandatory variable initialization can have both performance and maintainability implications across different programming languages. In languages like C and C++, while the compiler is often able to optimize out unnecessary initializations, there are circumstances where mandatory initialization can lead to performance d... | 14,201 | [
{
"from": "human",
"value": "The maintenance problems that uninitialised locals cause (particularly pointers) will be obvious to anyone who has done a bit of c/c++ maintenance or enhancement, but I still see them and occasionally hear performance implications given as their justification.\nIt's easy to demo... |
any thoughts on this would be appreciated:
std::string s1 = "hello";
std::string s2 = std::string(s1);
I'd now expect these two strings to be independent, i.e. I could append ", world" to s2 and s1 would still read "hello". This is what I find on windows and linux but running the code on a HP_UX machine it seems that ... | The behavior you're experiencing is indeed unexpected and should not happen with standard C++ string operations. The `std::string` class is designed to manage its own memory and should provide independent instances when you copy or assign one string to another.
Here's a breakdown of what should happen in your code:
1... | 16,768 | [
{
"from": "human",
"value": "any thoughts on this would be appreciated:\nstd::string s1 = \"hello\";\nstd::string s2 = std::string(s1);\n\nI'd now expect these two strings to be independent, i.e. I could append \", world\" to s2 and s1 would still read \"hello\". This is what I find on windows and linux but... |
I am trying to read ASCII text response from a tcp open streaming socket
This is what I have come up with so far. I want to know what is the best way to do this that includes error handling. Should I also be checking the SocketError after the Receive call in the do loop?
IPEndPoint ep = new IPEndPoint(IPAddress.Parse... | Your code for reading an ASCII text response from a TCP socket is mostly well-structured, but there are several areas for improvement, particularly regarding error handling and best practices. Here’s an enhanced version of your code along with some recommendations:
1. **Check for Socket Errors After Receive**: Yes, yo... | 14,521 | [
{
"from": "human",
"value": "I am trying to read ASCII text response from a tcp open streaming socket\nThis is what I have come up with so far. I want to know what is the best way to do this that includes error handling. Should I also be checking the SocketError after the Receive call in the do loop?\nIPE... |
I'm using WScript to automate some tasks, by using WScript.Shell to call external programs.
However, right now it does not wait for the external program to finish, and instead moves on. This causes issues because I have some tasks dependent on others finishing first.
I am using code like:
ZipCommand = "7za.exe a -r -y ... | Yes, you can make `WScript.Shell` wait for the external program to finish executing by using the second argument of the `run` method. By default, `run` executes the command asynchronously, but you can change that behavior by passing `1` as the second argument.
Here's how to modify your code to ensure it waits for the ... | 19,696 | [
{
"from": "human",
"value": "I'm using WScript to automate some tasks, by using WScript.Shell to call external programs.\nHowever, right now it does not wait for the external program to finish, and instead moves on. This causes issues because I have some tasks dependent on others finishing first.\nI am usin... |
I keep reading about people who are "test infected", meaning that they don't just "get" TDD but also can't live without it. They've "had the makeover" as it were. The question is, how do I get like that?
| Becoming "test infected" and adopting Test-Driven Development (TDD) as a fundamental part of your programming practice requires both a mindset shift and practical experience. Here are some steps to help you embrace TDD and integrate it into your workflow:
1. **Understand the Principles of TDD**: Start by studying the ... | 14,731 | [
{
"from": "human",
"value": "I keep reading about people who are \"test infected\", meaning that they don't just \"get\" TDD but also can't live without it. They've \"had the makeover\" as it were. The question is, how do I get like that?\n"
},
{
"from": "gpt",
"value": "Becoming \"test infect... |
I have seen a lot of discussions going on and people asking about DataGrid for WPF and complaining about Microsoft for not having one with their WPF framework till date. We know that WPF is a great UI technology and have the Concept of ItemsControl,DataTemplate, etc,etc to make great UX. Even WPF has got a more closely... | The discussion surrounding the need for a DataGrid in WPF is quite nuanced and touches on various aspects of UI design, usability, and developer experience. Here are some thoughts on the matter:
### Necessity of a DataGrid Control in WPF
1. **Common Use Case**: DataGrids are a common requirement in many applications ... | 17,388 | [
{
"from": "human",
"value": "I have seen a lot of discussions going on and people asking about DataGrid for WPF and complaining about Microsoft for not having one with their WPF framework till date. We know that WPF is a great UI technology and have the Concept of ItemsControl,DataTemplate, etc,etc to make ... |
I have a form with a default OK button, and a Cancel button. I have a treeview with nodes that can be edited, i.e. you can double-click them or press F2 to open another form.
Now, I've never liked that F2 shortcut, and now that I'm enabling treeview label edition, it's even worse. My first reaction when testing the for... | This is a great question that touches on user experience design and usability principles in applications. While there is no one-size-fits-all answer, there are a few considerations to keep in mind when designing keyboard shortcuts and interactions, particularly with forms and controls like treeviews.
### Should "Enter... | 14,819 | [
{
"from": "human",
"value": "I have a form with a default OK button, and a Cancel button. I have a treeview with nodes that can be edited, i.e. you can double-click them or press F2 to open another form.\nNow, I've never liked that F2 shortcut, and now that I'm enabling treeview label edition, it's even wor... |
I have about 200 Excel files that are in standard Excel 2003 format.
I need them all to be saved as Excel xml - basically the same as opening each file and choosing Save As... and then choosing Save as type: XML Spreadsheet
Would you know any simple way of automating that task?
| Yes, you can automate the conversion of your Excel files to XML Spreadsheet format using a simple Python script with the `openpyxl` and `os` libraries, or you can also utilize VBA within Excel itself. Here’s how you can do both:
### Method 1: Using Python
To use Python, you need to have Python installed along with th... | 15,666 | [
{
"from": "human",
"value": "I have about 200 Excel files that are in standard Excel 2003 format. \nI need them all to be saved as Excel xml - basically the same as opening each file and choosing Save As... and then choosing Save as type: XML Spreadsheet\nWould you know any simple way of automating that tas... |
I am looking to build a multi-threaded text import facility (generally CSV into SQL Server 2005) and would like to do this in VB.NET but I am not against C#. I have VS 2008 trial and just dont know where to begin. Can anyone point me in the direction of where I can look at and play with the source of a VERY simple m... | Creating a multi-threaded text import facility in VB.NET or C# involves several steps. To get you started, I will provide you with a simple example of how to create a multi-threaded application that can read a CSV file and import it into SQL Server 2005. I'll provide a basic structure using VB.NET, but the same princip... | 9,089 | [
{
"from": "human",
"value": "I am looking to build a multi-threaded text import facility (generally CSV into SQL Server 2005) and would like to do this in VB.NET but I am not against C#. I have VS 2008 trial and just dont know where to begin. Can anyone point me in the direction of where I can look at an... |
I've been looking at F# recently, and while I'm not likely to leap the fence any time soon, it definitely highlights some areas where C# (or library support) could make life easier.
In particular, I'm thinking about the pattern matching capability of F#, which allows a very rich syntax - much more expressive than the c... | What you’re proposing is quite an interesting approach to improving C#'s handling of pattern matching and branching logic, especially given the syntax and expressiveness that F# offers with its pattern matching capabilities. The constructs you've outlined provide a more fluent and modular way to handle conditional logi... | 12,781 | [
{
"from": "human",
"value": "I've been looking at F# recently, and while I'm not likely to leap the fence any time soon, it definitely highlights some areas where C# (or library support) could make life easier.\nIn particular, I'm thinking about the pattern matching capability of F#, which allows a very ric... |
Ok I have two modules, each containing a class, the problem is their classes reference each other.
Lets say for example I had a room module and a person module containing CRoom and CPerson.
The CRoom class contains infomation about the room, and a CPerson list of every one in the room.
The CPerson class however sometim... | In Python, cyclic imports can indeed lead to issues as you've observed. There are a couple of approaches to break the circular dependency without having to combine the classes into a single module. Here are the most common solutions:
### Solution 1: Use Type Annotations with Strings
You can use string literals for ty... | 13,767 | [
{
"from": "human",
"value": "Ok I have two modules, each containing a class, the problem is their classes reference each other.\nLets say for example I had a room module and a person module containing CRoom and CPerson.\nThe CRoom class contains infomation about the room, and a CPerson list of every one in ... |
I've forgotten the WinAPI call to find out how much space is remaining on a particular drive and pinvoke.net isn't giving me any love.
It's compact framework by the way, so I figure coredll.dll.
Can anyone with a better memory jog mine?
| To determine the available space on a particular drive in the Compact Framework using PInvoke with `coredll.dll`, you can use the `GetDiskFreeSpaceEx` function. However, this function might not be available in the Compact Framework. Instead, you can use the `GetDiskFreeSpace` function, which is simpler but provides lim... | 17,546 | [
{
"from": "human",
"value": "I've forgotten the WinAPI call to find out how much space is remaining on a particular drive and pinvoke.net isn't giving me any love.\nIt's compact framework by the way, so I figure coredll.dll.\nCan anyone with a better memory jog mine?\n"
},
{
"from": "gpt",
"valu... |
Please suggest some good resources to start writing Java Web services.
| Certainly! Writing Java web services involves understanding both the Java programming language and the technologies that enable web service development. Here are some good resources to get you started:
### Books
1. **"Java Web Services: Up and Running" by Dan Woods and David Thorne**
This book provides a practica... | 12,510 | [
{
"from": "human",
"value": "Please suggest some good resources to start writing Java Web services.\n"
},
{
"from": "gpt",
"value": "Certainly! Writing Java web services involves understanding both the Java programming language and the technologies that enable web service development. Here are s... |
I'm starting a new project which involves developing an interface for a machine that measures wedge and roundness of lenses and stores the information in a database and reports on it. There's a decent chance we're going to be putting a touch screen on this machine so that it doesn't need to have a mouse or keyboard... ... | Developing an interface for a touch screen, especially for a machine like the one you're working on, involves several key considerations. Here are some tips and best practices to help guide your development process:
### 1. **Design for Touch**:
- **Larger Touch Targets**: Ensure that buttons and interactive element... | 12,551 | [
{
"from": "human",
"value": "I'm starting a new project which involves developing an interface for a machine that measures wedge and roundness of lenses and stores the information in a database and reports on it. There's a decent chance we're going to be putting a touch screen on this machine so that it doe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.