instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Typing in programs longer than 50 characters got old really fast on my HP49g+.
What IDEs are designed for programming HP calculators? Are there any plugins to Visual Studio, Eclipse, xCode, etc. for this purpose?
| Programming HP calculators like the HP49g+ often involves using specific software tools and IDEs tailored for the HP calculator series. Here are some options:
### Dedicated IDEs/Software:
1. **HP Development Environment (HPDE)**:
- This is a specialized development environment for HP calculators. It can be used to... | 28,891 | [
{
"from": "human",
"value": "Typing in programs longer than 50 characters got old really fast on my HP49g+.\nWhat IDEs are designed for programming HP calculators? Are there any plugins to Visual Studio, Eclipse, xCode, etc. for this purpose?\n"
},
{
"from": "gpt",
"value": "Programming HP calcu... |
This is my link:
link text
Thought about it and this was my additional question:
Now If i am going against stored procedures, is there an easy way without using T4, LLCodeGen, Codesmith, subsonic, etc..to obtain the input/output params and types if i wanted to generate my own data access layer
This is ASP.Net 2.0
| Yes, you can definitely obtain the input/output parameters and their types for stored procedures without using code generation tools like T4, LLCodeGen, Codesmith, or SubSonic in ASP.NET 2.0. Here are some steps to manually retrieve that information:
### 1. Using SQL Server System Catalog Views
You can query SQL Serv... | 30,780 | [
{
"from": "human",
"value": "This is my link:\nlink text\nThought about it and this was my additional question:\nNow If i am going against stored procedures, is there an easy way without using T4, LLCodeGen, Codesmith, subsonic, etc..to obtain the input/output params and types if i wanted to generate my own... |
I have setup web dav on windows server 2008. It seems to work fine but will not allow me to save a word document to the dir but it will allow a text file to be saved. Any ideas?
Thanks,
Alex
| Hi Alex,
The issue you're experiencing with saving Word documents to your WebDAV directory on Windows Server 2008 could be related to several factors. Here are some steps to troubleshoot and potentially resolve the issue:
1. **File Permissions**:
- Ensure that the user account you're using to access the WebDAV dir... | 17,103 | [
{
"from": "human",
"value": "I have setup web dav on windows server 2008. It seems to work fine but will not allow me to save a word document to the dir but it will allow a text file to be saved. Any ideas?\nThanks,\nAlex\n"
},
{
"from": "gpt",
"value": "Hi Alex,\n\nThe issue you're experiencing... |
I have a threading problem with Delphi. I guess this is common in other languages too. I have a long process which I do in a thread, that fills a list in main window. But if some parameters change in the mean time, then I should stop current executing thread and start from the beginning. Delphi suggests terminating a t... | In Delphi, directly terminating a thread is generally not recommended because it can lead to resource leaks, data corruption, and inconsistent application states. Threads should ideally finish their execution gracefully by checking the `Terminated` property at safe points where they can exit without causing issues. How... | 26,702 | [
{
"from": "human",
"value": "I have a threading problem with Delphi. I guess this is common in other languages too. I have a long process which I do in a thread, that fills a list in main window. But if some parameters change in the mean time, then I should stop current executing thread and start from the b... |
I need to call a VBScript file (.vbs file extension) in my C# Windows application.
How can I do this?
There is an add-in to access a VBScript file
in Visual Studio.
But I need to access the script in code behind. How to do this?
| You can call a VBScript file from your C# Windows application by using the `System.Diagnostics.Process` class to execute the script using the Windows Script Host (WSH). Below is an example of how you can do this in your C# application.
### Step 1: Create Your VBScript
First, create your VBScript file (for example, `s... | 26,992 | [
{
"from": "human",
"value": "I need to call a VBScript file (.vbs file extension) in my C# Windows application.\nHow can I do this? \nThere is an add-in to access a VBScript file \nin Visual Studio. \nBut I need to access the script in code behind. How to do this?\n"
},
{
"from": "gpt",
"value":... |
Using C / C++ socket programming, and the "read(socket, buffer, BUFSIZE)" method. What exactly is the "buffer" I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be able to hold the entire message until the null character?
| In C/C++ socket programming, the `read` function (or `recv` in the context of sockets) is used to read data from a socket into a buffer. Here's an overview of what the `buffer` is and how to handle it correctly.
### What is the Buffer?
The `buffer` is simply a block of memory where the incoming data will be stored. I... | 26,565 | [
{
"from": "human",
"value": "Using C / C++ socket programming, and the \"read(socket, buffer, BUFSIZE)\" method. What exactly is the \"buffer\" I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be able to hold the entire mes... |
I have a page with a "Print" link that takes the user to a printer-friendly page. The client wants a print dialog box to appear automatically when the user arrives at the print-friendly page. How can I do this with javascript?
| To automatically trigger the print dialog box when a user arrives at a printer-friendly page, you can use JavaScript's `window.print()` method. You would typically execute this method when the page has fully loaded. To achieve this, you can listen for the `load` event of the `window` object.
Here's a simple example of... | 32,631 | [
{
"from": "human",
"value": "I have a page with a \"Print\" link that takes the user to a printer-friendly page. The client wants a print dialog box to appear automatically when the user arrives at the print-friendly page. How can I do this with javascript?\n"
},
{
"from": "gpt",
"value": "To ... |
Why can't we initialize members inside a structure ?
example:
struct s {
int i = 10;
};
| In C and C++, the rules for initializing members of a structure differ between the two languages, and also depend on the version of C++ you are using.
### C Language
In C, you cannot initialize members of a structure directly within the structure definition. For example, the following code will result in an error in C... | 34,326 | [
{
"from": "human",
"value": "Why can't we initialize members inside a structure ?\nexample:\nstruct s {\n int i = 10;\n};\n\n"
},
{
"from": "gpt",
"value": "In C and C++, the rules for initializing members of a structure differ between the two languages, and also depend on the version of C++ y... |
I'd like to create a text field with a dropdown list that lets the user choose some predefined values. The user should also be able to type a new value or select a predefined one from a dropdown list. I know that I can use two widgets for that but in my app it would be more ergonomnic if it was unified in a one widget.... | You can achieve the desired functionality of a combined text field and dropdown list by using a "combobox." A combobox allows users to either select an option from a predefined list (dropdown) or enter their own value.
### HTML and CSS Approach
In standard HTML, you can use the `<datalist>` element to create a combo... | 32,004 | [
{
"from": "human",
"value": "I'd like to create a text field with a dropdown list that lets the user choose some predefined values. The user should also be able to type a new value or select a predefined one from a dropdown list. I know that I can use two widgets for that but in my app it would be more ergo... |
I'm trying to write a program that is able to import and export a specific database, plus users and logins, from a Microsoft SQL Server database. I have an abstraction layer between my code and ODBC that much of our other software uses. The abstraction layer normally runs with autocommit off and handles transactions on... | The issue you're encountering is quite common when dealing with ODBC and SQL Server, especially when a command produces multiple result sets or messages. In this case, the `BACKUP` command is generating multiple informational messages, and the ODBC driver is not automatically sending those messages back to your applica... | 30,274 | [
{
"from": "human",
"value": "I'm trying to write a program that is able to import and export a specific database, plus users and logins, from a Microsoft SQL Server database. I have an abstraction layer between my code and ODBC that much of our other software uses. The abstraction layer normally runs with a... |
We are creating custom WPF controls (not user controls) for an XBAP application and we would like to add a storyboard animation to scale the control to be 110% of its original size when the mouse hovers over it. We've used Blend to create the storyboard and it compiles just fine...however, when we run, it does not ani... | In your WPF custom control, the issue you're experiencing with the storyboard animations not playing is likely due to the fact that the target property for your animations is not properly set. To animate the scale of your control properly, you'll need to ensure that the `RenderTransform` is set correctly and that the s... | 27,349 | [
{
"from": "human",
"value": "We are creating custom WPF controls (not user controls) for an XBAP application and we would like to add a storyboard animation to scale the control to be 110% of its original size when the mouse hovers over it. We've used Blend to create the storyboard and it compiles just fin... |
I have two tables that I would like to join but I am getting an error from MySQL
Table: books
bookTagNum ShelfTagNum
book1 1
book2 2
book3 2
Table: shelf
shelfNum shelfTagNum
1 shelf1
2 shelf2
I want my results to be:
bookTagNum ShelfTagNum shelfNum
book1 shelf1 1
boo... | The issue you're facing arises from the way you're joining the tables. In your current query, you're using a comma-separated list of tables and a join condition that is incorrect, leading to a Cartesian product or cross join.
To achieve the desired result, you need to use a proper `JOIN` clause. You want to join the `... | 30,741 | [
{
"from": "human",
"value": "I have two tables that I would like to join but I am getting an error from MySQL\nTable: books\nbookTagNum ShelfTagNum\nbook1 1\nbook2 2\nbook3 2\n\nTable: shelf\nshelfNum shelfTagNum\n1 shelf1\n2 shelf2\n\nI want my results to be:\nbookTagNum ... |
Is there any tool that enables you to "hot swap" JavaScript contents while executing a webpage?
I am looking for something similar to what HotSpot does for Java, a way to "hot deploy" new JS code without having to reload the whole page.
Is there anything like that out there?
Clarifying in case people don't understand ... | Yes, there are several tools and techniques that allow you to "hot swap" or dynamically update JavaScript code without needing to reload the entire webpage. Here are a few options that you might find useful:
### 1. **Hot Module Replacement (HMR)**
This is a feature commonly found in modern JavaScript build tools and f... | 32,653 | [
{
"from": "human",
"value": "Is there any tool that enables you to \"hot swap\" JavaScript contents while executing a webpage? \nI am looking for something similar to what HotSpot does for Java, a way to \"hot deploy\" new JS code without having to reload the whole page.\nIs there anything like that out the... |
Looking for some direction here as I'm running into some migration problems.
We have a legacy application. The 'infrastructure' is running just fine. Business logic and data access layers written in VB calling SQL Server for the database.
I have a LOT of experience writing Winforms (desktop) application and have had ... | It sounds like you're diving into a significant transition from WinForms to ASP.NET Web Forms, and I can definitely understand the challenges you're facing. Given your background, you might find it helpful to explore resources that bridge that gap and offer guidance on ASP.NET Web Forms, particularly in terms of layout... | 29,714 | [
{
"from": "human",
"value": "Looking for some direction here as I'm running into some migration problems.\nWe have a legacy application. The 'infrastructure' is running just fine. Business logic and data access layers written in VB calling SQL Server for the database.\nI have a LOT of experience writing W... |
I have a C++ STL set with a custom ordering defined.
The idea was that when items get added to the set, they're naturally ordered as I want them.
However, what I've just realised is that the ordering predicate can change as time goes by.
Presumably, the items in the set will then no longer be in order.
So two questions... | Hi John,
You've identified a couple of important points when working with a `std::set` that uses a custom comparator.
### 1. Impact of Changing the Ordering Predicate
When you change the ordering predicate after elements have been inserted into a `std::set`, the following can happen:
- **Insertion of New Elements**... | 26,409 | [
{
"from": "human",
"value": "I have a C++ STL set with a custom ordering defined.\nThe idea was that when items get added to the set, they're naturally ordered as I want them.\nHowever, what I've just realised is that the ordering predicate can change as time goes by.\nPresumably, the items in the set will ... |
I have an MFC legacy app that I help to maintain. I'm not quite sure how to identify the version of MFC and I don't think it would make a difference anyway.
The app can take some parameters on the command line; I would like to be able to set an errorlevel on exiting the app to allow a bat/cmd file to check for failu... | In an MFC (Microsoft Foundation Classes) application, you can indeed use the `exit()` function to set the exit code for your application, even though it is a GUI application. However, this approach is not typically recommended because `exit()` does not clean up MFC resources properly. Instead, you should use `AfxExit()... | 28,741 | [
{
"from": "human",
"value": "I have an MFC legacy app that I help to maintain. I'm not quite sure how to identify the version of MFC and I don't think it would make a difference anyway. \nThe app can take some parameters on the command line; I would like to be able to set an errorlevel on exiting the app ... |
Folks,
I connect to a large number of SQL Server 2005 databases through SQL Server Management Studio 2005. I frequently check off "Remember password", yet the next time I try to connect it doesn't actually remember it. Have you had this experience? Any workarounds?
| Yes, this issue with SQL Server Management Studio (SSMS) 2005 not remembering passwords can be frustrating. Here are a few points and potential workarounds to help you:
1. **Windows Credential Manager**: If you are using Windows Authentication, consider adding your SQL Server credentials to the Windows Credential Mana... | 27,212 | [
{
"from": "human",
"value": "Folks,\nI connect to a large number of SQL Server 2005 databases through SQL Server Management Studio 2005. I frequently check off \"Remember password\", yet the next time I try to connect it doesn't actually remember it. Have you had this experience? Any workarounds?\n"
},
... |
I've been developing web applications for a while and i am quite comfortable with mySql, in fact as many do i use some form of SQL almost every day. I like the syntax and a have zero problems writing queries or optimizing my tables. I have enjoyed this mysql api.
The thing that has been bugging me is Ruby on Rails us... | Your concerns about ActiveRecord and the use of an abstraction layer over SQL are quite common among developers who are familiar with traditional SQL querying. Let's break down some of the advantages and disadvantages of using ActiveRecord in Ruby on Rails compared to direct SQL querying with MySQL.
### Advantages of ... | 23,057 | [
{
"from": "human",
"value": "I've been developing web applications for a while and i am quite comfortable with mySql, in fact as many do i use some form of SQL almost every day. I like the syntax and a have zero problems writing queries or optimizing my tables. I have enjoyed this mysql api.\nThe thing th... |
If anyone has experience using Oracle text (CTXSYS.CONTEXT), I'm wondering how to handle user input when the user wants to search for names that may contain an apostrophe.
Escaping the ' seems to work in some cases, but not for 's at the end of the word - s is in the list of stop words, and so seems to get removed.
We ... | Handling user input with apostrophes in Oracle Text can be tricky, especially when dealing with stop words and the behavior of text indexing. When searching for names or terms that contain apostrophes, such as "Joe's," you may run into issues due to stop words being removed or the apostrophe causing parsing issues. Her... | 30,596 | [
{
"from": "human",
"value": "If anyone has experience using Oracle text (CTXSYS.CONTEXT), I'm wondering how to handle user input when the user wants to search for names that may contain an apostrophe.\nEscaping the ' seems to work in some cases, but not for 's at the end of the word - s is in the list of st... |
For example, say one was to include a 'delete' keyword in C# 4. Would it be possible to guarantee that you'd never have wild pointers, but still be able to rely on the garbage collecter, due to the reference-based system?
The only way I could see it possibly happening is if instead of references to memory locations, a ... | The idea of introducing a `delete` keyword or similar manual memory management concept in a language that primarily relies on garbage collection (like C# or Java) raises a number of complexities. Let's explore your question in terms of memory safety and dangling pointers.
### Garbage Collection vs Manual Memory Manage... | 28,140 | [
{
"from": "human",
"value": "For example, say one was to include a 'delete' keyword in C# 4. Would it be possible to guarantee that you'd never have wild pointers, but still be able to rely on the garbage collecter, due to the reference-based system?\nThe only way I could see it possibly happening is if ins... |
What is the fastest way to load data from flatfiles into a MySQL database, and then create the relations between the tables via foreign keys?
For example... I have a flat file in the format:
[INDIVIDUAL] [POP] [MARKER] [GENOTYPE]
"INDIVIDUAL1", "CEU", "rs55555","AA"
"INDIVIDUAL1", "CEU", "rs535454","GA"
"IND... | To load large datasets from flat files into a MySQL database while maintaining relationships through foreign keys, you can use a combination of the following strategies:
1. **Use MySQL's `LOAD DATA INFILE`**: This command allows for fast bulk loading of data from a text file directly into a MySQL table.
2. **Create S... | 24,904 | [
{
"from": "human",
"value": "What is the fastest way to load data from flatfiles into a MySQL database, and then create the relations between the tables via foreign keys? \nFor example... I have a flat file in the format: \n[INDIVIDUAL] [POP] [MARKER] [GENOTYPE]\n\n\"INDIVIDUAL1\", \"CEU\", \"rs55555\",... |
I have multiple branches of a project checked out, each under their own directory (pretty standard).
src/branch1/some/code/directories
src/branch2/some/code/directories
I often find myself wanting to copy selected files from one branch to another. An example would be copying cvsignore files, or intellij module files... | You can achieve this task using a combination of the `find`, `cp`, and `rsync` commands in your terminal. Here’s a step-by-step method using each of these tools.
### Method 1: Using `find` and `cp`
1. Open a terminal.
2. Navigate to the `src/branch1` directory.
```bash
cd /path/to/src/branch1
```
3. Use the `find`... | 25,004 | [
{
"from": "human",
"value": "I have multiple branches of a project checked out, each under their own directory (pretty standard). \nsrc/branch1/some/code/directories\nsrc/branch2/some/code/directories\nI often find myself wanting to copy selected files from one branch to another. An example would be copyi... |
I have to refactor a large C# application, and I found a lot of functions that are never used. How can I check for unused code, so I can remove all the unused functions?
| Identifying and removing unused code in a large C# application can significantly improve maintainability, reduce complexity, and potentially improve performance. Here are several strategies to check for unused functions and effectively refactor your application:
### 1. **Static Code Analysis Tools**
Use static code an... | 28,240 | [
{
"from": "human",
"value": "I have to refactor a large C# application, and I found a lot of functions that are never used. How can I check for unused code, so I can remove all the unused functions?\n"
},
{
"from": "gpt",
"value": "Identifying and removing unused code in a large C# application c... |
I've been trying to compare the memory footprint between a VB6 application and .Net application. Trying to determine what's the average difference between the two.
The .Net code is for the most part a direct translation of the VB6 and for the most part has the same instructions as they would be programmed in C#. So whi... | When comparing the memory footprint of applications, especially between VB6 and .NET, there are several concepts and metrics from Process Explorer (or any process monitoring tool) that you should understand. Here's a breakdown of relevant memory metrics and considerations for your analysis:
### Memory Metrics in Proce... | 28,594 | [
{
"from": "human",
"value": "I've been trying to compare the memory footprint between a VB6 application and .Net application. Trying to determine what's the average difference between the two.\nThe .Net code is for the most part a direct translation of the VB6 and for the most part has the same instructions... |
I need to handle resultsets returning stored procedures/functions for three databases (Oracle, sybase, MS-Server). The procedures/functions are generally the same but the call is a little different in Oracle.
statement.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);
...
statement.execute();
ResultSet rs = (Re... | To determine the type of database you are connected to in a cleaner and more reliable way than just checking the driver name, you can utilize the `DatabaseMetaData` class provided by JDBC. This class contains useful methods that can help you identify the type of database, including the database product name and version... | 29,625 | [
{
"from": "human",
"value": "I need to handle resultsets returning stored procedures/functions for three databases (Oracle, sybase, MS-Server). The procedures/functions are generally the same but the call is a little different in Oracle.\nstatement.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);\n.... |
Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in...
I'm my specific case - I need it to open upwards - always.
UPDATE: You can't fix thi... | To force a ComboBox to always open upwards in a Flash/AIR application, you're correct that subclassing alone won't provide the control you need, especially since the internal logic for determining the dropdown direction is private and encapsulated within the ComboBox class.
Here are a few alternative approaches you mi... | 30,579 | [
{
"from": "human",
"value": "Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in...\nI'm my specific case - I need it to open up... |
I'm working on a site which is at the core/ master of a number of sites. We are also responsible for handling the authentication across all the sites under the brand banner.
The client has wanted a single-sign-on operation to be included, so if I was to sign into any of the sites I would be signed into all the sites. W... | Implementing Single Sign-On (SSO) using image tags (also known as "cookie-less authentication") is indeed a creative approach, but it has several limitations, especially with modern web browsers. As you've noticed, the major issue with WebKit-based browsers (such as Safari and Chrome) relates to their handling of third... | 30,466 | [
{
"from": "human",
"value": "I'm working on a site which is at the core/ master of a number of sites. We are also responsible for handling the authentication across all the sites under the brand banner.\nThe client has wanted a single-sign-on operation to be included, so if I was to sign into any of the sit... |
I have a char array buffer that I am using to store characters that the user will input one by one. My code below works but has a few glitches that I can't figure out:
when I execute a printf to see what's in Buffer, it does fill up but I get garbage characters at the end
it won't stop at 8 characters despite being d... | The behavior you are experiencing is due to a couple of issues with how you are handling the `Buffer` array in your code. Let's break down the problems and then provide a solution.
### Issues:
1. **Buffer Overflow**: You declared `char Buffer[8]`, which means it can only hold 8 characters, but you're not checking if `... | 30,653 | [
{
"from": "human",
"value": "I have a char array buffer that I am using to store characters that the user will input one by one. My code below works but has a few glitches that I can't figure out:\n\nwhen I execute a printf to see what's in Buffer, it does fill up but I get garbage characters at the end\ni... |
Is there a way to create C# objects and call methods from unmanaged C++, but without using COM Iterop? I am looking for something like JNI (but for .Net), where you can manually create the VM, create objects, etc.
| Yes, you can create and manipulate C# objects from unmanaged C++ code without using COM Interop by leveraging the .NET Common Language Runtime (CLR) directly. The process to do this is somewhat involved, but it essentially involves hosting the CLR within your C++ application. Below are the high-level steps to achieve t... | 29,618 | [
{
"from": "human",
"value": "Is there a way to create C# objects and call methods from unmanaged C++, but without using COM Iterop? I am looking for something like JNI (but for .Net), where you can manually create the VM, create objects, etc.\n"
},
{
"from": "gpt",
"value": "Yes, you can create ... |
I have a third-party product, a terminal emulator, which provides a DLL that can be linked to a C program to basically automate the driving of this product (send keystrokes, detect what's on the screen and so forth).
I want to drive it from a scripting language (I'm comfortable with Python and slightly less so with Per... | To interface a Windows DLL with Python or Perl, you have several options that can allow you to avoid the complexity of a separate server program. Below are methods specifically suited for both Python and Perl that will enable you to directly call functions in the DLL.
### For Python:
1. **ctypes**:
- The `ctypes` ... | 26,851 | [
{
"from": "human",
"value": "I have a third-party product, a terminal emulator, which provides a DLL that can be linked to a C program to basically automate the driving of this product (send keystrokes, detect what's on the screen and so forth).\nI want to drive it from a scripting language (I'm comfortable... |
We have a current application where user login credentials are stored in a SQL Server DB. These are, basically, stored as a plain text username, a password hash, and an associated salt for this hash.
These were all created by built in functions in ASP.NET's membership/role system. Here's a row for a user named 'joe' ... | It looks like you are trying to replicate the behavior of ASP.NET's `EncodePassword` function in Python in order to authenticate users in Django. From your description, there are a couple of issues in the code snippet you provided that need to be addressed:
1. **Encoding of Password String**: The password needs to be ... | 29,397 | [
{
"from": "human",
"value": "We have a current application where user login credentials are stored in a SQL Server DB. These are, basically, stored as a plain text username, a password hash, and an associated salt for this hash.\nThese were all created by built in functions in ASP.NET's membership/role sys... |
I'd like to highlight certain words in the document displayed in an embedded webbrowser control. I can envision a solution where the innerhtml property of the document is modified to add a colorizing < span > tag around the desired text, but I can't help feeling that there must be a simpler way?
| If you're working with an embedded web browser control, modifying the inner HTML to highlight words using `<span>` tags is indeed a common approach. However, there are also some simpler methods you can consider. Here are a few suggestions:
### 1. Using CSS and Classes
Instead of manually modifying the inner HTML, you... | 30,106 | [
{
"from": "human",
"value": "I'd like to highlight certain words in the document displayed in an embedded webbrowser control. I can envision a solution where the innerhtml property of the document is modified to add a colorizing < span > tag around the desired text, but I can't help feeling that there must ... |
This is not a technical problem, but very annoying.
Does anyone know how to turn off or change the color for the name highlight in phpEclipse?
I use white-on-black scheme and this highlight has a white background which makes it unreadable and very ugly.
To better explain which highlight I'm refering to, it's when I mov... | In phpEclipse, the highlighting you're referring to is typically related to the "Occurrences" highlighting feature. It can indeed be frustrating if the color scheme does not complement your chosen theme, especially in a white-on-black setup. Here's how you can change the color of that highlight:
1. **Open Preferences*... | 29,091 | [
{
"from": "human",
"value": "This is not a technical problem, but very annoying.\nDoes anyone know how to turn off or change the color for the name highlight in phpEclipse?\nI use white-on-black scheme and this highlight has a white background which makes it unreadable and very ugly.\nTo better explain whic... |
When doing a cvs update, you get a nice summary of the state of the repository, for example:
M src/file1.txt
M src/file2.txt
C src/file3.txt
A src/file4.txt
? src/file5.txt
Is there a way to get this without actually updating? I know there is cvs status, but this is way to verbose:
====================================... | In CVS, while there isn't a built-in command that provides the exact output of `cvs update` without performing the update, there is a command that gets close. You can use the `cvs status` command with some additional options to reduce the verbosity and format the output more like what you get from `cvs update`.
You ca... | 32,229 | [
{
"from": "human",
"value": "When doing a cvs update, you get a nice summary of the state of the repository, for example:\nM src/file1.txt\nM src/file2.txt\nC src/file3.txt\nA src/file4.txt\n? src/file5.txt\n\nIs there a way to get this without actually updating? I know there is cvs status, but this is way ... |
At the moment I have setup a custom ok cancel dialog with a drop down in c#. The ok and cancel buttons use the DialogResult property so no code behind it. What I now need to do is validate the drop down to check it isn't left empty before posting back a dialogresult.
Is this possible?
| Yes, it is possible to validate a dropdown (ComboBox) in a custom dialog before closing it using the `DialogResult` property in C#. You will need to handle the click events of the OK and Cancel buttons, perform the validation for the dropdown, and then set the `DialogResult` accordingly.
Here is a general outline of h... | 29,202 | [
{
"from": "human",
"value": "At the moment I have setup a custom ok cancel dialog with a drop down in c#. The ok and cancel buttons use the DialogResult property so no code behind it. What I now need to do is validate the drop down to check it isn't left empty before posting back a dialogresult.\nIs this po... |
I am trying to use native windows API with Qt using mingw toolset. There are link problems with some functions. What happens? Is this a bug with mingw name mangling?
#ifdef Q_WS_WIN
HWND hwnd = QWidget::winId();
HDC hdcEMF = CreateEnhMetaFile(NULL, NULL, NULL, NULL ) ;
Rectangle(hdcEMF,100,100,200,200);
... | The errors you're encountering are likely due to the fact that the MinGW toolchain you are using is not linking against the necessary Windows libraries that contain the implementations of the functions you're calling. In Windows, many API functions are defined in specific libraries that need to be linked explicitly whe... | 31,315 | [
{
"from": "human",
"value": "I am trying to use native windows API with Qt using mingw toolset. There are link problems with some functions. What happens? Is this a bug with mingw name mangling?\n#ifdef Q_WS_WIN\n HWND hwnd = QWidget::winId();\n HDC hdcEMF = CreateEnhMetaFile(NULL, NULL, NULL, NULL )... |
Where one can learn more about VectorScript (the Pascal-like programming languaged built into NNA VectorWorks CAD application) to create custom "plug-in" objects and tools ?
| To learn more about VectorScript and how to create custom plug-in objects and tools in the VectorWorks CAD application, you can explore the following resources:
1. **Official VectorWorks Documentation**: The VectorWorks help system includes a comprehensive guide to VectorScript. You can access the documentation from w... | 33,933 | [
{
"from": "human",
"value": "Where one can learn more about VectorScript (the Pascal-like programming languaged built into NNA VectorWorks CAD application) to create custom \"plug-in\" objects and tools ?\n"
},
{
"from": "gpt",
"value": "To learn more about VectorScript and how to create custom ... |
I'm trying to program ARM using Eclipse + CDT + yagarto (gnu toolchain) + OpenOCD. In several sample projects (from yagarto site for example) I found linker scripts (*.ld) where a lot of linking information specified (along with sections definitions). Actually I haven't faced this files before (IAR doesn't need them), ... | Linker scripts are indeed a crucial part of embedded systems development, especially when working with GNU tools like those in the YAGARTO toolchain. They define how the various sections of your code are mapped to memory. While IAR handles this more abstractly, using linker scripts gives you fine-grained control over m... | 31,366 | [
{
"from": "human",
"value": "I'm trying to program ARM using Eclipse + CDT + yagarto (gnu toolchain) + OpenOCD. In several sample projects (from yagarto site for example) I found linker scripts (*.ld) where a lot of linking information specified (along with sections definitions). Actually I haven't faced th... |
I'm curious what techniques you find to be the best for storage and maintaining of viewstate with respect to an ASP.Net application running within a mobile web browser (i.e. Treo with Windows Mobile, or Blackberry Curve web browser).
| In ASP.NET applications, particularly when dealing with mobile web browsers like those on Treo with Windows Mobile or Blackberry Curve, managing ViewState effectively is crucial for performance and user experience due to the limited resources and bandwidth typically available on mobile devices. Here are some techniques... | 30,690 | [
{
"from": "human",
"value": "I'm curious what techniques you find to be the best for storage and maintaining of viewstate with respect to an ASP.Net application running within a mobile web browser (i.e. Treo with Windows Mobile, or Blackberry Curve web browser).\n"
},
{
"from": "gpt",
"value": "... |
I've seen the word "spike" used in relation to source-control.
For example, a project I'm working with has three top-level folders: trunk, branches and spikes.
What's the meaning of this term?
| In the context of source control and software development, the term "spike" refers to a specific type of exploratory work aimed at gaining knowledge or reducing uncertainty about a particular technical challenge or requirement. Spikes are often used when a team needs to investigate a new technology, prototype a concept... | 35,512 | [
{
"from": "human",
"value": "I've seen the word \"spike\" used in relation to source-control.\nFor example, a project I'm working with has three top-level folders: trunk, branches and spikes.\nWhat's the meaning of this term?\n"
},
{
"from": "gpt",
"value": "In the context of source control and ... |
Possible Duplicate:
What are the different doctypes in html and what do they mean?
Being fairly inexperienced with certain aspects of web development (I've always concentrated more on the back-end than the front), can anyone give me their thoughts on whether I should worry about the DOCTYPE declaration made at the b... | The DOCTYPE declaration is an important part of an HTML document, and it serves a couple of key purposes:
1. **Standards Mode vs. Quirks Mode**: The DOCTYPE tells the web browser which version of HTML or XHTML the page is using. This helps the browser to render the page in standards mode instead of quirks mode, where ... | 31,947 | [
{
"from": "human",
"value": "\nPossible Duplicate:\nWhat are the different doctypes in html and what do they mean? \n\nBeing fairly inexperienced with certain aspects of web development (I've always concentrated more on the back-end than the front), can anyone give me their thoughts on whether I should worr... |
Disclaimer: the following is a sin against XML. That's why I'm trying to change it with XSLT :)
My XML currently looks like this:
<root>
<object name="blarg" property1="shablarg" property2="werg".../>
<object name="yetanotherobject" .../>
</root>
Yes, I'm putting all the textual data in attributes. I'm hopin... | In XSLT, when you transform XML, whitespace in attributes is usually preserved as-is; however, the way you create the output and handle the formatting may affect how it appears.
From the sample you've provided, the issue arises when you are constructing your new elements and pulling values from the attributes. If you ... | 27,412 | [
{
"from": "human",
"value": "Disclaimer: the following is a sin against XML. That's why I'm trying to change it with XSLT :)\nMy XML currently looks like this:\n<root>\n <object name=\"blarg\" property1=\"shablarg\" property2=\"werg\".../>\n <object name=\"yetanotherobject\" .../>\n</root>\n\nYes, I'... |
I have three related questions.
I want to create a word file with a name from C++. I want to be able to sent the printing command to this file, so that the file is being printed without the user having to open the document and do it manually and I want to be able to open the document. Opening the document should just ... | To accomplish your goal of creating a Word document, printing it programmatically without user intervention, and opening it using C++, you can utilize the Microsoft Office Interop or the COM (Component Object Model) automation model in Windows. This will require you to have Microsoft Word installed on the machine where... | 27,222 | [
{
"from": "human",
"value": "I have three related questions. \nI want to create a word file with a name from C++. I want to be able to sent the printing command to this file, so that the file is being printed without the user having to open the document and do it manually and I want to be able to open the d... |
I know this question isn't "directly" programming related, but since I want to be able to be well-prepared on windows-programming when Windows 7 is released, I want to try it out now. But since I don't have two computers, I can't risk to install it as dual-boot in case it screws something up, my experience with dual-bo... | Yes, there are several virtualization programs that can handle Windows 7, even during its pre-beta stages. Here are some of the most popular virtualization solutions you might consider:
1. **VMware Workstation**: VMware has a strong track record of supporting various operating systems, including beta versions. VMware ... | 33,798 | [
{
"from": "human",
"value": "I know this question isn't \"directly\" programming related, but since I want to be able to be well-prepared on windows-programming when Windows 7 is released, I want to try it out now. But since I don't have two computers, I can't risk to install it as dual-boot in case it scre... |
I have a (Wordpress powered) website, and Google is indexing some of the sub-directories. How can I stop Apache from showing users the directory listing? I know I can edit .htaccess to password-protect a directory, but I would prefer a 403 / custom redirect if possible.
| To prevent Apache from showing directory listings and instead return a 403 Forbidden status or redirect users to a custom page, you can modify your `.htaccess` file.
Here are two methods to achieve this:
### Method 1: Disable Directory Listing with a 403 Forbidden Response
1. Open your `.htaccess` file in the root d... | 28,193 | [
{
"from": "human",
"value": "I have a (Wordpress powered) website, and Google is indexing some of the sub-directories. How can I stop Apache from showing users the directory listing? I know I can edit .htaccess to password-protect a directory, but I would prefer a 403 / custom redirect if possible.\n"
},
... |
Which sorting algorithm works best on mostly sorted data?
| When dealing with mostly sorted data, **insertion sort** is generally considered one of the most efficient sorting algorithms. Its performance improves significantly when the input data is nearly sorted because it only requires a few comparisons and shifts for elements that are already in place.
The average and worst-... | 33,038 | [
{
"from": "human",
"value": "Which sorting algorithm works best on mostly sorted data?\n"
},
{
"from": "gpt",
"value": "When dealing with mostly sorted data, **insertion sort** is generally considered one of the most efficient sorting algorithms. Its performance improves significantly when the i... |
I have an Infopath 2007 form hosted on MOSS 2007. The code behind the form is written in C#. In this context, System.Environment.MachineName return the server name.
How can I get the name of the computer from which the client is filling this form?
| In InfoPath 2007 forms hosted on MOSS 2007 (Microsoft Office SharePoint Server 2007), retrieving the client's computer name directly is not straightforward because the InfoPath form runs on the client machine and communicates with the server, which may not directly expose the client’s machine name due to security and a... | 31,154 | [
{
"from": "human",
"value": "I have an Infopath 2007 form hosted on MOSS 2007. The code behind the form is written in C#. In this context, System.Environment.MachineName return the server name.\nHow can I get the name of the computer from which the client is filling this form?\n"
},
{
"from": "gpt",... |
I'm writing an app with an image upload feature. Right now I'm using NSURL POST like: 125306.
When the app is closed as far as I can tell all of the uploads abort and the threads die. Is there
1) a way to make these upload threads persist when the app is no longer in the foreground?
2) an iPhone OS service that will ... | When dealing with background uploads on iOS, there are specific APIs and techniques that you can use to ensure that your uploads can continue even if the app goes into the background or is terminated. Here’s how you can achieve that:
### 1. Using `URLSession` for Background Uploads
iOS provides a `URLSession` API that... | 29,849 | [
{
"from": "human",
"value": "I'm writing an app with an image upload feature. Right now I'm using NSURL POST like: 125306.\nWhen the app is closed as far as I can tell all of the uploads abort and the threads die. Is there\n1) a way to make these upload threads persist when the app is no longer in the fore... |
What is the regular expression to match strings (in this case, file names) that start with 'Run' and have a filename extension of '.py'?
The regular expression should match any of the following:
RunFoo.py
RunBar.py
Run42.py
It should not match:
myRunFoo.py
RunBar.py1
Run42.txt
The SQL equivalent of what I am looking ... | To create a regular expression that matches strings (file names) that start with 'Run' and end with the extension '.py', you can use the following regular expression:
```regex
^Run.*\.py$
```
### Breakdown of the regular expression:
- `^` asserts the position at the start of the string.
- `Run` matches the exact stri... | 31,961 | [
{
"from": "human",
"value": "What is the regular expression to match strings (in this case, file names) that start with 'Run' and have a filename extension of '.py'?\nThe regular expression should match any of the following:\nRunFoo.py\nRunBar.py\nRun42.py\n\nIt should not match:\nmyRunFoo.py\nRunBar.py1\nR... |
Let's have the following class hierarchy:
public class ParentClass implements SomeInterface {
}
public class ChildClass extends ParentClass {
}
Then let's have these two instances:
ParentClass parent;
ChildClass child;
Then we have the following TRUE statements
(parent instanceof SomeInterface) == true
(child instan... | In Java, once a class implements an interface, its subclasses inherit that implementation. Thus, in the case of your `ParentClass` implementing `SomeInterface`, any subclass (like `ChildClass`) will also be considered an implementation of `SomeInterface`. Therefore, `child instanceof SomeInterface` will always return `... | 31,705 | [
{
"from": "human",
"value": "Let's have the following class hierarchy:\npublic class ParentClass implements SomeInterface {\n}\n\npublic class ChildClass extends ParentClass {\n}\n\nThen let's have these two instances:\nParentClass parent;\nChildClass child;\n\nThen we have the following TRUE statements\n(p... |
I'm working on a C# program, and right now I have one Form and a couple of classes. I would like to be able to access some of the Form controls (such as a TextBox) from my class. When I try to change the text in the TextBox from my class I get the following error:
An object reference is required for the non-static fie... | In C#, to access the controls of a Form (like a `TextBox`) from another class, you need a reference to the instance of that Form. Since Form controls are instance members, you cannot access them directly from a static context (like a static method or a static class).
Here's how you can do it:
### Option 1: Pass the F... | 22,290 | [
{
"from": "human",
"value": "I'm working on a C# program, and right now I have one Form and a couple of classes. I would like to be able to access some of the Form controls (such as a TextBox) from my class. When I try to change the text in the TextBox from my class I get the following error:\n\nAn object r... |
I want to convert a BYTE* into an gdi+ Image object.
How can I do this?
The BYTE* seems a Dib point.
I found Image has a method named Image::FromStream() which may help,
But I can not find any reference about how to convert a BYTE* into a IStream object.
How can I do this?
Thanks in advance!
Actually, it is hard to ... | In GDI+, if you have a `BYTE*` that represents a DIB (Device Independent Bitmap) and you want to convert it into a GDI+ `Image` object, you can create an `IStream` using `CreateStreamOnHGlobal` from the Windows API. This allows you to write your byte data into a stream that GDI+ can read.
Here’s how you can do this in... | 27,831 | [
{
"from": "human",
"value": "I want to convert a BYTE* into an gdi+ Image object.\nHow can I do this?\nThe BYTE* seems a Dib point.\nI found Image has a method named Image::FromStream() which may help,\nBut I can not find any reference about how to convert a BYTE* into a IStream object.\nHow can I do this?... |
How do you remove the jagged edges from a wide button in internet explorer? For example:
| To remove the jagged edges from a wide button in Internet Explorer, you can use CSS to style the button more effectively. Internet Explorer has its own quirks, especially with older versions, so specific styles can help improve the appearance of buttons.
Here are a few tips you can use to achieve a smoother appearance... | 29,744 | [
{
"from": "human",
"value": "How do you remove the jagged edges from a wide button in internet explorer? For example:\n\n"
},
{
"from": "gpt",
"value": "To remove the jagged edges from a wide button in Internet Explorer, you can use CSS to style the button more effectively. Internet Explorer ha... |
One of the things that the Microsoft documentation says about enabling reliable sessions is that the service will be able to process messages in the order that they were received.
Does this mean that messages within a single session are processed in order? Or does it mean that all messages for all sessions within the s... | The concept of reliable sessions in the context of WCF (Windows Communication Foundation) pertains to how messages are delivered and processed in relation to their order, but it applies specifically to individual sessions rather than all messages across multiple sessions.
1. **Order of Messages within a Single Session... | 33,242 | [
{
"from": "human",
"value": "One of the things that the Microsoft documentation says about enabling reliable sessions is that the service will be able to process messages in the order that they were received.\nDoes this mean that messages within a single session are processed in order? Or does it mean that ... |
I'm working on a system that includes a large number of reports, generated using JasperReports. One of the newer features is that you can define styles for reports.
From the available docs I believe there is some way to have an external file defining styles to use, and you can reference that in your jasper reports. Thi... | Yes, JasperReports allows you to define styles externally, and you can apply those styles to multiple reports. This feature is particularly useful for maintaining a consistent look and feel across all your reports without needing to redefine styles in each report. You can achieve this through the use of **style templat... | 27,957 | [
{
"from": "human",
"value": "I'm working on a system that includes a large number of reports, generated using JasperReports. One of the newer features is that you can define styles for reports.\nFrom the available docs I believe there is some way to have an external file defining styles to use, and you can ... |
I'm writing a custom swing component (something completely new, but think JTree or JList). I'm trying to follow the general design of JTree, JTable, JList etc for consistency (I've also seen various poor 3rd party components abandon the separable model and/or renderer approach).
So, I have a model full of nodes, the co... | Your approach to designing the custom Swing component, while adhering to the established patterns of JTree, JTable, and JList, seems well thought out and effectively addresses the flexibility and separation of concerns you're aiming for. Here are some additional reflections on your design:
1. **Separation of Concerns*... | 26,201 | [
{
"from": "human",
"value": "I'm writing a custom swing component (something completely new, but think JTree or JList). I'm trying to follow the general design of JTree, JTable, JList etc for consistency (I've also seen various poor 3rd party components abandon the separable model and/or renderer approach).... |
We are using feature branches in Subversion for our development which is a very convenient way of keeping code within version control that is not yet ready for the mainline. However, whenever I go to merge the feature branch revision into the mainline it is a pain. Right now I go through the following steps:
Check out... | Merging feature branches in Subversion can indeed be cumbersome, especially in older versions like 1.4 that lack the more sophisticated merge tracking introduced in 1.5. Here are some tips and alternative strategies you might consider to simplify your merging process:
### 1. Upgrade to Subversion 1.5 or Later
If at al... | 29,408 | [
{
"from": "human",
"value": "We are using feature branches in Subversion for our development which is a very convenient way of keeping code within version control that is not yet ready for the mainline. However, whenever I go to merge the feature branch revision into the mainline it is a pain. Right now I g... |
If I have a Linq to SQL expression like this:
from subscription in dbContext.Subscriptions
where subscription.Expires > DateTime.Now
select subscription
I want this to to use the SQL Servers GETDATE() function instead of the time of the machine running the C# program.
The next question would be how to translate thi... | To use SQL Server's `GETDATE()` function in a LINQ to SQL expression, you can utilize the `SqlMethods` class in combination with `SqlFunctions`. However, because `SqlMethods` is not supported in LINQ to SQL directly, you have to rely on `DbFunctions` or create a custom SQL function in the data context that calls SQL Se... | 28,258 | [
{
"from": "human",
"value": "If I have a Linq to SQL expression like this:\n from subscription in dbContext.Subscriptions\n where subscription.Expires > DateTime.Now\nselect subscription\n\nI want this to to use the SQL Servers GETDATE() function instead of the time of the machine running the C# program.\n... |
A bunch of CSS files were pulled in and now I'm trying to clean things up a bit.
How can I efficiently identify unused CSS definitions in a whole project?
| Identifying unused CSS definitions can be a bit challenging, but there are several approaches and tools that can help you efficiently clean up your stylesheets. Here are some methods to consider:
### 1. **Browser Developer Tools**
Most modern browsers come with built-in developer tools that allow you to find unused CS... | 26,305 | [
{
"from": "human",
"value": "A bunch of CSS files were pulled in and now I'm trying to clean things up a bit.\nHow can I efficiently identify unused CSS definitions in a whole project?\n"
},
{
"from": "gpt",
"value": "Identifying unused CSS definitions can be a bit challenging, but there are sev... |
Is there any Ruby equivalent for Python's builtin zip function? If not, what is a concise way of doing the same thing?
A bit of context: this came up when I was trying to find a clean way of doing a check involving two arrays. If I had zip, I could have written something like:
zip(a, b).all? {|pair| pair[0] === pair[1]... | Ruby doesn't have a built-in `zip` method that operates like Python's `zip`, but it does provide a method called `zip` that is used for a similar purpose on arrays. You can achieve the same functionality as Python's `zip` with the `zip` method in Ruby.
Given your example, you can use Ruby's `zip` to combine two arrays... | 32,487 | [
{
"from": "human",
"value": "Is there any Ruby equivalent for Python's builtin zip function? If not, what is a concise way of doing the same thing?\nA bit of context: this came up when I was trying to find a clean way of doing a check involving two arrays. If I had zip, I could have written something like:\... |
Whenever I drop a new database object from server explorer into the dbml, Visual Studio replaces the connection string in the designer file with a new one that it automatically adds to the connection strings in my config file. They both have exactly the same parameters, just different names.
How do I force Visual Studi... | To ensure that Visual Studio uses an existing connection string from your configuration file when you update your DBML (LINQ to SQL) design, you can follow these steps:
1. **Open Your DBML File**: Open the .dbml file in the designer view.
2. **Modify the Connection String in the Properties Window**:
- Click on an ... | 32,441 | [
{
"from": "human",
"value": "Whenever I drop a new database object from server explorer into the dbml, Visual Studio replaces the connection string in the designer file with a new one that it automatically adds to the connection strings in my config file. They both have exactly the same parameters, just dif... |
I seem to be having an issue with iPhone SDK 2.1 in as far as being
able to establish a relationship between a ViewController and a View
window. In as far as a Cocoa Touch Class, I went forward and added a
UIViewController subclass. I made sure that the target is part of the
existing project. Right afterwards I added a... | It looks like you're working with an iOS project using Objective-C and are encountering issues connecting your `UIViewController` subclass to your XIB file. Here are several things you can check and troubleshoot to resolve the issues you're facing:
### 1. **Check Class Identity in the XIB**
Make sure you have set the ... | 29,439 | [
{
"from": "human",
"value": "I seem to be having an issue with iPhone SDK 2.1 in as far as being\nable to establish a relationship between a ViewController and a View\nwindow. In as far as a Cocoa Touch Class, I went forward and added a\nUIViewController subclass. I made sure that the target is part of the\... |
I've been involved in developing coding standards which were quite elaborate. My own experience is that it was hard to enforce if you don't have proper processes to maintain it and strategies to uphold it.
Now I'm working in, and leading, an environment even less probable to have processes and follow-up strategies in q... | One crucial element of a C++ coding standard that facilitates safer code and minimizes the risk of bugs is:
### Use of Smart Pointers Instead of Raw Pointers
**Motivation**: Smart pointers (such as `std::unique_ptr` and `std::shared_ptr`) help manage memory automatically and prevent memory leaks, dangling pointers, a... | 35,109 | [
{
"from": "human",
"value": "I've been involved in developing coding standards which were quite elaborate. My own experience is that it was hard to enforce if you don't have proper processes to maintain it and strategies to uphold it.\nNow I'm working in, and leading, an environment even less probable to ha... |
I am trying to add a png image resource in a specific Silverlight project folder. I would like to refer to this image with in my tag? I only seem to get this working when the xaml file containing the image tag is located in the same directory as the png file.
For example in the xap file the png file would be locate... | In a Silverlight application, when you want to reference an image that is located in a different folder from your XAML file, you can use a relative URI to point to the image's location. The path should be relative to the XAML file.
Given your example, if the PNG image is located in `xap\resource\image1.png` and your X... | 31,172 | [
{
"from": "human",
"value": "I am trying to add a png image resource in a specific Silverlight project folder. I would like to refer to this image with in my tag? I only seem to get this working when the xaml file containing the image tag is located in the same directory as the png file. \nFor example in... |
Let me apologize in advance for the simplicity of this question (I heard Jeff's podcast and his concern that the quality of the questions will be "dumbed down"), but I'm stuck. I'm using AquaData to hit my Informix DB. There are quirky little nuances between MS SQL and Informix SQL. Anyway, I'm trying to do a simple... | It looks like you're working with Informix SQL and trying to perform some calculations and aggregations. The challenge you're facing seems to revolve around correctly using the `ROUND` function with your division operation in the query.
From your explanation and the code you provided, you've made a good adjustment in ... | 28,293 | [
{
"from": "human",
"value": "Let me apologize in advance for the simplicity of this question (I heard Jeff's podcast and his concern that the quality of the questions will be \"dumbed down\"), but I'm stuck. I'm using AquaData to hit my Informix DB. There are quirky little nuances between MS SQL and Infor... |
Does anyone know how to use the credential cache or network credential to get the user's personal info from the Active Directory using C# or VB? I need to get personal info such as name, telephone ID and so on.
| To retrieve user information from Active Directory using C#, you can utilize the `System.DirectoryServices` namespace, which provides easy access to the Active Directory and allows you to query user information.
### Setting Up
First, make sure you have the necessary assembly referenced in your project. If you're usin... | 17,445 | [
{
"from": "human",
"value": "Does anyone know how to use the credential cache or network credential to get the user's personal info from the Active Directory using C# or VB? I need to get personal info such as name, telephone ID and so on.\n"
},
{
"from": "gpt",
"value": "To retrieve user inform... |
We'd like to start our bug numbers to something other than 1 for a new Bugzilla installation. Is there a way to do this?
| Yes, you can start your bug numbers from a specific number other than 1 in a Bugzilla installation. This requires altering the database directly, so proceed with caution and make sure to back up your database before making any changes.
Here's a general approach to set a custom starting number for bugs:
1. **Backup Yo... | 33,323 | [
{
"from": "human",
"value": "We'd like to start our bug numbers to something other than 1 for a new Bugzilla installation. Is there a way to do this?\n"
},
{
"from": "gpt",
"value": "Yes, you can start your bug numbers from a specific number other than 1 in a Bugzilla installation. This require... |
Suppose a database table has a column "Name" which is defined as key for the table.
Usual name values will be "Bill", "Elizabeth", "Bob", "Alice". Lookups on the table will be done by the name key as well.
Does hashing the values optimize the operations in any way? i.e. entering each name as some hashed value of the na... | Hashing values like names in a database can have some advantages, but there are also important trade-offs and considerations that need to be taken into account.
### Advantages of Hashing
1. **Storage Optimization**: Depending on the hash function, storing hashed values might require less space than storing strings, e... | 32,112 | [
{
"from": "human",
"value": "Suppose a database table has a column \"Name\" which is defined as key for the table.\nUsual name values will be \"Bill\", \"Elizabeth\", \"Bob\", \"Alice\". Lookups on the table will be done by the name key as well.\nDoes hashing the values optimize the operations in any way? i... |
I'm invoking one of SharePoint's web service APIs that returns a CAML fragment. I've searched the interweb far and wide but I've been unable to figure out how to make this CAML fragment to render as "normal" HTML that I can render in a more sane environment like Plumtree, WLP, Liferay or any other portal besides ShareP... | You raise a valid point about the limitations of CAML (Collaborative Application Markup Language) in terms of interoperability with non-SharePoint environments. CAML is indeed primarily intended for use within SharePoint to define queries and views for SharePoint lists and libraries, and it can be challenging to work w... | 32,898 | [
{
"from": "human",
"value": "I'm invoking one of SharePoint's web service APIs that returns a CAML fragment. I've searched the interweb far and wide but I've been unable to figure out how to make this CAML fragment to render as \"normal\" HTML that I can render in a more sane environment like Plumtree, WLP,... |
public void Getrecords(ref IList iList,T dataItem)
{
iList = Populate.GetList<dataItem>() // GetListis defined as GetList<T>
}
dataItem can be my order object or user object which will be decided at run time.The above does not work as it gives me this error
The type 'T' must have a public parameterless constructor... | The error you're encountering stems from the use of `T` in your method signature and the attempt to call `GetList<dataItem>()` using a variable `dataItem` as a type, which is not valid C#. Instead, you need to define a type parameter that is constrained to types with a public parameterless constructor.
Here’s how you ... | 32,779 | [
{
"from": "human",
"value": "public void Getrecords(ref IList iList,T dataItem) \n{ \n iList = Populate.GetList<dataItem>() // GetListis defined as GetList<T>\n}\n\ndataItem can be my order object or user object which will be decided at run time.The above does not work as it gives me this error\nThe type '... |
For reasons unknown, the VB6 compiler often likes to reorder the contents of .vbp files and the control descriptor block at the top of .frm files (The code that describes the properties of controls on the form. Code that you don't see in the IDE but you do see in a text editor and when doing diffs against the previous... | The reordering of contents in Visual Basic 6 (VB6) project files (.vbp) and form files (.frm) is a known issue due to how the VB6 IDE handles and saves these files. Unfortunately, there isn't a built-in setting in VB6 that can prevent this behavior, but there are some workarounds and practices you can consider to mitig... | 29,723 | [
{
"from": "human",
"value": "For reasons unknown, the VB6 compiler often likes to reorder the contents of .vbp files and the control descriptor block at the top of .frm files (The code that describes the properties of controls on the form. Code that you don't see in the IDE but you do see in a text editor ... |
Is there a cross-browser method to emulate CSS3's zoom property? I know how to zoom images and text separately, but cannot seem to keep everything aligned.
One solution might be to read the computed styles of the element and its children, convert all measures to px, multiply them by some factor, and then generate HTML... | Emulating the CSS3 `zoom` property in a cross-browser way can be a bit challenging because different browsers have different levels of support for it, and it isn't part of any formal CSS specification. However, you can achieve a similar effect by using CSS transformations or by applying a scaling technique using JavaSc... | 27,639 | [
{
"from": "human",
"value": "Is there a cross-browser method to emulate CSS3's zoom property? I know how to zoom images and text separately, but cannot seem to keep everything aligned.\nOne solution might be to read the computed styles of the element and its children, convert all measures to px, multiply t... |
I'd like to have a page in php that normally displays information based on the GET request sent to it. However, I'd like for it to also be able to process certain POST requests. So, how can I tell if any data was sent by POST so I can act on it?
| In PHP, you can determine if any data has been sent via POST by checking the `$_SERVER['REQUEST_METHOD']` variable. This variable will tell you whether the request method used was POST, GET, or another method. You can then access the data sent in the POST request using the `$_POST` superglobal array.
Here’s a simple e... | 32,108 | [
{
"from": "human",
"value": "I'd like to have a page in php that normally displays information based on the GET request sent to it. However, I'd like for it to also be able to process certain POST requests. So, how can I tell if any data was sent by POST so I can act on it?\n"
},
{
"from": "gpt",
... |
My problem is that I set some breakpoints in my code and some of them aren't working. In some places it complains about "Unresolved Breakpoint".
Does anyone have any clue why this is happening? I am using gdb, by the way.
EDIT: Yes, of course is compiled with debug information. It only happens at some classes or point... | The "Unresolved Breakpoint" issue you're experiencing with GDB can be caused by several factors, even if you're compiling with debug information and without optimizations. Here are some potential reasons and solutions:
1. **Debug Information**: Ensure that your compiler is generating debug information correctly. If yo... | 30,555 | [
{
"from": "human",
"value": "My problem is that I set some breakpoints in my code and some of them aren't working. In some places it complains about \"Unresolved Breakpoint\". \nDoes anyone have any clue why this is happening? I am using gdb, by the way.\nEDIT: Yes, of course is compiled with debug informat... |
I am refactoring some MFC code that is littered with ASSERT statements, and in preparation for a future Linux port I want to replace them with the standard assert. Are there any significant differences between the two implementations that people know of that could bite me on the backside?
Similarly, I have also come a... | When refactoring MFC code to replace `ASSERT` and `ATLASSERT` with the standard `assert`, there are some differences and considerations to keep in mind:
### Key Differences
1. **Debug vs. Release Behavior**:
- **MFC's ASSERT**: Typically, MFC’s `ASSERT` macro does not affect the behavior of the application in rele... | 30,194 | [
{
"from": "human",
"value": "I am refactoring some MFC code that is littered with ASSERT statements, and in preparation for a future Linux port I want to replace them with the standard assert. Are there any significant differences between the two implementations that people know of that could bite me on th... |
Are XML parsers (provided by standard libraries) faster than custom written parsers?
If so, why?
| The performance of XML parsers can vary significantly between standard libraries and custom-written parsers, and whether standard parsers are faster than custom ones depends on several factors. Here are some considerations:
### 1. **Optimization**:
- **Standard Library Parsers**: These are typically well-optimized ... | 30,368 | [
{
"from": "human",
"value": "Are XML parsers (provided by standard libraries) faster than custom written parsers?\nIf so, why?\n"
},
{
"from": "gpt",
"value": "The performance of XML parsers can vary significantly between standard libraries and custom-written parsers, and whether standard parser... |
If i can use
<td><textarea><bean:write name="smlMoverDetailForm" property="empFDJoiningDate"/>
</textarea></td>
to displace a value how can i use the struts tags to save a vaiable to the sesssion
in sudo code
session.setAttribute("test" , "<bean:write name="smlMoverDetailForm"
property="empFDJoiningDate"/>");
is thi... | In JSP with Struts, you typically use form beans to encapsulate data, and you would use these beans to populate and save form data. However, directly assigning a JSP expression like `<bean:write ... />` into a session attribute, as you're trying to do in your pseudo-code, is not the right approach.
Instead, you should... | 31,006 | [
{
"from": "human",
"value": "If i can use\n<td><textarea><bean:write name=\"smlMoverDetailForm\" property=\"empFDJoiningDate\"/>\n</textarea></td>\n\nto displace a value how can i use the struts tags to save a vaiable to the sesssion \nin sudo code\nsession.setAttribute(\"test\" , \"<bean:write name=\"smlMo... |
In my Visual Studio Web application project I am adding a reference to a web service. When I add a web reference the following list of files gets generated.
Reference.map
Reference.vb
Reference.disco
Reference.wsdl
All these files contains the url pointing to the web service. Even when I move it to a machine without... | In .NET Framework 1.1, you don't have built-in support for web services URL configurations like you would in later versions with `app.config` or `web.config`. However, you can achieve similar functionality by modifying the way you create the web service proxy instance in your code.
Here's a common approach to use the... | 32,294 | [
{
"from": "human",
"value": "In my Visual Studio Web application project I am adding a reference to a web service. When I add a web reference the following list of files gets generated. \n\nReference.map\nReference.vb\nReference.disco\nReference.wsdl\n\nAll these files contains the url pointing to the web s... |
Some time back I was working on an algorithm that processed code, and required a reflections API. We were interested in its implementation for multiple languages, but the reflections API for a language would not work for any other language. So is there any thing like a "universal reflections API" that would work for al... | Creating a "universal reflections API" that works across multiple programming languages like .NET, Java, Ruby, and Python poses significant challenges. Each language has its own unique features, paradigms, and implementations of object-oriented programming (OOP). However, it is possible to outline a conceptual approach... | 27,155 | [
{
"from": "human",
"value": "Some time back I was working on an algorithm that processed code, and required a reflections API. We were interested in its implementation for multiple languages, but the reflections API for a language would not work for any other language. So is there any thing like a \"univers... |
I have an ascx component, that holds two-level menu, because there are several user types, and the menu needs to be computed on server.
Anyways - I'm also doing the highlighting of current menu item on server (adding a selected class/css to an item). Highlighting with javascript is not good option, because there is co... | Managing dynamic menu highlighting can be challenging, especially when dealing with multiple user types and maintaining the correct state during postbacks. While your current approach using a hashtable for mapping URLs to menu items is functional, there are several alternative techniques that you might consider to impr... | 28,986 | [
{
"from": "human",
"value": "I have an ascx component, that holds two-level menu, because there are several user types, and the menu needs to be computed on server. \nAnyways - I'm also doing the highlighting of current menu item on server (adding a selected class/css to an item). Highlighting with javascri... |
How can I debug a .NET setup project?
| Debugging a .NET setup project (also known as a deployment project) can be a bit more complex compared to debugging regular .NET applications. Here are some steps and tips to effectively debug a .NET setup project:
### 1. Enable Logging for the Installer
You can enable logging for your setup project by using the follo... | 28,358 | [
{
"from": "human",
"value": "How can I debug a .NET setup project?\n"
},
{
"from": "gpt",
"value": "Debugging a .NET setup project (also known as a deployment project) can be a bit more complex compared to debugging regular .NET applications. Here are some steps and tips to effectively debug a .... |
I'm a total amateur writing a small App to track to changes in folders. I imagine I'll be keeping information about the directories to watch in one datatable bound to a gridview, when the user clicks a button, the program will create FileSystemWatchers to keep an eye on the directories and they will send their event me... | When designing an application that tracks changes in folders using FileSystemWatchers, it's important to approach the problem with good object-oriented programming (OOP) principles. Here’s a structured way to manage your `DataTables` and `FileSystemWatchers` within your application:
### 1. Class Structure
Instead of ... | 24,494 | [
{
"from": "human",
"value": "I'm a total amateur writing a small App to track to changes in folders. I imagine I'll be keeping information about the directories to watch in one datatable bound to a gridview, when the user clicks a button, the program will create FileSystemWatchers to keep an eye on the dire... |
I'm debugging my Python code in Eclipse using the Pydev plugin. I'm able to open a Pydev console and it gives me two options: "Console for currently active editor" and "Python console". However none of them is useful to inspect current variable status after a breakpoint.
For example, the code stopped at a breakpoint an... | When debugging with Pydev in Eclipse and you hit a breakpoint, you have a couple of options for inspecting variables, including the "Variables" view and the Debug perspective. Here’s how you can effectively inspect variable states after hitting a breakpoint:
### Using the Variables View
1. **Break at the Breakpoint**... | 33,304 | [
{
"from": "human",
"value": "I'm debugging my Python code in Eclipse using the Pydev plugin. I'm able to open a Pydev console and it gives me two options: \"Console for currently active editor\" and \"Python console\". However none of them is useful to inspect current variable status after a breakpoint.\nFo... |
What is a good resource to get started with Windows file system driver development for a newbie?
| Getting started with Windows file system driver development can be complex, but there are several good resources to help you on your journey. Here are some recommended resources:
1. **Windows Driver Kit (WDK)**:
- Download the latest version of the Windows Driver Kit, which includes documentation, sample drivers, ... | 31,303 | [
{
"from": "human",
"value": "What is a good resource to get started with Windows file system driver development for a newbie?\n"
},
{
"from": "gpt",
"value": "Getting started with Windows file system driver development can be complex, but there are several good resources to help you on your jour... |
I'm going to be distributing a plugin that will be routinely updated with features, bug fixes, and updates to downloadable corpuses.
The usual update site mechanism can do the update ok - when the user asks it to.
The problem is that (unlike MS Office), the automatic updater preference is off by default and I don't wan... | When it comes to implementing automatic update checks for your plugin, there are several approaches to consider, each with its own implications for user experience and compliance with best practices. Here are some options, along with what might be considered acceptable or bad form:
### 1. **Occasional Update Checks:**... | 32,216 | [
{
"from": "human",
"value": "I'm going to be distributing a plugin that will be routinely updated with features, bug fixes, and updates to downloadable corpuses.\nThe usual update site mechanism can do the update ok - when the user asks it to.\nThe problem is that (unlike MS Office), the automatic updater p... |
I have the following Apache mod_rewrite rule:
RewriteRule ^(.*) http://127.0.0.1:4321/$1 [proxy]
This works great; Apache forwards all requests to the CherryPy server I have running on the same machine.
Unfortunately, I'm having some problems with paths which have a space. If I make a request for /Sites/some%20site/i... | When you are using Apache’s mod_rewrite to forward requests to another server (like CherryPy), it is important to manage URL encoding properly. The issue you’re facing is that Apache is decoding the URL before sending it to CherryPy, resulting in spaces instead of `%20`.
While there is no direct way to re-encode URLs ... | 31,460 | [
{
"from": "human",
"value": "I have the following Apache mod_rewrite rule:\nRewriteRule ^(.*) http://127.0.0.1:4321/$1 [proxy]\n\nThis works great; Apache forwards all requests to the CherryPy server I have running on the same machine.\nUnfortunately, I'm having some problems with paths which have a space. ... |
I have a MS Access form with a Datasheet subform.
Using code, I change the ColumnHidden property of various of its columns.
But, when I close the form, I'm asked whether to save the table layout of the Datasheet's table.
How can I stop the form from asking the user to same the table layout continually?
Do I have no ch... | In Microsoft Access, when you modify properties of a datasheet view (like the `ColumnHidden` property) at runtime, Access will prompt the user to save those layout changes when the form is closed. This behavior occurs because the changes you make are considered as layout changes to the underlying table or query of the ... | 31,091 | [
{
"from": "human",
"value": "I have a MS Access form with a Datasheet subform.\nUsing code, I change the ColumnHidden property of various of its columns.\nBut, when I close the form, I'm asked whether to save the table layout of the Datasheet's table.\n\nHow can I stop the form from asking the user to same ... |
In the below code snippet can i replace char * to const char * and remove the strdup() function call and directly take the optarg value set by getopt()? I am advised to use const char * to skip the strdup function usage. Appreciate the help in advance.
/* Code Snippet */
char *dir = NULL;
char *bld = NULL;
int chr;
w... | Yes, you can replace `char *` with `const char *` for the variables `dir` and `bld`, and you can skip the `strdup()` function calls to directly use `optarg`.
The reason you can do this is that `optarg` is a pointer to the argument string provided by the user when using `getopt()`, and since `optarg` is not going to b... | 33,224 | [
{
"from": "human",
"value": "In the below code snippet can i replace char * to const char * and remove the strdup() function call and directly take the optarg value set by getopt()? I am advised to use const char * to skip the strdup function usage. Appreciate the help in advance.\n/* Code Snippet */\nchar ... |
So, I'm writing a Cocoa application that needs to be able to display web content using Opera's rendering engine. This is for a feature, not because I'm an Opera fanboi (I'm not). All I've been able to find on the subject is this press release about Adobe's use of the Opera engine.
Has anyone done this? What's the API l... | Integrating Opera's rendering engine (Presto, prior to Opera moving to Blink) into a Cocoa application can be quite challenging, especially since the engine is proprietary and not openly available for third-party developers. As of the last update in 2023, Opera Software has largely transitioned to using the Blink rende... | 33,100 | [
{
"from": "human",
"value": "So, I'm writing a Cocoa application that needs to be able to display web content using Opera's rendering engine. This is for a feature, not because I'm an Opera fanboi (I'm not). All I've been able to find on the subject is this press release about Adobe's use of the Opera engin... |
What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer.
| To perform an SCP transfer in Java, the most common approach is to use the JSch library, which is a pure Java implementation of SSH2. JSch allows you to execute commands on a remote server, manage SFTP and SCP transfers, and handle SSH connections. Here's a step-by-step guide on how to perform an SCP transfer using JSc... | 30,013 | [
{
"from": "human",
"value": "What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer.\n"
},
{
"from": "gpt",
"value": "T... |
If I need to upgrade MSSQL 2000 TO MSSQL 2005 which is installed inside the citrix
box. How can I check if it is compatible or not.
Thanks
| Upgrading from Microsoft SQL Server 2000 to SQL Server 2005 is a significant upgrade, and compatibility checks are essential to ensure a smooth transition. Here are the steps you can follow to check for compatibility before proceeding with the upgrade:
### 1. **Review System Requirements:**
- Check the system requi... | 30,248 | [
{
"from": "human",
"value": "If I need to upgrade MSSQL 2000 TO MSSQL 2005 which is installed inside the citrix\nbox. How can I check if it is compatible or not.\nThanks\n"
},
{
"from": "gpt",
"value": "Upgrading from Microsoft SQL Server 2000 to SQL Server 2005 is a significant upgrade, and com... |
Literate programming is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the software source code would be a plain document like word, with code paragraphs in it.
I ... | Literate programming is indeed a powerful approach for enhancing code readability and maintainability, and integrating it into a development environment can be a challenge. Although the concept has been around for a while, tooling support varies. Here are some tools and approaches that could help you implement literate... | 28,309 | [
{
"from": "human",
"value": "Literate programming is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the software source code would be a plain document l... |
Using any tools which you would expect to find on a nix system (in fact, if you want, msdos is also fine too), what is the easiest/fastest way to calculate the mean of a set of numbers, assuming you have them one per line in a stream or file?
| There are several ways to calculate the mean of a set of numbers in a file or stream on a Unix-like system. Here's a straightforward approach using common command-line tools:
### Using `awk`
If you have your numbers in a file called `numbers.txt`, you can use `awk` as follows:
```bash
awk '{ total += $1; count++ } E... | 30,687 | [
{
"from": "human",
"value": "Using any tools which you would expect to find on a nix system (in fact, if you want, msdos is also fine too), what is the easiest/fastest way to calculate the mean of a set of numbers, assuming you have them one per line in a stream or file?\n"
},
{
"from": "gpt",
"... |
Programming is learned by writing programs. But code reading is said to be another good way of learning. I would like to improve my unit-testing skills by reading, examining real-world code. Could you recommend any open source projects where the source is extensively tested with unit tests?
I'm interested in code writt... | Absolutely! Here are some open-source C++ projects that are known for having extensive unit tests:
1. **Google Test (gtest)**:
- **Repository**: [Google Test GitHub](https://github.com/google/googletest)
- **Description**: Google Test is a popular unit testing framework for C++. The repository includes numerous ... | 27,334 | [
{
"from": "human",
"value": "Programming is learned by writing programs. But code reading is said to be another good way of learning. I would like to improve my unit-testing skills by reading, examining real-world code. Could you recommend any open source projects where the source is extensively tested with... |
I've recently gotten my hobby java project embedded into a page thanks to this very site, but now I'm having some security issues.
I have the include:
import java.sql.*;
and the line:
Class.forName("com.mysql.jdbc.Driver").newInstance();
as well as a mysql .jar file in my src directory, it works from the console, and... | You're facing a common issue with Java applets, particularly concerning security restrictions imposed by the Java security model. Since applets run in a restricted environment (sandbox), they have limited access to system resources and can be restricted from loading external classes or drivers such as `com.mysql.jdbc.D... | 30,323 | [
{
"from": "human",
"value": "I've recently gotten my hobby java project embedded into a page thanks to this very site, but now I'm having some security issues.\nI have the include:\nimport java.sql.*;\n\nand the line:\nClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\nas well as a mysql .jar file i... |
How should I base64 encode a PDF file for transport over XML-RPC in Python?
| Base64 encoding a PDF file for transport over XML-RPC in Python involves reading the PDF file in binary mode, encoding its content using base64, and then passing it as a string. Here’s how you can do that:
1. **Read the PDF file in binary mode**.
2. **Use the `base64` module** to encode the binary data.
3. **Convert t... | 34,120 | [
{
"from": "human",
"value": "How should I base64 encode a PDF file for transport over XML-RPC in Python?\n"
},
{
"from": "gpt",
"value": "Base64 encoding a PDF file for transport over XML-RPC in Python involves reading the PDF file in binary mode, encoding its content using base64, and then pass... |
In C# you can use verbatim strings like this:
@"\\server\share\file.txt"
Is there something similar in JavaScript?
| Yes, JavaScript has a similar feature for strings known as template literals, which are enclosed by backticks (`` ` ``). Template literals allow for multi-line strings and also support interpolation of expressions, but they do not have the exact same behavior as C# verbatim strings regarding escaping characters.
For e... | 34,869 | [
{
"from": "human",
"value": "In C# you can use verbatim strings like this:\n@\"\\\\server\\share\\file.txt\"\n\nIs there something similar in JavaScript?\n"
},
{
"from": "gpt",
"value": "Yes, JavaScript has a similar feature for strings known as template literals, which are enclosed by backticks... |
Any good logging libraries that support .NET compact framework?
| The .NET Compact Framework has limited support for logging libraries compared to the full .NET Framework, but there are still some options you can consider:
1. **Log4Net**: While primarily designed for the full .NET Framework, there is a compact version of Log4Net that some developers have used. However, you may need ... | 33,290 | [
{
"from": "human",
"value": "Any good logging libraries that support .NET compact framework?\n"
},
{
"from": "gpt",
"value": "The .NET Compact Framework has limited support for logging libraries compared to the full .NET Framework, but there are still some options you can consider:\n\n1. **Log4N... |
I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. It needs the capability of selecting a single element or group of elements and highlighting the data in some way. It also needs to allow editing. I'm writing this in C# 3,5 using Winforms. ... | In C# WinForms, when creating a custom control to display and edit an array of hexadecimal data, you have a couple of options. Here are some suggestions based on your requirements:
### 1. Using DataGridView
The most straightforward approach is to use a `DataGridView`. This control is very flexible and supports the abi... | 21,163 | [
{
"from": "human",
"value": "I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. It needs the capability of selecting a single element or group of elements and highlighting the data in some way. It also needs to allow editing. I'... |
I am writing a Jython script to sort a list of URLs.
I have a list that looks like this:
http://www.domain.com/folder1/folder2/|,1
http://www.domain.com/folder1/|,1
http://www.domain.com/folder1/folder2/folder3/|,1
http://www.domain.com/folder1/|,1
http://www.domain.com/folder1/folder2/|,1
http://www.domain.com/folder1... | Certainly! You can sort the list of URLs based on their length using Jython. The approach involves splitting each entry into its components, sorting based on the URL's length, and then reassembling the sorted entries.
Here's a simple Jython script to accomplish this:
```python
# Sample list of URLs
urls = [
"http... | 31,451 | [
{
"from": "human",
"value": "I am writing a Jython script to sort a list of URLs.\nI have a list that looks like this:\nhttp://www.domain.com/folder1/folder2/|,1\nhttp://www.domain.com/folder1/|,1\nhttp://www.domain.com/folder1/folder2/folder3/|,1\nhttp://www.domain.com/folder1/|,1\nhttp://www.domain.com/fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.