instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have a requirement to be able to provide a flex component in English and several asian languages. I have looked at the flex documentation and it seems that I have to build several swf's, which feels wrong.
Does anyone know of a straightforward and practical way of bundling string resources in different languages a... | When working with Flex and aiming to support multiple languages, you can indeed manage string resources in a more efficient manner without having to create multiple SWF files for each language. Here are some practical steps to achieve that:
### 1. Use Resource Bundles
Flex supports resource bundles, which allow you to... | 12,865 | [
{
"from": "human",
"value": "I have a requirement to be able to provide a flex component in English and several asian languages. I have looked at the flex documentation and it seems that I have to build several swf's, which feels wrong. \nDoes anyone know of a straightforward and practical way of bundling... |
Being a C# developer since version 1.0, F# has captured my free time for the past few weeks. Computers are now sold with 2, 4 .. Cores and multi-threading is not always simple to accomplish.
At the moment I see that F# has great potential for complicated and or heavy workloads.
Do you think that F# will (once RTM) bec... | F# has several attributes that make it an attractive choice for certain types of enterprise applications, particularly those involving complex business logic, data processing, and concurrent computations. Here are some considerations regarding F# and its potential in the enterprise software market:
1. **Functional Pro... | 11,622 | [
{
"from": "human",
"value": "Being a C# developer since version 1.0, F# has captured my free time for the past few weeks. Computers are now sold with 2, 4 .. Cores and multi-threading is not always simple to accomplish. \nAt the moment I see that F# has great potential for complicated and or heavy workloads... |
I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the runas command but this won't work for an automated script as t... | To run your build script that calls Wise under a specific user account while automating the process, you have a few options. Here are a few methods you can consider:
### Method 1: Using `PsExec`
You can use `PsExec`, a tool from Sysinternals, which allows you to run processes as a different user. This is particularly... | 11,580 | [
{
"from": "human",
"value": "I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the runas command but thi... |
We're considering writing the next version of out project in using .Net 3, but are wondering if we can take the hit on forcing end users to install the .net framework version 3.
| When considering developing your project using .NET Framework 3.0 (or any version of the .NET Framework), there are several factors to consider regarding the potential impact on your end users:
1. **Compatibility and Installation**: The .NET Framework 3.0 is not the latest version, and many end users may already have ... | 11,827 | [
{
"from": "human",
"value": "We're considering writing the next version of out project in using .Net 3, but are wondering if we can take the hit on forcing end users to install the .net framework version 3.\n"
},
{
"from": "gpt",
"value": "When considering developing your project using .NET Fram... |
I've never really understand why a web service implementer would choose one over the other. Is XML-RPC generally found in older systems? Any help in understanding this would be greatly appreciated.
| XML-RPC (XML Remote Procedure Call) and other web service protocols like JSON-RPC and SOAP have different features and use cases that can influence an implementer's choice. Here are some key points to help you understand the considerations involved in choosing XML-RPC and whether it's more common in older systems:
###... | 11,110 | [
{
"from": "human",
"value": "I've never really understand why a web service implementer would choose one over the other. Is XML-RPC generally found in older systems? Any help in understanding this would be greatly appreciated.\n"
},
{
"from": "gpt",
"value": "XML-RPC (XML Remote Procedure Call) ... |
How do I make an array shorter in Perl? I read some webpages indicating that I can assign:
$#ARRAY = 42;
I read that the use of $# is deprecated. I need a solution that will work for an array of arrays, too. This didn't work:
$#$ARRAY[$i] = 42;
| In Perl, you can shorten an array by modifying its size using the `splice` function, or by directly assigning a new value to the last index of the array. While using `$#ARRAY` is still supported, it is not the most readable or preferred way. Instead, you can use `splice` or other array manipulation techniques.
### Exa... | 9,493 | [
{
"from": "human",
"value": "How do I make an array shorter in Perl? I read some webpages indicating that I can assign:\n$#ARRAY = 42;\n\nI read that the use of $# is deprecated. I need a solution that will work for an array of arrays, too. This didn't work:\n$#$ARRAY[$i] = 42;\n\n"
},
{
"from": ... |
I am running blazeds on the server side. I would like to filter http requests using an http header. My goal is to send extra parameters to the server without changing the signatures of my blazeds services.
On the client side, I am using Flex RemoteObject methods.
With Flex WebService components, it is possible to set ... | To filter HTTP requests in BlazeDS using custom HTTP headers while working with the `RemoteObject` class in Flex, you can achieve this by leveraging a custom `MessageBrokerFilter`. Unfortunately, as you noted, the `RemoteObject` class does not have a built-in way to set HTTP headers directly like the `WebService` compo... | 7,035 | [
{
"from": "human",
"value": "I am running blazeds on the server side. I would like to filter http requests using an http header. My goal is to send extra parameters to the server without changing the signatures of my blazeds services.\nOn the client side, I am using Flex RemoteObject methods. \nWith Flex We... |
Ok so before I even ask my question I want to make one thing clear. I am currently a student at NIU for Computer Science and this does relate to one of my assignments for a class there. So if anyone has a problem read no further and just go on about your business.
Now for anyone who is willing to help heres the situat... | It looks like you're trying to process a text file and clean each word by removing any punctuation before counting occurrences in a map. You mentioned that you're facing an issue with empty strings being inserted into the map. Let's address this issue and suggest some improvements to your code.
### Fixing the Empty St... | 10,201 | [
{
"from": "human",
"value": "Ok so before I even ask my question I want to make one thing clear. I am currently a student at NIU for Computer Science and this does relate to one of my assignments for a class there. So if anyone has a problem read no further and just go on about your business. \nNow for anyo... |
I have:
class MyClass extends MyClass2 implements Serializable {
//...
}
In MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object?
Correction: MyClass2 is, of course, not an interface but a class.
| In Java, when you want to serialize an object of a class that extends another class (in your case, `MyClass` extends `MyClass2`) and the superclass (`MyClass2`) contains non-serializable fields, you have a few options to manage this situation. The goal is to control what gets serialized and to handle the non-serializab... | 8,928 | [
{
"from": "human",
"value": "I have:\nclass MyClass extends MyClass2 implements Serializable {\n //...\n}\n\nIn MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object?\nCorrection: MyClass2 is, of course, not an interface but a class.\n"
},
{
"from": "gp... |
One of the many things that's been lacking from my scraper service that I set up last week are pretty URLs. Right now the user parameter is being passed into the script with ?u=, which is a symptom of a lazy hack (which the script admittedly is). However, I've been thinking about redoing it and I'd like to get some fee... | When considering the structure of your URLs, there are a few principles to keep in mind: clarity, consistency, and scalability. Each of your proposed options has its merits, and I'll break them down based on these criteria.
### Option 1:
- **URLs:**
- `http://<tld>/update/1234`
- `http://<tld>/chart/1234`
**... | 11,338 | [
{
"from": "human",
"value": "One of the many things that's been lacking from my scraper service that I set up last week are pretty URLs. Right now the user parameter is being passed into the script with ?u=, which is a symptom of a lazy hack (which the script admittedly is). However, I've been thinking abou... |
let's assume i have a self referencing hierarchical table build the classical way like this one:
CREATE TABLE test
(name text,id serial primary key,parent_id integer
references test);
insert into test (name,id,parent_id) values
('root1',1,NULL),('root2',2,NULL),('root1sub1',3,1),('root1sub2',4,1),('root
2sub1',5,2),('... | To clone a record from a self-referencing hierarchical table in PostgreSQL, you'll need to write a function that performs several tasks:
1. Find the record with the specified ID.
2. Insert a new record with a new ID and the same name, setting its parent_id to NULL.
3. Recursively find all child records (those that ref... | 11,432 | [
{
"from": "human",
"value": "let's assume i have a self referencing hierarchical table build the classical way like this one:\nCREATE TABLE test\n(name text,id serial primary key,parent_id integer\nreferences test);\n\ninsert into test (name,id,parent_id) values\n('root1',1,NULL),('root2',2,NULL),('root1sub... |
What are the maximum allowed number of columns in a query in access 2003?
| In Microsoft Access 2003, the maximum number of columns (fields) that you can include in a query is 255. This limit applies to both the number of fields you can select in a SELECT query and the number of fields you can have in a result set. If you exceed this limit, you will encounter an error. | 16,911 | [
{
"from": "human",
"value": "What are the maximum allowed number of columns in a query in access 2003?\n"
},
{
"from": "gpt",
"value": "In Microsoft Access 2003, the maximum number of columns (fields) that you can include in a query is 255. This limit applies to both the number of fields you can... |
I have a problem with scandir(): The manpage contains this as prototype:
int scandir(const char *dir, struct dirent ***namelist,
int (*filter)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **));
Therefore I have this:
static inline int
RubyCompare(const struct dirent **a,
cons... | The warning you're encountering relates to a mismatch between the expected function pointer type for the comparator function in the `scandir` prototype and the actual type of your `RubyCompare` function.
The `scandir` function expects the comparator to have the following signature:
```c
int (*compar)(const struct di... | 11,733 | [
{
"from": "human",
"value": "I have a problem with scandir(): The manpage contains this as prototype:\nint scandir(const char *dir, struct dirent ***namelist,\n int (*filter)(const struct dirent *),\n int (*compar)(const struct dirent **, const struct dirent **));\n\nTherefore I have this:\nstatic inline ... |
I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid.
Is there another way to obtain the PID?
| You can obtain the process ID (PID) of a currently running Java or JRuby process on a Linux platform using various methods. Here are a couple of solutions you can try:
### 1. Using `java.lang.management.ManagementFactory` in Java
If you're running Java code, you can retrieve the PID using the `ManagementFactory` clas... | 11,468 | [
{
"from": "human",
"value": "I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid.\nIs there another way to obtain the PID?\n"
},
{... |
Considering that the debug data file is available (PDB) and by using either System.Reflection or another similar framework such as Mono.Cecil, how to retrieve programmatically the source file name and the line number where a type or a member of a type is declared.
For example, let's say you have compiled this file into... | To retrieve the source file name and line number of a method without invoking it, you can leverage the `Mono.Cecil` library alongside the debug symbols (PDB files) created during compilation. Mono.Cecil is a powerful library that allows you to inspect and manipulate .NET assemblies, and it can extract debugging informa... | 10,835 | [
{
"from": "human",
"value": "Considering that the debug data file is available (PDB) and by using either System.Reflection or another similar framework such as Mono.Cecil, how to retrieve programmatically the source file name and the line number where a type or a member of a type is declared.\nFor example, ... |
What are some popular spam prevention methods besides CAPTCHA?
| There are several popular spam prevention methods aside from CAPTCHA. Here are some effective alternatives:
1. **Honeypot Technique**: This involves adding a hidden field to forms that legitimate users won't fill out. If this field is filled in, it's likely a bot, and the submission can be discarded.
2. **Rate Limiti... | 13,012 | [
{
"from": "human",
"value": "What are some popular spam prevention methods besides CAPTCHA?\n"
},
{
"from": "gpt",
"value": "There are several popular spam prevention methods aside from CAPTCHA. Here are some effective alternatives:\n\n1. **Honeypot Technique**: This involves adding a hidden fie... |
I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there.
You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem.
Does anyone know of a better way?
| To conditionally hide columns in an ASP.NET GridView (or similar data-bound control) where the column headers are defined in the `LayoutTemplate`, you can approach this in a few different ways. Since you can't use `<% %>` code blocks directly in the `LayoutTemplate`, you will need to handle this in the code-behind.
He... | 11,407 | [
{
"from": "human",
"value": "I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there.\nYou cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem.\nDoes anyone know of a better way?\n"
},
{
... |
Is there a way to call an external script or program from Flash CS3 every time it builds a SWF file? I'd like to add subversion information using subwcrev - the SVN keywords don't work because they only update when the version class file is updated.
| While Flash CS3 itself doesn't directly support custom build scripts or hooks, there is a way to achieve what you want by using a post-build process. You can create a build script that first compiles your SWF file and then calls your external script (like `subwcrev`) to update the SWF with SVN information.
Here's a si... | 6,056 | [
{
"from": "human",
"value": "Is there a way to call an external script or program from Flash CS3 every time it builds a SWF file? I'd like to add subversion information using subwcrev - the SVN keywords don't work because they only update when the version class file is updated.\n"
},
{
"from": "gpt... |
I'm trying to use libvirt with virsh to manage my kvm/qemu vms. The problem I have is with getting it to work with public IPs. The server is running ubuntu 8.04.
libvirt keeps trying to run it as:
/usr/bin/kvm -M pc -m 256 -smp 3 -monitor pty -no-acpi \
-drive file=/opt/virtual-machines/calculon/root.qcow2,if=ide,b... | To configure your KVM/QEMU virtual machines (VMs) to use a bridge (like `br0`) for networking, instead of using the default NAT setup that libvirt attempts to use, you'll need to adjust the libvirt network configuration.
Here’s a step-by-step guide on how to set it up:
### Step 1: Create a Bridge Interface
You've al... | 7,460 | [
{
"from": "human",
"value": "I'm trying to use libvirt with virsh to manage my kvm/qemu vms. The problem I have is with getting it to work with public IPs. The server is running ubuntu 8.04.\nlibvirt keeps trying to run it as:\n/usr/bin/kvm -M pc -m 256 -smp 3 -monitor pty -no-acpi \\ \n -drive file=/opt/... |
How can I know what encoding will be used by PHP when sending data to the browser? I.e. with the Cotent-Type header, for instance: iso-8859-1.
| In PHP, the encoding used when sending data to the browser is generally determined by the `Content-Type` header you set in your script. To specify the encoding, you will typically include it in the header like this:
```php
header('Content-Type: text/html; charset=iso-8859-1');
```
To find out the encoding that PHP is... | 14,207 | [
{
"from": "human",
"value": "How can I know what encoding will be used by PHP when sending data to the browser? I.e. with the Cotent-Type header, for instance: iso-8859-1.\n"
},
{
"from": "gpt",
"value": "In PHP, the encoding used when sending data to the browser is generally determined by the `... |
We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When they come in, the files are processed in one way or another. However, one problem that I have never seen a satisfactory answer for is: for large file... | When using `FileSystemWatcher` to monitor a directory for new files, distinguishing between files that are still being written to and files that are completely written can be tricky, especially with large files. Since `FileSystemWatcher` only informs you of the file creation, renaming, and deletion events, you have to ... | 11,120 | [
{
"from": "human",
"value": "We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When they come in, the files are processed in one way or another. However, one problem that I have never seen a s... |
I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.
<div id="panel">
<div id="field_name">TEXT GOES HERE</div>
</div>
Here's what the function will look like:
function showPanel(fieldName) {
var fieldNameElement = documen... | To set the text within a `DIV` element dynamically in a browser-safe way using JavaScript, you can use the `textContent` property or `innerText` property, depending on your needs. Given that you have Prototype.js available, you might also prefer to use Prototype's methods for DOM manipulation.
Here's how you can imple... | 12,786 | [
{
"from": "human",
"value": "I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.\n<div id=\"panel\">\n <div id=\"field_name\">TEXT GOES HERE</div>\n</div>\n\nHere's what the function will look like:\nfunction show... |
Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so.
Now I want to get rid of sourcesafe and move on to Team Foundation Server.
Do you have any tips or tricks for me before I embark on this migration? What are the things I have to be careful about?
I am sure this ... | Migrating from Visual SourceSafe (VSS) to Team Foundation Server (TFS) can be a significant step forward, especially considering the improvements in version control, collaboration, and project management capabilities that TFS offers. However, such a migration does come with its challenges and requires careful planning.... | 9,092 | [
{
"from": "human",
"value": "Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so. \nNow I want to get rid of sourcesafe and move on to Team Foundation Server.\nDo you have any tips or tricks for me before I embark on this migration? What are the things I... |
I am using USRP with DBSRX daughter board.
I need a very high sample frequency. Currently, the USRP can give me
maximum sample frequency of 64M/8 in I and Q, and the data type is
short, which takes 2 bytes.
So can I decrease the length of the output data? for example save the
data as char which takes 1 bytes, and incr... | When using a USRP (Universal Software Radio Peripheral) with a DBSRX daughterboard, it's important to consider how sample data is represented and how it affects your throughput and sampling frequency.
### Understanding Data Representation
1. **Data Type**: The current configuration gives you 16-bit samples (short) fo... | 8,095 | [
{
"from": "human",
"value": "I am using USRP with DBSRX daughter board.\nI need a very high sample frequency. Currently, the USRP can give me\nmaximum sample frequency of 64M/8 in I and Q, and the data type is\nshort, which takes 2 bytes.\nSo can I decrease the length of the output data? for example save t... |
We have a SharePoint site on it's own domain and are debating using Forms Authentication or Active Directory. Really we would like the power of kerberos with the flexibility and transparancy of a forms authentication (like storing the users in sqlserver using sqlmembershipprovider in asp.net). Is there any way to for... | Certainly! When considering authentication methods for a SharePoint site, it's important to evaluate your requirements and the technical limitations of the technologies you’re considering. Here's a breakdown of the options and potential approaches based on your needs:
### Active Directory vs. Forms Authentication
1. ... | 11,950 | [
{
"from": "human",
"value": "We have a SharePoint site on it's own domain and are debating using Forms Authentication or Active Directory. Really we would like the power of kerberos with the flexibility and transparancy of a forms authentication (like storing the users in sqlserver using sqlmembershipprovi... |
How do you get a Media Type (MIME type) from a file using Java? So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly.
How would you probe the file to determine its actual type (not merely based on the extension)?
| To determine the MIME type of a file in Java, you can use the `java.nio.file.Files` class, which provides a simple and effective way to detect the media type based on the content of the file rather than just relying on the file extension. The `Files.probeContentType(Path path)` method uses the underlying operating syst... | 11,169 | [
{
"from": "human",
"value": "How do you get a Media Type (MIME type) from a file using Java? So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly.\nHow would you probe the file to determine its actual type (not merely based on the exte... |
I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub.
Does anybody know how to get back into real mode without having to get rid of grub?
| When you boot your operating system using GRUB, it typically starts in protected mode, which is a mode that enables advanced features like virtual memory, multitasking, and hardware protection. However, if you need to switch back to real mode for certain operations (like directly interacting with VGA in the way you des... | 11,045 | [
{
"from": "human",
"value": "I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub.\nDoes anybody know how to get back into real mode w... |
I'm trying to implement a pop-up menu based on a click-and-hold, positioned so that a (really) slow click will still trigger the default action, and with the delay set so that a text-selection gesture won't usually trigger the menu.
What I can't seem to do is cancel the text-selection in a way that doesn't prevent te... | To implement a pop-up menu based on a long click without preventing text selection, you'll need to use a combination of touch and mouse events to differentiate between a regular click (or text selection) and a long press that triggers the pop-up menu.
The general idea is to set a timer when the user presses down, and... | 7,964 | [
{
"from": "human",
"value": "I'm trying to implement a pop-up menu based on a click-and-hold, positioned so that a (really) slow click will still trigger the default action, and with the delay set so that a text-selection gesture won't usually trigger the menu. \nWhat I can't seem to do is cancel the text-... |
What are futures? It's something to do with lazy evaluation.
| Futures are a concept in programming and computer science that allow for lazy evaluation and concurrent programming. A future is essentially a placeholder for a value that may not yet be computed. It represents a promise that a computation will eventually be completed and can be used to retrieve the result once it is a... | 12,211 | [
{
"from": "human",
"value": "What are futures? It's something to do with lazy evaluation.\n"
},
{
"from": "gpt",
"value": "Futures are a concept in programming and computer science that allow for lazy evaluation and concurrent programming. A future is essentially a placeholder for a value that m... |
My boss asked me to setup a Subversion server for him to use so that he can share all his documents across different machines in sync and still be able to access them when there is no Internet connection.
I have this up for him, but now he's requesting that the 'create date' file attribute be preserved. I explained th... | Subversion (SVN) does not natively preserve the original creation date of files when they are added to a repository. The primary attributes tracked by SVN are the last modified times, which means that when you check out files from an SVN repository, they will have the timestamp of the last commit rather than their orig... | 11,792 | [
{
"from": "human",
"value": "My boss asked me to setup a Subversion server for him to use so that he can share all his documents across different machines in sync and still be able to access them when there is no Internet connection.\nI have this up for him, but now he's requesting that the 'create date' fi... |
I have an application that uploads an Excel .xls file to the file system, opens the file with an oledbconnection object using the .open() method on the object instance and then stores the data in a database. The upload and writing of the file to the file system works fine but I get an error when trying to open the fil... | The 'Unspecified Error' you are encountering while trying to open an Excel file with an `OleDbConnection` on your production server could indeed be related to permissions or environment differences. Here are some steps you can take to troubleshoot and potentially resolve the issue:
1. **Check Excel File Permissions**:... | 9,295 | [
{
"from": "human",
"value": "I have an application that uploads an Excel .xls file to the file system, opens the file with an oledbconnection object using the .open() method on the object instance and then stores the data in a database. The upload and writing of the file to the file system works fine but I... |
Say I have a web service http://www.example.com/webservice.pl?q=google which returns text "google.com". I need to call this web service (http://www.example.com/webservice.pl) from a JavaScript module with a parameter (q=google) and then use the return value ("google.com") to do further processing.
What's the simplest w... | You can make a request to a web service using JavaScript with the `fetch` API, which provides a simple way to perform asynchronous HTTP requests. Below is a straightforward example of how you can call your web service, pass the parameter `q=google`, and handle the response.
Here’s a simple code snippet demonstrating t... | 11,843 | [
{
"from": "human",
"value": "Say I have a web service http://www.example.com/webservice.pl?q=google which returns text \"google.com\". I need to call this web service (http://www.example.com/webservice.pl) from a JavaScript module with a parameter (q=google) and then use the return value (\"google.com\") to... |
I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD).
I realize that 26^255 >> 2^32, but also know that the number of words in the English language is far less than 2^32.
The strings I need to 'hash' would be mostly single w... | The FNV (Fowler–Noll–Vo) hash function is indeed a great choice for your requirements. It’s designed for speed and provides a good distribution of hash values, making it less likely to have collisions for the types of inputs you're working with (single words or simple constructs).
### FNV-1a Hash Algorithm Overview:
... | 10,970 | [
{
"from": "human",
"value": "I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD).\nI realize that 26^255 >> 2^32, but also know that the number of words in the English language is far less than 2^32.\nThe string... |
I have the function below ENCRYPT.
Public Function Encrypt(ByVal plainText As String) As Byte()
Dim key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
Dim iv() As Byte = {65, 110, 68, 26, 69, 178, 200, 219}
' Declare a UTF8Encoding object so we may use the Ge... | To view the byte values of the encrypted text generated by your `Encrypt` function, you can convert the resulting byte array into a string representation of its values. Here's how you can modify your code to display the byte values in a user-friendly format, such as a hexadecimal string or a simple comma-separated list... | 13,413 | [
{
"from": "human",
"value": "I have the function below ENCRYPT.\nPublic Function Encrypt(ByVal plainText As String) As Byte()\n\n\nDim key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}\nDim iv() As Byte = {65, 110, 68, 26, 69, 178, 200, 219}\n\n\n ' D... |
Environment: HP laptop with Windows XP SP2
I had created some encrypted files using GnuPG (gpg) for Windows. Yesterday, my hard disk failed so I had reimage the hard disk. I have now reinstalled gpg and regenerated my keys using the same passphrase as earlier. But, I am now unable to decrypt the files. I get the fo... | The error message you are encountering, `gpg: decryption failed: secret key not available`, indicates that GnuPG is unable to find the private key needed to decrypt the file. In GnuPG, the public key is used for encryption, while the corresponding private key is used for decryption.
Here are the steps you can take to ... | 11,095 | [
{
"from": "human",
"value": "Environment: HP laptop with Windows XP SP2\nI had created some encrypted files using GnuPG (gpg) for Windows. Yesterday, my hard disk failed so I had reimage the hard disk. I have now reinstalled gpg and regenerated my keys using the same passphrase as earlier. But, I am now ... |
Given the problem that a stored procedure on SQL Server 2005, which is looping through a cursor, must be run once an hour and it takes about 5 minutes to run, but it takes up a large chunk of processor time:
edit: I'd remove the cursor if I could, unfortunatly, I have to be doing a bunch of processing and running other... | Using `WAITFOR DELAY` in your cursor processing may help to reduce CPU usage, but it comes with trade-offs and is generally not recommended for performance-sensitive applications. Adding a delay will indeed yield processing time for other processes, but it will also lengthen the overall execution time of your stored pr... | 10,564 | [
{
"from": "human",
"value": "Given the problem that a stored procedure on SQL Server 2005, which is looping through a cursor, must be run once an hour and it takes about 5 minutes to run, but it takes up a large chunk of processor time:\nedit: I'd remove the cursor if I could, unfortunatly, I have to be doi... |
For an open source project I am looking for a good, simple implementation of a Dictionary that is backed by a file. Meaning, if an application crashes or restarts the dictionary will keep its state. I would like it to update the underlying file every time the dictionary is touched. (Add a value or remove a value). A Fi... | Creating a simple `PersistentDictionary` class that writes to a file while maintaining a dictionary-like interface can be a bit challenging, especially with the requirement to seek and update specific values in the file without rewriting the entire contents. However, here is a basic implementation that fulfills your re... | 7,839 | [
{
"from": "human",
"value": "For an open source project I am looking for a good, simple implementation of a Dictionary that is backed by a file. Meaning, if an application crashes or restarts the dictionary will keep its state. I would like it to update the underlying file every time the dictionary is touch... |
How can I delete a line form a bound DataGridView when pressing the Delete key?
| To enable deleting a row from a `DataGridView` when the Delete key is pressed, you can handle the `KeyDown` event of the `DataGridView`. Here's how to do this in a Windows Forms application:
### Step-by-step Implementation
1. **Set up the DataGridView**: Make sure you have a `DataGridView` added to your form and boun... | 10,483 | [
{
"from": "human",
"value": "How can I delete a line form a bound DataGridView when pressing the Delete key?\n"
},
{
"from": "gpt",
"value": "To enable deleting a row from a `DataGridView` when the Delete key is pressed, you can handle the `KeyDown` event of the `DataGridView`. Here's how to do ... |
Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their own different time and cost for each leg:
Array
(
[leg0] =... | To find the best combination of shippers for your multi-leg shipment problem, you can consider using a brute-force approach, which will check all possible combinations of shippers across each leg and calculate the total days and cost for each combination. After calculating all the combinations, you can select the one t... | 6,748 | [
{
"from": "human",
"value": "Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their own different time an... |
I'd like to be able to write a PHP class that behaves like an array and uses normal array syntax for getting & setting.
For example (where Foo is a PHP class of my making):
$foo = new Foo();
$foo['fooKey'] = 'foo value';
echo $foo['fooKey'];
I know that PHP has the _get and _set magic methods but those don't let you... | In PHP, to create a class that behaves like an array and supports array syntax for getting and setting values, you can implement the `ArrayAccess` interface. This interface defines four methods that you must implement to allow your class to be accessed using array syntax.
Here's how you can do it:
1. Implement the `... | 12,204 | [
{
"from": "human",
"value": "I'd like to be able to write a PHP class that behaves like an array and uses normal array syntax for getting & setting.\nFor example (where Foo is a PHP class of my making):\n$foo = new Foo();\n\n$foo['fooKey'] = 'foo value';\n\necho $foo['fooKey'];\n\nI know that PHP has the _g... |
I see a lot of example code for C# classes that does this:
public class Point {
public int x { get; set; }
public int y { get; set; }
}
Or, in older code, the same with an explicit private backing value and without the new auto-implemented properties:
public class Point {
private int _x;
private int _y... | You're correct that in simple cases, like the `Point` class you provided, using public fields seems to achieve the same end result as using properties with getters and setters. However, there are several reasons why using properties (either with auto-implemented syntax or explicit backing fields) is generally preferred... | 11,974 | [
{
"from": "human",
"value": "I see a lot of example code for C# classes that does this:\npublic class Point {\n public int x { get; set; }\n public int y { get; set; }\n}\n\nOr, in older code, the same with an explicit private backing value and without the new auto-implemented properties:\npublic clas... |
How do I cause the page to make the user jump to a new web page after X seconds. If possible I'd like to use HTML but a niggly feeling tells me it'll have to be Javascript.
So far I have the following but it has no time delay
<body onload="document.location='newPage.html'">
| To redirect a user to a new webpage after a specified time delay using JavaScript, you can use the `setTimeout` function. While you can use HTML alone for a simple redirect (like the `<meta>` tag method), for a timed delay, JavaScript is indeed the way to go.
Here’s an example of how you can do it:
```html
<!DOCTYPE ... | 13,836 | [
{
"from": "human",
"value": "How do I cause the page to make the user jump to a new web page after X seconds. If possible I'd like to use HTML but a niggly feeling tells me it'll have to be Javascript.\nSo far I have the following but it has no time delay\n<body onload=\"document.location='newPage.html'\">\... |
I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other?
EDIT: When I said Managed c++ before I apparently meant c++/CLI
| Translating C++/CLI code to C# can be challenging due to differences in syntax, memory management, and other language features. While there is no perfect tool that automates the conversion entirely, there are a few options that might help you streamline the process:
1. **Manual Translation**: Given the differences bet... | 11,963 | [
{
"from": "human",
"value": "I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other?\nEDIT: When I said Managed c++ before I apparently meant c++/CLI\n"
},
... |
I'm looking for pseudocode, or sample code, to convert higher bit ascii characters (like, Ü which is extended ascii 154) into U (which is ascii 85).
My initial guess is that since there are only about 25 ascii characters that are similar to 7bit ascii characters, a translation array would have to be used.
Let me know i... | Certainly! To convert higher-bit ASCII characters (such as extended ASCII characters) to their closest equivalent in standard ASCII, you can use a translation array or mapping function. Here's a simple approach using pseudocode, followed by a sample implementation in Python.
### Pseudocode
1. Create a mapping table t... | 12,317 | [
{
"from": "human",
"value": "I'm looking for pseudocode, or sample code, to convert higher bit ascii characters (like, Ü which is extended ascii 154) into U (which is ascii 85).\nMy initial guess is that since there are only about 25 ascii characters that are similar to 7bit ascii characters, a translation ... |
I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates. The database (SQL Server 2005) in early development phase and I'm in charge of rebuilding the mappings, entities, DAOs, configuration, whatever. Each time I have to reverse-engineer the tables and so I lose every customization I... | Dealing with the challenges of reverse engineering in Hibernate, especially when you have customizations that are crucial for your application's functionality, can be quite frustrating. Here are several best practices and strategies that can help mitigate these challenges:
1. **Use Annotations Instead of XML**: If pos... | 12,345 | [
{
"from": "human",
"value": "I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates. The database (SQL Server 2005) in early development phase and I'm in charge of rebuilding the mappings, entities, DAOs, configuration, whatever. Each time I have to reverse-engineer the t... |
I want to create variables inside a function from a dictionary.
Let's say I have a dictionary, bar:
bar = {
'a': 1,
'b': 2,
'c': 3
}
That goes to:
def foo():
a = 1
b = 2
c = 3
I want to make new variables with the variable names as bar's keys (a, b, c), then set the values of the variables ... | Yes, it's possible to create variables dynamically within a function based on the keys and values of a dictionary. However, using `exec` to define variables is generally not recommended due to potential security risks and code readability issues.
Here's how you can achieve what you want using the `globals()` or `local... | 12,549 | [
{
"from": "human",
"value": "I want to create variables inside a function from a dictionary.\nLet's say I have a dictionary, bar:\nbar = {\n 'a': 1, \n 'b': 2, \n 'c': 3\n}\n\nThat goes to:\ndef foo():\n a = 1\n b = 2\n c = 3\n\n\nI want to make new variables with the variable names as bar... |
When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar.
To see what I mean, click in your web browser's address bar. You'll notice the following behavior:
Clicking in the textbox should select all the text if the textbox wasn't previously focused.
Mouse down and drag in the tex... | To implement the desired behavior for a WinForms TextBox that mimics a browser's address bar, you'll need to handle the focus and mouse events carefully. Here's how you can achieve that behavior:
1. **Track the focus state** of the TextBox.
2. **Select all text** when the TextBox gains focus via keyboard/tab or progra... | 9,732 | [
{
"from": "human",
"value": "When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar.\nTo see what I mean, click in your web browser's address bar. You'll notice the following behavior: \n\nClicking in the textbox should select all the text if the textbox wasn't previo... |
I have this code:
chars = #some list
try:
indx = chars.index(chars)
except ValueError:
#doSomething
else:
#doSomethingElse
I want to be able to do this because I don't like knowfully causing Exceptions:
chars = #some list
indx = chars.index(chars)
if indx == -1:
#doSomething
else:
#doSomethingElse... | The way you're currently using `list.index()` will always raise a `ValueError` if the item you're trying to find isn't in the list, so using a try-except block is a common way to handle this situation.
However, if you want to avoid using exceptions, you can check if the item exists in the list before calling the `inde... | 15,825 | [
{
"from": "human",
"value": "I have this code:\nchars = #some list\n\ntry:\n indx = chars.index(chars)\nexcept ValueError:\n #doSomething\nelse:\n #doSomethingElse\n\nI want to be able to do this because I don't like knowfully causing Exceptions:\nchars = #some list\n\nindx = chars.index(chars)\n\ni... |
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 or packet sniffer for the browser to use in order to see what its sending?
I'm already using Fiddler to ... | To verify HTTP requests made by a browser in a programmatic and UI-less manner, you can set up a proxy server or use a packet capture tool. Here are some common approaches:
### 1. Use a Headless Proxy
You can set up a headless proxy using tools like **mitmproxy** or **Charles Proxy**. These tools can capture, modify,... | 10,492 | [
{
"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 or packet sniffer for the browser to use in order to see what i... |
We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation.
In Scrum, you obviously have the product backlog ("The application begins by bringing up the last document the user was working with.") and the sprint task backlog ("Implement forgot password screen"). H... | In Scrum, the management of detailed requirements and documentation can sometimes be a challenge, especially when working with complex features. While the Product Backlog and Sprint Backlog typically contain high-level items, there's a need to provide enough detail to ensure that the development team can implement thes... | 10,963 | [
{
"from": "human",
"value": "We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation.\nIn Scrum, you obviously have the product backlog (\"The application begins by bringing up the last document the user was working with.\") and the sprint task back... |
See title: what does it mean for a C++ function to be inline?
| In C++, the `inline` keyword is a suggestion to the compiler that it should attempt to expand the function's code in place, rather than generating a traditional function call. The primary purpose of marking a function as `inline` is to improve performance by reducing the overhead associated with function calls.
Here a... | 12,771 | [
{
"from": "human",
"value": "See title: what does it mean for a C++ function to be inline?\n"
},
{
"from": "gpt",
"value": "In C++, the `inline` keyword is a suggestion to the compiler that it should attempt to expand the function's code in place, rather than generating a traditional function ca... |
I was inserting data into a MS Access database using JDBC-ODBC driver. The blank mdb file was 2KB. After populating this database, the size grew to 155MB. Then I was deleting the data. But I found the size of mdb remains the same as 155MB. I don't get any errors. But is it normal this way? I would expect the fil... | Yes, what you are experiencing is normal behavior for Microsoft Access databases. When you delete records from an Access database, the physical size of the database file (the .mdb or .accdb file) does not automatically decrease. This can be confusing, but it is how Access manages its internal storage.
### Why File Siz... | 12,727 | [
{
"from": "human",
"value": "I was inserting data into a MS Access database using JDBC-ODBC driver. The blank mdb file was 2KB. After populating this database, the size grew to 155MB. Then I was deleting the data. But I found the size of mdb remains the same as 155MB. I don't get any errors. But is it... |
Is this valid SOAP / XML?
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateRoute xmlns="urn:Routs">
<aRoute>... | The provided XML is mostly valid SOAP/XML, but there are a few points to clarify, particularly regarding the `xsi:type` attribute and the namespace.
1. **Validity**: The structure of the SOAP message is correctly formatted, and it adheres to the general rules of XML syntax (properly nested elements, correct opening a... | 13,442 | [
{
"from": "human",
"value": "Is this valid SOAP / XML?\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <soap:Body>\n ... |
After the last project I've done using WebForms, I've decided to pass on using that framework in the future. It's great for getting your basic features out there...not so great when you have more complex UI logic.
I'm looking at ASP.NET MVC, and like what I see so far. Of course the issue is that you lose the server si... | It's great to hear that you're exploring ASP.NET MVC! Transitioning from WebForms can be quite rewarding, especially when it comes to maintaining complex UI logic and having greater control over your HTML and JavaScript.
When it comes to selecting an AJAX toolkit, there are several popular options that can complement ... | 12,550 | [
{
"from": "human",
"value": "After the last project I've done using WebForms, I've decided to pass on using that framework in the future. It's great for getting your basic features out there...not so great when you have more complex UI logic.\nI'm looking at ASP.NET MVC, and like what I see so far. Of cours... |
I'd like to check if the current browser supports the onbeforeunload event.
The common javascript way to do this does not seem to work:
if (window.onbeforeunload) {
alert('yes');
}
else {
alert('no');
}
Actually, it only checks whether some handler has been attached to the event.
Is there a way to detect if on... | To check if the `onbeforeunload` event is supported in the current browser, you can perform a more effective check than just inspecting if a handler has been attached. Instead, you can create an event and check if the `onbeforeunload` property exists on the event object. Here's how you can do this:
```javascript
funct... | 14,052 | [
{
"from": "human",
"value": "I'd like to check if the current browser supports the onbeforeunload event.\nThe common javascript way to do this does not seem to work:\nif (window.onbeforeunload) {\n alert('yes');\n}\nelse {\n alert('no');\n}\n\nActually, it only checks whether some handler has been att... |
How can I open multiple Eclipse workspaces at the same time on the Mac?
On other platforms, I can just launch extra Eclipse instances, but the Mac will not let me open the same application twice. Is there a better way than keeping two copies of Eclipse?
| On macOS, you can open multiple instances of Eclipse with different workspaces without needing to have multiple copies of the Eclipse application. Here’s how to do it:
### Method 1: Use Terminal
1. **Open Terminal**: You can find Terminal in the Applications > Utilities folder or search for it using Spotlight (Cmd + ... | 10,938 | [
{
"from": "human",
"value": "How can I open multiple Eclipse workspaces at the same time on the Mac?\nOn other platforms, I can just launch extra Eclipse instances, but the Mac will not let me open the same application twice. Is there a better way than keeping two copies of Eclipse?\n"
},
{
"from": ... |
I have a helper method has been created which allows a MovieClip-based class in code and have the constructor called. Unfortunately the solution is not complete because the MovieClip callback onLoad() is never called.
(Link to the Flashdevelop thread which created the method .)
How can the following function be modif... | To ensure that the `onLoad()` method of a `MovieClip` is properly called after creating an instance of a subclassed `MovieClip`, you need to invoke the `onLoad()` method after you construct the class. This can be achieved by checking if `onLoad` exists on the new movie clip instance and then calling it directly.
Here... | 13,447 | [
{
"from": "human",
"value": "I have a helper method has been created which allows a MovieClip-based class in code and have the constructor called. Unfortunately the solution is not complete because the MovieClip callback onLoad() is never called. \n(Link to the Flashdevelop thread which created the method ... |
Greetings all,
I'm trying to localize a .NET/C# project. I'm using string resource files and setting the "Localizable" property on all my forms to 'True'. The assembly culture is empty. The resx/resource files are successfully passed through Lingobit, resgen, and al.
When running the localized executables, some of ... | When dealing with localization in a .NET/C# project, especially when using WinForms, there are several common issues that can cause some forms or controls not to be localized even when you have set the `Localizable` property to `True`. Here are a few troubleshooting steps and considerations:
1. **Check the Resource Fi... | 11,032 | [
{
"from": "human",
"value": "Greetings all,\nI'm trying to localize a .NET/C# project. I'm using string resource files and setting the \"Localizable\" property on all my forms to 'True'. The assembly culture is empty. The resx/resource files are successfully passed through Lingobit, resgen, and al. \nWhe... |
Part of the series of controls I am working on obviously involves me lumping some of them together in to composites. I am rapidly starting to learn that this takes consideration (this is all new to me!) :)
I basically have a StyledWindow control, which is essentially a glorified Panel with ability to do other bits (lik... | It sounds like you're making progress in understanding how to create composite controls in ASP.NET, but you're encountering issues with control lifecycle management, particularly with the Page reference being null when your nested controls attempt to register client-side scripts. Let's go through the key aspects to ens... | 10,891 | [
{
"from": "human",
"value": "Part of the series of controls I am working on obviously involves me lumping some of them together in to composites. I am rapidly starting to learn that this takes consideration (this is all new to me!) :)\nI basically have a StyledWindow control, which is essentially a glorifie... |
I want to use small flex charts with just 3 labels, for example a chart over the past 2 hours , with 3 horizontal label, as shown below:
| | |
9:46 10:46 11:46
(of course, there are more than 3 values to display!)
I have been told this is not trivial, but how would you do it?
Also, do you kno... | Creating a chart with a limited number of labels in Flex can indeed be a bit tricky, especially if you want to ensure that the chart remains visually informative without cluttering the interface. Here's a high-level approach to achieve what you want:
### Step-by-Step Approach
1. **Choose Your Chart Type**: Decide on ... | 9,631 | [
{
"from": "human",
"value": "I want to use small flex charts with just 3 labels, for example a chart over the past 2 hours , with 3 horizontal label, as shown below:\n | | | \n9:46 10:46 11:46\n\n(of course, there are more than 3 values to display!)\nI have been told this is not trivi... |
How does C handle converting between integers and characters? Say you've declared an integer variable and ask the user for a number but they input a string instead. What would happen?
| In C, the conversion between integers and characters is typically done using type casting or functions like `atoi()` (ASCII to Integer), `sprintf()`, etc. However, if you have an integer variable and you ask the user for input (for example, through `scanf()`), and the user enters a string instead of a valid integer, se... | 12,129 | [
{
"from": "human",
"value": "How does C handle converting between integers and characters? Say you've declared an integer variable and ask the user for a number but they input a string instead. What would happen?\n"
},
{
"from": "gpt",
"value": "In C, the conversion between integers and charac... |
It has been a few years since I used Actionscript. Back in the day, I made a project that emulated a QTVR panorama (at the time I was using Flash, you could only embed very basic mov files) by simply moving a very long flattened pano image left or right behind a mask. The effect was okay, but not as nice as a real pano... | As of my last knowledge update in October 2023, Flash has been officially discontinued and is no longer supported. However, I can provide some insights into creating immersive panorama experiences, drawing from both past techniques and modern alternatives.
### Actionscript & Flash
While there might be more features a... | 13,269 | [
{
"from": "human",
"value": "It has been a few years since I used Actionscript. Back in the day, I made a project that emulated a QTVR panorama (at the time I was using Flash, you could only embed very basic mov files) by simply moving a very long flattened pano image left or right behind a mask. The effect... |
Ok, my web application is at C:\inetpub\wwwroot\website
The files I want to link to are in S:\someFolder
Can I make a link in the webapp that will direct to the file in someFolder?
| In general, linking directly to files on a file system (like your `S:\someFolder`) from a web application is not a standard practice due to security and accessibility concerns. Web applications typically serve files from their own web server directories, like your `C:\inetpub\wwwroot\website`.
However, there are a few... | 10,454 | [
{
"from": "human",
"value": "Ok, my web application is at C:\\inetpub\\wwwroot\\website\nThe files I want to link to are in S:\\someFolder\nCan I make a link in the webapp that will direct to the file in someFolder?\n"
},
{
"from": "gpt",
"value": "In general, linking directly to files on a file... |
I've just built a VS C++ 6.0 program using VS 2008. When I attempt to run or debug the application, Vista asks for permission. What is it about how the program is built that causes this? The program is being built and run from a subfolder of C:\Dev
This response made no sense to me as a solution to the problem.
| When you run or debug a program in Windows Vista (and later versions of Windows), User Account Control (UAC) comes into play. UAC is a security feature that helps prevent unauthorized changes to your operating system. Here are a few reasons why your application built with Visual Studio 2008 might trigger a UAC prompt:
... | 9,063 | [
{
"from": "human",
"value": "I've just built a VS C++ 6.0 program using VS 2008. When I attempt to run or debug the application, Vista asks for permission. What is it about how the program is built that causes this? The program is being built and run from a subfolder of C:\\Dev\nThis response made no sen... |
How do I submit an HTML form when the return key is pressed and if there are no buttons in the form?
The submit button is not there. I am using a custom div instead of that.
| If you want to submit an HTML form when the return (Enter) key is pressed and there are no buttons in the form, you can achieve this using JavaScript. You can listen for the `keydown` event on the form elements, and if the pressed key is the Enter key, you can trigger the form submission programmatically.
Here’s a sim... | 9,654 | [
{
"from": "human",
"value": "How do I submit an HTML form when the return key is pressed and if there are no buttons in the form?\nThe submit button is not there. I am using a custom div instead of that.\n"
},
{
"from": "gpt",
"value": "If you want to submit an HTML form when the return (Enter) ... |
In our product we ship some linux binaries that dynamically link to system libraries like "libpam". On some customer systems we get the following error on stderr when the program runs:
./authpam: /lib/libpam.so.0: no version information available (required by authpam)
The application runs fine and executes code from ... | The warning message you’re encountering typically arises from discrepancies between the expected version information of a shared library and what is actually available. In Linux, shared libraries can contain versioning information that dynamic executables expect to use when resolving symbols. When the executable is bui... | 10,994 | [
{
"from": "human",
"value": "In our product we ship some linux binaries that dynamically link to system libraries like \"libpam\". On some customer systems we get the following error on stderr when the program runs:\n./authpam: /lib/libpam.so.0: no version information available (required by authpam)\n\nThe... |
I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors fro... | To implement a system where authenticated users can download a pre-configured Windows application from your ASP.NET web site, you'll need to follow a few steps. Below is an overview of how you can achieve this, including server-side code and considerations for security and usability.
### Step 1: Prepare the Windows Ap... | 7,603 | [
{
"from": "human",
"value": "I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user fri... |
This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. "/Foo.aspx" or "~/Foo.aspx" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under which the site runs is different, I will get http://test/Foo.aspx ... | To convert a relative URL into a full URL in a way that works regardless of the environment (development, test, or production), you can use various methods depending on the technology stack you're using. Below are examples for common web technologies:
### 1. ASP.NET (Web Forms)
If you are using ASP.NET Web Forms, you... | 10,897 | [
{
"from": "human",
"value": "This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. \"/Foo.aspx\" or \"~/Foo.aspx\" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under which the site runs i... |
I'd like to just put in a comment in the block of my if-statement, but I get an error when I try. I want to be more like Steve McConnell.
declare @ConstraintName varchar(255)
set @ConstraintName = 'PK_Whatever'
IF LEFT(@ConstraintName, 2) = 'PK'
BEGIN
--can't drop primary keys
END
The error I get is:
Incorrect sy... | The issue you’re encountering with your SQL code is due to the way comments are handled in T-SQL. In T-SQL, single-line comments that start with `--` should be followed by a space or a new line. If you write a comment directly before an `END` statement, without any space or line break, the parser might get confused and... | 13,730 | [
{
"from": "human",
"value": "I'd like to just put in a comment in the block of my if-statement, but I get an error when I try. I want to be more like Steve McConnell.\ndeclare @ConstraintName varchar(255)\nset @ConstraintName = 'PK_Whatever'\n\nIF LEFT(@ConstraintName, 2) = 'PK'\nBEGIN\n --can't drop pri... |
I've been really enjoying Python programming lately. I come from a background of a strong love for C-based coding, where everything is perhaps more complicated than it should be (but puts hair on your chest, at least). So switching from C to Python for more complex things that don't require tons of speed has been more ... | It's great to hear that you've been enjoying Python after a solid background in C! Transitioning between these two languages can definitely present unique challenges, especially regarding readability and code structure.
Your approach of adding comments like `#-- while --` and `#-- if --` to denote the end of blocks is... | 11,863 | [
{
"from": "human",
"value": "I've been really enjoying Python programming lately. I come from a background of a strong love for C-based coding, where everything is perhaps more complicated than it should be (but puts hair on your chest, at least). So switching from C to Python for more complex things that d... |
How do you render primitives as wireframes in OpenGL?
| Rendering primitives as wireframes in OpenGL can be done in several ways. Here’s a straightforward method that involves setting the polygon mode to render as wireframes. You can use the `glPolygonMode` function to achieve this. Below are the steps you need to follow:
### Step-by-Step Guide to Render Wireframes in Open... | 10,789 | [
{
"from": "human",
"value": "How do you render primitives as wireframes in OpenGL?\n"
},
{
"from": "gpt",
"value": "Rendering primitives as wireframes in OpenGL can be done in several ways. Here’s a straightforward method that involves setting the polygon mode to render as wireframes. You can us... |
Folks,
I need a solution that allows drag-and-drop cell over the table.
The cells can be of different colspans, so when the cell is dropped into the middle of another cell, which is bigger, the following steps should be performed:
Another td element is created, which is equal in width to the draggable element.
Cells ... | For implementing a drag-and-drop solution that allows you to manage table cells with varying colspans, there are a few libraries and approaches you can consider. While jQuery UI provides basic drag-and-drop functionality, it can be cumbersome when it comes to manipulating complex DOM structures like tables.
Here are ... | 10,115 | [
{
"from": "human",
"value": "Folks,\nI need a solution that allows drag-and-drop cell over the table. \nThe cells can be of different colspans, so when the cell is dropped into the middle of another cell, which is bigger, the following steps should be performed:\n\nAnother td element is created, which is eq... |
For many questions the answer seems to be found in "the standard". However, where do we find that? Preferably online.
Googling can sometimes feel futile, again especially for the C standards, since they are drowned in the flood of discussions on programming forums.
To get this started, since these are the ones I am sea... | Finding the official standards for programming languages can be a bit tricky, as they are often behind paywalls or not readily indexed by search engines. Here are some reputable online resources where you can find the standards for the versions of C and C++ you listed:
### C Standards
1. **C89 (ANSI C)**:
- The C8... | 7,337 | [
{
"from": "human",
"value": "For many questions the answer seems to be found in \"the standard\". However, where do we find that? Preferably online.\nGoogling can sometimes feel futile, again especially for the C standards, since they are drowned in the flood of discussions on programming forums.\nTo get th... |
I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution.
Does anyone have any ideas ?
| Debugging a crashing application can be challenging, especially with older software like those built with Delphi 7. Here are several strategies you can use to identify and possibly resolve the issue:
### 1. **Run in Compatibility Mode**
- Right-click on the executable file of your software and go to Properties.
... | 10,265 | [
{
"from": "human",
"value": "I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution.\nDoes anyone have any ideas ?\n"
},
{
"from": "gp... |
We use SQL Server 2000 MSDE for an Point Of Sale system running on about 800 cash registers. Each box has its own copy, and only the local software accesses it.
This is a newly updated platform for the cash register vendor--who shall remain nameless.
Routinely we are seeing corruption of Master, MSDB, Model and the da... | The issues you're experiencing with SQL Server 2000 MSDE on your point of sale system, especially considering the frequency of corruption across critical system databases (Master, MSDB, Model, and the application database), can indeed suggest underlying hardware problems. Here are several possible causes and steps to i... | 12,722 | [
{
"from": "human",
"value": "We use SQL Server 2000 MSDE for an Point Of Sale system running on about 800 cash registers. Each box has its own copy, and only the local software accesses it. \nThis is a newly updated platform for the cash register vendor--who shall remain nameless.\nRoutinely we are seeing c... |
I'm working on a music writing application and would like to add the functionality to import Finale music files. Right now, the only thing I know is that they are enigma binary files.
Does anyone have any suggestions on where I could start so that I could be able to parse through these types of files?
| Importing Finale music files, which are stored in the Enigma binary format, can be quite challenging since the format is proprietary and not publicly documented. However, there are some strategies you can pursue to enable your application to read and parse these files:
### 1. **Research the Enigma Format**:
- **Doc... | 12,154 | [
{
"from": "human",
"value": "I'm working on a music writing application and would like to add the functionality to import Finale music files. Right now, the only thing I know is that they are enigma binary files. \nDoes anyone have any suggestions on where I could start so that I could be able to parse th... |
What options are there for building automated tests for GUIs written in Java Swing?
I'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code under test would be ideal.
| Automated testing of Java Swing GUIs can be a challenge, especially if you want to avoid modifying the code. However, there are several options available that can help you achieve your goal. Here are some popular tools and frameworks you can consider for automating tests for Java Swing GUIs:
1. **JUnit and AssertJ Swi... | 10,377 | [
{
"from": "human",
"value": "What options are there for building automated tests for GUIs written in Java Swing?\nI'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code under test would be ideal.\n"
}... |
Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory.
Is there a simple web applet API I can use to port my app over?
I'm just using basic System.out and System.in functionality, but I'm happy to rebuild my I/O wrappers.
I think someth... | Translating a console-based Java application to a web-based one can be a fun and rewarding project! While traditional Java applets are largely deprecated and not widely supported in modern browsers, there are still ways to achieve a similar effect. Here are a few approaches you might consider for putting your console a... | 11,511 | [
{
"from": "human",
"value": "Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory.\nIs there a simple web applet API I can use to port my app over?\nI'm just using basic System.out and System.in functionality, but I'm happy... |
I've been trying to install PDT in Eclipse 3.4 for a few hours now and I'm not having any success.
I have a previous installation of the Eclipse for Java EE developers (my main deal) distro and I just want to add the PDT to my install so I can also work on some of my websites in Eclipse.
I've done my best to follow t... | The issue you're encountering is likely due to version compatibility between the Eclipse IDE you're using (Eclipse 3.4) and the version of the PHP Development Tools (PDT) you are trying to install. To resolve this issue, you can try the following steps:
### 1. Ensure Compatibility
Make sure you are trying to install ... | 9,630 | [
{
"from": "human",
"value": "I've been trying to install PDT in Eclipse 3.4 for a few hours now and I'm not having any success.\nI have a previous installation of the Eclipse for Java EE developers (my main deal) distro and I just want to add the PDT to my install so I can also work on some of my websites i... |
What's the best practice for using a switch statement vs using an if statement for 30 unsigned enumerations where about 10 have an expected action (that presently is the same action). Performance and space need to be considered but are not critical. I've abstracted the snippet so don't hate me for the naming conventio... | Both `switch` statements and `if` statements can be used effectively for handling enumerations, but each has its own advantages and disadvantages, especially when dealing with a larger number of cases such as in your example with 30 unsigned enumerations.
### Performance
1. **Switch Statement**:
- Compilers often ... | 11,107 | [
{
"from": "human",
"value": "What's the best practice for using a switch statement vs using an if statement for 30 unsigned enumerations where about 10 have an expected action (that presently is the same action). Performance and space need to be considered but are not critical. I've abstracted the snippet ... |
How do I create a self signed SSL certificate for an Apache Server to use while testing a web app?
| Creating a self-signed SSL certificate for an Apache server is a useful way to enable HTTPS for testing purposes, especially when working with a web application. Here’s a step-by-step guide to creating and configuring a self-signed SSL certificate on an Apache server:
### Step 1: Install OpenSSL
If you haven't alread... | 8,828 | [
{
"from": "human",
"value": "How do I create a self signed SSL certificate for an Apache Server to use while testing a web app?\n"
},
{
"from": "gpt",
"value": "Creating a self-signed SSL certificate for an Apache server is a useful way to enable HTTPS for testing purposes, especially when worki... |
Is there a way to substring in JSP files, using struts2 technologies? I mean, struts2 has its own taglib and also uses ognl. How can I get a substring from a stacked value or bean value?
| In Struts2, you can use OGNL (Object-Graph Navigation Language) to manipulate and access properties of your beans. To obtain a substring from a value, you can use the `substring` function provided by OGNL.
Here’s how you can achieve this in a JSP file using Struts2:
### Example Usage in JSP
Assuming you have a prope... | 10,893 | [
{
"from": "human",
"value": "Is there a way to substring in JSP files, using struts2 technologies? I mean, struts2 has its own taglib and also uses ognl. How can I get a substring from a stacked value or bean value?\n"
},
{
"from": "gpt",
"value": "In Struts2, you can use OGNL (Object-Graph Navi... |
I found this in an article on Multithreaded Apartments, but can’t find a definition for “input-synchronized calls”.
(Article is at http://msdn.microsoft.com/en-us/library/ms693421(VS.85).aspx)
As used in the article
- Multithreaded apartments cannot make input-synchronized calls
What are “input-synchronized" calls?
Th... | In the context of COM (Component Object Model) programming, particularly with reference to apartments and threading models, "input-synchronized calls" typically refer to calls that require synchronization with the user input or messages being processed by the application.
In a single-threaded apartment (STA), the thr... | 13,205 | [
{
"from": "human",
"value": "I found this in an article on Multithreaded Apartments, but can’t find a definition for “input-synchronized calls”.\n(Article is at http://msdn.microsoft.com/en-us/library/ms693421(VS.85).aspx)\nAs used in the article \n- Multithreaded apartments cannot make input-synchronized c... |
You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager..
You tell your boss you're going to need a week to clean this stuff up.
"Clean what up?"
"My code - its ... | In this situation, it’s important to approach your boss with clarity and professionalism. Here’s how you might frame your conversation:
---
"Thanks for your feedback. I understand the importance of delivering features quickly, especially under pressure. However, I believe that taking a little time now to refactor the... | 13,795 | [
{
"from": "human",
"value": "You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager..\nYou tell your boss you're going to need a week to clean this ... |
Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes.
| Detecting whether a user closes a tab in a web browser can be challenging, especially given that the behavior can differ between browsers and because of security/privacy concerns. Here are some common approaches for handling this situation, though note that they may not be foolproof or supported in all browsers.
### G... | 11,838 | [
{
"from": "human",
"value": "Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes.\n"
},
{
"from": "gpt",
... |
What is the best way to start developing Windows Mobile Professional applications in Python? Is there a reasonable SDK including an emulator? Is it even possible without doing excessive amount of underlaying Windows API calls for UI for instance?
| Developing Windows Mobile Professional applications in Python is quite niche, as the platform is largely outdated, and there are limited resources available. However, if you still want to pursue this, here are some steps and considerations:
### 1. **Understand the Platform**
Windows Mobile Professional (often referred... | 12,397 | [
{
"from": "human",
"value": "What is the best way to start developing Windows Mobile Professional applications in Python? Is there a reasonable SDK including an emulator? Is it even possible without doing excessive amount of underlaying Windows API calls for UI for instance?\n"
},
{
"from": "gpt",
... |
And if you do, can you give some background information on the implementation and the reasons for implementing this pattern?
The pattern is described in more detail in these articles:
Microsoft Inductive User Interface
Guidelines
IUIs and Web-Style
Navigation in Windows Forms, Part 1 & Part 2
| The Microsoft Inductive User Interface (IUI) is a design pattern aimed at enhancing user interaction and experience in software applications, particularly in desktop environments like Windows Forms. The concept is grounded in principles of user-centered design and cognitive psychology, promoting intuitive navigation an... | 11,332 | [
{
"from": "human",
"value": "And if you do, can you give some background information on the implementation and the reasons for implementing this pattern?\nThe pattern is described in more detail in these articles:\n\nMicrosoft Inductive User Interface\nGuidelines\nIUIs and Web-Style\nNavigation in Windows F... |
I have a web application that is becoming rather large. I want to separate it into smaller more logical projects, but the smaller projects are still going to need to access some of the classes in the app_code of the main project. What are some good methods to accomplish this?
| Breaking down a large web application into smaller, more manageable projects is a great way to improve maintainability and scalability. Here are several approaches you can take to achieve this while still allowing smaller projects to access shared classes and code from the main project:
### 1. **Create a Shared Librar... | 9,787 | [
{
"from": "human",
"value": "I have a web application that is becoming rather large. I want to separate it into smaller more logical projects, but the smaller projects are still going to need to access some of the classes in the app_code of the main project. What are some good methods to accomplish this?\n"... |
I want to create a box shape and I am having trouble.
I want the box to have a background color, and then different color inside the box.
The box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's background color is too stretch the entire distance of... | To create the box shape with the desired styling using HTML and CSS, you can follow these steps:
1. Create the structure of the HTML with a parent box and a nested list (`ul` and `li`).
2. Apply CSS to style the box, including background colors, spacing, and padding to achieve the desired layout.
Here’s a sample code... | 9,749 | [
{
"from": "human",
"value": "I want to create a box shape and I am having trouble.\nI want the box to have a background color, and then different color inside the box.\nThe box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's background ... |
My question: Is the MIPS programming language that beneficial to know?
I'm a CS student and am taking an assembly class which focuses on MIPS. I'm very comfortable writing in high level languages, but MIPS has me a little bit down.
Is MIPS something that I should really focus on and try to completely grasp? Will it hel... | MIPS (Microprocessor without Interlocked Pipeline Stages) is a reduced instruction set computer (RISC) architecture that is commonly used for teaching computer architecture and assembly language concepts. As a computer science student, understanding MIPS can be beneficial for several reasons:
1. **Fundamentals of Comp... | 14,090 | [
{
"from": "human",
"value": "My question: Is the MIPS programming language that beneficial to know?\nI'm a CS student and am taking an assembly class which focuses on MIPS. I'm very comfortable writing in high level languages, but MIPS has me a little bit down.\nIs MIPS something that I should really focus ... |
How can I convert a JavaScript string value to be in all lowercase letters?
Example: "Your Name" to "your name"
| In JavaScript, you can convert a string to all lowercase letters using the `toLowerCase()` method. Here's how you can do it:
```javascript
let originalString = "Your Name";
let lowerCaseString = originalString.toLowerCase();
console.log(lowerCaseString); // Output: "your name"
```
In this example, the `toLowerCase()... | 16,633 | [
{
"from": "human",
"value": "How can I convert a JavaScript string value to be in all lowercase letters?\nExample: \"Your Name\" to \"your name\"\n"
},
{
"from": "gpt",
"value": "In JavaScript, you can convert a string to all lowercase letters using the `toLowerCase()` method. Here's how you can... |
I need to build a managed DLL, targeted for x64, and expose it via x64 COM. I need a walk through, good article, etc...
Interop is fairly straightforward, but when you talk about x64 on both sides, I can't find anything.
| Building a managed DLL targeted for x64 and exposing it via x64 COM can be a bit challenging, especially if you're looking for a complete walk-through. Below, I'll provide a detailed guide on how to achieve this. This will include creating a .NET class library, registering it for COM interop, and handling the necessary... | 9,076 | [
{
"from": "human",
"value": "I need to build a managed DLL, targeted for x64, and expose it via x64 COM. I need a walk through, good article, etc...\nInterop is fairly straightforward, but when you talk about x64 on both sides, I can't find anything.\n"
},
{
"from": "gpt",
"value": "Building a m... |
If I am writing a library and I have a function that needs to return a sequence of values, I could do something like:
std::vector<int> get_sequence();
However, this requires the library user to use the std::vector<> container rather than allowing them to use whatever container they want to use. In addition, it can ad... | Yes, designing a generic interface for functions that return sequences of arbitrary length can be challenging. However, there are a few strategies and best practices you can consider to create an effective API. Here are some recommendations:
### 1. Use Output Iterators
You can define your function to accept an output ... | 9,712 | [
{
"from": "human",
"value": "If I am writing a library and I have a function that needs to return a sequence of values, I could do something like:\nstd::vector<int> get_sequence();\n\nHowever, this requires the library user to use the std::vector<> container rather than allowing them to use whatever contain... |
I am attempting to read a large XML document and I wanted to do it in chunks vs XmlDocument's way of reading the entire file into memory. I know I can use XmlTextReader to do this but I was wondering if anyone has used SAX for .NET? I know Java developers swear by it and I was wondering if it is worth giving it a try a... | Yes, SAX (Simple API for XML) is a well-known event-driven approach to processing XML data, and while it is primarily associated with Java, there are similar approaches available in .NET that can provide the same benefits.
In .NET, the `XmlReader` class (which is part of the System.Xml namespace) functions similarly t... | 10,940 | [
{
"from": "human",
"value": "I am attempting to read a large XML document and I wanted to do it in chunks vs XmlDocument's way of reading the entire file into memory. I know I can use XmlTextReader to do this but I was wondering if anyone has used SAX for .NET? I know Java developers swear by it and I was w... |
I think I've got it down to the most basic case:
int main(int argc, char ** argv) {
int * arr;
foo(arr);
printf("car[3]=%d\n",arr[3]);
free (arr);
return 1;
}
void foo(int * arr) {
arr = (int*) malloc( sizeof(int)*25 );
arr[3] = 69;
}
The output is this:
> ./a.out
car[3]=-1869558540
a.out(4100) mall... | The issue you are encountering stems from how C handles pointers, specifically the way you are passing the pointer to the `foo` function. In C, when you pass a pointer to a function, you are passing it by value. This means that any changes you make to the pointer itself within the function won't be reflected outside of... | 11,247 | [
{
"from": "human",
"value": "I think I've got it down to the most basic case:\nint main(int argc, char ** argv) {\n int * arr;\n\n foo(arr);\n printf(\"car[3]=%d\\n\",arr[3]);\n free (arr);\n return 1;\n}\n\nvoid foo(int * arr) {\n arr = (int*) malloc( sizeof(int)*25 );\n arr[3] = 69;\n}\n\nThe outpu... |
I have a legacy C++ module that offers encryption/decryption using the openssl library (DES encryption). I'm trying to translate that code into java, and I don't want to rely on a DLL, JNI, etc...
C++ code looks like:
des_string_to_key(reinterpret_cast<const char *>(key1), &initkey);
des_string_to_key(reinterpret_cast<... | To translate your C++ DES encryption code using OpenSSL to Java while ensuring that both implementations use the same keys and encryption logic, you'll need to consider a few key points.
### Key Length and Formatting
1. **Key Size**: DES uses a 56-bit key for encryption, which corresponds to 8 bytes. However, the key... | 8,439 | [
{
"from": "human",
"value": "I have a legacy C++ module that offers encryption/decryption using the openssl library (DES encryption). I'm trying to translate that code into java, and I don't want to rely on a DLL, JNI, etc...\nC++ code looks like:\ndes_string_to_key(reinterpret_cast<const char *>(key1), &in... |
Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes it doesn't find a match when it should (wh... | It sounds like you're working on a challenging problem of approximate string matching, where you need to match extracted text against a predefined search list. The Needleman-Wunsch algorithm is a classic dynamic programming approach primarily used for global alignment in bioinformatics, but it might not be the most sui... | 10,051 | [
{
"from": "human",
"value": "Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes i... |
I'm researching SVN repository browsers, and it's a tiresome task given how many are out there (I started here)
The "ideal" system would
Run on Linux
Be easy to use, even for non-developer types
Look nice (have a decent skin)
Either have built-in access control, or be written in PHP so that I could hack it myself to h... | There are several SVN repository browsers that might fit your requirements. Below are some suggestions that run on Linux, are user-friendly, have a decent aesthetic, and offer access control or are customizable for such needs.
### 1. **WebSVN**
- **Description**: WebSVN is a simple yet powerful web-based SVN repositor... | 9,129 | [
{
"from": "human",
"value": "I'm researching SVN repository browsers, and it's a tiresome task given how many are out there (I started here)\nThe \"ideal\" system would\n\nRun on Linux\nBe easy to use, even for non-developer types\nLook nice (have a decent skin)\nEither have built-in access control, or be w... |
I am using following PHP code to connect to MS Access database:
$odb_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path.";";
$odb_conn->open($connstr);
How can I retrieve database catalog/metadata from the mdb file?
FOUND THE SOLUTION
$rs_meta = $odb_conn->OpenSch... | Great to hear that you found the solution to retrieve the database catalog/metadata from your MS Access database! Using the `OpenSchema` method with the appropriate parameters allows you to access various types of schema information.
For your reference and the benefit of others who may have similar queries, here's a b... | 12,817 | [
{
"from": "human",
"value": "I am using following PHP code to connect to MS Access database:\n$odb_conn = new COM(\"ADODB.Connection\");\n$connstr = \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\". $db_path.\";\";\n$odb_conn->open($connstr);\n\nHow can I retrieve database catalog/metadata from the mdb fi... |
What does the POP3 CAPA UIDL command do?
| In the Post Office Protocol version 3 (POP3), the `CAPA` command is used by a client to request the capabilities of the mail server. When a client sends the `CAPA` command, the server responds with a list of features and options it supports.
The `UIDL` (Unique ID Listing) command is a specific capability that can be ... | 15,725 | [
{
"from": "human",
"value": "What does the POP3 CAPA UIDL command do?\n"
},
{
"from": "gpt",
"value": "In the Post Office Protocol version 3 (POP3), the `CAPA` command is used by a client to request the capabilities of the mail server. When a client sends the `CAPA` command, the server responds ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.