instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have added all the header files from library in path how to get the headers that are only needed for the project
| To identify which header files from a library are needed for your project, you can follow these steps:
### 1. **Analyze Your Code:**
- Go through your source code and note down all the header files that are included using `#include <...>` or `#include "..."`.
- Make a list of all the unique headers you are using... | 41,987 | [
{
"from": "human",
"value": "I have added all the header files from library in path how to get the headers that are only needed for the project\n"
},
{
"from": "gpt",
"value": "To identify which header files from a library are needed for your project, you can follow these steps:\n\n### 1. **Anal... |
How do I mask the address of another site using HTML?
For example, I'd like:
http://www.example.com/source.html
To point to another page:
http://www.example.com/dest.html
Note that the destination page could be on another domain.
| To mask the address of a webpage using HTML, you can use an HTML `<iframe>`. However, it's important to note that this won't truly "mask" the URL in the address bar, as the user's browser will still show the original URL. Instead, this method allows you to embed another page within your page, while the original URL rem... | 41,576 | [
{
"from": "human",
"value": "How do I mask the address of another site using HTML?\nFor example, I'd like:\nhttp://www.example.com/source.html\nTo point to another page:\nhttp://www.example.com/dest.html\nNote that the destination page could be on another domain.\n"
},
{
"from": "gpt",
"value": ... |
What is the best definition of a thread and what is a process?
If I call a function, how do I know that a thread is calling it or a process (or am I not understanding it??!). This is in a multi-core system (quadcore).
| In the context of operating systems and computer architecture, **processes** and **threads** are fundamental concepts related to executing tasks. Here's a clear definition of both:
### Process
- A **process** is an instance of a program in execution. It contains the program code (text segment), current activity (stack... | 41,505 | [
{
"from": "human",
"value": "What is the best definition of a thread and what is a process? \nIf I call a function, how do I know that a thread is calling it or a process (or am I not understanding it??!). This is in a multi-core system (quadcore).\n"
},
{
"from": "gpt",
"value": "In the context... |
A colleague of mine and I have been discussing how to declare variables in a function.
Let's say you have a class called TStrings (using Delphi for the sake of explanation) that has at least one abstract method and a descendant class called TStringList which obviously implements the abstract method, but it introduces n... | In your examples, you are comparing two different ways of declaring the variable `aList` in the `AddElements` procedure, where one uses `TStringList` and the other uses the base class `TStrings`. Let's analyze both approaches in terms of best practices in Delphi programming.
### Example Analysis
1. **Using `TStringLi... | 43,453 | [
{
"from": "human",
"value": "A colleague of mine and I have been discussing how to declare variables in a function.\nLet's say you have a class called TStrings (using Delphi for the sake of explanation) that has at least one abstract method and a descendant class called TStringList which obviously implement... |
I have table employee like,
employee
(
emp_id int primary key,
emp_name varchar(50),
mngr_id int)
and here mngr_id would either null or contain valid emp_id. This way it form the hierarchy of employees in the organization.
In order to traverse the entire hierarchy I had to write the recursive stored procedure. (in Ora... | When dealing with hierarchical data, using a recursive stored procedure to traverse the hierarchy can be a practical approach, especially if the depth of the hierarchy is limited (as in your case, where it does not exceed 10 levels). However, there are performance implications to consider, particularly in relation to h... | 42,568 | [
{
"from": "human",
"value": "I have table employee like,\n\nemployee\n(\nemp_id int primary key,\nemp_name varchar(50),\nmngr_id int)\nand here mngr_id would either null or contain valid emp_id. This way it form the hierarchy of employees in the organization.\nIn order to traverse the entire hierarchy I had... |
Goal: Efficiently show/hide rows based on the data in the row.
Create a helper column that determines whether or not
a row should be hidden.
Have the formula in the helper
column return an error or a number.
Hide the helper column and write
code to execute the hiding/showing.
Question: Which one of the following me... | To determine which of the two methods (`SetRowVisibility1` or `SetRowVisibility2`) is expected to be faster for showing/hiding rows based on the data in a helper column, let's analyze the approaches used in each of them.
### Method 1: `SetRowVisibility1`
- **Use of `SpecialCells`**: This method takes advantage of the ... | 43,605 | [
{
"from": "human",
"value": "Goal: Efficiently show/hide rows based on the data in the row.\n\nCreate a helper column that determines whether or not\na row should be hidden.\nHave the formula in the helper\ncolumn return an error or a number.\nHide the helper column and write\ncode to execute the hiding/sh... |
import sys
words = {
1 : 'one',
2 : 'two',
3 : 'three',
4 : 'four',
5 : 'five',
6 : 'six',
7 : 'seven',
8 : 'eight',
9 : 'nine',
10 : 'ten',
11 : 'eleven',
12 : 'twelve',
13 : 'thirteen',
14 : 'fourteen',
15 : 'fifteen',
16 : 'sixteen',
17 : 'seventee... | You're on the right track with your implementation of converting numbers to words in Python! However, there are indeed some improvements that can be made to enhance readability, maintainability, and functionality. Below are a few suggestions, including handling numbers that do not have a digit count that is a multiple ... | 40,393 | [
{
"from": "human",
"value": "import sys\n\nwords = {\n 1 : 'one',\n 2 : 'two',\n 3 : 'three',\n 4 : 'four',\n 5 : 'five',\n 6 : 'six',\n 7 : 'seven',\n 8 : 'eight',\n 9 : 'nine',\n 10 : 'ten',\n 11 : 'eleven',\n 12 : 'twelve',\n 13 : 'thirteen',\n 14 : 'fourteen',\n... |
I want to assign a resource I already have a second name, similar to using the BasedOn property of Styles. Specifically I have a brush that I use for a group of elements called ForegroundColor and I would like to use it in a control template (a ComboBox) calling it MouseOverBackgroundBrush. I would like to do something... | In XAML, there isn't a built-in `ResourceCopy` element to directly copy the value of a resource to another resource. However, you can achieve a similar effect by using the `StaticResource` or `DynamicResource` markup extension to reference the existing resource.
If you want to create a new resource that effectively us... | 40,760 | [
{
"from": "human",
"value": "I want to assign a resource I already have a second name, similar to using the BasedOn property of Styles. Specifically I have a brush that I use for a group of elements called ForegroundColor and I would like to use it in a control template (a ComboBox) calling it MouseOverBack... |
See http://msdn.microsoft.com/en-us/library/aa767916(VS.85).aspx for Async Pluggable protocols.
We currently have it working, however it requires that we write to HKey_Class_Root. In the interest of trying to allow a non-admin install, it would be nice if we could achieve the same thing with writing to HKey_Current_Us... | Using Async Pluggable Protocols (APP) in Windows typically involves registering your protocol handler in the Windows registry under `HKEY_CLASSES_ROOT`. However, as you have rightly pointed out, writing to `HKEY_CLASSES_ROOT` requires administrative privileges, which can be a barrier for non-admin installations.
To ac... | 42,653 | [
{
"from": "human",
"value": "See http://msdn.microsoft.com/en-us/library/aa767916(VS.85).aspx for Async Pluggable protocols.\nWe currently have it working, however it requires that we write to HKey_Class_Root. In the interest of trying to allow a non-admin install, it would be nice if we could achieve the ... |
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
| You can set the default paragraph spacing in a `RichTextBox` programmatically in WPF by manipulating the `FlowDocument` associated with the `RichTextBox`. Specifically, you can set the `Paragraph` properties to adjust the spacing. Below is a simple example of how to do this in C# code behind.
```csharp
using System.Wi... | 41,618 | [
{
"from": "human",
"value": "I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?\n"
},
{
"from": "gpt",
"value": "You... |
I have code that looks like the following, which works fine for displaying the message, but can't figure out any way to get a hold of the stack trace.
try {
throw new RuntimeException("This is bad stuff!");
} catch (Exception e ) {
mainForm.append("Exception: " + e.getMessage());
}
Calling e.printStackTrace(... | To capture and display the stack trace of an exception in your Java code, you can convert the stack trace to a string and then append it to your output. You can use the `StringWriter` and `PrintWriter` classes to accomplish this. Here is how you can modify your code to include the stack trace in your output:
```java
i... | 43,619 | [
{
"from": "human",
"value": "I have code that looks like the following, which works fine for displaying the message, but can't figure out any way to get a hold of the stack trace. \ntry {\n throw new RuntimeException(\"This is bad stuff!\");\n} catch (Exception e ) {\n mainForm.append(\"Exception: \"... |
I often find myself using Integers to represent values in different "spaces". For example...
int arrayIndex;
int usersAge;
int daysToChristmas;
Ideally, I'd like to have separate classes for each of these types "Index","Years" and "Days", which should prevent me accidentally mixing them up. Typedefs are a help from a ... | Creating type-safe wrapper classes for your integer values is a great way to prevent accidental mixing of types, and you can definitely do this in a straightforward way using templates. Here’s a simple way to implement it in C++.
You can create a generic `TypedInt` class template that takes a tag type as a parameter. ... | 42,806 | [
{
"from": "human",
"value": "I often find myself using Integers to represent values in different \"spaces\". For example...\nint arrayIndex;\nint usersAge;\nint daysToChristmas;\n\nIdeally, I'd like to have separate classes for each of these types \"Index\",\"Years\" and \"Days\", which should prevent me ac... |
I'm working on a project where we have some custom Taglet classes that are used to modify the Javadocs (such as linking to source code in SVN, adding citations) and so on.One of the things we'd like to do is to be able to get the annotations that are used in the source and manipulate the information from them.
It seem... | In JDK 1.5, the support for annotations was introduced, but the Javadoc tool did not directly provide functionality to access annotations through the Taglet interface. Taglets are primarily designed for handling custom tags in Javadoc comments, and they do not include direct support for retrieving Java source annotatio... | 43,849 | [
{
"from": "human",
"value": "I'm working on a project where we have some custom Taglet classes that are used to modify the Javadocs (such as linking to source code in SVN, adding citations) and so on.One of the things we'd like to do is to be able to get the annotations that are used in the source and manip... |
How to Read SMS/MMS in UIQ ?
| Reading SMS/MMS in a UIQ (User Interface Quartz) environment typically requires accessing the device's messaging database through the appropriate APIs. However, since UIQ is an older smartphone platform primarily used by Sony Ericsson, it may not have widely available development resources.
Here is a general approach ... | 42,468 | [
{
"from": "human",
"value": "How to Read SMS/MMS in UIQ ?\n"
},
{
"from": "gpt",
"value": "Reading SMS/MMS in a UIQ (User Interface Quartz) environment typically requires accessing the device's messaging database through the appropriate APIs. However, since UIQ is an older smartphone platform pr... |
I have a sea of weighted nodes with edges linking clusters of nodes together. This graph follows the typical small world layout.
I wish to find a path finding algorithm, which isn't costly on processor power, to find a path along the best possible path where the nodes are the most favorably weighted, the fastest route ... | In your case, you have a specific set of requirements for pathfinding on a large graph with weighted nodes, prioritizing node weights over distance and needing considerations for load balancing and traffic rerouting. Let's address your queries regarding ACO, A*, and other potential approaches:
### Ant Colony Optimizat... | 42,982 | [
{
"from": "human",
"value": "I have a sea of weighted nodes with edges linking clusters of nodes together. This graph follows the typical small world layout.\nI wish to find a path finding algorithm, which isn't costly on processor power, to find a path along the best possible path where the nodes are the m... |
I am implementing a on screen keyboard in Java for SWT and AWT.
One important thing is to move the keyboard to a position where the selected text field can show and is not lying behind the on screen keyboard.
For AWT i can detect the position of the current selected component with
Component owner = KeyboardFocusManager... | In SWT, you can get the location of a widget relative to the entire screen by using the `toDisplay` method. This method transforms the coordinates of the widget from its parent composite's coordinate system to the display's coordinate system (which is essentially the screen's coordinate system).
Here's how you can mod... | 41,102 | [
{
"from": "human",
"value": "I am implementing a on screen keyboard in Java for SWT and AWT.\nOne important thing is to move the keyboard to a position where the selected text field can show and is not lying behind the on screen keyboard.\nFor AWT i can detect the position of the current selected component ... |
I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included.
The problem cannot be solved by extending the class as it involves members with private access.
How should I go about fi... | When dealing with a situation like this in J2ME Polish or any similar project, you have a few options for fixing the bug. Here are the steps you can follow to resolve the issue:
1. **Locate Build Scripts**:
- First, check the project repository (if available) to see if there are any build scripts (like Ant, Maven,... | 36,958 | [
{
"from": "human",
"value": "I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included. \nThe problem cannot be solved by extending the class as it involves members with... |
I have to simultaneously load data into a table and run queries on it. Because of data nature, I can trade integrity for performance. How can I minimize the overhead of transactions?
Unfortunately, alternatives like MySQL cannot be used (due to non-technical reasons).
| If you are constrained to using PostgreSQL and need to simultaneously load data into a table while running queries, and you're willing to trade off integrity for performance, here are several strategies you can employ to minimize the overhead of transactions:
### 1. Use `COPY` for Bulk Inserts
Utilize the `COPY` comm... | 41,281 | [
{
"from": "human",
"value": "I have to simultaneously load data into a table and run queries on it. Because of data nature, I can trade integrity for performance. How can I minimize the overhead of transactions?\nUnfortunately, alternatives like MySQL cannot be used (due to non-technical reasons). \n"
},
... |
Rather than the demos can you suggest any open source projects using castle activerecord for code study?
| Certainly! Castle ActiveRecord is a part of the Castle Project and provides an object-relational mapping (ORM) framework. While specific open-source projects using Castle ActiveRecord may not be as prevalent as those using more popular ORM frameworks like Entity Framework, there are still some projects and resources yo... | 43,811 | [
{
"from": "human",
"value": "Rather than the demos can you suggest any open source projects using castle activerecord for code study?\n"
},
{
"from": "gpt",
"value": "Certainly! Castle ActiveRecord is a part of the Castle Project and provides an object-relational mapping (ORM) framework. While s... |
I have a web application that is using a data store that has it's own built in paging. The PagedResult class tells me the number of total pages. What I would like to do it (after binding my ASP.NET GridView) do this:
MyGridView.PageCount = thePageCount;
And then have the GridView magically build the pagination links a... | In ASP.NET, the `GridView` control does not allow you to directly set the `PageCount` property, since it's a read-only property. However, you can achieve the desired pagination functionality by using a combination of a `PagerTemplate` or handling the `PageIndexChanged` event and custom logic.
Here's a simple way to im... | 38,230 | [
{
"from": "human",
"value": "I have a web application that is using a data store that has it's own built in paging. The PagedResult class tells me the number of total pages. What I would like to do it (after binding my ASP.NET GridView) do this:\nMyGridView.PageCount = thePageCount;\n\nAnd then have the Gri... |
I want to convert user-submitted date format (mm/dd/yyyy) to a MySQL date format (YYYY-mm-dd). Submission is via a simple PHP form direc tto MySQL database.
| To convert a user-submitted date format from `mm/dd/yyyy` to the MySQL date format `YYYY-mm-dd` in PHP, you can use the `DateTime` class for proper date handling. Below is an example of how to do this when receiving the date from a form submission.
### PHP Code Example
1. **HTML Form**: First, make sure you have a si... | 43,556 | [
{
"from": "human",
"value": "I want to convert user-submitted date format (mm/dd/yyyy) to a MySQL date format (YYYY-mm-dd). Submission is via a simple PHP form direc tto MySQL database. \n"
},
{
"from": "gpt",
"value": "To convert a user-submitted date format from `mm/dd/yyyy` to the MySQL dat... |
Dup of Some Basic PHP Questions
Hello,
I have a heap of tinyint fields in a mysql database I need to show with PHP. At the moment I am doing something like this:
if ($row['PAYPAL_ACCEPT'] == "1"){
$paypal = "Yes";
else
$paypal = "No";
}
For each field, which is tedious and seems like there should be a better way, ... | You can simplify your code by creating a function that handles the conversion from a tinyint to a more readable string (like "Yes" or "No"). This way, you won't have to write the same `if` statement for each field. Here’s how you can do it:
### Define a Helper Function
First, define a function that checks the value of... | 44,054 | [
{
"from": "human",
"value": "Dup of Some Basic PHP Questions\nHello,\nI have a heap of tinyint fields in a mysql database I need to show with PHP. At the moment I am doing something like this:\nif ($row['PAYPAL_ACCEPT'] == \"1\"){\n\n$paypal = \"Yes\";\n\nelse\n\n$paypal = \"No\";\n\n}\n\nFor each field, wh... |
Well, heres my scenario.
Client/Server winforms application with SQL Express as the DB. I need to be able to print invoice, packing slips etc..
i would like the customer to be able to modify the invoices. ie. be able to put their logo or change font sizes etc...basically format the display.
Things i have considered so ... | Based on your requirements for allowing customers to modify invoices, including adding logos and changing font sizes, here are some considerations for each approach you've mentioned:
### 1. Template Engine (HTML Output)
- **Pros**:
- Flexibility: Customers can design their own templates using HTML/CSS, which offers ... | 40,713 | [
{
"from": "human",
"value": "Well, heres my scenario.\nClient/Server winforms application with SQL Express as the DB. I need to be able to print invoice, packing slips etc..\ni would like the customer to be able to modify the invoices. ie. be able to put their logo or change font sizes etc...basically forma... |
The following error is being thrown:
com.sun.jdi.InternalException: Got error code in reply:35 occurred while retrieving value. for all expressions
I am getting this error for all expressions and cant find anything on it. My guess is that the debugger isn't correctly connecting to the remote version, but I am not sur... | The error you are encountering (`com.sun.jdi.InternalException: Got error code in reply:35 occurred while retrieving value`) suggests that there may be an issue with the Java Debug Interface (JDI) when trying to access values while debugging a Java application. This can be caused by various factors. Here are some steps... | 39,480 | [
{
"from": "human",
"value": "The following error is being thrown:\ncom.sun.jdi.InternalException: Got error code in reply:35 occurred while retrieving value. for all expressions\n\nI am getting this error for all expressions and cant find anything on it. My guess is that the debugger isn't correctly connec... |
A recent question about StyleCop alerted me to the use of tools to enforce coding style. I would feel very annoyed if I were required to run one of these tools while I was developing. Do people really find them useful? Why or why not?
Everyone that has answered so far has indicated that they think that style/formatting... | The use of tools like StyleCop to enforce coding style can be a polarizing topic among developers. Here are some reasons why many people find these tools useful, as well as some concerns that lead others to be skeptical:
### Reasons for Finding Style Enforcement Tools Useful:
1. **Consistency Across Codebases**: Auto... | 40,896 | [
{
"from": "human",
"value": "A recent question about StyleCop alerted me to the use of tools to enforce coding style. I would feel very annoyed if I were required to run one of these tools while I was developing. Do people really find them useful? Why or why not?\nEveryone that has answered so far has indic... |
After installing the F# September CTP (1.9.6.2), Visual Studio 2008 frequently gives an error "Microsoft Visual C# IntelliSense has stopped working" which promptly crashes all of Visual Studio. I tried the tips mentioned in a similar SO article such as "devenv.exe /ResetSettings", deleting the ncb file (which actually... | It sounds like you're experiencing a frustrating issue with Visual Studio 2008 after installing the F# September CTP. Here are some additional steps you can try to resolve the "Microsoft Visual C# IntelliSense has stopped working" issue:
1. **Disable/Re-enable ReSharper**: Even though you have disabled ReSharper, some... | 43,088 | [
{
"from": "human",
"value": "After installing the F# September CTP (1.9.6.2), Visual Studio 2008 frequently gives an error \"Microsoft Visual C# IntelliSense has stopped working\" which promptly crashes all of Visual Studio. I tried the tips mentioned in a similar SO article such as \"devenv.exe /ResetSett... |
Which design do you think runs faster on PostgreSQL?
Making a 15 column table of varchars and the like, but putting all TEXT columns in a separate table with an fkey link back to this table. And let's imagine you want to search for the record with ID of "4" but then pull all the rows back, including the stuff from the... | The performance of the two designs you've described in PostgreSQL can vary based on several factors, but here's a breakdown of the considerations that could affect the speed of your queries:
### Design A: Separate Table for TEXT Columns
1. **Schema Structure**: In this approach, you have a main table with 15 columns ... | 42,446 | [
{
"from": "human",
"value": "Which design do you think runs faster on PostgreSQL?\n\nMaking a 15 column table of varchars and the like, but putting all TEXT columns in a separate table with an fkey link back to this table. And let's imagine you want to search for the record with ID of \"4\" but then pull al... |
I'm known around the office as "the backup guy". As a developer, I often jump back and forth between projects, and as a result I don't always remember exactly what changes were present in each when I return to them. I usually have to compare my local changes versus those in our source control system, and then I'll even... | It sounds like you've put considerable thought into your backup process, and developing a custom tool tailored to your specific needs could indeed enhance your workflow. However, there are existing tools and strategies that may also suit your requirements without needing to build something from scratch. Here are some o... | 41,125 | [
{
"from": "human",
"value": "I'm known around the office as \"the backup guy\". As a developer, I often jump back and forth between projects, and as a result I don't always remember exactly what changes were present in each when I return to them. I usually have to compare my local changes versus those in ou... |
I want to specify a file system path as part of a Spring bean configuration. I know that I can set a path such as:
<bean id="myBean" class="com.example.BeanImpl">
<property name="path" value="/WEB-INF/jsp"/>
</bean>
An the path /WEB-INF/jsp is interpreted as being relative to the web application root. But how do I ... | In a Spring bean configuration, if you want to specify a file system path that is absolute (like `/usr/bin`), you can simply set the value directly as you would for any other property. Spring will treat the path as an absolute file system path if it begins with a `/`.
Here's how you can define it in your Spring bean c... | 44,281 | [
{
"from": "human",
"value": "I want to specify a file system path as part of a Spring bean configuration. I know that I can set a path such as:\n<bean id=\"myBean\" class=\"com.example.BeanImpl\">\n <property name=\"path\" value=\"/WEB-INF/jsp\"/>\n</bean> \n\nAn the path /WEB-INF/jsp is interpreted as bei... |
Does anyone know whether the iPhone supports or will soon support the W3C Geolocation specification?
I'm looking to build an app for mobile users, but rather than spend the time developing apps for every different platform (iPhone, Android, etc...), I'd much prefer to create a web app that makes use of the W3C Standard... | Yes, iPhone (specifically iOS devices) supports the W3C Geolocation API. This means you can build a web app that utilizes geolocation features without needing to develop separate native apps for each platform. The Geolocation API allows you to access the user's geographical location using their device's GPS, Wi-Fi, or ... | 43,994 | [
{
"from": "human",
"value": "Does anyone know whether the iPhone supports or will soon support the W3C Geolocation specification?\nI'm looking to build an app for mobile users, but rather than spend the time developing apps for every different platform (iPhone, Android, etc...), I'd much prefer to create a ... |
I’m listening to the Hanselminutes Podcast; "StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team". During the course of the Podcast they are speaking about SQL server and say something along the lines of 'The days of the Stored Procedure are over'.
Now I'm not a DBA but this has taken me a bit by surpr... | The statement about the decline of stored procedures (SPs) is a reflection of a broader trend in software development and database management, but it's essential to understand the context and nuances behind this claim.
### Reasons for Declining Use of Stored Procedures
1. **Development Agility**: Modern application d... | 41,640 | [
{
"from": "human",
"value": "I’m listening to the Hanselminutes Podcast; \"StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team\". During the course of the Podcast they are speaking about SQL server and say something along the lines of 'The days of the Stored Procedure are over'. \nNow I'm no... |
Can I use LoadLibrary method for to import a data of type struct??
excuse me for my English.
thanks.
| Your English is fine! To answer your question: the `LoadLibrary` function in Windows is used to load a dynamic-link library (DLL) into the address space of the calling process. It allows you to call functions defined in that DLL.
However, `LoadLibrary` itself does not import data of any type, including structs. You ca... | 41,787 | [
{
"from": "human",
"value": "Can I use LoadLibrary method for to import a data of type struct??\nexcuse me for my English. \nthanks.\n"
},
{
"from": "gpt",
"value": "Your English is fine! To answer your question: the `LoadLibrary` function in Windows is used to load a dynamic-link library (DLL) ... |
I've tried my best and cannot figure out what happened here. It worked fine in Delphi 4. After upgrading to Delphi 2009, I don't know if this is the way it is supposed to work, or if it's a problem:
This is what my program's menu looks like in Design Mode under Delphi 2009:
Notice that every word in the Main Menu and ... | It sounds like you're experiencing a common issue that arose with the transition from Delphi 4 to Delphi 2009, specifically regarding the rendering of menu items and accelerator keys. In Delphi 2009 and later versions, there were significant changes in the VCL (Visual Component Library) and how it handles menus, especi... | 42,397 | [
{
"from": "human",
"value": "I've tried my best and cannot figure out what happened here. It worked fine in Delphi 4. After upgrading to Delphi 2009, I don't know if this is the way it is supposed to work, or if it's a problem:\nThis is what my program's menu looks like in Design Mode under Delphi 2009:\n\n... |
In my application I need to hash a string before I save it to a text file. Does anyone know how to do that?
| Certainly! Hashing a string is a common practice for securing sensitive information. In many programming languages, you can use libraries to easily hash strings. Below are examples in Python, Java, and JavaScript.
### Python Example
You can use the built-in `hashlib` library in Python:
```python
import hashlib
def h... | 43,006 | [
{
"from": "human",
"value": "In my application I need to hash a string before I save it to a text file. Does anyone know how to do that?\n"
},
{
"from": "gpt",
"value": "Certainly! Hashing a string is a common practice for securing sensitive information. In many programming languages, you can us... |
Is there a specific reason that the EF requires new data providers and can't make use of ODBC? I figured it had to be some ORM specific problem, but NHibernate works fine via ODBC.
I'm using NHibernate and can continue to use Nhibernate, but I worry that I can't assume Nhibernate knowledge for any future programmers h... | Entity Framework (EF) and NHibernate are both Object-Relational Mapping (ORM) tools, but they are designed with different architectures and approaches to data access. Here are some reasons why EF may require specific data providers and does not work with ODBC as readily as NHibernate does:
1. **Design Philosophy**: EF... | 41,332 | [
{
"from": "human",
"value": "Is there a specific reason that the EF requires new data providers and can't make use of ODBC? I figured it had to be some ORM specific problem, but NHibernate works fine via ODBC.\nI'm using NHibernate and can continue to use Nhibernate, but I worry that I can't assume Nhibern... |
does anybody know any resources that I can refer to?
| Sure! Could you please specify what kind of resources you're looking for? For example, are you looking for educational materials, research papers, tutorials, books, or something else? Additionally, let me know the topic or field you're interested in! | 47,161 | [
{
"from": "human",
"value": "does anybody know any resources that I can refer to?\n"
},
{
"from": "gpt",
"value": "Sure! Could you please specify what kind of resources you're looking for? For example, are you looking for educational materials, research papers, tutorials, books, or something els... |
For an ASP.NET application, what is the Best Practice implementation method for a custom swear word remover/replacer?
If this is a data table solution, is there free resource to get the data? (Similar to finding a public dictionary table that you can import to your system for spellchecking)
| Implementing a custom swear word remover/replacer in an ASP.NET application involves several considerations for best practices. Here's a recommended approach:
### Best Practice Implementation Method
1. **Data Storage**:
- **Database Table**: Create a database table to store the swear words and their replacements. ... | 41,747 | [
{
"from": "human",
"value": "For an ASP.NET application, what is the Best Practice implementation method for a custom swear word remover/replacer?\nIf this is a data table solution, is there free resource to get the data? (Similar to finding a public dictionary table that you can import to your system for s... |
Some days ago I realized that PrintWriter (as well as PrintStream) never throw an IOException when writing, flushing or closing.
Instead it sets an internal flag (trouble=true) when an error occurs.
It's not possible to get the exact exception, but only if there was some exception (checkError()).
My question is: why wo... | The design choice behind `PrintWriter` and `PrintStream` in Java, where they do not throw `IOException` on write, flush, or close operations, stems from a combination of historical context, intended use cases, and performance considerations. Here are some insights into why this behavior might be considered beneficial i... | 41,588 | [
{
"from": "human",
"value": "Some days ago I realized that PrintWriter (as well as PrintStream) never throw an IOException when writing, flushing or closing.\nInstead it sets an internal flag (trouble=true) when an error occurs.\nIt's not possible to get the exact exception, but only if there was some excep... |
I'm using a QTableWidget to display several rows. Some of these rows should reflect an error and their text color is changed :
Rows reflecting that there is no error are displayed with a default color (black text on white background on my computer).
Rows reflecting that there is an error are displayed with a red text c... | To achieve different text colors for selected rows in a `QTableWidget` depending on whether there is an error or not, you'll need to subclass `QTableWidget` and override the appropriate paint method. The default selection behavior sets the text color to white for all selected items, but you can customize this to check ... | 39,736 | [
{
"from": "human",
"value": "I'm using a QTableWidget to display several rows. Some of these rows should reflect an error and their text color is changed :\nRows reflecting that there is no error are displayed with a default color (black text on white background on my computer).\nRows reflecting that there ... |
Assuming the following hypothetical inheritance hierarchy:
public interface IA
{
int ID { get; set; }
}
public interface IB : IA
{
string Name { get; set; }
}
Using reflection and making the following call:
typeof(IB).GetProperties(BindingFlags.Public | BindingFlags.Instance)
will only yield the properties of ... | Yes, you can find all the properties in the inheritance hierarchy for interfaces by using reflection in combination with `GetInterfaces()` to retrieve properties from all base interfaces. The `GetProperties()` method only returns properties declared directly on the interface you are querying, which is why you only see ... | 43,701 | [
{
"from": "human",
"value": "Assuming the following hypothetical inheritance hierarchy:\npublic interface IA\n{\n int ID { get; set; }\n}\n\npublic interface IB : IA\n{\n string Name { get; set; }\n}\n\nUsing reflection and making the following call: \ntypeof(IB).GetProperties(BindingFlags.Public | Bindin... |
Many of our customers have access to InstallShield, WISE or AdminStudio. These aren't a problem. I'm hoping there is some way I can provide our smaller customers without access to commercial repackaging tools a freely available set of tools and steps to do the file replacement themselves.
Only need to replace a single ... | Certainly! Here’s a simple way to guide your customers through replacing a single configuration file in a compressed MSI without needing commercial tools. This process utilizes tools such as Orca and the Windows command line, both of which are freely available or commonly used.
### Steps to Replace a Configuration Fil... | 38,091 | [
{
"from": "human",
"value": "Many of our customers have access to InstallShield, WISE or AdminStudio. These aren't a problem. I'm hoping there is some way I can provide our smaller customers without access to commercial repackaging tools a freely available set of tools and steps to do the file replacement t... |
When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.
Is there a way to access the same variable in JavaScript, <script></script> (perhaps using the DOM; I don't know how Django makes the variables accessi... | Yes, you can access Django template variables in your JavaScript code by embedding those variables directly into your JavaScript code within the `<script>` tag. Here are some common ways to do this:
### 1. Inline JavaScript within Django Template
You can directly insert your Django variables into your JavaScript code... | 41,928 | [
{
"from": "human",
"value": "When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.\nIs there a way to access the same variable in JavaScript, <script></script> (perhaps using the DOM; I don't k... |
I'm trying to have an XSLT that copies most of the tags but removes empty "<b/>" tags. That is, it should copy as-is "<b> </b>" or "<b>toto</b>" but completely remove "<b/>".
I think the template would look like :
<xsl:template match="b">
<xsl:if test=".hasChildren()">
<xsl:element name="b">
<xsl:apply-temp... | You're correct that there is no `hasChildren()` function in XSLT. Instead, you can use the `count()` function to determine if an element has any child nodes. Specifically, for your case where you want to remove empty `<b/>` tags but keep `<b> </b>` or `<b>toto</b>`, you can modify your template as follows:
```xml
<xsl... | 42,839 | [
{
"from": "human",
"value": "I'm trying to have an XSLT that copies most of the tags but removes empty \"<b/>\" tags. That is, it should copy as-is \"<b> </b>\" or \"<b>toto</b>\" but completely remove \"<b/>\".\nI think the template would look like :\n<xsl:template match=\"b\">\n <xsl:if test=\".hasChildr... |
The following is a question I asked on my blog a few months back but I still haven't got a proper answer to. Then a couple of days ago I was asked if I had the answer so I decided to copy the question in here where it will get a much more exposure by willing-and-able developers. Anyways, here goes...
I have been worki... | The issue you’re experiencing is common in web applications that rely on AJAX callbacks, especially when they depend on an authenticated user session that can expire. When the user’s session expires while they are still interacting with the page, any AJAX requests made (like those from the `AutoCompleteExtender` or oth... | 41,262 | [
{
"from": "human",
"value": "The following is a question I asked on my blog a few months back but I still haven't got a proper answer to. Then a couple of days ago I was asked if I had the answer so I decided to copy the question in here where it will get a much more exposure by willing-and-able developers.... |
How can I match (PCRE) everything inbetween two tags?
I tried something like this:
<!--\s*LoginStart\s*-->(.*)<!--\s*LoginEnd\s*-->
But it didn't work out too well for me..
I'm kind of new to regular expressions, so I was hoping if someone would be kind enough to explain to me how I would accomplish this, if its even... | To match everything between two tags using Perl Compatible Regular Expressions (PCRE), you can use a non-greedy matching approach. The problem with your current regular expression is that `(.*)` is greedy and will match as much as possible, which can cause it to include text beyond the `<!-- LoginEnd -->` tag.
Instead... | 43,297 | [
{
"from": "human",
"value": "How can I match (PCRE) everything inbetween two tags?\nI tried something like this:\n\n<!--\\s*LoginStart\\s*-->(.*)<!--\\s*LoginEnd\\s*-->\n\nBut it didn't work out too well for me..\nI'm kind of new to regular expressions, so I was hoping if someone would be kind enough to exp... |
So i have a source tree that i want to clean up in CVS.
What a really want is to branch the old stuff off, but never merge in back in. But so i can have an eclipse workspace to access and make some changes if i need to.
And then we clean up the main trunk (by removing things we dont need anymore) and keep developing. T... | Using CVS (Concurrent Versions System) for version control can be a bit different from more modern systems, but it's definitely possible to achieve the workflow you described. Here’s a step-by-step approach to help you clean up your source tree and manage branches in CVS:
### 1. **Branching the Old Code**
First, you'... | 39,407 | [
{
"from": "human",
"value": "So i have a source tree that i want to clean up in CVS.\nWhat a really want is to branch the old stuff off, but never merge in back in. But so i can have an eclipse workspace to access and make some changes if i need to.\nAnd then we clean up the main trunk (by removing things w... |
During integration Zend OpenID Server into MVC I have problem with Consumers answer (at Livejournal). It says:
"naive_verify_failed_return: Provider says signature is invalid".
Does anyone have any ideas why it can appears? Thanks
| The error message "naive_verify_failed_return: Provider says signature is invalid" indicates that the OpenID provider (in this case, LiveJournal) is unable to verify the signature of the response being sent back by the OpenID server. This can happen for several reasons. Here are some potential causes and solutions you ... | 40,642 | [
{
"from": "human",
"value": "During integration Zend OpenID Server into MVC I have problem with Consumers answer (at Livejournal). It says:\n\n\"naive_verify_failed_return: Provider says signature is invalid\". \n\nDoes anyone have any ideas why it can appears? Thanks\n"
},
{
"from": "gpt",
"val... |
This question relates to an ASP.NET website, originally developed in VS 2005 and now in VS 2008.
This website uses two unmanaged external DLLs which are not .NET and I do not have the source code to compile them and have to use them as is.
This website runs fine from within Visual Studio, locating and accessing these e... | The issue you're experiencing with the external unmanaged DLLs not being found when the application is deployed on IIS can be quite common. Here are several steps and considerations to help troubleshoot and resolve this issue:
1. **Ensure the DLLs Are Correctly Placed**: Although you mentioned the DLLs are in the `bin... | 41,472 | [
{
"from": "human",
"value": "This question relates to an ASP.NET website, originally developed in VS 2005 and now in VS 2008.\nThis website uses two unmanaged external DLLs which are not .NET and I do not have the source code to compile them and have to use them as is.\nThis website runs fine from within Vi... |
I have the following code for my masterpage:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xm... | To ensure that your footer stays at the bottom of the page even when the main content doesn't fill the entire viewport, you can apply a simple CSS approach known as the "sticky footer" technique. This involves setting your layout in such a way that the footer is always at the bottom of the viewport if the content is sh... | 39,812 | [
{
"from": "human",
"value": "I have the following code for my masterpage:\n<%@ Master Language=\"C#\" AutoEventWireup=\"true\" CodeFile=\"MasterPage.master.cs\" Inherits=\"MasterPage\" %>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://w... |
I am a FLEX newbie, trying to port a Javascript-based prototype into FLEX. One thing my original prototype had was an unordered list (ul) which had list items that had rich text inside it, i.e. I had a mix of differently styled and colored text and some images inside each item. I looked at the List control for FLEX and... | In Apache Flex, while the standard `List` control is primarily designed for simple string data representation, you can create a custom item renderer to handle rich text within your list items. An item renderer is a component that defines how each item in the list will be displayed.
Here’s a step-by-step guide to creat... | 38,525 | [
{
"from": "human",
"value": "I am a FLEX newbie, trying to port a Javascript-based prototype into FLEX. One thing my original prototype had was an unordered list (ul) which had list items that had rich text inside it, i.e. I had a mix of differently styled and colored text and some images inside each item. ... |
I'm looking to make validation for a page in which one or more fields have a value in them. I have an advanced search form in asp.net and I'm trying to pop up an error and not post back if all the fields are empty. I've looked into required fields validators but I'm not sure how to make them work together in a AND ty... | To implement a validation mechanism that ensures at least one of the fields in your ASP.NET advanced search form is filled in, you can utilize a combination of `CustomValidator` along with some simple JavaScript. Since `RequiredFieldValidator` works on an "OR" basis, it won’t meet your requirement of requiring at least... | 41,294 | [
{
"from": "human",
"value": "I'm looking to make validation for a page in which one or more fields have a value in them. I have an advanced search form in asp.net and I'm trying to pop up an error and not post back if all the fields are empty. I've looked into required fields validators but I'm not sure h... |
How do I output colored text to the terminal in Python?
| You can output colored text to the terminal in Python using several methods. Here are a few common approaches:
### 1. ANSI Escape Codes
You can use ANSI escape codes directly in your print statements. For example:
```python
# ANSI escape codes for colors
RED = '\033[91m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RESET =... | 42,893 | [
{
"from": "human",
"value": "How do I output colored text to the terminal in Python?\n"
},
{
"from": "gpt",
"value": "You can output colored text to the terminal in Python using several methods. Here are a few common approaches:\n\n### 1. ANSI Escape Codes\nYou can use ANSI escape codes directly... |
Anyone know the <%= %> or Response.Write() code for getting the version of .Net my web app is running on?
| In an ASP.NET web application, you can retrieve the version of the .NET Framework that your application is running on using a combination of `<%= %>` and `Response.Write()`. Here's how you can do this:
1. **Using `<%= %>`**: You can directly output the .NET version within your ASPX page using the `Environment.Version`... | 43,280 | [
{
"from": "human",
"value": "Anyone know the <%= %> or Response.Write() code for getting the version of .Net my web app is running on?\n"
},
{
"from": "gpt",
"value": "In an ASP.NET web application, you can retrieve the version of the .NET Framework that your application is running on using a c... |
I can handle the process that file part, but before I go crazy, has someone built a simple wcf service & client (running under windows services or IIS) that I can use to upload a file, and download that file back? with the fewest lines of code? (C# or VB)
compression & encryption would be cool, but i'll layer that on l... | Certainly! Below is a simple example of a WCF service and client that allows you to upload and download files. This example is built using C#.
### Step 1: Create the WCF Service
1. **Create a new WCF Service Library project.**
2. **Add a service contract to define the file upload and download operations.**
```csharp... | 36,480 | [
{
"from": "human",
"value": "I can handle the process that file part, but before I go crazy, has someone built a simple wcf service & client (running under windows services or IIS) that I can use to upload a file, and download that file back? with the fewest lines of code? (C# or VB)\ncompression & encrypti... |
I'm trying to use a browser view with bindings to represent some data and I'm getting an error message:
2008-11-11 17:22:28.636 BrowserViewTest[18269:813] Cocoa Bindings: Error accessing value
for key path arrangedObjects.projects of object <NSTreeController: 0x1321e0>[object class: BillingCode]
(from bound object <N... | The error message you are seeing indicates that the Cocoa Bindings system is trying to access the `displayString` property on a `BillingCode` object through your `NSTreeController`, but it can't find it. Here are a few things you can check to troubleshoot this issue:
1. **KVC Compliance**: Ensure that your `BillingCod... | 38,851 | [
{
"from": "human",
"value": "I'm trying to use a browser view with bindings to represent some data and I'm getting an error message:\n2008-11-11 17:22:28.636 BrowserViewTest[18269:813] Cocoa Bindings: Error accessing value\n for key path arrangedObjects.projects of object <NSTreeController: 0x1321e0>[object... |
I have the following situation:
I have a certain function that runs a loop and does stuff, and error conditions may make it exit that loop.
I want to be able to check whether the loop is still running or not.
For this, i'm doing, for each loop run:
LastTimeIDidTheLoop = new Date();
And in another function, which runs ... | You can achieve this by storing the time of the last loop execution in a variable and then using `setInterval` to check this variable periodically. Here's a sample implementation to illustrate how you could set this up in JavaScript:
```javascript
let lastTimeIDidTheLoop = new Date(); // Initialize the last run time
... | 41,693 | [
{
"from": "human",
"value": "I have the following situation:\nI have a certain function that runs a loop and does stuff, and error conditions may make it exit that loop.\nI want to be able to check whether the loop is still running or not.\nFor this, i'm doing, for each loop run:\nLastTimeIDidTheLoop = new ... |
I'm a bit flabbergasted at this, so I'm wondering if any SOers have encountered it before.
I have an essentially flat page with a number of input=text seeded in the markup with default values of say A,B,C,D,E in order. The markup looks like this in view source:
<td class="action invoice">
<a href="#foo">Toggle Invoic... | This is indeed a perplexing issue, and it sounds like you've done a thorough job of isolating the problem. Here are a few points to consider that might help you diagnose the root cause of the behavior you're seeing in Firefox:
1. **Caching**: Sometimes browsers cache certain responses. Even though you've noted that th... | 39,419 | [
{
"from": "human",
"value": "I'm a bit flabbergasted at this, so I'm wondering if any SOers have encountered it before.\nI have an essentially flat page with a number of input=text seeded in the markup with default values of say A,B,C,D,E in order. The markup looks like this in view source:\n<td class=\"act... |
I need to activate a JButton ActionListener within a JDialog so I can do some unit testing using JUnit.
Basically I have this:
public class MyDialog extends JDialog {
public static int APPLY_OPTION= 1;
protected int buttonpressed;
protected JButton okButton;
public MyDialog(Frame f) {
super... | To activate the `ActionListener` attached to the `JButton` in your `MyDialog` class, you can simulate a button click in your test. You can do this by manually triggering the `actionPerformed` method of the `ActionListener`.
Here’s how you can modify your test code to accomplish this:
1. Ensure that the `okButton` is... | 41,187 | [
{
"from": "human",
"value": "I need to activate a JButton ActionListener within a JDialog so I can do some unit testing using JUnit.\nBasically I have this:\n public class MyDialog extends JDialog {\n public static int APPLY_OPTION= 1;\n protected int buttonpressed;\n protected JButton okButton... |
I have a loader.exe with Main() that loads the 'UI' in WPF, the thing is that I want only one instance of the loader.exe, how can I achieve it?
Is there a way a user clicks loader.exe it should check if an existing loader.exe is running and does nothing.
currently I have
loader.exe
with
main()
....
..
Load UI
...
... | To ensure that only one instance of your `loader.exe` is running, you can use a mutex. A mutex (mutual exclusion) is a synchronization primitive that can be used to manage access to a resource across multiple threads or processes. By creating a named mutex, you can check if another instance of your application is alrea... | 36,541 | [
{
"from": "human",
"value": "I have a loader.exe with Main() that loads the 'UI' in WPF, the thing is that I want only one instance of the loader.exe, how can I achieve it? \nIs there a way a user clicks loader.exe it should check if an existing loader.exe is running and does nothing.\ncurrently I have \nlo... |
I am trying to load UIImage object from NSData, and the sample code was to NSImage, I guess they should be the same. But just now loading the image, I am wondering what's the best to troubleshoot the UIImage loading NSData issue.
| Loading a `UIImage` from `NSData` should work similarly to how you would load an `NSImage` in macOS, but there are some differences in the APIs and the platforms. If you're having trouble loading a `UIImage` from `NSData`, here are some troubleshooting steps and tips you can follow:
1. **Check Data Validity**: Make su... | 41,607 | [
{
"from": "human",
"value": "I am trying to load UIImage object from NSData, and the sample code was to NSImage, I guess they should be the same. But just now loading the image, I am wondering what's the best to troubleshoot the UIImage loading NSData issue.\n"
},
{
"from": "gpt",
"value": "Load... |
I have a need to allow for a user to download an event that has multiple meeting dates. To do this I have created a memorystream to be downloaded which produces a .ics file. For example:
BEGIN:VCALENDAR
PRODID:-//Company//Product//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
SUMMARY:Subject of Event
LOCATION:Location ... | In order to ensure that multiple `VEVENT` entries in your `.ics` file are recognized as appointments in an existing calendar in Outlook (rather than creating a new calendar), you need to consider how the events are structured and how Outlook interprets them.
Here are some recommendations to help achieve the desired ou... | 42,146 | [
{
"from": "human",
"value": "I have a need to allow for a user to download an event that has multiple meeting dates. To do this I have created a memorystream to be downloaded which produces a .ics file. For example:\n\nBEGIN:VCALENDAR\nPRODID:-//Company//Product//EN\nVERSION:2.0\nMETHOD:PUBLISH\nBEGIN:VEV... |
I just want to create a C# program which will read a word template and create n number of copies of it with mail merge feature.The data to replace is Name and Address the rest of the things in the template should remains the same. Can any one tell me how to do this ?
| Creating a C# program that performs a mail merge using a Word template can be accomplished using the `Microsoft.Office.Interop.Word` library. Below is a step-by-step guide along with sample code to help you achieve this.
### Prerequisites
1. You need to have Microsoft Office (Word) installed on your machine.
2. You ne... | 39,813 | [
{
"from": "human",
"value": "I just want to create a C# program which will read a word template and create n number of copies of it with mail merge feature.The data to replace is Name and Address the rest of the things in the template should remains the same. Can any one tell me how to do this ?\n"
},
{... |
I'm working in a windows environment (my laptop!) and I need a couple of scripts that run other programs, pretty much like a windows batch file.
how can I run a command from python such that the program when run, will replace the script? The program is interactive (for instance, unison) and keeps printing lines and ask... | To achieve the functionality you're looking for in Python — essentially to run an interactive command like `unison` and take over the input/output in the same way that a batch file would — you can use the `subprocess` module. This allows you to spawn new processes, connect to their input/output/error pipes, and obtain ... | 43,450 | [
{
"from": "human",
"value": "I'm working in a windows environment (my laptop!) and I need a couple of scripts that run other programs, pretty much like a windows batch file.\nhow can I run a command from python such that the program when run, will replace the script? The program is interactive (for instance... |
What would be the benefit of using decimal.compare vs. just using a > or < to compare to variables?
| Using `Decimal.Compare` versus simple comparison operators (`>`, `<`, `==`, etc.) to compare `decimal` variables in programming, such as in C#, has some specific benefits and scenarios where `Decimal.Compare` might be preferred:
1. **Consistent Handling of Special Cases**: `Decimal.Compare` can handle special cases co... | 42,829 | [
{
"from": "human",
"value": "What would be the benefit of using decimal.compare vs. just using a > or < to compare to variables? \n"
},
{
"from": "gpt",
"value": "Using `Decimal.Compare` versus simple comparison operators (`>`, `<`, `==`, etc.) to compare `decimal` variables in programming, such... |
I have a procedure that is run for a lot of items, skipping over certain items who don't meet a criterion. However, I then go back and run it for some of the individuals who were missed in the first pass. I currently do this by manually re-running the procedure for each individual person, but would ideally like a sol... | You can definitely accomplish your task using VBA by iterating over the items in a named list. Below is a step-by-step guide along with a sample code snippet that demonstrates how to read items from a ListObject and then run your desired procedure for each item.
### Step 1: Create a List
First, ensure you have your l... | 42,094 | [
{
"from": "human",
"value": "I have a procedure that is run for a lot of items, skipping over certain items who don't meet a criterion. However, I then go back and run it for some of the individuals who were missed in the first pass. I currently do this by manually re-running the procedure for each indivi... |
Which would be faster for say 500 elements.
Or what's the faster data structure/collection for retrieving elements?
List<MyObj> myObjs = new List<MyObj>();
int i = myObjs.BinarySearch(myObjsToFind);
MyObj obj = myObjs[i];
Or
Dictionary<MyObj, MyObj> myObjss = new Dictionary<MyObj, MyObj... | When comparing the performance of retrieving elements from a `List<MyObj>` using `BinarySearch` versus using a `Dictionary<MyObj, MyObj>`, the main difference lies in the complexity of the operations involved in each approach.
### 1. **List with Binary Search**
- **Structure**: `List<MyObj> myObjs = new List<MyObj>();... | 43,845 | [
{
"from": "human",
"value": "Which would be faster for say 500 elements.\nOr what's the faster data structure/collection for retrieving elements?\n List<MyObj> myObjs = new List<MyObj>();\n int i = myObjs.BinarySearch(myObjsToFind);\n MyObj obj = myObjs[i];\n\nOr\n Dictionary<MyO... |
I have a couple search forms, 1 with ~50 fields and the other with ~100. Typically, as the HTML spec says, I do searches using the GET method as no data is changed. I haven't run into this problem yet, but I'm wondering if I will run out of URL space soon?
The limit of Internet Explorer is 2083 characters. Other browse... | You're absolutely right to consider the limitations of URL length when using the GET method for forms with a high number of fields. As you've pointed out, different browsers and servers have different limits, which can lead to inconsistencies and problems for users.
Here are some possible solutions to your situation:
... | 42,186 | [
{
"from": "human",
"value": "I have a couple search forms, 1 with ~50 fields and the other with ~100. Typically, as the HTML spec says, I do searches using the GET method as no data is changed. I haven't run into this problem yet, but I'm wondering if I will run out of URL space soon?\nThe limit of Internet... |
...or am I stuck rolling my own "XML chopping" functions. I'd like to create a small tasktray app so I can quickly re-point a Virual Directory to one of several of folders on my harddisk.
Bit of background:
I have 3 different svn branches of our code base on my dev machine.
Current Production Branch ( C:\Projects\.... | Creating a small task tray application to manage your IIS virtual directories sounds like a great idea! Instead of manually adjusting settings through IIS Manager, you can automate this process. Here’s a high-level overview of how you can create such an application, along with some code snippets to help you get started... | 40,926 | [
{
"from": "human",
"value": "...or am I stuck rolling my own \"XML chopping\" functions. I'd like to create a small tasktray app so I can quickly re-point a Virual Directory to one of several of folders on my harddisk.\nBit of background: \nI have 3 different svn branches of our code base on my dev machine.... |
Did someone ever used a BIRT report in a desktop application. I'm comming from the .NET environment and there you can use Crystal Reports to show reports in desktop apps. Is this possible with BIRT too, without having to set up a server environment?
Can you give me some advice how to reach this goal?
Thanks in advance.... | Yes, BIRT (Business Intelligence and Reporting Tools) can indeed be used in desktop applications, although it is more commonly associated with web-based reporting. However, it is possible to utilize BIRT reports in a desktop environment without setting up a full server. Here’s how you can achieve this:
### Using BIRT ... | 40,716 | [
{
"from": "human",
"value": "Did someone ever used a BIRT report in a desktop application. I'm comming from the .NET environment and there you can use Crystal Reports to show reports in desktop apps. Is this possible with BIRT too, without having to set up a server environment?\nCan you give me some advice ... |
I'm working on a System Preferences Pane. It opens fine on some computers, but on other Macs (all running 10.5.5), the preference pane refuses to load and simply hangs, spitting the following into the console:
11/9/08 8:38:50 PM [0x0-0x31031].com.apple.systempreferences[369] Sun Nov 9 20:38:50 Macintosh.local System Pr... | The issue you are experiencing with the System Preferences Pane hanging and the error messages related to context creation suggests that there may be a problem with the graphics or windowing system on the affected Macs. Here are a few potential causes and solutions to investigate:
1. **Graphics Drivers**: Ensure that ... | 43,514 | [
{
"from": "human",
"value": "I'm working on a System Preferences Pane. It opens fine on some computers, but on other Macs (all running 10.5.5), the preference pane refuses to load and simply hangs, spitting the following into the console:\n11/9/08 8:38:50 PM [0x0-0x31031].com.apple.systempreferences[369] Su... |
Plone is very complex. Zope2, Zope3, Five, ZCML, ZODB, ZEO, a whole bunch of acronyms and abbreviations.
It's hard to begin and the current state seems to be undecided. It is mainly based on Zope2, but incorporates Zope3 via Five. And there are XML config files everywhere.
Does the steep learning curve pay of? Is this ... | Your observations about Plone's complexity and the steep learning curve associated with it are quite common among newcomers. Plone is indeed built on a set of technologies that can feel daunting at first, especially if you're not already familiar with them. Here’s some insight into whether the learning curve is worth i... | 41,362 | [
{
"from": "human",
"value": "Plone is very complex. Zope2, Zope3, Five, ZCML, ZODB, ZEO, a whole bunch of acronyms and abbreviations.\nIt's hard to begin and the current state seems to be undecided. It is mainly based on Zope2, but incorporates Zope3 via Five. And there are XML config files everywhere.\nDoe... |
I'm using Interop.Domino.dll to retrieve E-mails from a Lotus "Database" (Term used loosely). I'm having some difficulty in retrieving certain fields and wonder how to do this properly. I've been using NotesDocument.GetFirstItem to retrieve Subject, From and Body.
My issues in this regard are thus:
How do I retrieve ... | When working with the `Interop.Domino.dll` library to access Lotus Notes (IBM Notes) documents, retrieving fields like the "Reply-To" address and other properties can sometimes be tricky due to how Lotus Notes stores information. Below, I will address your questions one by one.
### 1. Retrieving the "Reply-To" Address... | 39,893 | [
{
"from": "human",
"value": "I'm using Interop.Domino.dll to retrieve E-mails from a Lotus \"Database\" (Term used loosely). I'm having some difficulty in retrieving certain fields and wonder how to do this properly. I've been using NotesDocument.GetFirstItem to retrieve Subject, From and Body. \nMy issues ... |
After deploying a new build (mostly changed DLL's) of an ASP.NET web app the CPU on the server is now jumping to 100% every few seconds and the culprit is lsass.exe. Do you think that the deployment of the asp.net web app to the server and this problem are related? (or a coincidence that it happened at the same time?)
... | The sudden spike in CPU usage by `lsass.exe` (Local Security Authority Subsystem Service) on your Server 2008 x64 machine after deploying a new build of your ASP.NET web app could potentially be related to the deployment, especially if the deployment introduced new authentication mechanisms or changed existing ones. Ho... | 43,390 | [
{
"from": "human",
"value": "After deploying a new build (mostly changed DLL's) of an ASP.NET web app the CPU on the server is now jumping to 100% every few seconds and the culprit is lsass.exe. Do you think that the deployment of the asp.net web app to the server and this problem are related? (or a coincid... |
I have a full userdata in Lua module written in C. The userdata has __gc() metamethod, which is called by garbage collector. Does lua interpreter free userdata memory after __gc() call, or do I have to free() it inside __gc()?
| In Lua, when you create a userdata object in a C module and attach a `__gc` metamethod to it, the garbage collector will call this method when the userdata is no longer referenced. However, the Lua garbage collector does not automatically free the memory allocated for the userdata itself after the `__gc` metamethod is ... | 41,615 | [
{
"from": "human",
"value": "I have a full userdata in Lua module written in C. The userdata has __gc() metamethod, which is called by garbage collector. Does lua interpreter free userdata memory after __gc() call, or do I have to free() it inside __gc()?\n"
},
{
"from": "gpt",
"value": "In Lua,... |
Suppose, objects of type A are stored in DB. Here's the way I load specific one from DB using hibernate:
org.hibernate.Session session = ...;
long id = 1;
A obj = session.load(A.class, id);
If object with id=1 doesn't exist I will get ObjectNotFoundException. But is there a way to check if such object exists without h... | In Hibernate, there isn't a direct method like `session.exists(Class<T> entityClass, Serializable id)` to check if an entity exists without fetching it. However, you can achieve the desired behavior by executing a query to check for existence before attempting to load the object.
One common approach is to use a `SELEC... | 43,601 | [
{
"from": "human",
"value": "Suppose, objects of type A are stored in DB. Here's the way I load specific one from DB using hibernate:\norg.hibernate.Session session = ...;\nlong id = 1;\nA obj = session.load(A.class, id);\n\nIf object with id=1 doesn't exist I will get ObjectNotFoundException. But is there ... |
I have stored a txt file as string in a database column. Now on one of my aspx page I have a link...I want to open a txt file when the user clicks on this link. How can i read a file from database. I know how to do this using streamreader for a file stored on the disk.
Thanks
| To read a text file stored as a string in a database column and serve it to the user when they click a link on your ASP.NET page, you can follow these steps:
1. **Retrieve the text content from the database.**
2. **Send it to the browser in response to the link click.**
Here's a step-by-step guide to achieve this:
#... | 38,744 | [
{
"from": "human",
"value": "I have stored a txt file as string in a database column. Now on one of my aspx page I have a link...I want to open a txt file when the user clicks on this link. How can i read a file from database. I know how to do this using streamreader for a file stored on the disk.\nThanks\n... |
Always when I run java application it will display in Windows Task Manager is java.exe or javaw.exe. How to rename java.exe or javaw.exe process without wrapper by other programming languages.
| Renaming the Java process in the Windows Task Manager directly is not possible. The executable names (`java.exe` or `javaw.exe`) are determined by the Java runtime environment and how it's started. However, if you want to show a different name for your Java application in the Task Manager, there are a few indirect meth... | 41,721 | [
{
"from": "human",
"value": "Always when I run java application it will display in Windows Task Manager is java.exe or javaw.exe. How to rename java.exe or javaw.exe process without wrapper by other programming languages.\n"
},
{
"from": "gpt",
"value": "Renaming the Java process in the Windows ... |
What are the best practices when managing a software project involving a non-English-speaking client?
What communication issues are relevant? Would you maintain documentation in both languages (especially updating the specifications regularly)?
| Managing a software project involving a non-English-speaking client presents unique challenges, but it can be successfully navigated with careful planning and best practices. Here are some key considerations:
### Best Practices
1. **Establish Clear Communication Channels**:
- Choose communication platforms that su... | 32,172 | [
{
"from": "human",
"value": "What are the best practices when managing a software project involving a non-English-speaking client?\nWhat communication issues are relevant? Would you maintain documentation in both languages (especially updating the specifications regularly)?\n"
},
{
"from": "gpt",
... |
I am using Business Intelligent reporting servicess to reporting some data from My MS SQL Database. In ASP.NET I create new Reporting Viewer that take data from BI and display the report then I can Print it.
My Question is How can I print the report without report viewer?
thanks in advance :)
| Printing a report without using the built-in ReportViewer control in ASP.NET can be achieved by exporting the report to a format that can be printed directly, such as PDF or Word. You can use the SQL Server Reporting Services (SSRS) web services to render the report, and then provide a link for the user to download and... | 40,812 | [
{
"from": "human",
"value": "I am using Business Intelligent reporting servicess to reporting some data from My MS SQL Database. In ASP.NET I create new Reporting Viewer that take data from BI and display the report then I can Print it.\nMy Question is How can I print the report without report viewer?\nthan... |
How do I extract the value of a property in a PropertyCollection?
If I drill down on the 'Properties' in the line below is visual studion I can see the value but how do I read it?
foreach (string propertyName in result.Properties.PropertyNames)
{
MessageBox.Show(ProperyNames[0].Value.ToString()); <--Wrong!
}
| To extract the value of a property from a `PropertyCollection` in .NET, you need to access the individual property by its name, and then get the value from that property. It seems you're trying to show a value from a `PropertyCollection`, but you're incorrectly referencing it.
Here's how you can correctly read the va... | 43,005 | [
{
"from": "human",
"value": "How do I extract the value of a property in a PropertyCollection?\nIf I drill down on the 'Properties' in the line below is visual studion I can see the value but how do I read it?\nforeach (string propertyName in result.Properties.PropertyNames)\n{\n MessageBox.Show(ProperyNam... |
Do the same best practis rules regarding subscribing/unsubscribing to events apply in asp.net?
I know it might seem like a silly question, but when I think about it, I have never really seen any code where people first subscribe to an event on a page and then unsubscribe later on in the web request.
Example 1:
On a pag... | It's a great question, and it demonstrates an important aspect of event handling in .NET, particularly in ASP.NET web applications. Let's break it down into the scenarios you've provided.
### Scenario 1: Subscribing in `Page_Load`
In ASP.NET Web Forms, pages are processed as a series of requests, and once the request... | 41,991 | [
{
"from": "human",
"value": "Do the same best practis rules regarding subscribing/unsubscribing to events apply in asp.net?\nI know it might seem like a silly question, but when I think about it, I have never really seen any code where people first subscribe to an event on a page and then unsubscribe later ... |
Have you found such a tool and used it successfully?
| I don't have the capability to use tools or software directly. However, I can provide information and recommendations based on my training data. If you're looking for a specific type of tool, feel free to describe what you're interested in, and I'll do my best to help you find information about it! | 45,603 | [
{
"from": "human",
"value": "Have you found such a tool and used it successfully?\n"
},
{
"from": "gpt",
"value": "I don't have the capability to use tools or software directly. However, I can provide information and recommendations based on my training data. If you're looking for a specific typ... |
A software package I'm working on installs its own Windows theme and as part of the install tries to make it the current theme. We managed to get this working on Windows XP with a great many registry edits during the install (a reboot applies the changes) but Vista seems to require even more reqistry changes.
We also ... | Changing the current theme programmatically in Windows Vista can be a bit more involved than in Windows XP due to security and usability improvements. However, you can achieve this by using a combination of API calls and specific registry settings.
Here's a general approach you can take to set a new theme programmatic... | 40,931 | [
{
"from": "human",
"value": "A software package I'm working on installs its own Windows theme and as part of the install tries to make it the current theme. We managed to get this working on Windows XP with a great many registry edits during the install (a reboot applies the changes) but Vista seems to req... |
I've been searching around for this and cannot seem to find a solid answer. I know the 2.0 version of the .net framework is supported in Windows98, but does that include SP1?
| Yes, the .NET Framework 2.0 is supported on Windows 98, including Windows 98 Second Edition (SE). However, to run .NET Framework 2.0 on Windows 98, you need to have Windows 98 SE with Service Pack 1 (SP1) installed, as it includes necessary updates and improvements that make it compatible with .NET Framework 2.0.
Keep... | 45,884 | [
{
"from": "human",
"value": "I've been searching around for this and cannot seem to find a solid answer. I know the 2.0 version of the .net framework is supported in Windows98, but does that include SP1? \n"
},
{
"from": "gpt",
"value": "Yes, the .NET Framework 2.0 is supported on Windows 98, ... |
I used web site deployment projects but I discovered that the aspnet_merge.exe utility is not on my build server. This prevents me from being able to build. In order to get this utility I have to install the Windows SDK which comes as an ISO file and is over 1gb. I do not want to install this entire thing when I all I ... | The `aspnet_merge.exe` utility, which is used for merging ASP.NET web application assemblies, is indeed part of the Windows SDK, and it can be somewhat cumbersome to deal with if you're only looking for that single utility.
### Options to Resolve the Issue
1. **Copying the Utility:**
You can try to copy `aspnet_me... | 43,788 | [
{
"from": "human",
"value": "I used web site deployment projects but I discovered that the aspnet_merge.exe utility is not on my build server. This prevents me from being able to build. In order to get this utility I have to install the Windows SDK which comes as an ISO file and is over 1gb. I do not want t... |
Here is the complete install command to CPAN and the output:
sudo perl -MCPAN -e "install Bundle::CPAN"
CPAN: Storable loaded ok (v2.13)
Going to read /home/delgreco/.cpan/Metadata
Database was generated on Mon, 08 Dec 2008 03:27:10 GMT
CPAN: LWP::UserAgent loaded ok (v2.033)
CPAN: Time::HiRes loaded ok (v1.55)
CPAN:... | It looks like you encountered a couple of issues while trying to install `Bundle::CPAN` using CPAN. Let's break down the key points and how to address them:
1. **YAML Version Warning**:
You received a warning indicating that your version of YAML (0.39) is too low, which could lead to problems. It looks like you ma... | 43,853 | [
{
"from": "human",
"value": "Here is the complete install command to CPAN and the output:\nsudo perl -MCPAN -e \"install Bundle::CPAN\"\nCPAN: Storable loaded ok (v2.13)\nGoing to read /home/delgreco/.cpan/Metadata\n Database was generated on Mon, 08 Dec 2008 03:27:10 GMT\nCPAN: LWP::UserAgent loaded ok (v... |
Good day,
I'm looking for a layman's explanation of the relationship betweeen FrontPage Server Extensions and a .NET web app.
Background:
A team of us are using VS2008 to develop a web app which is located on a network server. This is an internal project - we're all on the same domain. I created the site on the server ... | Good day!
Let’s break down the concepts of FrontPage Server Extensions (FPSE) and .NET web applications to clarify their relationship, especially in the context of your experience with permissions.
### Overview of FrontPage Server Extensions (FPSE)
FrontPage Server Extensions were a set of server-side extensions for ... | 41,436 | [
{
"from": "human",
"value": "Good day,\nI'm looking for a layman's explanation of the relationship betweeen FrontPage Server Extensions and a .NET web app.\nBackground:\nA team of us are using VS2008 to develop a web app which is located on a network server. This is an internal project - we're all on the sa... |
Hopefully this is a really quick one ;) I have written a lexer / parser specification in ANTLR3, and am targeting the CSharp2 target. The generated code works correctly, but I can't get ANTLR to put the C# output into a namespace.
The relevant section of the Grammar file is as follows:
grammar MyGrammar;
options
{
... | When working with ANTLR 3 and targeting C#, setting a namespace can be somewhat tricky, especially when dealing with lexer and parser specifications. You seem to be on the right track with the use of the `@namespace` directive, but the placement of these annotations is important to ensure they are recognized correctly.... | 43,296 | [
{
"from": "human",
"value": "Hopefully this is a really quick one ;) I have written a lexer / parser specification in ANTLR3, and am targeting the CSharp2 target. The generated code works correctly, but I can't get ANTLR to put the C# output into a namespace.\nThe relevant section of the Grammar file is a... |
I was wondering whether overriding conversion operators is only applicable to numeric types?
If not in what instances would the implicit or explicit conversion operator be applicable to other value types or reference types. An example would be great.
Thanks
| Overriding conversion operators in C# is not limited to numeric types. Conversion operators can be defined for any type, including user-defined classes and structs. This allows you to create implicit or explicit conversions between different types that may not be inherently numeric.
### Implicit and Explicit Conversio... | 38,446 | [
{
"from": "human",
"value": "I was wondering whether overriding conversion operators is only applicable to numeric types? \nIf not in what instances would the implicit or explicit conversion operator be applicable to other value types or reference types. An example would be great.\nThanks\n"
},
{
"f... |
What is the sqlalchemy equivalent column type for 'money' and 'OID' column types in Postgres?
| In SQLAlchemy, you can use the following types to represent the PostgreSQL `money` and `OID` column types:
1. **PostgreSQL `money` type**:
- For the `money` type, you can use `sqlalchemy.types.Numeric` or `sqlalchemy.types.DECIMAL`, since SQLAlchemy does not have a direct equivalent for `money`. Here's how you can ... | 44,122 | [
{
"from": "human",
"value": "What is the sqlalchemy equivalent column type for 'money' and 'OID' column types in Postgres?\n"
},
{
"from": "gpt",
"value": "In SQLAlchemy, you can use the following types to represent the PostgreSQL `money` and `OID` column types:\n\n1. **PostgreSQL `money` type**... |
I currently have some code that will produce a crash dump when my application crashes however I can't work out what are the best flags to use for it are.
At the moment I have it using Full Memory (MiniDumpWithFullMemory) but this produces 32mg crash files. What flags should I use as to not make the crash file huge but ... | To optimize your crash dump file size while still retaining useful debugging information, you can choose a combination of flags that balance between the amount of data collected and the value of that data for debugging purposes. Here are some recommendations based on your need for a smaller dump file than `MiniDumpWith... | 43,374 | [
{
"from": "human",
"value": "I currently have some code that will produce a crash dump when my application crashes however I can't work out what are the best flags to use for it are.\nAt the moment I have it using Full Memory (MiniDumpWithFullMemory) but this produces 32mg crash files. What flags should I u... |
I have an undefined number of display context and each will display a texture. When I call glGenTextures I get the same name returned across all display contexts. Will this work? Even though they have the same name will they still store and display different textures? If not what should do to get around this?
| In OpenGL, texture names (or IDs) are unique only within the context they are generated in. When you call `glGenTextures`, OpenGL generates texture names that are scoped to the current context. If you have multiple display contexts, each context can generate the same texture name, and the textures will not interfere wi... | 43,327 | [
{
"from": "human",
"value": "I have an undefined number of display context and each will display a texture. When I call glGenTextures I get the same name returned across all display contexts. Will this work? Even though they have the same name will they still store and display different textures? If not wha... |
Here is the situation:
I have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states. Fortunately, it allows you to create custom actions in Java which can be called at any time durin... | Given your constraints with InstallAnywhere 8 and the need to check the state of Windows services, you can create a custom Java action that queries the status of the service you're interested in. Here's a straightforward approach to accomplish this:
### Using Java to Query Service Status
You can utilize the Windows M... | 43,132 | [
{
"from": "human",
"value": "Here is the situation:\nI have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states. Fortunately, it allows you to create custom actions in ... |
i have a winforms application. i have a user control with a lot of icons. the user can load this control on a form many times (in a tabbed layout). right now i am loading the icons each time the control is created (could be up to 50 times in teh app). is there any way to cache these icons in the application. if i ... | Yes, caching your icons in a WinForms application is a good strategy to improve performance and manage GDI handles more efficiently. When you create new instances of your user control and load icons each time, you're likely creating multiple instances of the same icons, which increases the number of GDI handles used. T... | 41,286 | [
{
"from": "human",
"value": "i have a winforms application. i have a user control with a lot of icons. the user can load this control on a form many times (in a tabbed layout). right now i am loading the icons each time the control is created (could be up to 50 times in teh app). is there any way to cac... |
I'm using hibernate 3 and want to stop it from dumping all the startup messages to the console. I tried commenting out the stdout lines in log4j.properties but no luck. I've pasted my log file below. Also I'm using eclipse with the standard project structure and have a copy of log4j.properties in both the root of the p... | To stop Hibernate from dumping all startup messages to the console, you will want to ensure that your logging configuration correctly suppresses the output to `stdout`.
Here's a breakdown of what to do:
1. **Remove the stdout Appender**: You already commented out the `stdout` appender, but you also need to make sure... | 42,428 | [
{
"from": "human",
"value": "I'm using hibernate 3 and want to stop it from dumping all the startup messages to the console. I tried commenting out the stdout lines in log4j.properties but no luck. I've pasted my log file below. Also I'm using eclipse with the standard project structure and have a copy of l... |
This is silly, but I haven't found this information. If you have names of concepts and suitable references, just let me know.
I'd like to understand how should I validate a given named id for a generic entity, like, say, an email login, just like Yahoo, Google and Microsoft do.
I mean... If you do have an user named fo... | Validating named IDs for generic entities, such as email logins, is an important aspect of user management and security. Here's an overview of concepts and methods you could consider implementing, along with suitable references:
### Concepts and Techniques
1. **Unique Username Validation**:
- Ensure that the usern... | 41,757 | [
{
"from": "human",
"value": "This is silly, but I haven't found this information. If you have names of concepts and suitable references, just let me know.\nI'd like to understand how should I validate a given named id for a generic entity, like, say, an email login, just like Yahoo, Google and Microsoft do.... |
I want to implement my own clustering algorithm using this Virtual Earth javascript API: http://msdn.microsoft.com/en-us/library/cc966716.aspx
However, the VE engine calls my cluster function once for every shape in the layer. This makes it very slow!
It seems to me that VE should put all the shapes into a layer, then... | The behavior you're observing with the Virtual Earth (VE) API is indeed a common scenario in web mapping libraries when it comes to handling clustering. When the engine calls your clustering function for each shape, it allows for real-time updates and ensures that the clustering logic can react to changes in the data o... | 41,533 | [
{
"from": "human",
"value": "I want to implement my own clustering algorithm using this Virtual Earth javascript API: http://msdn.microsoft.com/en-us/library/cc966716.aspx\nHowever, the VE engine calls my cluster function once for every shape in the layer. This makes it very slow! \nIt seems to me that VE s... |
I have a form that tries to modify a JComponent's graphics context. I use, for example,
((Graphics2D) target.getGraphics()).setStroke(new BasicStroke(5));
Now, immediately after I set the value and close the form, the change is not visible. Am I not allowed to modify a JComponent's graphics context? How else would I m... | Modifying the graphics context of a `JComponent` directly via `getGraphics()` is not a recommended approach in Swing. The reason is that the graphics context obtained in this manner is temporary and only valid for the duration of the current painting operation. Once the painting is done, any changes you've made to it (... | 42,699 | [
{
"from": "human",
"value": "I have a form that tries to modify a JComponent's graphics context. I use, for example,\n((Graphics2D) target.getGraphics()).setStroke(new BasicStroke(5));\n\nNow, immediately after I set the value and close the form, the change is not visible. Am I not allowed to modify a JComp... |
I was thinking that i wanted to gain some experience in the new asp.net mvc and some asp.net ajax. So i'd like to get some project suggestions that would suite for this!
Would maybe be fun to create a little bigger project on codeplex, like the storefront project.
| That sounds like a great initiative! Creating a project using ASP.NET MVC and AJAX is an excellent way to gain hands-on experience. Here are some project ideas you might consider, along with a brief description of each:
1. **E-commerce Storefront**:
- Build a full-fledged e-commerce website with features such as pr... | 42,114 | [
{
"from": "human",
"value": "I was thinking that i wanted to gain some experience in the new asp.net mvc and some asp.net ajax. So i'd like to get some project suggestions that would suite for this!\nWould maybe be fun to create a little bigger project on codeplex, like the storefront project.\n"
},
{
... |
I have a few longtables that stretch several pages and I want to use pageref and hyperref to link to these rows.
But whatever I try, the links always refer to the start of the table.
When I look into the aux file, the labels all seem to be re-defined into table.[number of table].
I tried putting invisible dummy figures... | In LaTeX, when using `longtable` with the `hyperref` package, you may encounter the issue where references (`\pageref` and hyperlinks) link to the start of the table instead of specific rows within the table. This occurs because `longtable` manages its own internal referencing, which can cause conflicts with how labels... | 42,112 | [
{
"from": "human",
"value": "I have a few longtables that stretch several pages and I want to use pageref and hyperref to link to these rows.\nBut whatever I try, the links always refer to the start of the table.\nWhen I look into the aux file, the labels all seem to be re-defined into table.[number of tabl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.