instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
IBM Rational Application Developer is very slow and has many problems.
I tried to use ant scripts to build EAR/WAR files for Websphere Application Server
but it did not work.
| If you're experiencing slowness and issues with IBM Rational Application Developer (RAD) and have tried using Ant scripts to build EAR/WAR files for WebSphere Application Server without success, here are some steps you can take to troubleshoot and improve your experience:
### 1. Improve RAD Performance
- **Increase M... | 39,909 | [
{
"from": "human",
"value": "IBM Rational Application Developer is very slow and has many problems.\nI tried to use ant scripts to build EAR/WAR files for Websphere Application Server\nbut it did not work.\n"
},
{
"from": "gpt",
"value": "If you're experiencing slowness and issues with IBM Ratio... |
If I'm using ConcurrentHashMap (where the put is thread safe) , and I supply a public function myPut that uses the ConcurrentHashMap put - do I need to synchronize my function?
meaning : should this be synchronized?
ConcurrentHashMap map;
public void myPut(int something) {
this.map.put(something);
}
| No, you do not need to synchronize your `myPut` function if you're only using the `put` method of `ConcurrentHashMap`. The `ConcurrentHashMap` is designed to handle concurrent access by multiple threads, and its `put` method is thread-safe. This means that multiple threads can safely call `put` simultaneously without t... | 41,823 | [
{
"from": "human",
"value": "If I'm using ConcurrentHashMap (where the put is thread safe) , and I supply a public function myPut that uses the ConcurrentHashMap put - do I need to synchronize my function? \nmeaning : should this be synchronized?\nConcurrentHashMap map; \npublic void myPut(int something) {... |
SQL Server 2000 Guru's,
I've setup SQL 2000 to accept HTTP Queries i.e.
http://74.22.98.66/MYDATABASE?sql={CALL+sp_XMLDATA}+&root=root (ficticious url)
It works great and returns the following XML via I.E.7 url -
<?xml version="1.0" encoding="utf-8" ?>
<root>
<g c="15" />
<g c="8" />
<g c="19" />
</root>
... | In SQL Server 2000, there is no direct way to add custom attributes or metadata like "Content Length" directly to the XML declaration itself. The XML declaration is defined by the XML standard and does not support additional attributes.
However, you can return the content length as part of the response headers. Here a... | 36,016 | [
{
"from": "human",
"value": "SQL Server 2000 Guru's,\nI've setup SQL 2000 to accept HTTP Queries i.e.\nhttp://74.22.98.66/MYDATABASE?sql={CALL+sp_XMLDATA}+&root=root (ficticious url)\nIt works great and returns the following XML via I.E.7 url -\n<?xml version=\"1.0\" encoding=\"utf-8\" ?> \n <root>\n <g c... |
I would normally use Google analytics because it is free and simple to implement but on this occasion we need an internally built reporting system. This system needs to be in .NET only because JavaScript is not an option.
My question is how do you track unique visitors when you can never be sure that they have cookies ... | Tracking unique visitors without relying on cookies or JavaScript can be quite challenging. However, you can implement a few strategies to approximate unique visitor tracking in your .NET reporting system. Here are some suggestions:
### 1. IP Address Tracking
While IP addresses are not reliable for unique identificati... | 41,496 | [
{
"from": "human",
"value": "I would normally use Google analytics because it is free and simple to implement but on this occasion we need an internally built reporting system. This system needs to be in .NET only because JavaScript is not an option.\nMy question is how do you track unique visitors when you... |
I'm an old hand at embedded programming but new to CE and having a lot of trouble doing reasonably simple things, because I am not familiar with the API and struggling to understand the obscure MSDN docs.
All I want to do is minimize and maximise two separate applications that are running from one of the applications.
... | To control the window states of other applications in a Windows CE environment, you typically use Windows APIs to find the target application windows and send messages to manipulate their state. Below are some steps and example code snippets to help you minimize and maximize the applications you mentioned:
### Steps t... | 38,011 | [
{
"from": "human",
"value": "I'm an old hand at embedded programming but new to CE and having a lot of trouble doing reasonably simple things, because I am not familiar with the API and struggling to understand the obscure MSDN docs.\nAll I want to do is minimize and maximise two separate applications that ... |
I'm reading in a lot of data from ldap which needs to be compared to the respective records in the database. To minimize the number of SQL queries, I want to batch multiple ldap records into a single query.
All this is pretty simple: A thread to produce ldap results, and a thread to consume those results and run the ... | You are correct in identifying the potential pitfalls of using special tokens or synchronizing variables that can lead to complexity in the code. Your aim to keep the responsibilities separate between the producer and consumer while also ensuring that the consumer can handle the termination of the process is crucial.
... | 40,107 | [
{
"from": "human",
"value": "I'm reading in a lot of data from ldap which needs to be compared to the respective records in the database. To minimize the number of SQL queries, I want to batch multiple ldap records into a single query.\nAll this is pretty simple: A thread to produce ldap results, and a th... |
When designing FPGA systems how can I estimate roughly the number of logic blocks a given task would require?
Anyone have a rough order of magnitude on what I should expect for these comon devices?:
UART
packet deframer with CRC32
8 micro core
I've seen www.opencores.org, however, they are not giving a number of gate... | Estimating the number of logic blocks (or logic elements) required for an FPGA implementation of specific tasks can be challenging, as it depends on various factors, including the architecture of the FPGA, the specific implementation details, and optimization techniques used. However, I can provide some rough estimates... | 40,611 | [
{
"from": "human",
"value": "When designing FPGA systems how can I estimate roughly the number of logic blocks a given task would require?\nAnyone have a rough order of magnitude on what I should expect for these comon devices?:\n\nUART\npacket deframer with CRC32\n8 micro core\n\nI've seen www.opencores.or... |
I'm writing a class that renders some content in WPF, and I want to give the user control over how the content is rendered. The rendering is mostly stroking lines, so I decided to look to the System.Windows.Forms.Shapes.Line class to get an idea of what properties I might want to implement. This led me to implement m... | Borrowing properties from existing WPF classes using the `AddOwner` method can be a practical approach to reduce redundancy in your code, especially if the properties you are borrowing have the behavior you need. It allows your custom class to inherit the property definitions without having to redefine them completely.... | 40,959 | [
{
"from": "human",
"value": "I'm writing a class that renders some content in WPF, and I want to give the user control over how the content is rendered. The rendering is mostly stroking lines, so I decided to look to the System.Windows.Forms.Shapes.Line class to get an idea of what properties I might want ... |
Create a file called Valid[File].txt and stick some text in it. Start powershell and go to the directory.
gc Valid[File].txt
should display the value in the file. It returns blank. If you use tab auto-completion it escapes the name:
gc 'Valid[File].txt'
but still returns nothing.
How do I reference files with br... | When working with file names that include special characters like brackets in PowerShell, you may run into issues with escaping or referencing those characters. Brackets (`[ ]`) are interpreted as special characters in PowerShell, which is why your attempts are not returning the expected content from the file.
Here ar... | 40,734 | [
{
"from": "human",
"value": "Create a file called Valid[File].txt and stick some text in it. Start powershell and go to the directory.\n\ngc Valid[File].txt\n\nshould display the value in the file. It returns blank. If you use tab auto-completion it escapes the name:\n\ngc 'Valid[File].txt'\n\nbut still ... |
Can we access div tags of user control in Master page? I am trying to change the background color for each one of the div tags on some event.
| Yes, you can access the `div` tags within a user control from a master page in ASP.NET, but you need to ensure that you have a proper reference to the user control and that the `div` elements are accessible.
Here are the steps to accomplish this:
### 1. Expose the `div` Control in the User Control
First, you need to... | 41,867 | [
{
"from": "human",
"value": "Can we access div tags of user control in Master page? I am trying to change the background color for each one of the div tags on some event.\n"
},
{
"from": "gpt",
"value": "Yes, you can access the `div` tags within a user control from a master page in ASP.NET, but ... |
I'm using the MessageBox class to show errors to users, and while that might not be the right behavior, it's very convenient. This is a touchscreen application, however, so I need the 'ok' button to be much larger than it is (curse my inordinately large fingers!).
I think that if I increase the font size in the dialog... | In a standard Windows Forms application, the `MessageBox` class does not provide direct customization options for its buttons, including resizing them or changing the font size. However, there are a few workarounds you can consider to achieve larger buttons or a larger dialog.
### Option 1: Custom Message Box
You can ... | 41,345 | [
{
"from": "human",
"value": "I'm using the MessageBox class to show errors to users, and while that might not be the right behavior, it's very convenient. This is a touchscreen application, however, so I need the 'ok' button to be much larger than it is (curse my inordinately large fingers!).\nI think that... |
I'm watching Stephen A Bohlen's excellent Summer of NHibernate series, and have been watching him interact with CodeRush. I've recently installed ReSharper (I'm a ReSharper newbie), and I'm trying to find some of the ReSharper productivity equivalents that Stephen is demonstrating (tangentially) with CodeRush.
As an e... | In ReSharper, there are indeed ways to streamline the process of wrapping a block of code with a `using` statement, but the specific feature you are looking for—automatically placing the first line into the `using` clause—is not handled as intuitively as in some other tools like CodeRush.
However, you can achieve a si... | 40,598 | [
{
"from": "human",
"value": "I'm watching Stephen A Bohlen's excellent Summer of NHibernate series, and have been watching him interact with CodeRush. I've recently installed ReSharper (I'm a ReSharper newbie), and I'm trying to find some of the ReSharper productivity equivalents that Stephen is demonstrat... |
I'm using the Outlook 2003 PIA and VS 2005 to access items in a public folder. The item.UserProperties collection always comes back empty, despite the items having several user defined fields.
If I add a property in code using UserProperties.Add, it is saved correctly with the item and is then available in the UserPro... | When working with the Outlook 2003 Primary Interop Assembly (PIA) and accessing public folder items, there can be a few reasons why the `UserProperties` collection may appear empty, even though you know that there are user-defined fields present. Here are several troubleshooting steps and considerations that could help... | 40,895 | [
{
"from": "human",
"value": "I'm using the Outlook 2003 PIA and VS 2005 to access items in a public folder. The item.UserProperties collection always comes back empty, despite the items having several user defined fields.\nIf I add a property in code using UserProperties.Add, it is saved correctly with the... |
I’m writing pl/sql procedure that exports data from Oracle to Excel. I need data formatting so I can’t use CSV. I’ve already tried with XML but it generates too large files when I want to export e.g. 70000 rows with 50 columns (almost 300 MB!!!).
That’s why I decided to use HTML tags to generate XLS file – it is small... | Generating multiple worksheets directly in an Excel file using HTML is challenging because HTML itself doesn't natively support the concept of worksheets like Excel does. However, you can employ a few methods to achieve your goal, though none of them are straightforward like working with a true Excel format.
### Optio... | 41,106 | [
{
"from": "human",
"value": "I’m writing pl/sql procedure that exports data from Oracle to Excel. I need data formatting so I can’t use CSV. I’ve already tried with XML but it generates too large files when I want to export e.g. 70000 rows with 50 columns (almost 300 MB!!!). \nThat’s why I decided to use HT... |
We're attempting to update our application in order to submit it for Vista certification. Part of the requirements are to handle only known exceptions and have Windows Error Reporting deal with all unhandled exceptions.
We have a global exception handler in our application (subscribed to the Application.ThreadExcept... | To meet the requirements for handling known exceptions and allowing Windows Error Reporting (WER) to deal with unhandled exceptions while preserving the call stack, you can follow this approach:
1. **Global Exception Handling**: Continue using the `Application.ThreadException` event to catch exceptions globally. This ... | 41,172 | [
{
"from": "human",
"value": "We're attempting to update our application in order to submit it for Vista certification. Part of the requirements are to handle only known exceptions and have Windows Error Reporting deal with all unhandled exceptions. \nWe have a global exception handler in our application (... |
Is there in Windows API or in MFC any analog to atoh() function?
atoh() converts a string containing a hexadecimal number into an unsigned number like
unsigned x = atoh("A");
and x = 10 after the operation.
In Windows I have a CString, containing "A". How can I convert it to int?
| In the Windows API and MFC, there isn't a direct analog to the `atoh()` function, but you can achieve the same result by using the `strtol` function, which can convert a string to a long integer with a specified base (in this case, base 16 for hexadecimal).
If you're using a `CString`, you can use the `GetString()` me... | 42,367 | [
{
"from": "human",
"value": "Is there in Windows API or in MFC any analog to atoh() function?\natoh() converts a string containing a hexadecimal number into an unsigned number like\nunsigned x = atoh(\"A\");\n\nand x = 10 after the operation.\nIn Windows I have a CString, containing \"A\". How can I convert... |
I have a xml text file opened in VS2005 IDE.
It has 4 mocked up lines:
<mc id="dog" name="mydogBob"/>
<mc id="cat" name="katie"/>
<mc id="turtle" name="slow"/>
<mc id="fish" name="happy"/>
How do I use VS2005 Find/Replace function with regular expression to replace words and make the final result like:
dog
cat
turtle
... | To achieve the desired result using the Find/Replace function with regular expressions in Visual Studio 2005, you can follow these steps:
1. Open your XML file in Visual Studio 2005.
2. Open the Find and Replace dialog by pressing `Ctrl + H` or selecting `Edit` > `Find and Replace` > `Replace in Document`.
3. In the... | 41,567 | [
{
"from": "human",
"value": "I have a xml text file opened in VS2005 IDE.\nIt has 4 mocked up lines:\n<mc id=\"dog\" name=\"mydogBob\"/>\n<mc id=\"cat\" name=\"katie\"/>\n<mc id=\"turtle\" name=\"slow\"/>\n<mc id=\"fish\" name=\"happy\"/>\n\nHow do I use VS2005 Find/Replace function with regular expression ... |
I'm in a very bad situation: I need to maintain asp.net web application hosted in an environment on which I don't have any access. For every small intervention I need to go personally which includes checking procedures since it'as a government agency.
I was wondering if there is some way to partially of full update a... | Maintaining an ASP.NET web application with such restricted access can indeed be challenging. However, there are some strategies you can consider to manage and potentially update your application more efficiently:
### 1. **Web-Based Admin Dashboard**
If you have the ability to develop or modify your application, consi... | 38,560 | [
{
"from": "human",
"value": "I'm in a very bad situation: I need to maintain asp.net web application hosted in an environment on which I don't have any access. For every small intervention I need to go personally which includes checking procedures since it'as a government agency.\n \nI was wondering if ther... |
I am trying to keep track of something and using the SessionID as they key to that object
However the SessionID every 2-3 reqiests changes shouldn't it remain the same?
HttpContext.Session.SessionID
Is the code I am using.
| In ASP.NET, the `HttpContext.Session.SessionID` should remain consistent for the duration of a user's session. However, if you are seeing that the `SessionID` is changing every 2-3 requests, there are a few potential reasons this could be happening:
1. **Session State Configuration**: Ensure that session state is prop... | 40,789 | [
{
"from": "human",
"value": "I am trying to keep track of something and using the SessionID as they key to that object\nHowever the SessionID every 2-3 reqiests changes shouldn't it remain the same?\nHttpContext.Session.SessionID\n\nIs the code I am using.\n"
},
{
"from": "gpt",
"value": "In ASP... |
Making echo of a question around the web:
Is the syntax for svn:ignore patterns
documented somewhere? The only pattern
matching character I could find in the
SVN book under 'svn:ignore' is '*'.
Subversion Book: 'svn:ignore'
In particular I want to match a 32 character string (md5 hash named directory).
| Yes, the syntax for `svn:ignore` patterns is documented, but it can sometimes be a bit sparse. The primary characters you can use in `svn:ignore` patterns include:
1. `*` - Matches zero or more characters.
2. `?` - Matches exactly one character.
3. `[abc]` - Matches any one character enclosed in the brackets (in this ... | 42,767 | [
{
"from": "human",
"value": "Making echo of a question around the web:\n\nIs the syntax for svn:ignore patterns\n documented somewhere? The only pattern\n matching character I could find in the\n SVN book under 'svn:ignore' is '*'.\n\nSubversion Book: 'svn:ignore'\nIn particular I want to match a 32 char... |
I want to put a table inside a table row. But when i try to take the preview it's not working. Can anyone help me on this?
| In HTML, you can definitely place a table inside a table row (also known as a nested table). However, you need to ensure that your HTML is structured correctly. Here's an example of how to properly create a table within a table row:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta n... | 40,024 | [
{
"from": "human",
"value": "I want to put a table inside a table row. But when i try to take the preview it's not working. Can anyone help me on this?\n"
},
{
"from": "gpt",
"value": "In HTML, you can definitely place a table inside a table row (also known as a nested table). However, you need ... |
This is the error, it's basically a security warning
Warning message http://img357.imageshack.us/img357/7992/visualstudiowarninggr4.jpg
(And here's the text grabbed off the dialog box)
Security Warning for WindowsApplication4 __________________________I
The WindowsApplication4 project file has been customized and could... | The warning message you are encountering in Visual Studio is a security precaution designed to protect your system from potentially harmful code execution. Here’s a breakdown of what it means and how to handle it:
### Explanation of the Warning
1. **Custom Build Steps**: Your project contains custom build steps or it... | 42,105 | [
{
"from": "human",
"value": "This is the error, it's basically a security warning\nWarning message http://img357.imageshack.us/img357/7992/visualstudiowarninggr4.jpg\n(And here's the text grabbed off the dialog box)\nSecurity Warning for WindowsApplication4 __________________________I\nThe WindowsApplicatio... |
We're currently using WinCVS but it's slow and has no merge dialog. I'm looking for something like Eclipse's Team Synchronize (so people can see what they'll get before they update).
What do you suggest? TortoiseCVS with WinMerge?
Note: OSS preferred :)
| If you're looking for an open-source alternative to WinCVS that provides a better user experience with features like a merge dialog and a visual way to see changes before updating, you might consider the following options:
1. **TortoiseCVS**: This is a popular option that integrates well with the Windows shell. It pro... | 41,636 | [
{
"from": "human",
"value": "We're currently using WinCVS but it's slow and has no merge dialog. I'm looking for something like Eclipse's Team Synchronize (so people can see what they'll get before they update).\nWhat do you suggest? TortoiseCVS with WinMerge?\nNote: OSS preferred :)\n"
},
{
"from":... |
So my goal is to be able to add a user from one Active Directory Domain to another group in a separate Active Directory Domain.
I'd like to do this in C#. I know there is a System.DirectoryServices namespace with classes to communicate with AD, but I can't find any information on adding users across domains.
In the en... | To add a user from one Active Directory domain (Domain B) to a group in another Active Directory domain (Domain A) using C#, you can leverage the `System.DirectoryServices` namespace. Given that you have a transient trust established between the two domains, you should be able to use the credentials from Domain B to ad... | 37,720 | [
{
"from": "human",
"value": "So my goal is to be able to add a user from one Active Directory Domain to another group in a separate Active Directory Domain.\nI'd like to do this in C#. I know there is a System.DirectoryServices namespace with classes to communicate with AD, but I can't find any information... |
I was fortunate enough to be able to start fresh with Grails. However, many people have asked me how to add Groovy and/or Grails to a legacy Java/JSP web app. Do people have experience or recommendations on how to best include Groovy and Grails into a large legacy application?
| Integrating Groovy and Grails into a legacy Java/JSP web application can be a strategic way to modernize your application and take advantage of Groovy's dynamic capabilities and Grails' features. Here are some recommendations on how to do this:
### 1. **Assess Your Legacy Application**
- **Understand the Architectu... | 38,345 | [
{
"from": "human",
"value": "I was fortunate enough to be able to start fresh with Grails. However, many people have asked me how to add Groovy and/or Grails to a legacy Java/JSP web app. Do people have experience or recommendations on how to best include Groovy and Grails into a large legacy application?... |
I'm searching for a code that will alow access to the SMS messages stored in a Pocket PC device with Windows Mobile so I can download/backup them to a Windows PC.
Anyone knows how to do this?
| To access SMS messages stored on a Pocket PC device running Windows Mobile and back them up to a Windows PC, you can use the following methods:
### Method 1: Using Software Tools
There are several third-party software tools available that can help you extract SMS messages from a Windows Mobile device. Some popular op... | 43,531 | [
{
"from": "human",
"value": "I'm searching for a code that will alow access to the SMS messages stored in a Pocket PC device with Windows Mobile so I can download/backup them to a Windows PC.\nAnyone knows how to do this?\n"
},
{
"from": "gpt",
"value": "To access SMS messages stored on a Pocket... |
I've made a custom control with values for start, current, and end times. The current time has to be between the start and end times, or else an exception is thrown.
In the designer, I want to set new start, current and end times; and the new current time is valid for the new start and end, but not the default start a... | To solve the problem of setting the `start`, `current`, and `end` times in the correct order in your custom control, you can implement a few strategies to ensure that the `current` time is only validated after the `start` and `end` times are set. Here are a couple of approaches you can consider:
### 1. Use a Flag to D... | 38,426 | [
{
"from": "human",
"value": "I've made a custom control with values for start, current, and end times. The current time has to be between the start and end times, or else an exception is thrown.\nIn the designer, I want to set new start, current and end times; and the new current time is valid for the new ... |
I have an XML document looking similar to this:
<items>
<item cat="1" owner="14">bla</item>
<item cat="1" owner="9">bla</item>
<item cat="1" owner="14">bla</item>
<item cat="2" owner="12">bla</item>
<item cat="2" owner="12">bla</item>
</items>
Now I'd like to get all unique owners (I actually only need the attrib... | You can achieve this using LINQ to XML in C#. Here's how you can extract the unique owners belonging to a specified category using LINQ query syntax:
```csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
class Program
{
static void Main()
{
string xml = @"... | 41,889 | [
{
"from": "human",
"value": "I have an XML document looking similar to this:\n<items>\n <item cat=\"1\" owner=\"14\">bla</item>\n <item cat=\"1\" owner=\"9\">bla</item>\n <item cat=\"1\" owner=\"14\">bla</item>\n <item cat=\"2\" owner=\"12\">bla</item>\n <item cat=\"2\" owner=\"12\">bla</item>\n</items>\n\n... |
This originally was a problem I ran into at work, but is now something I'm just trying to solve for my own curiosity.
I want to find out if int 'a' contains the int 'b' in the most efficient way possible. I wrote some code, but it seems no matter what I write, parsing it into a string and then using indexOf is twice a... | It’s great to see your enthusiasm for optimization and algorithmic challenges! Your goal of checking if one integer contains another can indeed be tackled in different ways, including both your mathematical approach and the string-based method.
Since you've already observed that converting to strings and using `index... | 40,175 | [
{
"from": "human",
"value": "This originally was a problem I ran into at work, but is now something I'm just trying to solve for my own curiosity.\nI want to find out if int 'a' contains the int 'b' in the most efficient way possible. I wrote some code, but it seems no matter what I write, parsing it into ... |
I like to keep my shell sessions named with useful titles as I work, this helps me keep track of what I'm using each of the many tabs for.
Currently to rename a session I double click its name on the tabbed part of the console - is there any command that I can use to do this from within the shell? It would save me a bi... | In KDE's Konsole, you can rename your terminal tabs from within the shell using the `PROMPT_COMMAND` variable or by using the built-in `echo` command to set the title. Here are a couple of methods you can use to change the tab title:
### Method 1: Using ANSI Escape Sequences
You can set the title of the tab by echoin... | 42,949 | [
{
"from": "human",
"value": "I like to keep my shell sessions named with useful titles as I work, this helps me keep track of what I'm using each of the many tabs for.\nCurrently to rename a session I double click its name on the tabbed part of the console - is there any command that I can use to do this fr... |
I'm getting pretty tired of my development box dying and then I end up having to reinstall a laundry list of tools that I use in development.
This time I think I'm going to set the development environment up on a Virtual Box VM and save it to an external HDD so that way I can bring the development environment back up... | Setting up your development environment on a VirtualBox VM and saving it to an external HDD is a practical solution for creating a hardware-agnostic backup of your tools and configuration. Many developers have found this approach beneficial for several reasons:
### Advantages
1. **Isolation**: Running your developmen... | 42,877 | [
{
"from": "human",
"value": "I'm getting pretty tired of my development box dying and then I end up having to reinstall a laundry list of tools that I use in development. \nThis time I think I'm going to set the development environment up on a Virtual Box VM and save it to an external HDD so that way I can... |
When designing a wiki application, what things should I take into consideration?
So far I have:
revisions
parsing some sort of markup text
keeping track of links in wikis, and pages that link to other pages.
related wikis i.e. wikis are related to others.
What else goes into building a Wiki?
| When designing a wiki application, there are several additional factors and features to consider to enhance usability, functionality, and performance. Here’s a comprehensive list of considerations beyond what you’ve already mentioned:
1. **User Management and Permissions:**
- User registration and authentication (O... | 40,710 | [
{
"from": "human",
"value": "When designing a wiki application, what things should I take into consideration?\nSo far I have:\n\nrevisions\nparsing some sort of markup text\nkeeping track of links in wikis, and pages that link to other pages.\nrelated wikis i.e. wikis are related to others.\n\nWhat else goe... |
I have this code
<?php
session_start();
if (isset($_GET["cmd"]))
$cmd = $_GET["cmd"];
else
die("You should have a 'cmd' parameter in your URL");
$pk = $_GET["pk"];
$con = mysql_connect("localhost","root","geheim");
if(!$con)
{
die('Connection failed because of' .mysql_error());
}
mysql_select_db("ebay",$con);
if($... | To ensure that the image is displayed below the table and only when there's a valid URL, you need to make a few modifications to your code. Here are the changes that you should implement:
1. **Use a Variable to Store the URL**: Instead of echoing the image directly in your loop and referencing `$row['PIC_URL']`, you s... | 38,682 | [
{
"from": "human",
"value": "I have this code\n<?php\nsession_start();\nif (isset($_GET[\"cmd\"]))\n $cmd = $_GET[\"cmd\"];\nelse\n die(\"You should have a 'cmd' parameter in your URL\");\n $pk = $_GET[\"pk\"];\n$con = mysql_connect(\"localhost\",\"root\",\"geheim\");\nif(!$con)\n{\ndie('Connection failed... |
I launch my program in C#, which then calls some unmanaged C++.
When I break on a line in the unmanaged C++, the 'New Data Breakpoint' menu item is grayed out.
Is there anyway around this?
| In Visual Studio, the option to set a new data breakpoint can indeed be grayed out when you're debugging unmanaged C++ code. This is typically due to the limitations in the debugger when working with mixed-mode (managed/unmanaged) applications.
Here are some potential workarounds and options you might consider:
1. **... | 41,726 | [
{
"from": "human",
"value": "I launch my program in C#, which then calls some unmanaged C++. \nWhen I break on a line in the unmanaged C++, the 'New Data Breakpoint' menu item is grayed out.\nIs there anyway around this?\n"
},
{
"from": "gpt",
"value": "In Visual Studio, the option to set a new ... |
The CSS Friendly Control Adapters for ASP.NET are great for creating markup that is easy to style. A big benefit of the GridView adapter is that it generates THEAD, TBODY, and TFOOT tags, which allow you to do some really great things with libraries like jQuery - for instance, Tablesorter for client-side table sorting... | You have a couple of options to achieve the desired functionality with your GridViews while keeping your existing ones unaffected. Here's a breakdown of the two solutions you're interested in:
### Solution 1: Extend or Modify GridView to Output THEAD and TBODY Tags
You can create a custom GridView control that inheri... | 33,061 | [
{
"from": "human",
"value": "The CSS Friendly Control Adapters for ASP.NET are great for creating markup that is easy to style. A big benefit of the GridView adapter is that it generates THEAD, TBODY, and TFOOT tags, which allow you to do some really great things with libraries like jQuery - for instance, ... |
Have you ever had alternating background colors in a Jasper report and then exported it to Excel? The Excel export seems to ignore the alternating color.
I've got a Jasper report where the rows alternating background color using the procedure referenced HERE. When I preview it using the viewer or export to PDF it wor... | When working with JasperReports, it is common to use expressions to achieve alternating row colors for better readability. However, as you've noticed, this formatting may not carry over to Excel exports because of how the JasperReports exporter handles styles.
Here are some tips to help you ensure that your alternatin... | 41,902 | [
{
"from": "human",
"value": "Have you ever had alternating background colors in a Jasper report and then exported it to Excel? The Excel export seems to ignore the alternating color.\nI've got a Jasper report where the rows alternating background color using the procedure referenced HERE. When I preview i... |
i've written a UserControl descendant that is in an assembly dll.
How do i drop the control on a form?
namespace StackOverflowExample
{
public partial class MonthViewCalendar : UserControl
{
...
}
}
i've added a reference to the assembly under the References node in the Solution Explorer, but no new con... | It looks like you've figured out how to add your custom UserControl to the Toolbox manually, which is great! Just to summarize and provide some additional context, here's a step-by-step guide to help anyone else encountering a similar issue:
### Adding a Custom UserControl to the Toolbox in Visual Studio
1. **Ensure ... | 32,233 | [
{
"from": "human",
"value": "i've written a UserControl descendant that is in an assembly dll.\nHow do i drop the control on a form?\nnamespace StackOverflowExample\n{\n public partial class MonthViewCalendar : UserControl\n {\n ...\n }\n}\n\ni've added a reference to the assembly under the Refer... |
When i do
wnd = CreateWindow("EDIT", 0,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN,
x, y, w, h,
parentWnd,
NULL, NULL, NULL);
everything is fine, however if i remove the WS_VSCROLL and WS_HSCROLL then do the below, i do not get... | The issue you're encountering is related to the timing of when window styles are set and how the window is created and displayed. When you create a window with the `CreateWindow` function, the styles specified are used to determine how the window behaves and what features it has.
### Reasons for Unusable Window
1. **... | 37,787 | [
{
"from": "human",
"value": "When i do \nwnd = CreateWindow(\"EDIT\", 0,\n WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | \n ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN,\n x, y, w, h,\n parentWnd,\n NULL, NULL, NULL);\n\neverything is fine, however if i remove the WS_VSC... |
How do I check the type of a value on runtime?
I'd like to find out where I'm creating doubles.
| In Python, you can check the type of a value at runtime using the built-in `type()` function or the `isinstance()` function. If you specifically want to identify where doubles (floating-point numbers) are being created or assigned, you could use these methods in conjunction with debugging techniques or logging.
Here a... | 43,422 | [
{
"from": "human",
"value": "How do I check the type of a value on runtime?\nI'd like to find out where I'm creating doubles.\n"
},
{
"from": "gpt",
"value": "In Python, you can check the type of a value at runtime using the built-in `type()` function or the `isinstance()` function. If you speci... |
There's a lot of conflicting information about this topic. So let's try to agree on a definitive answer:
Which one of these random number generator in C create better randomness: rand, random or arc4random?
note: Just to make the question clear, this is not a question about true randomness, it's only a clash between th... | When it comes to evaluating the randomness quality of random number generators (RNGs) in C, particularly in the context of Cocoa (and by extension, iOS development), here's a comparison of the three functions you mentioned: `rand`, `random`, and `arc4random`.
1. **rand**:
- The standard C library function `rand` is... | 41,100 | [
{
"from": "human",
"value": "There's a lot of conflicting information about this topic. So let's try to agree on a definitive answer:\nWhich one of these random number generator in C create better randomness: rand, random or arc4random?\nnote: Just to make the question clear, this is not a question about tr... |
We need to send email which contains Pound (currency) symbols in ColdFusion. Before sending email, we are dumping the data into a html file for preview.
How to send a email with utf-8 encoding in ColdFusion
How to save a file with utf-8 encoding in ColdFusion
| To send an email with UTF-8 encoding in ColdFusion, and to save a file with UTF-8 encoding as well, you can follow the steps below:
### Sending an Email with UTF-8 Encoding
When you send an email in ColdFusion, you can specify the character encoding using the `charset` attribute in the `cfmail` tag. Here’s an example... | 42,962 | [
{
"from": "human",
"value": "We need to send email which contains Pound (currency) symbols in ColdFusion. Before sending email, we are dumping the data into a html file for preview. \n\nHow to send a email with utf-8 encoding in ColdFusion\nHow to save a file with utf-8 encoding in ColdFusion\n\n"
},
{... |
I have tried different examples to filter a gridview by dropdownlist, but is it possible in a button on_click event? Do i create something like a SelectedItem on each dropdown and have them added to the button event? Sorry to be so vague....I would like to have the dropdowns with a selectedvalue and then add them tog... | Yes, you can filter a GridView based on selected values from multiple DropDownLists when a button is clicked. The general approach involves capturing the selected values from each DropDownList in the button's `OnClick` event handler, using those values to filter your data source, and then re-binding the filtered data t... | 36,586 | [
{
"from": "human",
"value": "I have tried different examples to filter a gridview by dropdownlist, but is it possible in a button on_click event? Do i create something like a SelectedItem on each dropdown and have them added to the button event? Sorry to be so vague....I would like to have the dropdowns w... |
I can't seem to figure out what I am doing wrong here. I publish my website to my server and when I try to run it I get the following exception:
Could not load the assembly 'App_Web_kh7-x3ka'. Make sure that it is compiled before accessing the page.
Has anyone else ever encountered this?
| The error message you're encountering suggests that your web application is trying to access a compiled assembly that is not found or not properly compiled on your server. Here are a few steps you can take to troubleshoot and resolve the issue:
1. **Check Compilation**: Ensure that your project is properly compiled be... | 40,591 | [
{
"from": "human",
"value": "I can't seem to figure out what I am doing wrong here. I publish my website to my server and when I try to run it I get the following exception:\n\nCould not load the assembly 'App_Web_kh7-x3ka'. Make sure that it is compiled before accessing the page.\n\nHas anyone else ever en... |
I'd like to run a method when a user switches to another tab or when the application is closed. Is there a way to do this with the iphone sdk?
I've tried looking at the methods for the view controllers and the tab bars, but I didn't see any methods that seemed to do this.
I've also tried doing this with "Editing Did ... | In iOS development, you can handle events related to when a user switches tabs or when the application is about to close (or go into the background) using appropriate delegate methods and notifications. Below are some methods to achieve this:
### 1. Detecting Tab Changes
To detect when the user switches tabs in a `UIT... | 39,254 | [
{
"from": "human",
"value": "I'd like to run a method when a user switches to another tab or when the application is closed. Is there a way to do this with the iphone sdk? \nI've tried looking at the methods for the view controllers and the tab bars, but I didn't see any methods that seemed to do this. \nI'... |
I am wondering if it is possible to use Reg-Free COM in an ASP.Net application?
| Yes, it is possible to use Reg-Free COM (Registration-Free COM) in an ASP.NET application. Reg-Free COM allows you to use COM components without needing to register them in the Windows Registry, which can simplify deployment and reduce potential conflicts. Here’s how you can implement it in an ASP.NET application:
###... | 40,390 | [
{
"from": "human",
"value": "I am wondering if it is possible to use Reg-Free COM in an ASP.Net application?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to use Reg-Free COM (Registration-Free COM) in an ASP.NET application. Reg-Free COM allows you to use COM components without needing t... |
Consider the following code snippet
private void ProcessFile(string fullPath) {
XmlTextReader rdr = new XmlTextReader("file:\\\\" + fullPath);
while (rdr.Read()) {
//Do something
}
return;
}
Now, this functions fine when passed a path like:
"C:\Work Files\Technical Information\Dummy.xml"
But th... | The issue you're experiencing is related to how the `XmlTextReader` interprets the path you are providing, especially with the presence of the hash character (`#`). In URLs, the hash character is treated as a fragment identifier, which can cause parsing issues.
### Problem Explanation
When you use the `XmlTextReader`... | 42,625 | [
{
"from": "human",
"value": "Consider the following code snippet\nprivate void ProcessFile(string fullPath) {\n XmlTextReader rdr = new XmlTextReader(\"file:\\\\\\\\\" + fullPath);\n while (rdr.Read()) {\n //Do something\n }\n return;\n}\n\nNow, this functions fine when passed a path like... |
A QA server of mine which has not given me any flack for a while started giving my applications errors because they could not write to a queue. MSMQ specifically threw a message saying "Insufficient resources to perform operation".
A check of the queues themselves indicate that they are empty, with zero messages each.
... | The error message you are seeing, "Insufficient resources to perform operation," indicates that MSMQ is unable to allocate resources for new messages because it has reached the storage limit defined for the queues. Since you've confirmed that the queues themselves are empty, it's likely that there are old messages or f... | 36,631 | [
{
"from": "human",
"value": "A QA server of mine which has not given me any flack for a while started giving my applications errors because they could not write to a queue. MSMQ specifically threw a message saying \"Insufficient resources to perform operation\".\nA check of the queues themselves indicate th... |
I am working on a Windows Forms app for quite some time now, and I really find myself doing more typecasts in the GUI code than I ever did in my underlying business code.
What I mean becomes apparent if you watch the ComboBox control that accepts some vague "object" as it's item.
Then you go off and may display some D... | Your frustration with typecasting in Windows Forms controls like `ComboBox` and `ListView` is a common one, particularly for developers who are accustomed to working with generics in other areas of .NET. Unfortunately, the design of Windows Forms was influenced by its need to support a wide array of .NET versions, and ... | 38,642 | [
{
"from": "human",
"value": "I am working on a Windows Forms app for quite some time now, and I really find myself doing more typecasts in the GUI code than I ever did in my underlying business code.\nWhat I mean becomes apparent if you watch the ComboBox control that accepts some vague \"object\" as it's i... |
I have an xml web service which I use at work to make a request to. This request, an xml document, includes information such as recipients, subject, body, etc (as a newsletter would contain).
I have an ASP.NET form to enter the above information to, to form the Xml document, and I can type foreign characters (non latin... | It sounds like you're encountering an issue with encoding when creating and sending your XML document through your ASP.NET application. Since you've confirmed that the foreign characters are displayed correctly and that you're using UTF-8 encoding, let's explore a few potential areas where things might be going wrong.
... | 37,028 | [
{
"from": "human",
"value": "I have an xml web service which I use at work to make a request to. This request, an xml document, includes information such as recipients, subject, body, etc (as a newsletter would contain).\nI have an ASP.NET form to enter the above information to, to form the Xml document, an... |
How can I retrieve raw time-series data from a Proficy Historian/iHistorian?
Ideally, I would ask for data for a particular tag between two dates.
| Retrieving raw time-series data from Proficy Historian or iHistorian involves using their API or querying their database directly. Here's a general approach to achieve this:
### Method 1: Using Proficy Historian API
1. **API Documentation**: First, check the official documentation for Proficy Historian or iHistorian ... | 39,984 | [
{
"from": "human",
"value": "How can I retrieve raw time-series data from a Proficy Historian/iHistorian?\nIdeally, I would ask for data for a particular tag between two dates.\n"
},
{
"from": "gpt",
"value": "Retrieving raw time-series data from Proficy Historian or iHistorian involves using th... |
I need to find out the pixel position of one element in a list that's been displayed using a ListView. It seems like I should get one of the TextView's and then use getTop(), but I can't figure out how to get a child view of a ListView.
Update: The children of the ViewGroup do not correspond 1-to-1 with the items in th... | To find the pixel position of an element in a `ListView`, you need to understand how `ListView` manages its children. As you noted, `ListView` only keeps the visible children in its internal view hierarchy, which means you cannot directly access a child view by its position in the list (like you would in a `RecyclerVie... | 42,134 | [
{
"from": "human",
"value": "I need to find out the pixel position of one element in a list that's been displayed using a ListView. It seems like I should get one of the TextView's and then use getTop(), but I can't figure out how to get a child view of a ListView.\nUpdate: The children of the ViewGroup do ... |
I've got a form inside an <asp:Content> block that is being submitted to a controller. For one of the controls, I need to get some information from it directly that won't happen automatically by calling UpdateModel().
However, in the Request.Form dictionary, the control's id is of the mangled form ctl00$ContentPlaceHo... | You are correct in your assessment that using the JavaScript version of the FCKeditor is typically more straightforward when working with ASP.NET MVC, as it avoids some of the complexities that arise from the WebForms approach, including the mangled control IDs.
### Steps to Use FCKeditor with JavaScript Version:
1. ... | 42,343 | [
{
"from": "human",
"value": "I've got a form inside an <asp:Content> block that is being submitted to a controller. For one of the controls, I need to get some information from it directly that won't happen automatically by calling UpdateModel().\nHowever, in the Request.Form dictionary, the control's id i... |
I've recently gotten charged with designing and implementing a source code version control, testing, and deployment scheme at the company I work.
Personally I've worked with Subversion for a few years on my own projects. But I've never dealt with it at this big scale. Hence I thought I'd ask here if anyone has any comm... | Your proposed setup for managing source code version control, testing, and deployment using Subversion (SVN) is quite solid and aligns well with best practices in version control and software deployment. Here are some comments, suggestions, and considerations to help refine and enhance your strategy:
### Overall Struc... | 42,541 | [
{
"from": "human",
"value": "I've recently gotten charged with designing and implementing a source code version control, testing, and deployment scheme at the company I work.\nPersonally I've worked with Subversion for a few years on my own projects. But I've never dealt with it at this big scale. Hence I t... |
I am a support engineer and our company's product allows XSLT transforms to customize outputs.
I made a xsl transform for this purpose. It works well for source files of typical size (several 100k), but occasionally a really huge (10M) source file will come by. In such case, the output is not generated even if I let it... | The performance issue you are encountering with your XSLT transformations on large XML files can indeed be attributed to both the structure of your XSLT and the efficiency of the XSLT processor itself. Here’s a breakdown of your questions:
1. **Flexibility of XSLT**: Yes, XSLT is flexible, and there are indeed more an... | 42,070 | [
{
"from": "human",
"value": "I am a support engineer and our company's product allows XSLT transforms to customize outputs.\nI made a xsl transform for this purpose. It works well for source files of typical size (several 100k), but occasionally a really huge (10M) source file will come by. In such case, th... |
I would like to implement a search engine which should crawl a set of web sites, extract specific information from the pages and create full-text index of that specific information.
It seems to me that Xapian could be a good choice for the search engine library.
What are the options for a crawler/parser to integrate wi... | Implementing a search engine that can crawl websites, extract specific information, and create a full-text index is an exciting project. Both Xapian and Solr can serve as search engine libraries, but they have different characteristics and use cases.
### Xapian
Xapian is a highly adaptable open-source search engine li... | 39,731 | [
{
"from": "human",
"value": "I would like to implement a search engine which should crawl a set of web sites, extract specific information from the pages and create full-text index of that specific information.\nIt seems to me that Xapian could be a good choice for the search engine library.\nWhat are the o... |
Just wondering if anyone has seen any usable progress bar for C# .net apps. My app takes about 20-60 secs to load and I would love to show users a progress bar while they wait. I saw this one but the sample site doesn't seem to work which doesn't inspire confidence.
| Certainly! Implementing a progress bar in a C# .NET application can greatly improve user experience during loading times. Here’s a straightforward way to create a progress bar in a Windows Forms application, which is a common type of desktop app in .NET.
### 1. Basic Progress Bar Setup
Here’s a simple example to sho... | 40,529 | [
{
"from": "human",
"value": "Just wondering if anyone has seen any usable progress bar for C# .net apps. My app takes about 20-60 secs to load and I would love to show users a progress bar while they wait. I saw this one but the sample site doesn't seem to work which doesn't inspire confidence.\n"
},
... |
I have a Jar file, which contains other nested Jars. When I invoke the new JarFile() constructor on this file, I get an exception which says:
java.util.zip.ZipException: error in opening zip file
When I manually unzip the contents of this Jar file and zip it up again, it works fine.
I only see this exception on WebSp... | The issue you are experiencing with the `JarFile` constructor throwing a `ZipException` when opening a JAR file that contains nested JARs, particularly in specific versions of WebSphere, could be attributed to a few different factors. Here are some considerations and potential solutions to help address the problem:
##... | 41,994 | [
{
"from": "human",
"value": "I have a Jar file, which contains other nested Jars. When I invoke the new JarFile() constructor on this file, I get an exception which says:\n\njava.util.zip.ZipException: error in opening zip file\n\nWhen I manually unzip the contents of this Jar file and zip it up again, it w... |
Is there any way to change the autonumber field to a number datatype, when the field is used a primary key and linked to other tables?
| Changing an AutoNumber field to a Number datatype in a database where it is used as a primary key and linked to other tables can be a complex operation and generally should be approached with caution. Here are the general steps you might follow, but remember to back up your database before making such changes:
1. **Ba... | 43,141 | [
{
"from": "human",
"value": "Is there any way to change the autonumber field to a number datatype, when the field is used a primary key and linked to other tables?\n"
},
{
"from": "gpt",
"value": "Changing an AutoNumber field to a Number datatype in a database where it is used as a primary key a... |
Would you recommend extreme programming practices implemented in organizations where team composition changes often?
If in an extreme programming scenario, the team becomes volatile midway, what would you recommend?
Thanks.
| Extreme Programming (XP) is a software development methodology that emphasizes flexibility, continuous feedback, and close collaboration within a team. However, XP practices can be challenging to implement in environments where team composition changes frequently. Here are some considerations and recommendations regard... | 40,183 | [
{
"from": "human",
"value": "Would you recommend extreme programming practices implemented in organizations where team composition changes often? \nIf in an extreme programming scenario, the team becomes volatile midway, what would you recommend?\nThanks.\n"
},
{
"from": "gpt",
"value": "Extreme... |
A good friend of mine works for a large asp.net shop, with a web farm with many web servers (dozens). The application logs exceptions and messages to the event log on each box (not to a centralized location).
Does anyone know of a convenient way to perform unified reporting on event logs on a number of different boxes... | To perform unified reporting on event logs across multiple web servers, there are several options you can consider, each with its own advantages and disadvantages. Here are some suggestions:
### 1. Centralized Logging Solutions
Using a centralized logging solution is generally the most efficient way to handle logging ... | 41,292 | [
{
"from": "human",
"value": "A good friend of mine works for a large asp.net shop, with a web farm with many web servers (dozens). The application logs exceptions and messages to the event log on each box (not to a centralized location).\nDoes anyone know of a convenient way to perform unified reporting on... |
I have one user who gets an error message when he closes his browser. This only happens when he has visited a page which contains my applet. It seems to have been registered as a bug at Sun but that was many years ago. He is using Java 1.6 and IE7.
Has anyone seen this before and know a solution or work-around?
java.la... | It sounds like the issue you were encountering was related to an interaction between your applet and Google Desktop, which may have been causing conflicts with how the Java applet was being managed in the browser's rendering process.
Java applets, particularly those running on older versions such as Java 1.6, can som... | 33,456 | [
{
"from": "human",
"value": "I have one user who gets an error message when he closes his browser. This only happens when he has visited a page which contains my applet. It seems to have been registered as a bug at Sun but that was many years ago. He is using Java 1.6 and IE7.\nHas anyone seen this before a... |
I have two Spring proxies set up:
<bean id="simpleBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target">
<ref local="simpleBeanTarget"/>
</property>
<property name="interceptorNames">
<list>
<value>cacheInterceptor</value>
</list>
... | It looks like you're attempting to set up a Spring AOP proxy around your `SpringDao` class using `ProxyFactoryBean`, but there may be some confusion in the wiring of your beans. Let's go through the setup and diagnose the issues you're facing.
### Key Areas to Check
1. **Bean Configuration**: Ensure that `springDaoTa... | 36,917 | [
{
"from": "human",
"value": "I have two Spring proxies set up:\n <bean id=\"simpleBean\" class=\"org.springframework.aop.framework.ProxyFactoryBean\">\n <property name=\"target\">\n <ref local=\"simpleBeanTarget\"/>\n </property>\n <property name=\"interceptorNames\">\n <list>\n ... |
I've found the following code from here "http://www.boyet.com/Articles/CodeFromInternet.html".
It returns the speed of the CPU in GHz but works only on 32bit Windows.
using System;
using System.Management;
namespace CpuSpeed
{
class Program
{
static double? GetCpuSpeedInGHz()
{
dou... | The code you've provided uses the WMI (Windows Management Instrumentation) to get the CPU speed, and it should work on both 32-bit and 64-bit versions of Windows without any changes, as WMI is designed to be compatible across different architectures.
However, if you are facing issues with this code on a 64-bit versio... | 41,708 | [
{
"from": "human",
"value": "I've found the following code from here \"http://www.boyet.com/Articles/CodeFromInternet.html\".\nIt returns the speed of the CPU in GHz but works only on 32bit Windows. \nusing System;\nusing System.Management;\n\nnamespace CpuSpeed\n{\n class Program\n {\n static ... |
is there an easy way to solve the following problem.
Let's say I fetch a IList with some books in my controller from my model. Now I want to enrich the output and fetch a preview from Amazon with another model from an outside framework and get another IList.
Now I put both ILists into a property bag.
In NVelocity I use... | To address your problem of merging two separate lists in NVelocity for rendering data in your view, you have several approaches to consider. Since both your book list and Amazon book list come from different frameworks and can't be easily merged into a single list, you'll need a strategy to efficiently access and displ... | 39,548 | [
{
"from": "human",
"value": "is there an easy way to solve the following problem.\nLet's say I fetch a IList with some books in my controller from my model. Now I want to enrich the output and fetch a preview from Amazon with another model from an outside framework and get another IList.\nNow I put both ILi... |
I have a flex client that makes service calls to a tomcat server running BlazeDS. I would like to gracefully handle server session timeouts in this environment.
I do have security constraints on the service, so the client authenticates against a remote object by initializing a ChannelSet based on the destination, and ... | Handling server session timeouts gracefully in a Flex client communicating with a BlazeDS backend involves a few steps to ensure that users are redirected back to the login page with appropriate messaging. Here's a strategy you can use to achieve this:
### 1. Server Configuration
First, ensure that your server is conf... | 39,561 | [
{
"from": "human",
"value": "I have a flex client that makes service calls to a tomcat server running BlazeDS. I would like to gracefully handle server session timeouts in this environment.\nI do have security constraints on the service, so the client authenticates against a remote object by initializing a... |
In HTML, I can find a file starting from the web server's root folder by beginning the filepath with "/". Like:
/images/some_image.jpg
I can put that path in any file in any subdirectory, and it will point to the right image.
With PHP, I tried something similar:
include("/includes/header.php");
...but that doesn't wo... | I'm glad to hear you found a solution to your issue with including files in PHP! To clarify for anyone who may face a similar situation:
1. **Using Absolute Paths in PHP**:
- When you specify a path that begins with a `/` in PHP, it refers to the root of the filesystem on the server, not the root of your web server... | 41,318 | [
{
"from": "human",
"value": "In HTML, I can find a file starting from the web server's root folder by beginning the filepath with \"/\". Like:\n/images/some_image.jpg\n\nI can put that path in any file in any subdirectory, and it will point to the right image.\nWith PHP, I tried something similar:\ninclude(... |
I've heard a lot of people asking how long information stays in Google Cache. To me, this is irrelevant (at least until someone libels my name).
| Google Cache is a feature that stores snapshots of web pages as they appeared at a certain point in time. The duration for which information remains in Google Cache can vary significantly based on several factors, including:
1. **Page Updates**: If a webpage is updated frequently, Google may recrawl it more often, res... | 43,969 | [
{
"from": "human",
"value": "I've heard a lot of people asking how long information stays in Google Cache. To me, this is irrelevant (at least until someone libels my name).\n"
},
{
"from": "gpt",
"value": "Google Cache is a feature that stores snapshots of web pages as they appeared at a certai... |
I am fortunate to be working for a company in which all of our new development efforts are all in WPF. Are there a lot of other developers out there in this situation? Are companies quickly adopting this as their primary UI platform? As developers we all see the value in it, but are companies buying into it?
| WPF (Windows Presentation Foundation) has been a popular choice for building desktop applications on Windows, especially since its introduction with .NET Framework 3.0 in 2006. Many developers appreciate WPF for its rich features, such as data binding, customizable controls, and support for modern UI design patterns. I... | 41,336 | [
{
"from": "human",
"value": "I am fortunate to be working for a company in which all of our new development efforts are all in WPF. Are there a lot of other developers out there in this situation? Are companies quickly adopting this as their primary UI platform? As developers we all see the value in it, but... |
How can I get notifications about what is the currect active window and when this changes without polling GetActiveWindow or using global hooks?
I don't like polling, and I'm working in C# and global hooks don't work (mostly).
| If you're looking to receive notifications about changes to the active window in a C# application without resorting to polling or using global hooks, you might consider using Windows message handling in combination with the `Win32` API. Unfortunately, there are limitations on what you can do purely within managed code ... | 40,633 | [
{
"from": "human",
"value": "How can I get notifications about what is the currect active window and when this changes without polling GetActiveWindow or using global hooks?\nI don't like polling, and I'm working in C# and global hooks don't work (mostly).\n"
},
{
"from": "gpt",
"value": "If you... |
I'm writing a GUI application that will let users interact with command-line programs. The programs are crystallography programs, in this case. They take a long time to run.
There's a certain common workflow using the command-line programs. The output from one program is typically processed and then is used by other... | Creating a GUI application that facilitates user interaction with command-line programs can indeed save time and effort for users. Here are some tools and frameworks that could help you achieve this:
### GUI Frameworks
1. **Tkinter (Python)**:
- **Overview**: Tkinter is the standard GUI toolkit for Python. It's ea... | 40,139 | [
{
"from": "human",
"value": "I'm writing a GUI application that will let users interact with command-line programs. The programs are crystallography programs, in this case. They take a long time to run.\nThere's a certain common workflow using the command-line programs. The output from one program is typ... |
I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array?
Basically if someone answered this question I think all my questions would be answered:
If I had 100 randomly generated numbers (as keys), h... | A hash table is a data structure that implements an associative array, a structure that can map keys to values. The main advantage of a hash table over a normal array is that it allows for faster data retrieval, insertion, and deletion operations on average, especially when dealing with large datasets. Here’s how the t... | 38,666 | [
{
"from": "human",
"value": "I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array? \nBasically if someone answered this question I think all my questions would be answered:\nIf I had ... |
If a large module is loaded by some submodule of your code, is there any benefit to referencing the module from that namespace instead of importing it again?
For example:
I have a module MyLib, which makes extensive use of ReallyBigLib. If I have code that imports MyLib, should I dig the module out like so
import MyLib... | When deciding whether to reference a module from an existing namespace or to import it again, there are a few considerations that can help you make an informed choice. Let's break down the options you provided:
1. **Referencing the module from the namespace**:
```python
import MyLib
ReallyBigLib = MyLib.SomeM... | 41,514 | [
{
"from": "human",
"value": "If a large module is loaded by some submodule of your code, is there any benefit to referencing the module from that namespace instead of importing it again?\nFor example:\nI have a module MyLib, which makes extensive use of ReallyBigLib. If I have code that imports MyLib, shoul... |
I'm trying to run dot net console application via Java:
process = Runtime.getRuntime().exec(commandLine);
I get the following output:
Detecting
The handle is invalid.
when running it directly via the console (windows) there is no problem:
Detecting
100%
Done.
100%
I'm running more applications in this form but have ... | The issue you're experiencing is due to how the standard output (stdout) and standard error (stderr) streams are handled in a Java application when invoking a .NET console application using `Runtime.exec()`. When a .NET application writes to the console, it expects to be running in an environment that supports console ... | 42,631 | [
{
"from": "human",
"value": "I'm trying to run dot net console application via Java:\nprocess = Runtime.getRuntime().exec(commandLine);\n\nI get the following output:\nDetecting\nThe handle is invalid.\n\nwhen running it directly via the console (windows) there is no problem:\nDetecting\n100%\nDone.\n100%\n... |
I am trying to test a class that manages data access in the database (you know, CRUD, essentially). The DB library we're using happens to have an API wherein you first get the table object by a static call:
function getFoo($id) {
$MyTableRepresentation = DB_DataObject::factory("mytable");
$MyTableRepresentation->ge... | To mock static methods in PHPUnit, you need to use a different approach since PHPUnit's `getMock()` does not handle static methods. Instead, you can use the `Mockery` library or make use of the `prophecy` library that comes with PHPUnit.
However, if you want to stick with PHPUnit's built-in functionality, you can refa... | 41,148 | [
{
"from": "human",
"value": "I am trying to test a class that manages data access in the database (you know, CRUD, essentially). The DB library we're using happens to have an API wherein you first get the table object by a static call:\nfunction getFoo($id) {\n $MyTableRepresentation = DB_DataObject::facto... |
I am using a .Net HtmlTextWriter to generate HTML.
try
{
htw.RenderBeginTag( HtmlTextWriterTag.Span );
htw.Write(myObject.GenerateHtml());
htw.RenderEndTag( );
}
catch (Exception e)
{
GenerateHtmlErrorMessage(htw);
}
In this example, if an error exception is fired during myObject.GenerateHtml(), I will g... | In .NET, the `HtmlTextWriter` does not have built-in functionality for rollback or undoing the writing of tags once they have been rendered. This makes it challenging to handle the scenario you've described. However, you can manage the structure of your HTML by controlling the flow and avoiding unclosed tags by using a... | 40,298 | [
{
"from": "human",
"value": "I am using a .Net HtmlTextWriter to generate HTML.\ntry\n{\n htw.RenderBeginTag( HtmlTextWriterTag.Span );\n\n htw.Write(myObject.GenerateHtml());\n\n htw.RenderEndTag( );\n}\ncatch (Exception e)\n{\n GenerateHtmlErrorMessage(htw);\n}\n\nIn this example, if an error exce... |
My if statement is always evaluating to false and not entering the <span> block. Because of which, I'm not able to get the value of "index" in the if condition, I've tried every thing appending index with # and %. Can anybody suggest the solution?
<c:forEach var="index" begin="1" end="<%=a%>" step="1">
<s:if test="... | It seems like you're experiencing issues with evaluating the `index` variable in your `<s:if>` statement within the `<c:forEach>` loop. The problem arises from the way you're trying to use the `index` variable in the Struts tag library (assuming that's what `<s:if>` and `<s:else>` refer to) within a JSTL loop.
When us... | 41,474 | [
{
"from": "human",
"value": "My if statement is always evaluating to false and not entering the <span> block. Because of which, I'm not able to get the value of \"index\" in the if condition, I've tried every thing appending index with # and %. Can anybody suggest the solution?\n<c:forEach var=\"index\" beg... |
How can I write a function that takes an array of integers and returns true if their exists a pair of numbers whose product is odd?
What are the properties of odd integers? And of course, how do you write this function in Java? Also, maybe a short explanation of how you went about formulating an algorithm for the actua... | ### Properties of Odd Integers
Odd integers are integers that are not divisible by 2. This means that:
- An integer is odd if `number % 2 != 0`.
- The product of two integers is odd only if both integers are odd. In other words, the product of any even integer with either even or odd integers is always even.
### Formu... | 41,600 | [
{
"from": "human",
"value": "How can I write a function that takes an array of integers and returns true if their exists a pair of numbers whose product is odd?\nWhat are the properties of odd integers? And of course, how do you write this function in Java? Also, maybe a short explanation of how you went ab... |
I'm tinkering with Silverlight 2.0.
I have some images, which I currently have a static URL for the image source.
Is there a way to dynamically load the image from a URL path for the site that is hosting the control?
Alternatively, a configuration setting, stored in a single place, that holds the base path for the URL,... | Yes, you can dynamically load images in Silverlight 2.0 from a URL. To accomplish this, you can either load the images directly using a dynamically constructed URL or use a configuration setting to store the base URL, allowing each image to only contain its filename.
### Method 1: Dynamically Loading the Image
You ca... | 43,365 | [
{
"from": "human",
"value": "I'm tinkering with Silverlight 2.0.\nI have some images, which I currently have a static URL for the image source.\nIs there a way to dynamically load the image from a URL path for the site that is hosting the control?\nAlternatively, a configuration setting, stored in a single ... |
I am working with:
#top ul li.corner span.right-corner:hover
{
background-image:url("images/corner-right-over.gif");
width:4px;
height:15px;
float:left;
}
#top ul li.corner span.left-corner:hover
{
background-image:url("images/corner-left-over.gif");
float:left;
width:4px;
height:15px;
... | If the `:hover` effect for your CSS selectors is not working as expected, here are a few suggestions to troubleshoot and improve the code:
1. **Check HTML Structure**: Make sure that the HTML structure matches the CSS selectors you are using. Your CSS selectors are targeting `span` elements with the classes `right-cor... | 40,604 | [
{
"from": "human",
"value": "I am working with:\n#top ul li.corner span.right-corner:hover\n{\n background-image:url(\"images/corner-right-over.gif\");\n width:4px;\n height:15px;\n float:left;\n}\n\n#top ul li.corner span.left-corner:hover\n{\n background-image:url(\"images/corner-left-over.... |
A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one. My assumption is that it's possible with some bitwise operators, but not sure.
| I’d be happy to help you with a brain-teaser! Could you please share the specific puzzle or problem that you're trying to solve? | 45,549 | [
{
"from": "human",
"value": "A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one. My assumption is that it's possible with some bitwise operators, but not sure.\n"
},
{
"from": "gpt",
"value": "I’d be happy to help you with a brain-teaser! Could y... |
I get an error when I compile this code:
using System;
public struct Vector2
{
public event EventHandler trigger;
public float X;
public float Y;
public Vector2 func()
{
Vector2 vector;
vector.X = 1;
vector.Y = 2;
return vector; // error CS0165: Use of unassigned ... | The issue you're encountering stems from the way the C# compiler handles uninitialized local variables, especially in the context of structs. In your `Vector2` struct, you've declared `vector` as a local variable in the `func()` method but haven't fully initialized it before using it in the return statement.
When a st... | 42,187 | [
{
"from": "human",
"value": "I get an error when I compile this code:\nusing System;\n\npublic struct Vector2\n{\n public event EventHandler trigger;\n\n public float X;\n public float Y;\n\n public Vector2 func()\n {\n Vector2 vector;\n vector.X = 1;\n vector.Y = 2;\n ... |
A few weeks ago I started using Core Data for the first time in a non-trivial application. One of the things that surprised and confused me was how error handling works. To give an example, one of the first things I tried was setting my data file as "locked" in Finder, to order to make sure I was properly handling the ... | Error handling in Core Data, as you've observed, can sometimes feel inconsistent or confusing, especially when transitioning from a more traditional error handling pattern to one that relies heavily on NSError objects and exceptions.
### General Guidelines for Error Handling in Core Data
1. **Use `NSError` for Expect... | 39,853 | [
{
"from": "human",
"value": "A few weeks ago I started using Core Data for the first time in a non-trivial application. One of the things that surprised and confused me was how error handling works. To give an example, one of the first things I tried was setting my data file as \"locked\" in Finder, to orde... |
I have a row of buttons, which all create a pdf file which I want to open in a new tab.
This way the button page stays on top, and the pdf's open to get printed. To prevent clicking a button twice I disable the button, like this (I use python):
<input type='submit' value='Factureren' name='submitbutton' id='%s'
onclick... | This issue you're encountering with Internet Explorer is due to how it processes events, specifically the `onclick` event in this case. When the button is clicked, the form submission can interrupt the execution of the JavaScript that follows, resulting in the behavior you've described.
To address this problem, you ca... | 42,051 | [
{
"from": "human",
"value": "I have a row of buttons, which all create a pdf file which I want to open in a new tab.\nThis way the button page stays on top, and the pdf's open to get printed. To prevent clicking a button twice I disable the button, like this (I use python):\n<input type='submit' value='Fact... |
Could you tell me how to translate the following SQL code to Linq To SQL or Linq To Entites?
The correct SQL code is:
select CollectId,url,userid,pubtime
from Collect group by
url,collectid,userid,pubtime having
pubtime >= (select max(pubtime) from
collect d where d.url = collect.url )
order by Collect.pu... | To translate the provided SQL code into LINQ to SQL or LINQ to Entities, we can break down the SQL query and recreate it using LINQ syntax.
### SQL Query Explanation:
1. **Select Columns**: You are selecting `CollectId`, `Url`, `UserId`, and `PubTime`.
2. **Group By**: You are grouping by `Url`, `CollectId`, `UserId`,... | 38,045 | [
{
"from": "human",
"value": "Could you tell me how to translate the following SQL code to Linq To SQL or Linq To Entites?\nThe correct SQL code is: \n\nselect CollectId,url,userid,pubtime\n from Collect group by\n url,collectid,userid,pubtime having\n pubtime >= (select max(pubtime) from\n collect d wh... |
I need to monitor number of the facebook group users and display it on the website. I know that it is possible to get User IDs using their API, but they are limited to 500 only (if the total number of members is 500+).
What would be the easiest way to get total number of members that signed up to a Facebook Group that... | As of my last knowledge update in October 2023, Facebook provides a limited set of APIs and tools to access data related to Facebook Groups. Here’s a breakdown of your options for monitoring the number of members in your Facebook Group:
### 1. **Facebook Graph API:**
- The Facebook Graph API allows you to retrieve ... | 38,481 | [
{
"from": "human",
"value": "I need to monitor number of the facebook group users and display it on the website. I know that it is possible to get User IDs using their API, but they are limited to 500 only (if the total number of members is 500+). \nWhat would be the easiest way to get total number of membe... |
I'm building a pretty basic HTML table creator/editor (based on a designMode iframe) at work, using direct DOM manipulation. It's a pain, obviously due to Internet Explorer.
When in designMode, a table inserted into the editing area iframe is resizable and the contents of the cells can be freely edited. In Firefox, row... | Implementing cross-browser compatibility for table editing in a designMode iframe, particularly with the challenges posed by IE6/7, can indeed be a complex task. jQuery can simplify DOM manipulation significantly, but you will still need to handle certain edge cases specific to IE.
Here's a breakdown of how you might ... | 38,177 | [
{
"from": "human",
"value": "I'm building a pretty basic HTML table creator/editor (based on a designMode iframe) at work, using direct DOM manipulation. It's a pain, obviously due to Internet Explorer.\nWhen in designMode, a table inserted into the editing area iframe is resizable and the contents of the c... |
Is there any supported way of mapping datetimeoffset the new datatype in SQL 2008 to the System.DateTimeOffset using nhibernate?
| Yes, NHibernate supports mapping the `datetimeoffset` data type in SQL Server 2008 to `System.DateTimeOffset` in .NET. You can achieve this by configuring your mapping files or using Fluent NHibernate.
### Using XML Mapping Files
If you are using XML mapping files, you can map a property of type `DateTimeOffset` to a... | 42,749 | [
{
"from": "human",
"value": "Is there any supported way of mapping datetimeoffset the new datatype in SQL 2008 to the System.DateTimeOffset using nhibernate?\n"
},
{
"from": "gpt",
"value": "Yes, NHibernate supports mapping the `datetimeoffset` data type in SQL Server 2008 to `System.DateTimeOff... |
How can I resume a dehydrated orchestration ?
the orchestration in question should have been retrieving messages from a MSMQ queue
but the userid permission wasn't set on the queue, so the BizTalk box wasn't able to read from the queue
Corrected the permissions, but the only options are teminate and suspend ?
| In BizTalk Server, when an orchestration is dehydrated, it means that it is persisted to the database and is not currently in memory. If you are facing issues where your orchestration is in a state that doesn't allow you to resume it normally, here's how you can handle this situation:
### Steps to Resume a Dehydrated ... | 41,492 | [
{
"from": "human",
"value": "How can I resume a dehydrated orchestration ?\n\nthe orchestration in question should have been retrieving messages from a MSMQ queue\nbut the userid permission wasn't set on the queue, so the BizTalk box wasn't able to read from the queue\n\nCorrected the permissions, but the o... |
I'm bored with surrounding code with try catch like this..
try
{
//some boring stuff
}
catch(Exception ex)
{
//something even more boring stuff
}
I would like something like
SurroundWithTryCatch(MyMethod)
I know I can accomplish this behaviour by creating a delegate with the exact signature of the function, b... | If you're looking for a more concise way to surround method calls with a `try-catch` block, there are a few options that you might find useful. While creating a delegate might be cumbersome, you can consider the following alternatives:
### 1. Use a Helper Method
You can create a generic helper method that takes an `A... | 41,441 | [
{
"from": "human",
"value": "I'm bored with surrounding code with try catch like this..\ntry\n{\n //some boring stuff\n}\ncatch(Exception ex)\n{\n //something even more boring stuff\n}\n\nI would like something like\nSurroundWithTryCatch(MyMethod)\n\nI know I can accomplish this behaviour by creating ... |
I have a MySQL instance running locally on port 3306, but for some legacy apps I also want to make it available on port 3305 (don't ask). Is there an easy way to do this on OS X, so that if I try to connect on either 3305 or 3306 they will both go to the MySQL server on 3306?
| Yes, you can achieve this by using the `socat` command, which creates a two-way data relay between two endpoints. This is a great solution for your use case where you want to redirect connections from port 3305 to your MySQL instance running on port 3306.
Here’s how you can set it up on OS X:
### Step 1: Install `soc... | 40,841 | [
{
"from": "human",
"value": "I have a MySQL instance running locally on port 3306, but for some legacy apps I also want to make it available on port 3305 (don't ask). Is there an easy way to do this on OS X, so that if I try to connect on either 3305 or 3306 they will both go to the MySQL server on 3306?\n"... |
I need to populate a context menu from a database at run time. I do not know the number of items that will be in the list, so I would like to handle the click event in a single place. How do I declare the handler so I can tell which menu item actually triggered the click.
Public Function GetBookmarkContextMenu(ByVal ... | In order to determine which dynamically created menu item was clicked in your `ForwardToList_Click` event handler, you can use the `sender` parameter that is passed to the event handler. This `sender` parameter refers to the object that raised the event, which in this case would be the `MenuItem` that was clicked.
You... | 36,459 | [
{
"from": "human",
"value": "I need to populate a context menu from a database at run time. I do not know the number of items that will be in the list, so I would like to handle the click event in a single place. How do I declare the handler so I can tell which menu item actually triggered the click.\nPub... |
I'm using Junit 4.4 and Ant 1.7. If a test case fails with an error (for example because a method threw an unexpected exception) I don't get any details about what the error was.
My build.xml looks like this:
<target name="test" depends="compile">
<junit printsummary="withOutAndErr" filtertrace="no" fork="yes" haltonf... | To get more detailed information about errors in your JUnit tests when using Ant, you can adjust your `build.xml` configuration a bit. Specifically, you can make use of the `formatter` element to output more detailed information about the test results, including any errors that occur.
Here's an updated version of you... | 43,010 | [
{
"from": "human",
"value": "I'm using Junit 4.4 and Ant 1.7. If a test case fails with an error (for example because a method threw an unexpected exception) I don't get any details about what the error was.\nMy build.xml looks like this:\n<target name=\"test\" depends=\"compile\">\n<junit printsummary=\"w... |
Well I would like to make a custom run dialog within my program so that the user can test commands without opening it themselves. The only problem is, msdn does not provide any coverage on this. If I cannot make my own custom run dialog and send the data to shell32.dll (where the run dialog is stored) I will settle for... | To open the Run dialog from a C++ program, you can make use of the `ShellExecute` function. This function allows you to execute a command or open a specified document or program. However, there isn't a direct API to open the Run dialog specifically, but you can use the `winver` command, which will call the Run dialog i... | 41,651 | [
{
"from": "human",
"value": "Well I would like to make a custom run dialog within my program so that the user can test commands without opening it themselves. The only problem is, msdn does not provide any coverage on this. If I cannot make my own custom run dialog and send the data to shell32.dll (where th... |
I'm creating a web application for work where the user has to enter the name of the person that requested the job. I'd like to create a simple AJAX auto-suggest dropdown so they don't need to type the entire name. On the backend, the database will provide suggestions based on previous entries. The website is built u... | For implementing an AJAX auto-suggest dropdown in a CakePHP 1.1 application, you have several options. Given that you are looking for something fast and easy to implement, here are two popular JavaScript libraries that you might consider:
### 1. jQuery UI Autocomplete
**Pros:**
- Simple to implement, especially if you... | 34,027 | [
{
"from": "human",
"value": "I'm creating a web application for work where the user has to enter the name of the person that requested the job. I'd like to create a simple AJAX auto-suggest dropdown so they don't need to type the entire name. On the backend, the database will provide suggestions based on ... |
I have seen a few questions about how to interview potential employees and employers, but this is something fairly important that I've come across in the past and I'm sure a lot of other users here will have too:
If you are running a small development company, consultancy or working freelance, what are the warning sign... | Identifying potential red flags in a client is crucial for ensuring a healthy working relationship and protecting your time and resources as a developer, consultant, or freelancer. Here are some common warning signs to watch out for, along with suggestions on how to handle them:
### Red Flags to Look For:
1. **Poor C... | 38,596 | [
{
"from": "human",
"value": "I have seen a few questions about how to interview potential employees and employers, but this is something fairly important that I've come across in the past and I'm sure a lot of other users here will have too:\nIf you are running a small development company, consultancy or wo... |
I'm using a java.util.concurrent.ExecutorService that I obtained by calling Executors.newSingleThreadExecutor(). This ExecutorService can sometimes stop processing tasks, even though it has not been shutdown and continues to accept new tasks without throwing exceptions. Eventually, it builds up enough of a queue that m... | The behavior you're observing with `Executors.newSingleThreadExecutor()` and the `ExecutorService` you created is somewhat expected but can be clarified.
1. **Single Thread Execution**: As the name suggests, a `SingleThreadExecutor` uses a single worker thread to process the tasks. If that thread encounters an except... | 41,609 | [
{
"from": "human",
"value": "I'm using a java.util.concurrent.ExecutorService that I obtained by calling Executors.newSingleThreadExecutor(). This ExecutorService can sometimes stop processing tasks, even though it has not been shutdown and continues to accept new tasks without throwing exceptions. Eventual... |
Here is my code
var SearchUser = (from u in db.Users
join l in db.LoggedInUsers on u.UserID equals l.UserID
where u.Username==txtSearch.Text
select u).SingleOrDefault();
litUsers.Text = "<div style='background-color:#B0C4DE;color:red'>"
+ "<a href=\... | Yes, it is indeed possible to add a query string to the anchor tag in your code. You can append the session variable as a query string parameter to the URL in the `href` attribute of your anchor tag.
Assuming you have a session variable (e.g., `Session["UserID"]`) that you want to include in the query string, you can ... | 41,032 | [
{
"from": "human",
"value": "Here is my code\nvar SearchUser = (from u in db.Users\n join l in db.LoggedInUsers on u.UserID equals l.UserID\n where u.Username==txtSearch.Text\n select u).SingleOrDefault();\n\nlitUsers.Text = \"<div style='background-color:#... |
I have the following entity class (in Groovy):
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
@Entity
public class ServerNode {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Long id
String firstName
String la... | To ensure that Hibernate automatically creates or updates the tables based on your entity classes when you run your script, you need to properly configure the `hbm2ddl.auto` property in your `persistence.xml` file. The value you currently have set is `create`, which means that Hibernate will create the schema every tim... | 40,068 | [
{
"from": "human",
"value": "I have the following entity class (in Groovy):\nimport javax.persistence.Entity\nimport javax.persistence.Id\nimport javax.persistence.GeneratedValue\nimport javax.persistence.GenerationType\n\n@Entity\npublic class ServerNode {\n\n @Id\n @GeneratedValue(strategy = GenerationT... |
I have to work on several VB6 legacy projects and despite some good VB6 plugins (CodeSMART for example) I hate the IDE more and more, especially now where I have the opportunity to work with Java/Netbeans on a new project. Unfortunatly it will stay that way at least the next few years.
So I'm asking myself: Can the Net... | Extending the NetBeans IDE to support Visual Basic 6 (VB6) projects is definitely a complex but potentially rewarding endeavor. While NetBeans is primarily designed for Java and a few other mainstream languages, it does have a flexible plugin architecture that allows you to add support for other languages and features.... | 36,700 | [
{
"from": "human",
"value": "I have to work on several VB6 legacy projects and despite some good VB6 plugins (CodeSMART for example) I hate the IDE more and more, especially now where I have the opportunity to work with Java/Netbeans on a new project. Unfortunatly it will stay that way at least the next few... |
I am looking for a reference describing precisely the XML project file format used by CodeWarrior. I managed to find XSD files for recent versions of Visual C++ (here), could anyone point me to some equivalent for CodeWarrior?
| Finding a specific reference for the XML project file format used by CodeWarrior can be a bit challenging, as detailed documentation may not always be publicly available. However, here are some steps and resources you can explore:
1. **CodeWarrior Documentation**: Check the official documentation provided with your ve... | 42,783 | [
{
"from": "human",
"value": "I am looking for a reference describing precisely the XML project file format used by CodeWarrior. I managed to find XSD files for recent versions of Visual C++ (here), could anyone point me to some equivalent for CodeWarrior?\n"
},
{
"from": "gpt",
"value": "Finding... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.