instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I am implementing a BFS, and what it is going to do is go through an ordered tree to find the shortest solution to a puzzle.
What i will be doing is creating a Snapshot object that holds the current position of each piece in a puzzle. I will add this Snapshot object into the queue and check if it is the solution. Howev... | In your implementation of BFS for solving a puzzle, you don't need to create separate variable names like `snapshot2`, `snapshot3`, etc., for each `Snapshot` object. Instead, you can use a data structure, such as a list or an array, to manage multiple `Snapshot` instances.
When you create a new `Snapshot`, you can sim... | 32,845 | [
{
"from": "human",
"value": "I am implementing a BFS, and what it is going to do is go through an ordered tree to find the shortest solution to a puzzle.\nWhat i will be doing is creating a Snapshot object that holds the current position of each piece in a puzzle. I will add this Snapshot object into the qu... |
I am working on making quicksort parallel, threads being the first attempt. The non threaded version sorts correctly but the threaded doesn't (no surprise there). What I found interesting was when I removed the threads but kept the boost::bind calls it still doesn't work. If boost::bind isn't what I want please offe... | The issue you're encountering is due to the way you're using `boost::bind` and how function calls are managed in C++. Let's go through your implementation and identify the problems.
### Problems with Your Implementation
1. **Using `boost::bind` without invoking**: When you do `boost::bind( &Quicksort, Array, Left, pi... | 31,500 | [
{
"from": "human",
"value": "I am working on making quicksort parallel, threads being the first attempt. The non threaded version sorts correctly but the threaded doesn't (no surprise there). What I found interesting was when I removed the threads but kept the boost::bind calls it still doesn't work. If ... |
I am having a peculiar problem with the order in which FlowLayoutPanels are added in to the form's controls property. This is what I tried,
I added 7 FlowLayoutPanels in to a C# window application from left to right in vertical strips. Then I tagged the flow layouts as 1, 2, 3, ... 7 again from left to right. Now in th... | The behavior you're observing with the `FlowLayoutPanel` controls being listed in reverse order is due to how Windows Forms manages controls in the `Controls` collection. When you add controls to a `FlowLayoutPanel`, they are organized based on their layout logic (which can affect the order in which they are stored in ... | 33,087 | [
{
"from": "human",
"value": "I am having a peculiar problem with the order in which FlowLayoutPanels are added in to the form's controls property. This is what I tried,\nI added 7 FlowLayoutPanels in to a C# window application from left to right in vertical strips. Then I tagged the flow layouts as 1, 2, 3,... |
Is it possible to have the StripesDispatcher be the sole determiner of webserver urls by looking at the @UrlBinding annotations on action beans AND also having those action beans forward to pre-compiled JSPs / servlets WITHOUT needing to define and maintain <servlet> <servlet-mapping> pairs in web.xml? Basically, I jus... | Yes, it is possible to achieve what you want using a framework that supports annotations for URL mapping, such as Stripes. The Stripes framework allows you to define URL bindings directly on your action beans using the `@UrlBinding` annotation, which eliminates the need to configure `servlet` and `servlet-mapping` in t... | 30,703 | [
{
"from": "human",
"value": "Is it possible to have the StripesDispatcher be the sole determiner of webserver urls by looking at the @UrlBinding annotations on action beans AND also having those action beans forward to pre-compiled JSPs / servlets WITHOUT needing to define and maintain <servlet> <servlet-ma... |
I'm using Hibernate for a Java-based Web Application and want to add full-text search via Compass. Compass is supposed to support that, but fails to provide any useful Getting Started guide.
I could figure out that I have to annotate my Entities with @Searchable and the various @SearchableXXX variations and accessing C... | It seems you're trying to integrate Compass for full-text search in a Java-based web application that uses Hibernate with Spring. The issue you're facing appears to be related to event listener configuration in your Hibernate setup.
Here's a step-by-step approach to help you troubleshoot and set up Compass with Hibern... | 27,983 | [
{
"from": "human",
"value": "I'm using Hibernate for a Java-based Web Application and want to add full-text search via Compass. Compass is supposed to support that, but fails to provide any useful Getting Started guide.\nI could figure out that I have to annotate my Entities with @Searchable and the various... |
I'm writing a Rails plugin that includes some partials. I'd like to test the partials, but I'm having a hard time setting up a test that will render them. There's no associated controller, so I'm just faking one:
require 'action_controller'
require 'active_support'
require 'action_pack'
require 'action_view'
class M... | Rendering partials in a Rails plugin without an associated controller can indeed be tricky. However, using `ActionView` directly to render the partial can simplify this process. Below is an example of how you can set up your test for rendering a partial using `ActionView`.
Make sure you have the required dependencies ... | 34,010 | [
{
"from": "human",
"value": "I'm writing a Rails plugin that includes some partials. I'd like to test the partials, but I'm having a hard time setting up a test that will render them. There's no associated controller, so I'm just faking one:\nrequire 'action_controller'\nrequire 'active_support'\nrequire ... |
I have a query that works on Postgresql 7.4 but not on Postgresql 8.3 with same database.
Query:
SELECT * FROM login_session WHERE (now()-modified) > timeout;
Gets the following error:
ERROR: operator does not exist: interval > integer
LINE 1: ...ELECT * FROM login_session WHERE (now()-modified) > timeout ...
... | The error you are encountering in PostgreSQL 8.3 is due to stricter type checking compared to PostgreSQL 7.4. In your query, you are trying to compare an interval (the result of `now() - modified`) with an integer (`timeout`). This comparison is not valid in PostgreSQL 8.3.
In PostgreSQL, `now()` returns a timestamp, ... | 34,527 | [
{
"from": "human",
"value": "I have a query that works on Postgresql 7.4 but not on Postgresql 8.3 with same database.\nQuery:\nSELECT * FROM login_session WHERE (now()-modified) > timeout;\n\nGets the following error:\nERROR: operator does not exist: interval > integer\nLINE 1: ...ELECT * FROM login_sessi... |
No extracted data output to data2.txt? What goes wrong to the code?
MyFile.txt
ex1,fx2,xx1
mm1,nn2,gg3
EX1,hh2,ff7
This is my desired output in data2.txt:
ex1,fx2,xx1
EX1,hh2,ff7
#! /DATA/PLUG/pvelasco/Softwares/PERLINUX/bin/perl -w
my $infile ='My1.txt';
my $outfile ='data2.txt';
open IN, '<', $infile or die "... | It looks like you are trying to filter lines from `MyFile.txt` and write specific lines to `data2.txt`. However, there are a couple of issues in your code. Here are the main problems and their solutions:
1. **File Naming**: Your input file is named `MyFile.txt` but you are trying to read from `My1.txt`. Make sure to c... | 30,901 | [
{
"from": "human",
"value": "No extracted data output to data2.txt? What goes wrong to the code?\nMyFile.txt\nex1,fx2,xx1\nmm1,nn2,gg3\nEX1,hh2,ff7\n\nThis is my desired output in data2.txt:\nex1,fx2,xx1\nEX1,hh2,ff7\n\n\n#! /DATA/PLUG/pvelasco/Softwares/PERLINUX/bin/perl -w\n\nmy $infile ='My1.txt';\nmy $... |
I'm still working with this huge list of URLs, all the help I have received has been great.
At the moment I have the list looking like this (17000 URLs though):
http://www.example.com/page?CONTENT_ITEM_ID=1
http://www.example.com/page?CONTENT_ITEM_ID=3
http://www.example.com/page?CONTENT_ITEM_ID=2
http://www.example.c... | To achieve the desired output of counting unique URLs and their occurrences, you can use various methods. Given that you're working with a large number of URLs, using a scripting language that efficiently handles text processing can be a good approach. Here's an example using Python and Bash.
### Method 1: Using Pytho... | 32,948 | [
{
"from": "human",
"value": "I'm still working with this huge list of URLs, all the help I have received has been great.\nAt the moment I have the list looking like this (17000 URLs though):\n\nhttp://www.example.com/page?CONTENT_ITEM_ID=1\nhttp://www.example.com/page?CONTENT_ITEM_ID=3\nhttp://www.example.c... |
I've been reading about "web services" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description?
If I make a simple website using PHP that just, say, prints a random integer to the page... is this a "web service"? If not, why not?
| In plain English, a **web service** is a way for different applications or systems to communicate with each other over the internet using standard protocols. It allows different software programs to exchange data and request services, regardless of the languages they are written in or the platforms they run on.
### Ke... | 32,769 | [
{
"from": "human",
"value": "I've been reading about \"web services\" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description?\nIf I make a simple website using PHP that just, say, prints a random integer to the page... is this a ... |
Am I able to integrate Apache Nutch crawler with the Solr Index server?
Edit:
One of our devs came up with a solution from these posts
Running Nutch and Solr
Update for Running Nutch and Solr
Answer
Yes
| Yes, you can integrate Apache Nutch with Apache Solr. Nutch is a web crawler that can be configured to fetch data from the web, while Solr is an open-source search platform built on Apache Lucene. The integration allows you to index the content fetched by Nutch into Solr, making it searchable.
Here are the general ste... | 31,347 | [
{
"from": "human",
"value": "Am I able to integrate Apache Nutch crawler with the Solr Index server?\nEdit:\nOne of our devs came up with a solution from these posts\n\nRunning Nutch and Solr\nUpdate for Running Nutch and Solr\n\nAnswer\nYes\n"
},
{
"from": "gpt",
"value": "Yes, you can integrat... |
do you have idea, if there would be some nice way to browse/log JMS queues? (I'm using OpenJMS)
For topics I can just add one consumer more and that's about it but with queues I haven't finished with a solution yet. I would like to log all the messages in certain queues and topics without "popping" them from the queue ... | Logging messages from JMS queues without consuming them can indeed be a challenging task due to the nature of the queue semantics, where messages are typically removed from the queue once they are consumed. Your approach using a second queue for logging purposes is a common pattern, but here are several options you can... | 32,793 | [
{
"from": "human",
"value": "do you have idea, if there would be some nice way to browse/log JMS queues? (I'm using OpenJMS)\nFor topics I can just add one consumer more and that's about it but with queues I haven't finished with a solution yet. I would like to log all the messages in certain queues and top... |
I have a git repository which tracks an svn repository. I cloned it using --stdlayout.
I created a new local branch via git checkout -b foobar
Now I want this branch to end up in …/branches/foobar in the svn repository.
How do I go about that?
(snipped lots of investigative text. see question history if you care)
| To push your new local branch (`foobar`) to the Subversion (SVN) repository under the `branches/foobar` path, you can follow these steps:
1. **Make sure you are on the `foobar` branch**:
First, ensure you are currently on the branch that you want to push to SVN. You can check this by running:
```bash
git bra... | 31,243 | [
{
"from": "human",
"value": "I have a git repository which tracks an svn repository. I cloned it using --stdlayout.\nI created a new local branch via git checkout -b foobar\nNow I want this branch to end up in …/branches/foobar in the svn repository.\nHow do I go about that?\n(snipped lots of investigative ... |
How can I customise the Site Actions menu to remove or rename 'standard' menu items? Where are the site actions menu items defined?
| Customizing the Site Actions menu in SharePoint (or other platforms that have similar features) can often involve different methods depending on the platform version you are using (SharePoint Online, SharePoint Server, etc.). Below, I'll outline general approaches to customize the Site Actions menu, including how to re... | 31,450 | [
{
"from": "human",
"value": "How can I customise the Site Actions menu to remove or rename 'standard' menu items? Where are the site actions menu items defined? \n"
},
{
"from": "gpt",
"value": "Customizing the Site Actions menu in SharePoint (or other platforms that have similar features) can o... |
I have a multiline text string (e.g. "Stuff\nMore Stuff\nYet More Stuff"), and I want to paint it, along with a bitmap into a tooltip. Since I am painting the bitmap, I need to set OwnerDraw to true, which I am doing. I am also handling the Popup event, so I can size the tooltip to be large enough to hold the text and... | Your approach for drawing the tooltip with both an image and multiline text looks good overall. You are correctly reserving space for the bitmap and offsetting the text so it doesn't overlap with the image. The only adjustment you might consider is ensuring that the text is drawn with proper alignment, especially since... | 32,615 | [
{
"from": "human",
"value": "I have a multiline text string (e.g. \"Stuff\\nMore Stuff\\nYet More Stuff\"), and I want to paint it, along with a bitmap into a tooltip. Since I am painting the bitmap, I need to set OwnerDraw to true, which I am doing. I am also handling the Popup event, so I can size the to... |
An initial draft of requirements specification has been completed and now it is time to take stock of requirements, review the specification. Part of this process is to make sure that there are no sizeable gaps in the specification. Needless to say that the gaps lead to highly inaccurate estimates, inevitable scope cre... | Pinpointing missing and implicit requirements in a requirements specification can be challenging, but there are several practical techniques that can help identify these gaps efficiently. Here are some effective methods:
### 1. **User Story Mapping**
- **Technique**: Create a user story map that visualizes the user... | 28,994 | [
{
"from": "human",
"value": "An initial draft of requirements specification has been completed and now it is time to take stock of requirements, review the specification. Part of this process is to make sure that there are no sizeable gaps in the specification. Needless to say that the gaps lead to highly i... |
I'm thinking about how to do this, but I have several different shapes of Data in my Database, Articles, NewsItems, etc.
They All have something in common, they all have IDs (in the DB they're named ArticleID, NewsID etc. )
They all have a Title
They all have BodyText.
They all have a Status
They all have a DateAdded... | Yes, what you're looking to achieve is definitely possible using Object-Relational Mapping (ORM) techniques. You can create a base class (or a master class) for your common properties and then have your specific content types inherit from this base class. This approach allows you to work with a common type across diffe... | 29,893 | [
{
"from": "human",
"value": "I'm thinking about how to do this, but I have several different shapes of Data in my Database, Articles, NewsItems, etc. \nThey All have something in common, they all have IDs (in the DB they're named ArticleID, NewsID etc. )\nThey all have a Title\nThey all have BodyText.\nThe... |
I'm starting to investigate T4 for Code Generation.
I get that you have a basic template in which you can embed little chunks of c#/vb which can perform clever stuff...
<#@ template language="VB" debug="True" hostspecific="True" #>
<#@ output extension=".vb" debug="True" hostspecific="True" #>
Imports System
<#For Each... | Certainly! You can achieve this by defining a separate class within your T4 template where you can write your `WriteX` methods. This class can include functions that generate code based on the parameters you pass to them.
Here's an example of how to structure your T4 template according to your requirements:
```vb
<#... | 30,967 | [
{
"from": "human",
"value": "I'm starting to investigate T4 for Code Generation.\nI get that you have a basic template in which you can embed little chunks of c#/vb which can perform clever stuff...\n<#@ template language=\"VB\" debug=\"True\" hostspecific=\"True\" #>\n<#@ output extension=\".vb\" debug=\"T... |
I want to programmatically disable the notification I get when I connect to a wireless network. I know there is a way to disable ALL notifications (see here) but is there a way to only disable the one issued by Windows wireless Manager (i.e. wlanapi.dll).
| Disabling specific notifications from the Windows Wireless Manager can be a bit tricky since Windows does not provide granular controls to manage notifications from specific system components through the standard user interface. However, there are a few approaches you might consider:
### 1. Group Policy Editor (for Wi... | 32,619 | [
{
"from": "human",
"value": "I want to programmatically disable the notification I get when I connect to a wireless network. I know there is a way to disable ALL notifications (see here) but is there a way to only disable the one issued by Windows wireless Manager (i.e. wlanapi.dll).\n"
},
{
"from":... |
I've honestly tried this left and right and still find that my mirror server, set up as a replication slave still lags behind. My app's user base keeps growing and now Ive reached the point where I can't keep "shutting down" to "resync" databases (not even on weekends).
Anyways, my question: Are there any plausible, af... | It sounds like you're experiencing performance issues with your current database replication setup, particularly with binlog replication. Here are several alternatives and strategies you might consider to alleviate the lag and improve your replication setup without needing to shut down your servers frequently:
1. **As... | 31,864 | [
{
"from": "human",
"value": "I've honestly tried this left and right and still find that my mirror server, set up as a replication slave still lags behind. My app's user base keeps growing and now Ive reached the point where I can't keep \"shutting down\" to \"resync\" databases (not even on weekends).\nAny... |
I am maintaining a website with currently about 800 concurrent users. The business plan says that this number will be 10x higher in one year.
This is my current configuration:
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="500" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"... | To prepare your website for a significant increase in concurrent users from 800 to 8,000, you'll need to make adjustments to your server configuration to handle the increased load. Here are some recommendations and considerations for tuning your JBoss configuration:
### Thread Configuration
1. **Increase `maxThreads`... | 27,921 | [
{
"from": "human",
"value": "I am maintaining a website with currently about 800 concurrent users. The business plan says that this number will be 10x higher in one year.\nThis is my current configuration:\n<Connector port=\"8080\" address=\"${jboss.bind.address}\"\n maxThreads=\"500\" maxHttpHeaderSize=\"... |
With which version(s) of VS2008/VSTS can I work with .dbproj files?
| In Visual Studio 2008, .dbproj files are associated with the Database Project feature, which is part of Visual Studio Team System (VSTS) for Database Professionals. This feature is specifically available in the **Visual Studio Team System 2008 Database Edition**.
So, if you want to work with .dbproj files, you will ne... | 36,145 | [
{
"from": "human",
"value": "With which version(s) of VS2008/VSTS can I work with .dbproj files?\n"
},
{
"from": "gpt",
"value": "In Visual Studio 2008, .dbproj files are associated with the Database Project feature, which is part of Visual Studio Team System (VSTS) for Database Professionals. T... |
I'm trying to collect wifi Bssid and Rssi information on Windows, and am looking for the most reliable way to do that across as many versions of Windows as possible. With Vista it's easy using Win32 calls with the Wireless LAN API. That API exists on XP SP2 (sometimes) and SP3, but as far as I can tell it doesn't suppo... | Collecting WiFi BSSID and RSSI information across various versions of Windows can be quite challenging, especially with the limitations and differences in available APIs. Here's a breakdown of the options you can explore, focusing on how to get this information reliably on Windows XP and later versions.
### 1. **Win32... | 26,294 | [
{
"from": "human",
"value": "I'm trying to collect wifi Bssid and Rssi information on Windows, and am looking for the most reliable way to do that across as many versions of Windows as possible. With Vista it's easy using Win32 calls with the Wireless LAN API. That API exists on XP SP2 (sometimes) and SP3, ... |
OK, so I've read through various posts about teaching beginner's to program, and there were some helpful things I will look at more closely. But what I want to know is whether there are any effective tools out there to teach a kid Java specifically?
I want to teach him Java specifically because (a) with my strong ba... | Teaching an 8-year-old Java is a wonderful idea, especially given your background and the growing importance of programming skills. There are several tools and frameworks that can help make learning Java engaging and accessible for beginners, especially for kids.
### Learning Resources and Tools for Java
1. **Greenfo... | 27,328 | [
{
"from": "human",
"value": "OK, so I've read through various posts about teaching beginner's to program, and there were some helpful things I will look at more closely. But what I want to know is whether there are any effective tools out there to teach a kid Java specifically? \nI want to teach him Java ... |
I would like to evaluate .NET as a development platform for a desktop application. I am looking for good examples of .NET desktop applications used in the mainstream. The only ones I know of are:
Visual Studio (The copy website form
is one example.)
Team Explorer UI
Paint.NET
Reflector
Gnome Do (An app launcher for Gn... | Certainly! .NET is a robust framework that has been used to develop a wide range of desktop applications. Here are some examples, including open-source and freeware options, along with a brief description of each:
### Open Source .NET Desktop Applications
1. **MonoGame**:
- **Description**: A popular framework for... | 19,460 | [
{
"from": "human",
"value": "I would like to evaluate .NET as a development platform for a desktop application. I am looking for good examples of .NET desktop applications used in the mainstream. The only ones I know of are:\n\nVisual Studio (The copy website form\nis one example.)\nTeam Explorer UI\nPaint.... |
(Note: This is for MySQL's SQL, not SQL Server.)
I have a database column with values like "abc def GHI JKL". I want to write a WHERE clause that includes a case-insensitive test for any word that begins with a specific letter. For example, that example would test true for the letters a,c,g,j because there's a 'word' b... | To perform a case-insensitive search for words that begin with a specific letter in a MySQL database without using full-text indexing, you can use the `LIKE` operator along with the `LOWER()` function to normalize the case of your string.
You can achieve this by using a combination of `LIKE` and the `REPLACE()` functi... | 32,009 | [
{
"from": "human",
"value": "(Note: This is for MySQL's SQL, not SQL Server.)\nI have a database column with values like \"abc def GHI JKL\". I want to write a WHERE clause that includes a case-insensitive test for any word that begins with a specific letter. For example, that example would test true for th... |
If I have a property that I want to let inheritors write to, but keep readonly externally, what is the preferred way to implement this? I usually go with something like this:
private object m_myProp;
public object MyProp
{
get { return m_myProp; }
}
protected void SetMyProp(object value)
{
m_myProp = value;
}
... | Your approach is a common and effective way to provide a read-only property externally while allowing derived classes to modify it. However, there are a few alternative methods and improvements you could consider to make the implementation more idiomatic and clear in C#. Here are a couple of suggestions:
### 1. Using ... | 32,786 | [
{
"from": "human",
"value": "If I have a property that I want to let inheritors write to, but keep readonly externally, what is the preferred way to implement this? I usually go with something like this:\nprivate object m_myProp;\npublic object MyProp\n{\n get { return m_myProp; }\n}\nprotected void SetM... |
I have a problem applying the DebuggerDisplay attribute on a generic class:
[DebuggerDisplay("--foo--")]
class Foo
{
}
[DebuggerDisplay("Bar: {t}")]
class Bar<T>
{
public T t;
}
When inspecting an object of type Bar<Foo> I would expect it to show as Bar: --foo--, but I get Bar: {Foo}
What am I doing wrong?
| The issue you're encountering arises from how the `DebuggerDisplay` attribute works with generics and the evaluation of properties. In your case, the `{t}` in the `DebuggerDisplay` attribute does not automatically evaluate the `DebuggerDisplay` attribute of the type `T` (which is `Foo` in your example).
To achieve the... | 31,730 | [
{
"from": "human",
"value": "I have a problem applying the DebuggerDisplay attribute on a generic class:\n[DebuggerDisplay(\"--foo--\")]\nclass Foo\n{\n}\n\n[DebuggerDisplay(\"Bar: {t}\")]\nclass Bar<T>\n{\n public T t;\n}\n\nWhen inspecting an object of type Bar<Foo> I would expect it to show as Bar: --... |
So after installing NUnit, the assemblies (nunit.framework, etc.) now appear in the References > Add Reference dialog, but they're not in the %WINDIR%\Microsoft.NET\Framework\v2.0.50727 dir and there is no NUnit registry entry for the Assembly Path (i.e. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramewokr\AssemblyFolde... | When you install NUnit, especially if you're using a package manager like NuGet, the assemblies may not be registered in the traditional ways that you're familiar with from manually adding references or installing the .NET Framework. Here are a few reasons why the NUnit assemblies can still show up in the "Add Referenc... | 34,038 | [
{
"from": "human",
"value": "So after installing NUnit, the assemblies (nunit.framework, etc.) now appear in the References > Add Reference dialog, but they're not in the %WINDIR%\\Microsoft.NET\\Framework\\v2.0.50727 dir and there is no NUnit registry entry for the Assembly Path (i.e. HKEY_LOCAL_MACHINE\\S... |
Assumption: live/production web app suppresses errors being shown to end-users.
Suppose your tech support team wants to see live data but through the eyes of the development-side of the application (maybe you want to see what errors are occurring, or want to see when you've got an issue fixed using an end-user's data).... | It's important to strike a balance between the need for troubleshooting and maintaining a secure and stable production environment. Given that your current setup uses one database for both development and live environments, here are some ideas and tools to help you achieve your goal:
### 1. **Error Logging and Monitor... | 33,074 | [
{
"from": "human",
"value": "Assumption: live/production web app suppresses errors being shown to end-users.\nSuppose your tech support team wants to see live data but through the eyes of the development-side of the application (maybe you want to see what errors are occurring, or want to see when you've got... |
Maybe it's the really late night I had but I can't figure this one out. First the html:
<div>
<a href="#internal">Internal Link</a>
<a href="http://external.com">External Link</a>
<a href="#internal2">Internal Link2</a>
</div>
in order to do something on the page instead of going to the link I need to filter it based ... | It looks like you're trying to filter anchor (`<a>`) elements based on whether their `href` attribute starts with a `#`. You're correct that you can use the attribute selector in jQuery, but it seems there is a small syntax error in your code.
Here's how you can achieve this:
1. Use the correct selector syntax.
2. Us... | 35,454 | [
{
"from": "human",
"value": "Maybe it's the really late night I had but I can't figure this one out. First the html:\n<div>\n<a href=\"#internal\">Internal Link</a>\n<a href=\"http://external.com\">External Link</a>\n<a href=\"#internal2\">Internal Link2</a>\n</div>\n\nin order to do something on the page i... |
This is probably easy but I am getting stuck: when I build a solution in Visual Studio - how do extract the exact cmd line for the current build command in order to be able to do the same build from VisualStudio console?
In the output window I can see the single projects in the solution build commands but not the one ... | In Visual Studio 2005, if you want to extract the command line used for building the whole solution, you can follow these steps:
1. **Enable Detailed Output in Build Output:**
- Go to `Tools` > `Options`.
- Expand the `Projects and Solutions` node.
- Select `Build and Run`.
- Change the `MSBuild project bu... | 33,295 | [
{
"from": "human",
"value": "This is probably easy but I am getting stuck: when I build a solution in Visual Studio - how do extract the exact cmd line for the current build command in order to be able to do the same build from VisualStudio console? \nIn the output window I can see the single projects in th... |
I've used a Continuous Integration server in the past with great success, and hadn't had the need to ever perform a code freeze on the source control system.
However, lately it seems that everywhere I look, most shops are using the concept of code freezes when preparing for a release, or even a new test version of the... | The concept of code freezes has traditionally been employed in software development to manage the risk associated with preparing for a release. The idea is to "freeze" the codebase at a certain point to stabilize the product before final testing, ensuring that no new features or changes that could introduce bugs are ad... | 33,268 | [
{
"from": "human",
"value": "I've used a Continuous Integration server in the past with great success, and hadn't had the need to ever perform a code freeze on the source control system. \nHowever, lately it seems that everywhere I look, most shops are using the concept of code freezes when preparing for a ... |
After looking on MSDN, it's still unclear to me how I should form a proper predicate to use the Find() method in List using a member variable of T (where T is a class)
For example:
public class Car
{
public string Make;
public string Model;
public int Year;
}
{ // somewhere in my code
List<Car> carList =... | Since you're using .NET Framework 2.0 and can't use Lambda expressions, you can create a method that matches the delegate type required by the `Find()` method. Specifically, you'll define a method that takes a `Car` object as a parameter and returns a boolean indicating whether the car's year matches the year you're se... | 32,027 | [
{
"from": "human",
"value": "After looking on MSDN, it's still unclear to me how I should form a proper predicate to use the Find() method in List using a member variable of T (where T is a class)\nFor example:\npublic class Car\n{\n public string Make;\n public string Model;\n public int Year;\n}\n\... |
I'm creating a (Java) class to represent an object in a musical score that has a specific onset time, and possibly a duration as well. I need a good name for this class. Is something like "Timed" or "TimedObject" appropriate? I've tried to come up with something that ends in "-able" (like Runnable) but I can't think... | Given your requirements and the context of the class representing an object with a specific onset time in a musical score, here are some naming suggestions:
1. **TimedEvent**: This name emphasizes that the object is an event that occurs at a specific time.
2. **MusicalEvent**: This name highlights that the class is pa... | 35,156 | [
{
"from": "human",
"value": "I'm creating a (Java) class to represent an object in a musical score that has a specific onset time, and possibly a duration as well. I need a good name for this class. Is something like \"Timed\" or \"TimedObject\" appropriate? I've tried to come up with something that ends... |
I am trying to setup a multi module SpringMVC appfuse applicaiton in Eclipse but it seems that I'm facing lots of errors in Eclipse after I import the project in Eclipse. Can anyone please help me with a step by step guideline showing the ideal way to setup such application in Eclipse?
| Setting up a multi-module Spring MVC application in Eclipse can be challenging, especially if you're facing multiple errors after importing your project. Here’s a step-by-step guide to help you set up your Spring MVC application using Eclipse IDE effectively.
### Step 1: Install Necessary Tools
1. **Eclipse IDE**:
... | 27,997 | [
{
"from": "human",
"value": "I am trying to setup a multi module SpringMVC appfuse applicaiton in Eclipse but it seems that I'm facing lots of errors in Eclipse after I import the project in Eclipse. Can anyone please help me with a step by step guideline showing the ideal way to setup such application in E... |
Does anyone have any suggestions for a good approach to finding all the CPAN dependencies that might have arisen in a bespoke development project. As tends to be the case your local development environment rarely matches your live one and as you build more and more projects you tend to build up a local library of insta... | Hi Peter,
Finding all CPAN (Comprehensive Perl Archive Network) dependencies for a bespoke development project can indeed be challenging, especially when your local environment differs from the one in which your project will eventually run. Here are some strategies you can use to identify the necessary dependencies fo... | 28,134 | [
{
"from": "human",
"value": "Does anyone have any suggestions for a good approach to finding all the CPAN dependencies that might have arisen in a bespoke development project. As tends to be the case your local development environment rarely matches your live one and as you build more and more projects you ... |
Probably an easy one:
Are there any rules of thumb or pointers that could help recognise political requirements?
Let’s say one of stakeholders (your boss, a head of another department or an actual user) asks for a feature or particular characteristic of software being developed by yourself or your team. Is there a litm... | Recognizing political requirements in software development can be nuanced, but there are several indicators and rules of thumb you can use to identify them:
1. **Vague or Non-Technical Justifications**: If the request for a feature lacks a clear business or technical rationale and instead focuses on “what others expec... | 34,472 | [
{
"from": "human",
"value": "Probably an easy one:\nAre there any rules of thumb or pointers that could help recognise political requirements?\nLet’s say one of stakeholders (your boss, a head of another department or an actual user) asks for a feature or particular characteristic of software being develope... |
I've been reading about Ocaml's consistent speed, rapid prototyping ability, and excellent memory management, and decided to take it up.
As I've already got Ruby, *lisp, Haskell, and Erlang under my belt, I'm interested specifically in what KISS-violating features I should look out for in Ocaml.
If you've started Ocaml... | It's great to hear that you're diving into OCaml! Given your background in Ruby, Lisp, Haskell, and Erlang, you'll likely find some aspects of OCaml familiar, while also encountering some features that may feel a bit KISS-violating or more complex than you're used to. Here are some aspects to consider:
### 1. Type Sys... | 28,103 | [
{
"from": "human",
"value": "I've been reading about Ocaml's consistent speed, rapid prototyping ability, and excellent memory management, and decided to take it up.\nAs I've already got Ruby, *lisp, Haskell, and Erlang under my belt, I'm interested specifically in what KISS-violating features I should look... |
What is the difference between a proxy server and a reverse proxy server?
| A **proxy server** and a **reverse proxy server** are both intermediary servers that facilitate requests between clients and servers, but they serve different purposes and are used in different contexts. Here are the key differences:
### Proxy Server (Forward Proxy)
1. **Client-side Proxy**: A forward proxy acts on be... | 31,418 | [
{
"from": "human",
"value": "What is the difference between a proxy server and a reverse proxy server?\n"
},
{
"from": "gpt",
"value": "A **proxy server** and a **reverse proxy server** are both intermediary servers that facilitate requests between clients and servers, but they serve different p... |
Anyone had any experience with httpZip product (ISAPI - based compression for IIS). I'm wondering if this is worthwhile compared to the native compression in IIS6... Pros / Cons / pitfalls of either approach?
| Using httpZip as an ISAPI-based compression module for IIS can offer some advantages over the native compression features in IIS 6, but there are also a few drawbacks and considerations to keep in mind. Here’s a breakdown of the pros and cons of both approaches:
### httpZip (ISAPI Compression)
#### Pros:
1. **Customi... | 29,799 | [
{
"from": "human",
"value": "Anyone had any experience with httpZip product (ISAPI - based compression for IIS). I'm wondering if this is worthwhile compared to the native compression in IIS6... Pros / Cons / pitfalls of either approach?\n"
},
{
"from": "gpt",
"value": "Using httpZip as an ISAPI... |
I am using BSD style pty/tty pairs to implement running a sub shell. When the user exits the sub shell, how do I detect in the master process that this has occurred? I am using select(nfds, &read_fds, NULL, NULL, &timeout); with the master pty file descriptor set in the read_fds on the master side.
| To detect when the user exits the sub-shell that you are running in a BSD-style pseudo-terminal (pty), you need to monitor the master side of the pty for specific events. When the sub-shell exits, the master end of the pty will receive an event that you can detect through the `select` call. Here are the steps to implem... | 31,247 | [
{
"from": "human",
"value": "I am using BSD style pty/tty pairs to implement running a sub shell. When the user exits the sub shell, how do I detect in the master process that this has occurred? I am using select(nfds, &read_fds, NULL, NULL, &timeout); with the master pty file descriptor set in the read_f... |
I am looking for a script to allow users to add a text field to a .dbf table(e.g. landuse categories) and allow them to input/update the rows basing on what values in the GRIDCODE (numeric categories) field they think should be assigned into text categories.i.e. if GRIDCODE value is 4, the corresponding field value of... | Certainly! Below, I've provided a Python script that uses the `pandas` library to read and update a `.dbf` file using user input. This script allows users to assign text categories based on the `GRIDCODE` values. It assumes you have a `.dbf` file in a structure where the `GRIDCODE` values are numeric, and you want to a... | 27,865 | [
{
"from": "human",
"value": "I am looking for a script to allow users to add a text field to a .dbf table(e.g. landuse categories) and allow them to input/update the rows basing on what values in the GRIDCODE (numeric categories) field they think should be assigned into text categories.i.e. if GRIDCODE val... |
I have something similar to the following method:
public ActionResult Details(int id)
{
var viewData = new DetailsViewData
{
Booth = BoothRepository.Find(id),
Category = ItemType.HotBuy
};
return View(viewData);
}
and the following Route:
routes.MapR... | The behavior you are encountering with the `ModelState` retaining the previous value of `id` and causing the method to use that value in subsequent requests is a known issue related to how parameter binding works in ASP.NET MVC, particularly when combined with dependency injection (DI) and how the controller is instant... | 32,378 | [
{
"from": "human",
"value": "I have something similar to the following method: \n public ActionResult Details(int id)\n {\n var viewData = new DetailsViewData\n {\n Booth = BoothRepository.Find(id),\n Category = ItemType.HotBuy\n };\n return View(viewD... |
Here's the core problem: I have a .NET application that is using COM interop in a separate AppDomain. The COM stuff seems to be loading assemblies back into the default domain, rather than the AppDomain from which the COM stuff is being called.
What I want to know is: is this expected behaviour, or am I doing something... | The behavior you're encountering is related to how COM interop works with .NET and AppDomains. When dealing with COM objects in .NET, there are some key concepts and limitations you need to understand regarding assembly loading and AppDomains.
### Expected Behavior
1. **COM Interop and Default AppDomain**:
When yo... | 33,497 | [
{
"from": "human",
"value": "Here's the core problem: I have a .NET application that is using COM interop in a separate AppDomain. The COM stuff seems to be loading assemblies back into the default domain, rather than the AppDomain from which the COM stuff is being called.\nWhat I want to know is: is this e... |
Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file to use? I know it's in org.eclipse.ui.ide, but how would I find that out?
Edit: Thank you to all of you who answered. Like many things, there seems to be several ways to skin this cat. I wish javadoc contained ... | To determine which JAR file contains a specific class like `org.eclipse.ui.views.navigator.ResourceNavigator`, there are indeed several methods you can use. You've already highlighted some useful techniques, both offline and online. Here's a consolidated summary of the approaches you mentioned, along with a few additio... | 33,667 | [
{
"from": "human",
"value": "Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file to use? I know it's in org.eclipse.ui.ide, but how would I find that out?\nEdit: Thank you to all of you who answered. Like many things, there seems to be several ways t... |
At what point is it better to switch from java.net to java.nio? .net (not the Microsoft entity) is easier to understand and more familiar, while nio is scalable, and comes with some extra nifty features.
Specifically, I need to make a choice for this situation: We have one control center managing hardware at several re... | Choosing between `java.net` and `java.nio` largely depends on the architecture of your application, your scalability needs, and how you plan to manage I/O operations. Given your situation, let's break down your options:
### Understanding Your Requirements
1. **Multiple Remote Servers:** You will have multiple remote ... | 29,900 | [
{
"from": "human",
"value": "At what point is it better to switch from java.net to java.nio? .net (not the Microsoft entity) is easier to understand and more familiar, while nio is scalable, and comes with some extra nifty features.\nSpecifically, I need to make a choice for this situation: We have one cont... |
In a project I'm starting I would like to give privileges to users based on certain conditions, eg (in a certain table):
can READ all rows
cannot WRITE to rows with id < x, but can WRITE to row >= x
etc...
I would like to avoid views as these conditions might change for each user (I understand I would have to create ... | Enforcing complex access control directly in the database can be challenging, especially when you want to avoid using views and ensure that security is not bypassed on the client side. Here are some approaches you could consider:
### 1. Row-Level Security (RLS)
If you are using a database system that supports Row-Lev... | 33,198 | [
{
"from": "human",
"value": "In a project I'm starting I would like to give privileges to users based on certain conditions, eg (in a certain table):\n\ncan READ all rows\ncannot WRITE to rows with id < x, but can WRITE to row >= x\netc...\n\nI would like to avoid views as these conditions might change for ... |
I'm using symfony and propel, and I'm trying to invoke a specific culture on an object and output some fields of that object to the screen in that specific culture. However, if the object's mapped database record doesn't have those fields in that specific culture, I would like it to default to the base culture (in this... | In Symfony with Propel, handling internationalization (i18n) can be done by checking if the specific culture exists for the object before trying to get the data. Below, I'll outline a way to implement this logic.
1. **Check for the culture record**: You can create a method that checks whether a specific culture record... | 34,279 | [
{
"from": "human",
"value": "I'm using symfony and propel, and I'm trying to invoke a specific culture on an object and output some fields of that object to the screen in that specific culture. However, if the object's mapped database record doesn't have those fields in that specific culture, I would like i... |
I have an importer process which is running as a windows service (debug mode as an application) and it processes various xml documents and csv's and imports into an SQL database. All has been well until I have have had to process a large amount of data (120k rows) from another table (as I do the xml documents).
I am no... | Based on your description, it sounds like you're encountering performance issues when processing a large volume of data. Here are several potential areas to investigate and strategies to troubleshoot the problem:
### 1. Review Memory Usage
- **SQL Server Configuration**: Make sure that SQL Server has enough memory all... | 32,562 | [
{
"from": "human",
"value": "I have an importer process which is running as a windows service (debug mode as an application) and it processes various xml documents and csv's and imports into an SQL database. All has been well until I have have had to process a large amount of data (120k rows) from another t... |
We currently have developed an application using WCF. Our clients make connections to different WCF servicehosts located on the server, and the servicehosts return the data from the DB that the clients need. Standard model. However, this current design has all of our WCF data in app.config files both on the client side... | Transitioning from a static WCF service configuration defined in `app.config` files to a dynamic configuration stored in a database does introduce some complexities, especially regarding how to access and use these dynamically defined endpoints. Below are some approaches and considerations to help you implement this fu... | 30,173 | [
{
"from": "human",
"value": "We currently have developed an application using WCF. Our clients make connections to different WCF servicehosts located on the server, and the servicehosts return the data from the DB that the clients need. Standard model. However, this current design has all of our WCF data in... |
I have a page something.aspx, with associated codebehind something.aspx.cs. In that codebehind, I want to know the filesystem location of something.aspx. Is there any convenient way to get it?
Update: I got several excellent answers, which unfortunately didn't work because of something else crazy I'm doing. I'm enco... | In ASP.NET, when you want to get the filesystem location of a specific `.aspx` file from its code-behind file, you typically use the `Server.MapPath` method. However, in your case, since you are trying to get the filesystem path using a complete URL that includes additional segments, you need to extract the path part o... | 30,950 | [
{
"from": "human",
"value": "I have a page something.aspx, with associated codebehind something.aspx.cs. In that codebehind, I want to know the filesystem location of something.aspx. Is there any convenient way to get it?\nUpdate: I got several excellent answers, which unfortunately didn't work because of... |
I am new to Cocoa and need to capture input using scanf to run a program that requires input of four variables one at a time.
Is there any console, window class, canvas, memo class (as in delphi) that will llow me to do this.
Earl Cenac
| Welcome to Cocoa! If you're new to Cocoa and want to capture user input, you have a couple of different approaches you can take.
### Using Command Line (Terminal)
If you are creating a command line application using Cocoa, you can use `scanf` directly in the `main` function or any other function. Below is a simple exa... | 32,002 | [
{
"from": "human",
"value": "I am new to Cocoa and need to capture input using scanf to run a program that requires input of four variables one at a time.\nIs there any console, window class, canvas, memo class (as in delphi) that will llow me to do this.\nEarl Cenac\n"
},
{
"from": "gpt",
"valu... |
I have a method that creates a MessageDigest (a hash) from a file, and I need to do this to a lot of files (>= 100,000). How big should I make the buffer used to read from the files to maximize performance?
Most everyone is familiar with the basic code (which I'll repeat here just in case):
MessageDigest md = MessageDi... | When it comes to optimizing file I/O performance, the size of the buffer you choose can indeed have a significant impact, especially when processing a large number of files. As you mentioned, the optimal buffer size can depend on various factors including the operating system, file system, disk characteristics, and mem... | 32,502 | [
{
"from": "human",
"value": "I have a method that creates a MessageDigest (a hash) from a file, and I need to do this to a lot of files (>= 100,000). How big should I make the buffer used to read from the files to maximize performance?\nMost everyone is familiar with the basic code (which I'll repeat here j... |
I am trying to find out how much memory my application is consuming from within the program itself. The memory usage I am looking for is the number reported in the "Mem Usage" column on the Processes tab of Windows Task Manager.
| To measure the memory usage of your application programmatically in C#, you can use the `Process` class from the `System.Diagnostics` namespace. This will allow you to retrieve information about the current process, including its memory usage.
Here is an example of how you can retrieve the memory usage of your applica... | 33,808 | [
{
"from": "human",
"value": "I am trying to find out how much memory my application is consuming from within the program itself. The memory usage I am looking for is the number reported in the \"Mem Usage\" column on the Processes tab of Windows Task Manager.\n"
},
{
"from": "gpt",
"value": "To ... |
is there a way to have a mysql select statement return fully qualified column names like "table.field" without using AS for every single field?
like so:
SELECT *
FROM table1
LEFT JOIN table2 on table1.f_ID = table2.ID
and the result would be:
"table1.ID", "table1.name", "table2.ID", "table2.name", ...
| In MySQL, there isn't a built-in option to automatically generate fully qualified column names (i.e., prefixed with the table name) for all columns in a `SELECT *` statement without using `AS` for each field.
However, you can achieve this by manually specifying each column with its fully qualified name, which can be ... | 33,936 | [
{
"from": "human",
"value": "is there a way to have a mysql select statement return fully qualified column names like \"table.field\" without using AS for every single field?\nlike so:\nSELECT * \nFROM table1 \nLEFT JOIN table2 on table1.f_ID = table2.ID \n\nand the result would be:\n\"table1.ID\", \"tab... |
Added: Working with SQL Server 2000 and 2005, so has to work on both. Also, value_rk is not a number/integer (Error: Operand data type uniqueidentifier is invalid for min operator)
Is there a way to do a single column "DISTINCT" match when I don't care about the other columns returned? Example:
**Table**
Value A, Valu... | To achieve the goal of getting distinct values from the `value` column while also retrieving other columns (like `attribute_definition_id` and a unique identifier `value_rk`), you can utilize a common table expression (CTE) or a subquery with the `ROW_NUMBER()` function in SQL Server. However, since you're working with... | 31,856 | [
{
"from": "human",
"value": "Added: Working with SQL Server 2000 and 2005, so has to work on both. Also, value_rk is not a number/integer (Error: Operand data type uniqueidentifier is invalid for min operator)\nIs there a way to do a single column \"DISTINCT\" match when I don't care about the other column... |
So I want to trigger an event (pausing/unpausing some media) whenever the user presses spacebar anywhere in the my Swing app.
Since there are so many controls and panels that could have focus, its not really possible to add keyevents to them all(not to mention gross).
So I found
KeyboardFocusManager.getCurrentKeyboar... | To handle the spacebar key press globally in your Swing application while ensuring that it does not interfere with text input fields or editable components, you can utilize the `KeyboardFocusManager` and its `addKeyEventDispatcher` method, along with some checks to identify if the currently focused component is editabl... | 32,431 | [
{
"from": "human",
"value": "So I want to trigger an event (pausing/unpausing some media) whenever the user presses spacebar anywhere in the my Swing app.\nSince there are so many controls and panels that could have focus, its not really possible to add keyevents to them all(not to mention gross).\nSo I fou... |
What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components.
As a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping a HTML Select with some JavaScript to fill values f... | Creating an editable dropdown list in ASP.NET without third-party components can be done effectively using a combination of a `TextBox` for input and a `DropDownList` for selection. Here's a straightforward approach to achieve this:
### Step-by-Step Implementation
1. **Use a `TextBox` and a `DropDownList`**: The `Tex... | 26,309 | [
{
"from": "human",
"value": "What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components.\nAs a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping a HTML Se... |
What is difference between Server.Transfer and Response.Redirect?
What are advantages and disadvantages of each?
When is one appropriate over the other?
When is one not appropriate?
| `Server.Transfer` and `Response.Redirect` are both methods in ASP.NET used to navigate from one page to another, but they operate differently and have distinct use cases. Here's a breakdown of their differences, advantages, disadvantages, and appropriate usage:
### Server.Transfer
#### Description:
- `Server.Transfer... | 30,929 | [
{
"from": "human",
"value": "What is difference between Server.Transfer and Response.Redirect?\n\nWhat are advantages and disadvantages of each?\nWhen is one appropriate over the other?\nWhen is one not appropriate?\n\n"
},
{
"from": "gpt",
"value": "`Server.Transfer` and `Response.Redirect` are... |
My situation is as follows:
I have a normalized database, in which I hold geographic information about airports. The structure is:
airport --is in--> city --is in--> country --is in--> continent
Now I want to let users administrate this data, without giving them direct access to the database. We need to offer this adm... | Your outlined approach and the associated XSD for solution D definitely have merit, particularly in terms of simplicity and ease of use for the client. Let's break down the considerations and evaluate whether this is the best solution and if the XSD is sufficient to convey the intent clearly.
### Evaluation of Solutio... | 28,015 | [
{
"from": "human",
"value": "My situation is as follows:\nI have a normalized database, in which I hold geographic information about airports. The structure is:\nairport --is in--> city --is in--> country --is in--> continent\n\nNow I want to let users administrate this data, without giving them direct acce... |
I'm working the the image upload piece of the FCKEditor and I've got the uploading working properly but am stuck with the server file browser.
You can see in the dialog above has a Browse Server button which pops up the following dialog
The problem is that I have no idea which folder the file browser is pointing at.
... | To configure the FCKEditor (now known as CKEditor) file browser to start in a specific directory, you will need to modify the PHP connector used by the file browser.
### Steps to Configure the Default Directory in the PHP Connector:
1. **Locate the PHP Connector Configuration File**:
The file you mentioned, `confi... | 32,094 | [
{
"from": "human",
"value": "I'm working the the image upload piece of the FCKEditor and I've got the uploading working properly but am stuck with the server file browser.\n\nYou can see in the dialog above has a Browse Server button which pops up the following dialog\n\nThe problem is that I have no idea w... |
After considering the answers to my previous question (One SVN Repository or many?), I've decided to take the 4 or so repositories I have and consolidate them into one. This of course leads to the question, what's the best way to do this?
Is there a way to combine two or more repositories maintaining the version histor... | Consolidating multiple SVN repositories into a single repository while preserving the version history can be a bit complex, especially if you're using a hosted service like Assembla.com that doesn't give you access to `svnadmin`. However, it is possible to achieve your goal through a method called "svn merge" and "svn ... | 29,875 | [
{
"from": "human",
"value": "After considering the answers to my previous question (One SVN Repository or many?), I've decided to take the 4 or so repositories I have and consolidate them into one. This of course leads to the question, what's the best way to do this?\nIs there a way to combine two or more r... |
I am looking to encrypt some data using Rijndael/AES in VBScript using a specific key and IV value. Are there any good function libraries or COM components that would be good to use?
I looked at CAPICOM; it allows a passphrase only, and won't allow setting specific key and IV values.
| Using Rijndael/AES encryption directly in VBScript can be a bit tricky due to its limitations and lack of built-in cryptographic libraries. However, you can use a couple of options to achieve AES encryption with a specific key and IV.
### Option 1: Use a COM Component
One of the most common methods is to utilize a th... | 30,113 | [
{
"from": "human",
"value": "I am looking to encrypt some data using Rijndael/AES in VBScript using a specific key and IV value. Are there any good function libraries or COM components that would be good to use?\nI looked at CAPICOM; it allows a passphrase only, and won't allow setting specific key and IV v... |
I need to create a new Many-To-One relationship on my User entity which joins against another entity. The problem is the other entity has a compound key of which 1 field is a field in the User entity and the other is a field in another Many-To-One entity.
User.Key -> User.NewThing.Key
User.SubThing.Key -> User.NewThing... | To establish a Many-To-One relationship in NHibernate where you are dealing with a compound key, you need to properly specify the compound key mapping in the target entity. This is done using the `<composite-id>` element for the target entity and then referring to the fields in your mapping file accordingly.
Here’s a ... | 30,990 | [
{
"from": "human",
"value": "I need to create a new Many-To-One relationship on my User entity which joins against another entity. The problem is the other entity has a compound key of which 1 field is a field in the User entity and the other is a field in another Many-To-One entity.\nUser.Key -> User.NewTh... |
I am new to C and i have this question. why does the following code crash:
int *a = 10;
*a = 100;
| The code you've provided crashes because you are trying to dereference a pointer (`a`) that points to an invalid memory location. Let's break it down:
1. **Declaration and Initialization**:
```c
int *a = 10;
```
Here, you're declaring a pointer `a` and initializing it with the integer value `10`. This is p... | 35,305 | [
{
"from": "human",
"value": "I am new to C and i have this question. why does the following code crash:\nint *a = 10;\n*a = 100;\n\n"
},
{
"from": "gpt",
"value": "The code you've provided crashes because you are trying to dereference a pointer (`a`) that points to an invalid memory location. Le... |
What is the best way to write data to the text console at arbitrary locations on the screen and with custom fore/background colors?
| Writing data to the text console at arbitrary locations and using custom foreground and background colors can vary based on the programming language and the platform you're working on. Here, I'll cover how to accomplish this in both Python (using ANSI escape codes) and C (using Windows Console API).
### Python Example... | 27,958 | [
{
"from": "human",
"value": "What is the best way to write data to the text console at arbitrary locations on the screen and with custom fore/background colors?\n"
},
{
"from": "gpt",
"value": "Writing data to the text console at arbitrary locations and using custom foreground and background col... |
I need to detect the device resolution automatically, right now I have a global var & hardwire the resolution:
Public gDeviceRes As String = "640"
'Public gDeviceRes As String = "320"
then recompile for each device, does anyone have a quick snippit of code for this??
| To automatically detect the device resolution in a VB.NET application, you can use the `System.Windows.Forms.Screen` class to get the current screen resolution. This way, you won't need to hard-code the resolution for each device. Here's a simple snippet that demonstrates how to achieve this:
```vb.net
Imports System.... | 31,565 | [
{
"from": "human",
"value": "I need to detect the device resolution automatically, right now I have a global var & hardwire the resolution:\nPublic gDeviceRes As String = \"640\"\n'Public gDeviceRes As String = \"320\"\n\nthen recompile for each device, does anyone have a quick snippit of code for this??\n"... |
We have a reporting server which has a bunch of reports and some ad hoc user reports created by users using report builder. Now we need to move all these to a different server. The new server already has some reports in it. I need to move all the reports from the older server to a folder in the new server because of th... | To migrate reports from one SQL Server Reporting Services (SSRS) server to another, particularly when you can't directly move the database, you can follow several methods to export and then deploy your reports. Below are some common approaches to achieve this:
### Method 1: Report Export/Import via Report Manager
1. ... | 31,029 | [
{
"from": "human",
"value": "We have a reporting server which has a bunch of reports and some ad hoc user reports created by users using report builder. Now we need to move all these to a different server. The new server already has some reports in it. I need to move all the reports from the older server to... |
There are two schools of thought on how to best extend, enhance, and reuse code in an object-oriented system:
Inheritance: extend the functionality of a class by creating a subclass. Override superclass members in the subclasses to provide new functionality. Make methods abstract/virtual to force subclasses to "fill-i... | The debate between inheritance and aggregation (composition) in object-oriented programming (OOP) is a long-standing one, and each approach has its benefits, costs, and consequences. Here's a breakdown of each:
### Inheritance
#### Benefits:
1. **Code Reusability**: Inheritance allows for the reuse of existing code. ... | 29,270 | [
{
"from": "human",
"value": "There are two schools of thought on how to best extend, enhance, and reuse code in an object-oriented system:\n\nInheritance: extend the functionality of a class by creating a subclass. Override superclass members in the subclasses to provide new functionality. Make methods abst... |
Suppose I have a SELECT statement that returns some set of results. Is there some way I can number my results in the following way:
SELECT TOP 3 Name FROM PuppyNames ORDER BY NumberOfVotes
would give me...
Fido
Rover
Freddy Krueger
...but I want...
1, Fido
2, Rover
3, Freddy Krueger
where of course the commas si... | In SQL Server 2000, you can achieve the desired output of numbering your results by using a Common Table Expression (CTE) or a derived table along with the `ROW_NUMBER()` function. However, since SQL Server 2000 does not support the `ROW_NUMBER()` function directly, you can use a workaround with a subquery or a tempora... | 34,222 | [
{
"from": "human",
"value": "Suppose I have a SELECT statement that returns some set of results. Is there some way I can number my results in the following way:\n\nSELECT TOP 3 Name FROM PuppyNames ORDER BY NumberOfVotes\n\nwould give me...\n\nFido\nRover\nFreddy Krueger\n\n...but I want...\n\n1, Fido\n2, ... |
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS.
IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
| Yes, it is possible to call Ada procedures and functions from C or C++ code, but it requires some understanding of how Ada and C/C++ interact, especially regarding calling conventions, name mangling, and data types. Here are the main steps to achieve this:
### 1. Compiling Ada Code
When you write Ada code that you wa... | 27,081 | [
{
"from": "human",
"value": "I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS.\nIIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible... |
Is there a visual studio express edition to develop WF applications?
| As of my last update in October 2023, Microsoft had discontinued the Express editions of Visual Studio. The Express editions were lightweight, free versions of Visual Studio that provided essential features for developing applications, including Windows Workflow Foundation (WF) applications.
However, Microsoft now off... | 35,716 | [
{
"from": "human",
"value": "Is there a visual studio express edition to develop WF applications?\n"
},
{
"from": "gpt",
"value": "As of my last update in October 2023, Microsoft had discontinued the Express editions of Visual Studio. The Express editions were lightweight, free versions of Visua... |
What are the lesser-known but useful features of the Python programming language?
Try to limit answers to Python core.
One feature per answer.
Give an example and short description of the feature, not just a link to documentation.
Label the feature using a title as the first line.
Quick links to answers:
Argument Un... | ### Argument Unpacking
Python allows you to unpack arguments from lists or tuples directly into function calls, which can make your code cleaner and more flexible.
**Example:**
```python
def add(a, b):
return a + b
args = (2, 3)
result = add(*args) # Unpacking the tuple
print(result) # Output: 5
```
In this ... | 12,988 | [
{
"from": "human",
"value": "What are the lesser-known but useful features of the Python programming language?\n\nTry to limit answers to Python core.\nOne feature per answer.\nGive an example and short description of the feature, not just a link to documentation.\nLabel the feature using a title as the fir... |
I'm looking for an abstract base class or master page solution that will prevent anyone from doing XSRF using both a token and ttl. Can anyone point me in the right direction?
Edit: The ideal solution will leverage the cookie that the default membership provider sends down to the client.
| To implement a solution that prevents Cross-Site Request Forgery (XSRF) using both a token and a time-to-live (TTL), and leverages the cookie sent down by the default membership provider, you can follow these guidelines. Here's a high-level overview along with an example implementation in ASP.NET.
### Overview
1. **T... | 26,819 | [
{
"from": "human",
"value": "I'm looking for an abstract base class or master page solution that will prevent anyone from doing XSRF using both a token and ttl. Can anyone point me in the right direction?\nEdit: The ideal solution will leverage the cookie that the default membership provider sends down to... |
In our new product we have a few data entry fields that require you to search for the correct value to place in this field.
When you enter this data entry field I would like to provide a search option via something on the view (perhaps an Ajax implementation) and have it allow searching of the database for the value,... | Implementing a search option in an MVC application using AJAX can be a straightforward process. Below is a general guideline to help you set this up. This will include creating a search field that fetches data asynchronously while preserving existing field values in your form.
### Step-by-step Guide:
1. **Create the ... | 31,027 | [
{
"from": "human",
"value": "In our new product we have a few data entry fields that require you to search for the correct value to place in this field. \nWhen you enter this data entry field I would like to provide a search option via something on the view (perhaps an Ajax implementation) and have it allo... |
I'm using xsd.exe to make the C# classes for our settings. I have a setting that is per-server and per-database, so I want the class to behave like Dictionary<string, string[][]>. So I want to be able to say
string serverName = "myServer";
int databaseId = 1;
FieldSettings fieldSettings = getFieldSettings();
string[... | To represent a complex structure like a nested dictionary in XSD, you need to create a more structured definition that allows you to group settings by server and database. Since XML Schema Definition (XSD) does not directly support dictionary-like structures, we can use elements to define the relationships.
Here's an ... | 32,159 | [
{
"from": "human",
"value": "I'm using xsd.exe to make the C# classes for our settings. I have a setting that is per-server and per-database, so I want the class to behave like Dictionary<string, string[][]>. So I want to be able to say\nstring serverName = \"myServer\";\nint databaseId = 1;\nFieldSetting... |
If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month:
d = new Date(); d.setFullYear(2008, 11, 0); // Sun Nov 30 2008
There is reference to this behaviour at mozilla. Is this a reliable cross-browser feature or should I look at alternative methods?
| The behavior you're describing, where passing `0` as the `dayValue` to `Date.setFullYear` results in setting the date to the last day of the previous month, is part of the ECMAScript specification for JavaScript. This means that it should be reliable across modern browsers that adhere to the standard.
Here’s how it wo... | 32,510 | [
{
"from": "human",
"value": "If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month:\nd = new Date(); d.setFullYear(2008, 11, 0); // Sun Nov 30 2008\n\nThere is reference to this behaviour at mozilla. Is this a reliable cross-browser feature or should I look at alte... |
I'm trying to define a table to store student grades for a online report card. I can't decide how to do it, though.
The grades are given by subject, in a trimestral period. Every trimester has a average grade, the total missed classes and a "recovering grade" (I don't know the right term in English, but it's an extra t... | Storing student grades in a database requires a design that is both flexible and easy to maintain, especially if grading periods may change in the future. Here’s a suggestion that balances normalization, flexibility, and ease of querying.
### Suggested Database Schema
You can use a normalized approach by creating mul... | 29,912 | [
{
"from": "human",
"value": "I'm trying to define a table to store student grades for a online report card. I can't decide how to do it, though.\nThe grades are given by subject, in a trimestral period. Every trimester has a average grade, the total missed classes and a \"recovering grade\" (I don't know th... |
I'm trying to do an image capture on a high end Nokia phone (N95). The phone's internal camera is very good (4 megapixels) but in j2me I only seem to be able to get a maximum of 1360x1020 image out. I drew largely from this example http://developers.sun.com/mobility/midp/articles/picture/
What I did was start with 64... | It sounds like you're facing some limitations inherent to J2ME on the Nokia N95 regarding the camera functionality. Here are some insights into your issues:
1. **Resolution Limitations:** The maximum resolution of 1360x1020 you are encountering is likely due to restrictions in the J2ME API, particularly in the way it ... | 31,283 | [
{
"from": "human",
"value": "I'm trying to do an image capture on a high end Nokia phone (N95). The phone's internal camera is very good (4 megapixels) but in j2me I only seem to be able to get a maximum of 1360x1020 image out. I drew largely from this example http://developers.sun.com/mobility/midp/artic... |
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
My application, using the Java Plugin Framework, appears unable to convert a dom4j-created XML document to Batik's implementation of the SVG specification.
On the console, I learn that an error occurs:
Excep... | The error you're encountering is indicative of a classloading conflict, which is common when using multiple libraries or frameworks that may have overlapping dependencies. In your case, it seems that both the Batik library and the Java Plugin Framework (JPF) are trying to load the same classes from different class load... | 25,368 | [
{
"from": "human",
"value": "Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.\nMy application, using the Java Plugin Framework, appears unable to convert a dom4j-created XML document to Batik's implementation of the SVG specification.\nOn the co... |
I need to plan a voyage connecting n locations in the sea with a specified origin and specified destination with following constraints.
The voyage has to touch all locations.
If there is a reservation from A to B then a has to be touched before B
The time spend at each location varies (depends upon the reservations to... | Your problem can be categorized as a variant of the **Traveling Salesman Problem (TSP)**, but with added complexities related to time constraints, working windows, and waiting times at locations. Here's how you can approach this problem:
### Steps to Address Your Voyage Planning Problem:
1. **Model the Problem:**
... | 33,813 | [
{
"from": "human",
"value": "I need to plan a voyage connecting n locations in the sea with a specified origin and specified destination with following constraints.\nThe voyage has to touch all locations.\nIf there is a reservation from A to B then a has to be touched before B \nThe time spend at each locat... |
My web app writes to several folders (logs, uploads, etc), and I've always set these permissions manually through my hosting provider.
I'd like to create a setup script that performs this on new installations. Is this possible under Medium trust?
I can't even call File.GetAccessControl, let alone File.SetAccessControl... | Setting folder permissions programmatically in a web application can be a bit tricky, especially under medium trust settings in .NET environments, as you mentioned. Medium trust restricts the ability to manipulate file system access controls directly through the .NET framework. Here are some options you can consider:
... | 30,267 | [
{
"from": "human",
"value": "My web app writes to several folders (logs, uploads, etc), and I've always set these permissions manually through my hosting provider.\nI'd like to create a setup script that performs this on new installations. Is this possible under Medium trust?\nI can't even call File.GetAcc... |
How do I configure an ASP.NET application to write verbose log messages of what ASP.NET engine itself is doing? What I get with
<trace enabled="true"
pageOutput="false"
requestLimit="10000"
writeToDiagnosticsTrace="true"/>
is just
[2488] aspx.page: Begin PreInit
[2488] aspx.page: End PreInit
[24... | To configure your ASP.NET application to write more detailed log messages, you need to consider several options beyond the standard ASP.NET trace output. The trace feature you have enabled does provide some insight into the ASP.NET page lifecycle, but you can increase verbosity and get more granular logging in a few di... | 28,850 | [
{
"from": "human",
"value": "How do I configure an ASP.NET application to write verbose log messages of what ASP.NET engine itself is doing? What I get with\n<trace enabled=\"true\" \n pageOutput=\"false\"\n requestLimit=\"10000\"\n writeToDiagnosticsTrace=\"true\"/>\n\nis just\n[2488] asp... |
How to send array in Httpservice in Adobe Flex3
| In Adobe Flex 3, you can send an array via `HTTPService` by converting the array into a format that can be transmitted over HTTP, such as a query string or JSON. Below, I'll demonstrate how to do both methods.
### Method 1: Sending as Query String
If you're sending a simple array, you can convert the array into a qu... | 26,825 | [
{
"from": "human",
"value": "How to send array in Httpservice in Adobe Flex3\n"
},
{
"from": "gpt",
"value": "In Adobe Flex 3, you can send an array via `HTTPService` by converting the array into a format that can be transmitted over HTTP, such as a query string or JSON. Below, I'll demonstrate ... |
We have an issue related to a Java application running under a (rather old) FC3 on an Advantech POS board with a Via C3 processor. The java application has several compiled shared libs that are accessed via JNI.
Via C3 processor is supposed to be i686 compatible. Some time ago after installing Ubuntu 6.10 on a MiniItx ... | To analyze binary files and determine the specific architecture extensions or CPU features that they may depend on, you have a few different tools and methods at your disposal. Here are some options you can consider:
1. **`readelf` and `objdump`**:
- Both of these tools are part of the GNU Binutils package and can ... | 32,286 | [
{
"from": "human",
"value": "We have an issue related to a Java application running under a (rather old) FC3 on an Advantech POS board with a Via C3 processor. The java application has several compiled shared libs that are accessed via JNI.\nVia C3 processor is supposed to be i686 compatible. Some time ago ... |
Can someone post a simple example of starting two (Object Oriented) threads in C++.
I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to calling a C-style thread library.
I left out any OS specific requests in the hopes that whoever replied would reply with cr... | Certainly! In modern C++, you can use the standard library's `std::thread` class to create and manage threads, which provides a simple and cross-platform way to work with threads. However, since you're looking for an object-oriented approach, I suggest creating a base class that wraps around `std::thread` to allow you ... | 30,617 | [
{
"from": "human",
"value": "Can someone post a simple example of starting two (Object Oriented) threads in C++. \nI'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to calling a C-style thread library.\nI left out any OS specific requests in the hop... |
I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction?
Here's why I think I need to use web services:
I'm developing on XP and the Sharepoint object... | Uploading documents to SharePoint using web services, especially when you're constrained by the environment (like developing on XP), can be tricky, but it is definitely doable with the right approach. Here’s a step-by-step guide on how to do this using the CopyIntoItems web service and how to update metadata afterward.... | 29,491 | [
{
"from": "human",
"value": "I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction?\nHere's why I think I need to use web services:\nI'm... |
I am currently developing a Java app which handles a SOAP webservice.
The problem lies after I parse the WSDL [the Parser object from Apache Axis does it for me], and I create the call.
When I try to invoke it, I have to pass a Object[] to assign the parameters [taken from the Action of the WSDL]. A normal action is ... | In the context of invoking a SOAP web service using Apache Axis, dealing with complex types defined in the WSDL can be tricky. From your WSDL fragment, it appears that the `FERecuperaQTYRequest` complex type expects a single `FEAuthRequest` object as its parameter.
Here's a structured approach to resolve the issue you... | 32,415 | [
{
"from": "human",
"value": "I am currently developing a Java app which handles a SOAP webservice. \nThe problem lies after I parse the WSDL [the Parser object from Apache Axis does it for me], and I create the call. \nWhen I try to invoke it, I have to pass a Object[] to assign the parameters [taken from t... |
I want to get started using Dependency Injection and IOC and I want to get more into using Ninject.
Are there any good application with sourcecode available that is written using Ninject that I can look at as a reference?
| Yes, there are several resources and examples available that can help you get started with Dependency Injection (DI) and Inversion of Control (IoC) using Ninject. Here are a few repositories and projects that you might find helpful:
1. **Ninject Examples Repository**:
- The official Ninject GitHub repository contai... | 32,810 | [
{
"from": "human",
"value": "I want to get started using Dependency Injection and IOC and I want to get more into using Ninject.\nAre there any good application with sourcecode available that is written using Ninject that I can look at as a reference?\n"
},
{
"from": "gpt",
"value": "Yes, there ... |
I am using sql server 2005 and ce framework 3.5 and attempting to use merge replication between my hand held and my sql server. I am getting the following error:
Error 28532 : A read operation from the transport returned no data.
The version of SQL Server Compact 3.5 Client Agent and SQL Server Compact 3.5 Server Agen... | The error message you're encountering indicates a mismatch between the SQL Server Compact 3.5 Client Agent and the SQL Server Compact 3.5 Server Agent versions. To resolve the issue, you'll need to verify that both agents are using the same version of SQL Server Compact. Here are steps to check the versions and resolve... | 31,576 | [
{
"from": "human",
"value": "I am using sql server 2005 and ce framework 3.5 and attempting to use merge replication between my hand held and my sql server. I am getting the following error:\nError 28532 : A read operation from the transport returned no data.\nThe version of SQL Server Compact 3.5 Client A... |
3/10/2008 = 1822556159
2/10/2008 = 1822523391
1/10/2008 = 1822490623
30/09/2008 = 1822392319
29/09/2008 = 1822359551
This is all the information that I know at the current time.
Dates increment by 32768 except when changing month when the increment is 32768 x 2 (65536).
Has anyone seen this binary date format and how ... | The numbers you provided appear to represent a specific format for encoding dates and possibly times. From the examples, it seems that you have a base value and you're adding a certain amount (32768 or 65536) to encode the dates.
### Analyzing the Increments:
1. The increment is **32768** for day-to-day changes.
2. Th... | 29,454 | [
{
"from": "human",
"value": "3/10/2008 = 1822556159\n2/10/2008 = 1822523391\n1/10/2008 = 1822490623\n30/09/2008 = 1822392319\n29/09/2008 = 1822359551\nThis is all the information that I know at the current time. \nDates increment by 32768 except when changing month when the increment is 32768 x 2 (65536).\n... |
I'm trying to auto-generate a plain text email with a trademark symbol in it. I've tried everything I can think of but it's still not going through.
<cfmail from="#x#" to="#y#" subject="test" charset="UTF-8">
™
™
#Chr(153)#
</cfmail>
| When generating an email using ColdFusion's `<cfmail>` tag, ensuring that special characters like the trademark symbol (™) are rendered correctly can sometimes be tricky. Here are a few things you can try to get the trademark symbol to appear properly in your email:
### Using HTML Entities
You can use the HTML entity ... | 33,807 | [
{
"from": "human",
"value": "I'm trying to auto-generate a plain text email with a trademark symbol in it. I've tried everything I can think of but it's still not going through.\n<cfmail from=\"#x#\" to=\"#y#\" subject=\"test\" charset=\"UTF-8\">\n ™\n ™\n #Chr(153)#\n</cfmail>\n\n"
},
{
"f... |
Is there any way to get the custom attributes of a specific object I am receiving in a method?
I do not want nor can to iterate over Type.GetMembers() and search for my member. I have the object, which is also a member, that has the attribute.
How do I get the attribute?
class Custom
{
[Availability]
private ob... | To check if the object `o` has any custom attributes of a specific type (like `Availability`) in the context you provided, you can use reflection to inspect the member that holds the object in your class.
Since you have the object `o`, you will also need to check the field or property that holds `o`. You can get the c... | 32,253 | [
{
"from": "human",
"value": "Is there any way to get the custom attributes of a specific object I am receiving in a method?\nI do not want nor can to iterate over Type.GetMembers() and search for my member. I have the object, which is also a member, that has the attribute.\nHow do I get the attribute?\nclas... |
I am building an ASP.NET web site where the users may upload photos of themselves. There could be thousands of photos uploaded every day. One thing my boss has asked a few time is if there is any way we could detect if any of the photos are showing too much 'skin' and automatically move flag these as 'Adults Only' befo... | To implement a solution that automatically detects nudity or excessive skin exposure in photos uploaded to your ASP.NET web application, you can leverage various third-party services and libraries that specialize in image analysis. Here are some steps and approaches you can take:
### 1. **Choose an Image Analysis API*... | 30,414 | [
{
"from": "human",
"value": "I am building an ASP.NET web site where the users may upload photos of themselves. There could be thousands of photos uploaded every day. One thing my boss has asked a few time is if there is any way we could detect if any of the photos are showing too much 'skin' and automatica... |
I need to pass an array from JavaScript to a page method in C#. I have tried using a parameter in the C# method of IList and also a string[] array. Both ways throw an exception "cannot convert an object of type system.string to xxx", where xxx is the parameter type in the C# method. I am passing the object from jQuery ... | When you're passing data from JavaScript (using jQuery) to a C# WebMethod, the data types need to align correctly to ensure that it can be deserialized properly. In your case, it looks like you're passing a single string that contains a comma-separated list of numbers, but your C# method expects an array of strings (`s... | 34,351 | [
{
"from": "human",
"value": "I need to pass an array from JavaScript to a page method in C#. I have tried using a parameter in the C# method of IList and also a string[] array. Both ways throw an exception \"cannot convert an object of type system.string to xxx\", where xxx is the parameter type in the C# m... |
I'm wondering if I'll have trouble installing SQL Server 2008 on my development machine whilst our production server is 2005? E.g. is something change so that my 2005 databases/sps/functions/views will not work correctly or other issues I should think about?
Would like to do this just to test drive the new SQL Server b... | Installing SQL Server 2008 alongside SQL Server 2005 can be managed with some considerations, especially since you want to ensure compatibility with your existing 2005 databases, stored procedures, functions, and views. Here are a few points to consider:
1. **Compatibility Level**: SQL Server 2008 supports a compatibi... | 32,087 | [
{
"from": "human",
"value": "I'm wondering if I'll have trouble installing SQL Server 2008 on my development machine whilst our production server is 2005? E.g. is something change so that my 2005 databases/sps/functions/views will not work correctly or other issues I should think about?\nWould like to do th... |
For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not?
| Yes, you can see the differences between your current branch and the remote branch before deciding whether to `git pull` or not. Here are a couple of approaches to achieve this:
1. **Fetch and Compare:**
You can use `git fetch` to update your remote tracking branches without merging any changes. After fetching, you... | 34,718 | [
{
"from": "human",
"value": "For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not?\n"
},
{
"from": "gpt",
"value": "Yes, you can see the differences between your current branch and the remote bran... |
Is anyone using the business intelligence tool Inetsoft Style Report ? I'm stuck with it and was wondering if anyone has advice on tuning and/or best practices for server admin? We are running on a fast Solaris box using Tomcat with a db2 database.
| InetSoft Style Report is a powerful business intelligence tool, and managing it effectively can help you get the most out of your deployment. Here are some best practices and tips for tuning and server administration based on general practices for similar BI tools, as well as considerations specific to your environment... | 32,149 | [
{
"from": "human",
"value": "Is anyone using the business intelligence tool Inetsoft Style Report ? I'm stuck with it and was wondering if anyone has advice on tuning and/or best practices for server admin? We are running on a fast Solaris box using Tomcat with a db2 database. \n"
},
{
"from": "g... |
I am currently working on a project with five other developers and we are using subversion for our revision control system. We have established that we have 12 milestones leading up to the first release of our software. We have labeled the milestones using version numbers (0.1 through 0.12) and descriptive labels. For ... | Versioning software with a non-sequential milestone release approach can indeed be challenging, especially when multiple features or components are developed in parallel. Here are several strategies that you can consider to maintain clarity and coherence in your versioning scheme:
### 1. Use Feature Flags
One approach... | 29,746 | [
{
"from": "human",
"value": "I am currently working on a project with five other developers and we are using subversion for our revision control system. We have established that we have 12 milestones leading up to the first release of our software. We have labeled the milestones using version numbers (0.1 t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.