instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm having trouble running a complex query against our company LDAP server. I'm using the following Perl script:
use Data::Dumper;
use Net::LDAP;
die "Can't connect to LDAP-Server: $@\n"
unless $ldap = Net::LDAP->new( 'xLDAPx' );
foreach my $filter ( 'ou=Personal', 'ou=BAR', 'ou=Personal,ou=BAR', 'ou=Personal,o... | It looks like you're encountering an issue with how the LDAP filter is being specified in your Perl script using the `Net::LDAP` module. In LDAP, the filter string and the search base are crucial to retrieving the expected results, and there are a few things you should consider.
### Potential Issues to Check
1. **Fil... | 33,877 | [
{
"from": "human",
"value": "I'm having trouble running a complex query against our company LDAP server. I'm using the following Perl script:\nuse Data::Dumper;\nuse Net::LDAP;\n\ndie \"Can't connect to LDAP-Server: $@\\n\" \n unless $ldap = Net::LDAP->new( 'xLDAPx' );\n\n\nforeach my $filter ( 'ou=Perso... |
Is there a way (preferrably using JavaScript) to determine whether a URL is to a SWF or a JPG?
The obvious answer is to sniff the filename for ".jpg" or ".swf" but I'm dealing with banners that are dynamically decided by the server and usually have a lot of parameters and generally don't include an extension.
so i'm ... | Yes, you can determine whether a URL points to a SWF or a JPG file by making an HTTP request to the URL and inspecting the response headers. The `Content-Type` header in the response can tell you the MIME type of the resource, which is useful for distinguishing between SWF and JPG files.
Here's a sample JavaScript imp... | 30,809 | [
{
"from": "human",
"value": "Is there a way (preferrably using JavaScript) to determine whether a URL is to a SWF or a JPG? \nThe obvious answer is to sniff the filename for \".jpg\" or \".swf\" but I'm dealing with banners that are dynamically decided by the server and usually have a lot of parameters and ... |
The GNU Scientific library has a multi-dimensional function minimization framework. However, its caveats explicitly says that when used on a function with several different local minima it just returns one arbitrary solution. Does anybody know how you might go about adapting it so that it would return a list of all loc... | To adapt the GNU Scientific Library (GSL) for finding multiple local minima of a multi-dimensional function, you would need to implement a strategy to explore the function landscape more thoroughly than what standard optimization methods provide. Here are a few approaches you could consider:
### 1. Randomized Starting... | 31,851 | [
{
"from": "human",
"value": "The GNU Scientific library has a multi-dimensional function minimization framework. However, its caveats explicitly says that when used on a function with several different local minima it just returns one arbitrary solution. Does anybody know how you might go about adapting it ... |
What is the best way to structure a VB.NET Windows Forms application so that code can be reused and the application can be extended easily?
I used to create lots of new forms. This lead to lots of repeated code and forms which did similar things.
Now, for forms which do similar jobs, such as view/edit/delete items from... | Your approach to structuring a VB.NET Windows Forms application demonstrates a solid understanding of object-oriented programming principles, particularly inheritance and encapsulation. Here are some additional suggestions and resources to help you refine your application structure for reusability and extensibility:
#... | 32,623 | [
{
"from": "human",
"value": "What is the best way to structure a VB.NET Windows Forms application so that code can be reused and the application can be extended easily?\nI used to create lots of new forms. This lead to lots of repeated code and forms which did similar things.\nNow, for forms which do simila... |
I would like to remove two files from a folder at the conclusion of my script. Do I need to create a function responsible for removing these two specific files? I would like to know in some detail how to use os.remove (if that is what I should use) properly. These two files will always be discarded at the conclusion of... | You don't necessarily need to create a separate function to remove the two specific files at the end of your script, but it can help keep your code organized and more readable. If the files are always going to be discarded at the end of your script, you can include the removal logic directly in the main body of your sc... | 33,912 | [
{
"from": "human",
"value": "I would like to remove two files from a folder at the conclusion of my script. Do I need to create a function responsible for removing these two specific files? I would like to know in some detail how to use os.remove (if that is what I should use) properly. These two files will... |
I often find a need to put paths in my code in order to find data or in some cases tool-specific modules. I've so far always used autotools because of this--it's just so easy to call sed to replace a few strings at build time. However, I'd like to find a more Pythonic way of doing this, i.e. use distutils or some oth... | Using `distutils` or `setuptools` to handle paths in Python projects is a common requirement. Instead of relying solely on build-time string replacement like `sed`, there are more Pythonic ways to manage configuration and paths. Here are a few strategies you can use to achieve this:
### 1. Use a Configuration File
On... | 32,511 | [
{
"from": "human",
"value": "I often find a need to put paths in my code in order to find data or in some cases tool-specific modules. I've so far always used autotools because of this--it's just so easy to call sed to replace a few strings at build time. However, I'd like to find a more Pythonic way of d... |
I've often read that corporations will save millions once Internet Explorer 6 is finally laid to rest, but reading quotes like that make me wonder just how much time people are spending on IE6 development. I'll be happy once IE6 goes, but I've found that if I write valid HTML and CSS, use a JavaScript framework, keep t... | The experience with Internet Explorer 6 (IE6) varies significantly between organizations, depending on their target audience, industry, and the complexity of their web applications. Here are some factors that generally impact the time, effort, and money spent on preparing sites for IE6:
### Time and Effort
1. **Develo... | 33,999 | [
{
"from": "human",
"value": "I've often read that corporations will save millions once Internet Explorer 6 is finally laid to rest, but reading quotes like that make me wonder just how much time people are spending on IE6 development. I'll be happy once IE6 goes, but I've found that if I write valid HTML an... |
I have a language-agnostic question about an algorithm.
This comes from a (probably simple) programming challenge I read. The problem is, I'm too stupid to figure it out, and curious enough that it is bugging me.
The goal is to sort a list of integers to ascending order by swapping the positions of numbers in the list.... | This problem resembles the classic problem of sorting with additional cost constraints related to the swaps performed. The challenge is to sort the list while minimizing the sum of the values of the numbers being swapped.
Here’s a hint to get you started on approaching this problem:
1. **Understand the Goal**: Your g... | 36,664 | [
{
"from": "human",
"value": "I have a language-agnostic question about an algorithm.\nThis comes from a (probably simple) programming challenge I read. The problem is, I'm too stupid to figure it out, and curious enough that it is bugging me.\nThe goal is to sort a list of integers to ascending order by swa... |
I have recently reinstalled MacOSX, and at some point (without realizing it) I made it so that a directory without index.html would try instead to run index.php. This has since stopped working. My localhost runs .php files fine; it just doesn't do so unless you specifically tell it to.
There are lots of htaccess guide... | It sounds like you're looking to set up your Apache server on macOS to use `index.php` as the default index file for directories, similar to how it would default to `index.html`. To achieve this, you'll need to modify your `.htaccess` file or the Apache configuration file.
### Method 1: Using `.htaccess`
1. **Locate ... | 29,004 | [
{
"from": "human",
"value": "I have recently reinstalled MacOSX, and at some point (without realizing it) I made it so that a directory without index.html would try instead to run index.php. This has since stopped working. My localhost runs .php files fine; it just doesn't do so unless you specifically tel... |
This is truly a beginner question, so I apologize in advance.
I have Visual Studio 2008 Standard installed and would like to create a small Windows application that does NOT require any .NET framework when run on computers. Does VS 2008 Standard support such a feature? Any pointers on how to accomplish this would be fa... | No need to apologize—everyone starts somewhere! To create a Windows application using Visual Studio 2008 that does not require the .NET Framework, you should consider using C++ instead of C# or VB.NET, which are part of the .NET Framework.
### Steps to Create a Native Windows Application Using C++
1. **Create a New P... | 33,922 | [
{
"from": "human",
"value": "This is truly a beginner question, so I apologize in advance.\nI have Visual Studio 2008 Standard installed and would like to create a small Windows application that does NOT require any .NET framework when run on computers. Does VS 2008 Standard support such a feature? Any poin... |
In Windows Server 2003, how I can check if my program is running in local console ("on the screen of the server machine") instead of remote session?
I'm using Delphi Win32, so any Windows API based method should work..
| In Windows Server 2003, you can determine if your program is running in a local console (on the server screen) versus a remote session (like Remote Desktop) by checking the session ID of the current process. The session ID indicates whether the process is running in the console session or a remote session.
You can us... | 25,312 | [
{
"from": "human",
"value": "In Windows Server 2003, how I can check if my program is running in local console (\"on the screen of the server machine\") instead of remote session?\nI'm using Delphi Win32, so any Windows API based method should work..\n"
},
{
"from": "gpt",
"value": "In Windows S... |
I'm using Gnome terminal and I want to change the background color or the profile through a command so I can group some commands in an alias to visually differentiate my windows when I run certain processes. I'm running Ubuntu, and bash is my shell. Are there commands in to do this?
| Yes, you can change the background color of the GNOME Terminal profile using the `gsettings` command. This command allows you to modify various settings for GNOME applications, including the terminal.
Here's how you can change the background color of your GNOME Terminal profile:
1. **List available profiles**: First,... | 35,281 | [
{
"from": "human",
"value": "I'm using Gnome terminal and I want to change the background color or the profile through a command so I can group some commands in an alias to visually differentiate my windows when I run certain processes. I'm running Ubuntu, and bash is my shell. Are there commands in to do t... |
I'm experimenting with JavaFX making a small game.
I want to add sound.
How?
I tried MediaPlayer with media defined with relative source attribute like:
attribute media = Media{
source: "{__FILE__}/sound/hormpipe.mp3"
}
attribute player = MediaPlayer{
autoPlay:true
media:media
}
It doesn't play.
I... | To play sound in a JavaFX application using the `MediaPlayer`, you need to ensure that the media file is correctly referenced and accessible at runtime. The exception you're seeing indicates that the media file is unavailable. Here are steps to properly set up sound in a JavaFX game:
### 1. File Structure
Make sure yo... | 29,369 | [
{
"from": "human",
"value": "I'm experimenting with JavaFX making a small game. \nI want to add sound.\nHow?\nI tried MediaPlayer with media defined with relative source attribute like:\nattribute media = Media{\n source: \"{__FILE__}/sound/hormpipe.mp3\" \n}\nattribute player = MediaPlayer{\n ... |
I find myself writing code that looks like this a lot:
set<int> affected_items;
while (string code = GetKeyCodeFromSomewhere())
{
if (code == "some constant" || code == "some other constant") {
affected_items.insert(some_constant_id);
} else if (code == "yet another constant" || code == "the constant I ... | Certainly! The structure you're using is not uncommon, but there are ways to make it cleaner and more maintainable. One common approach is to use a mapping from key codes to function callbacks or lambdas. This way, you can eliminate the need for multiple checks and still ensure that each function is called only once fo... | 31,571 | [
{
"from": "human",
"value": "I find myself writing code that looks like this a lot:\nset<int> affected_items;\nwhile (string code = GetKeyCodeFromSomewhere())\n{\n if (code == \"some constant\" || code == \"some other constant\") {\n affected_items.insert(some_constant_id);\n } else if (code ==... |
I wrote a program which includes writing and reading from database. When I run the app and try to perform writing I call the following method:
public static void AddMessage(string callID, string content)
{
string select =
"INSERT INTO Sporocilo (oznaka_klica, smer, vsebina, prebrano, cas_zapisa)... | The issue you are experiencing, where records inserted into the database appear temporarily but then disappear after the application exits, is likely related to the configuration of your database or the way your application connects to it. Here are a few potential causes and solutions to investigate:
### 1. **Database... | 34,685 | [
{
"from": "human",
"value": "I wrote a program which includes writing and reading from database. When I run the app and try to perform writing I call the following method:\npublic static void AddMessage(string callID, string content)\n {\n string select =\n \"INSERT INTO Sporocilo (ozna... |
What Delphi coding standards document(s) do you follow?
Our company is looking at putting some better coding standards in place, to improve our code’s readability, reviewability, and maintainability. We’ve come across CodeGear’s “Object Pascal Style Guide”, but it hasn’t been touched in quite a while and I imagine a n... | It's great to hear that your company is looking to improve coding standards for Delphi. Having a well-defined set of coding standards can significantly enhance code readability, maintainability, and ease of collaboration among team members.
While there are various style guides available for Delphi, here are a few nota... | 35,758 | [
{
"from": "human",
"value": "What Delphi coding standards document(s) do you follow?\nOur company is looking at putting some better coding standards in place, to improve our code’s readability, reviewability, and maintainability. We’ve come across CodeGear’s “Object Pascal Style Guide”, but it hasn’t been ... |
Previously, settings for deployments of an ASP.NET application were stored in multiple configuration files under the Web.config config sections using a KEY/VALUE format. We are moving these 'site module options' to the database for a variety of reasons.
Here are the two options we are mulling over at the moment:
1. A... | Both of your proposed options for migrating configuration settings from the Web.config to a database have their strengths and weaknesses. Ultimately, the best choice depends on your specific requirements, including factors such as ease of maintenance, performance, and how often configuration changes occur. Here’s a bre... | 33,036 | [
{
"from": "human",
"value": "Previously, settings for deployments of an ASP.NET application were stored in multiple configuration files under the Web.config config sections using a KEY/VALUE format. We are moving these 'site module options' to the database for a variety of reasons. \nHere are the two option... |
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1}},
windows = [{'script': "single.py"}],
zipfile = None,
)
in this setup file for py2exe where it says single.py is that where I place the name of my program?
| Yes, in the setup file you provided for `py2exe`, the line `windows = [{'script': "single.py"}]` is where you specify the name of your Python script that you want to convert into a Windows executable.
You should replace `"single.py"` with the actual name of your Python script file. For example, if your script is name... | 38,436 | [
{
"from": "human",
"value": "from distutils.core import setup\nimport py2exe, sys, os\n\nsys.argv.append('py2exe')\n\nsetup(\n options = {'py2exe': {'bundle_files': 1}},\n windows = [{'script': \"single.py\"}],\n zipfile = None,\n)\n\nin this setup file for py2exe where it says single.py is that wh... |
I've seen (and used) on various projects this layout, with a group of fields followed by a group of properties:
private int MyIntField;
private string MyStringField;
public int MyInt {
get { return MyIntField; }
set { MyIntField = value; }
}
public string MyString {
get { return MyStringField; }
... | Both of the layouts you've described for fields and properties in C# have their pros and cons, and the choice often comes down to personal or team preference, as well as coding standards. Let's take a look at each approach:
### Option 1: Fields Grouped Together, Properties Grouped Together
```csharp
private int MyInt... | 32,733 | [
{
"from": "human",
"value": "I've seen (and used) on various projects this layout, with a group of fields followed by a group of properties:\nprivate int MyIntField;\nprivate string MyStringField;\n\npublic int MyInt { \n get { return MyIntField; }\n set { MyIntField = value; }\n} \npublic string M... |
I'm doing an AutoLisp project which uses long associative structures to do heavy geometrical processing - so I'm curious about the associative list intense use timing results.
How simple/complex is the implementation? It uses some data structure or a normal list of dotted pairs?
The are any extension for b-tree or some... | In AutoLISP, associative lists (or "alist") are a common way to manage key-value pairs. These are typically implemented as lists of dotted pairs, where each dotted pair is a cons cell (a two-element list) with the first element being the key and the second being the value.
### Implementation
- **Data Structure**: An ... | 33,631 | [
{
"from": "human",
"value": "I'm doing an AutoLisp project which uses long associative structures to do heavy geometrical processing - so I'm curious about the associative list intense use timing results.\nHow simple/complex is the implementation? It uses some data structure or a normal list of dotted pairs... |
In some my project I notice that during executing unit tests under VSTS2008 its VSTestHost's memory consuming grows. As I have very many tests in my solution it leads to OutOfMemroyException eventually.
That looks very strange for me as I was sure that MSTest creates a new AppDomain for each unit test. Otherwise how wo... | Your understanding of how MSTest and VSTestHost work is generally correct, but it’s important to clarify a few points regarding AppDomain creation and memory management during unit testing in Visual Studio (specifically in older versions like VSTS 2008).
1. **AppDomain Behavior in MSTest**: MSTest does not create a ne... | 34,220 | [
{
"from": "human",
"value": "In some my project I notice that during executing unit tests under VSTS2008 its VSTestHost's memory consuming grows. As I have very many tests in my solution it leads to OutOfMemroyException eventually.\nThat looks very strange for me as I was sure that MSTest creates a new AppD... |
I'm creating a Path in Silverlight, and adding elements to it on mouse events. But, although the elements are there in memory, the screen doesn't get updated until something else causes a screen repaint to happen.
Here's the relevant code - I'm responding to a mouse event, and I keep a class member of the path I'm edit... | In Silverlight, the rendering engine can sometimes be less responsive to changes in the UI elements compared to WPF. This issue you've encountered with the `Path` not updating immediately after adding segments can be frustrating, but you can address it more elegantly than toggling the `Opacity` property.
Here are a co... | 32,045 | [
{
"from": "human",
"value": "I'm creating a Path in Silverlight, and adding elements to it on mouse events. But, although the elements are there in memory, the screen doesn't get updated until something else causes a screen repaint to happen.\nHere's the relevant code - I'm responding to a mouse event, and ... |
I want to use server controls in ASP.MVC View. I want to retrive data from View and pass it to the control. How could I use server side controls(grid, button etc) and their events?
| In ASP.NET MVC, traditional server controls like those in Web Forms (such as `GridView`, `Button`, etc.) are not used. Instead, MVC employs a different approach that relies on HTML helpers and client-side JavaScript. However, you can still create a grid-like component and handle events, but you'll do this using HTML an... | 32,135 | [
{
"from": "human",
"value": "I want to use server controls in ASP.MVC View. I want to retrive data from View and pass it to the control. How could I use server side controls(grid, button etc) and their events?\n"
},
{
"from": "gpt",
"value": "In ASP.NET MVC, traditional server controls like thos... |
Can someone explain this in a practical way? Sample represents usage for one, low-traffic Rails site using Nginx and 3 Mongrel clusters. I ask because I am aiming to learn about page caching, wondering if these figures have significant meaning to that process. Thank you. Great site!
me@vps:~$ free -m
... | Certainly! Let's break down the output of the `free -m` command in a practical way and how it relates to your low-traffic Rails site using Nginx and Mongrel clusters.
### Understanding the Output
The `free -m` command shows memory usage in megabytes (MB) on a Linux system. Here’s what each column means:
- **total**:... | 35,573 | [
{
"from": "human",
"value": "Can someone explain this in a practical way? Sample represents usage for one, low-traffic Rails site using Nginx and 3 Mongrel clusters. I ask because I am aiming to learn about page caching, wondering if these figures have significant meaning to that process. Thank you. Gre... |
I've been attempting to write embedded SQL statements for DB2 that ultimately gets compiled in C.
I couldn't find a tutorial or manual on the embedded SQL syntax for C for reference. One case I would like to do is to insert data into a table. I know most embedded sql statements need the initalizer EXEC SQL, but that's... | Sure, I can help you with that! In embedded SQL for C, you use the `EXEC SQL` statement to embed SQL commands directly into your C code. For an `INSERT` statement, you'll want to follow a format similar to the `SELECT` statement you provided.
### Basic Syntax for INSERT in Embedded SQL
The general syntax for an `INSER... | 34,962 | [
{
"from": "human",
"value": "I've been attempting to write embedded SQL statements for DB2 that ultimately gets compiled in C. \nI couldn't find a tutorial or manual on the embedded SQL syntax for C for reference. One case I would like to do is to insert data into a table. I know most embedded sql statement... |
I have an application that grabs video from multiple webcams, does some image processing, and displays the result on the screen. I'd like to be able to stream the video output on to the web - preferably to some kind of distribution service rather than connecting to clients directly myself.
So my questions are:
Do su... | Yes, there are several streaming distribution services that can accommodate your needs for streaming video output to the web. Here are the answers to your questions:
### 1. Streaming Distribution Services
Yes, there are various streaming distribution services that can take a video stream from your application and dis... | 34,202 | [
{
"from": "human",
"value": "I have an application that grabs video from multiple webcams, does some image processing, and displays the result on the screen. I'd like to be able to stream the video output on to the web - preferably to some kind of distribution service rather than connecting to clients dire... |
I am creating a new table inside mysql and I am trying to add a foreign key constraint to one of the fields.
CREATE TABLE `onlineorder` (
`receiptid` varchar(10) NOT NULL default '',
`delivereddate` date default NULL,
`cid` int(10) NOT NULL,
`card#` int(10) default NULL,
`expire` date default NULL,
PRIMARY... | The issue you are encountering is related to the storage engine you are using for your MySQL table. In your `CREATE TABLE` statement, you specified `ENGINE=MyISAM`. The MyISAM storage engine does not support foreign key constraints. This is why, after creating the table, you do not see the foreign key constraint when y... | 36,296 | [
{
"from": "human",
"value": "I am creating a new table inside mysql and I am trying to add a foreign key constraint to one of the fields.\n\nCREATE TABLE `onlineorder` (\n `receiptid` varchar(10) NOT NULL default '',\n `delivereddate` date default NULL,\n `cid` int(10) NOT NULL,\n `card#` int(10) defaul... |
As I hate reinventing the wheel, I wonder if there are any commonly used packaged out there for doing hte simple job of communicating (key,value) pairs of data betweeen two network endpoints (probably TCP/IP is the most likely carrier). I would like something that works in any environment, which for me means Unix/Linu... | Yes, there are several libraries and frameworks available in C and C++ that facilitate communication of key-value pairs over TCP/IP sockets, and are designed to work across Unix/Linux environments. Here are some of the popular ones:
### 1. **ZeroMQ**
- **Website**: [zeromq.org](https://zeromq.org/)
- **Description**: ... | 33,521 | [
{
"from": "human",
"value": "As I hate reinventing the wheel, I wonder if there are any commonly used packaged out there for doing hte simple job of communicating (key,value) pairs of data betweeen two network endpoints (probably TCP/IP is the most likely carrier). I would like something that works in any ... |
How do I run a function on a loop so all the results go straight into a list and is there a way to run a function which acts on all the values in a list?
| Certainly! In Python, you can run a function on a loop to collect results in a list using a simple `for` loop, list comprehension, or the `map` function. Additionally, you can apply a function to all the values in a list using similar methods.
### 1. Running a Function in a Loop and Collecting Results in a List
Here'... | 34,553 | [
{
"from": "human",
"value": "How do I run a function on a loop so all the results go straight into a list and is there a way to run a function which acts on all the values in a list?\n"
},
{
"from": "gpt",
"value": "Certainly! In Python, you can run a function on a loop to collect results in a l... |
Does the SCN itself encode a timestamp or is it a lookup from some table.
From an AskTom post he explains that the timestamp to +/-3seconds is stored in raw field in smon_scn_time. IS that where the function is going to get the value?
If so, when is that table purged if ever? If so, what triggers that purge?
If it is... | In Oracle databases, the System Change Number (SCN) is a critical component used for tracking changes to the database and managing consistency. Here's how the SCN and its associated timestamp are typically handled:
### 1. SCN and Timestamps
The SCN itself does not inherently contain a timestamp. However, Oracle provid... | 33,253 | [
{
"from": "human",
"value": "Does the SCN itself encode a timestamp or is it a lookup from some table. \nFrom an AskTom post he explains that the timestamp to +/-3seconds is stored in raw field in smon_scn_time. IS that where the function is going to get the value? \nIf so, when is that table purged if ever... |
Problem:
How can I tell if a selection of text in the CRichEditCtrl has multiple font sizes in it?
Goal:
I am sort of making my own RichEdit toolbar (bold, italic, font type, font size, etc). I want to emulate what MS Word does when a selection of text has more than a single font size spanning the selection.
Ex - You... | To determine whether the selection in a `CRichEditCtrl` has multiple font sizes, you're right to consider iterating through the selected text character by character. Unfortunately, the `GetSelectionCharFormat` method only provides information about the format of the character at the end of the selection, which isn't su... | 33,592 | [
{
"from": "human",
"value": "Problem:\nHow can I tell if a selection of text in the CRichEditCtrl has multiple font sizes in it?\n\nGoal:\nI am sort of making my own RichEdit toolbar (bold, italic, font type, font size, etc). I want to emulate what MS Word does when a selection of text has more than a sing... |
We currently use Hp SiteScope for monitoring synthetic transactions across some of our web apps. This works pretty well except for the licensing cost for each synthetic transaction makes it prohibitive to ensure adequate coverage across our applications.
So, an alternative would be to use SiteScope's URL monitoring whi... | Hi Matt,
It's great to hear that you're looking for ways to optimize your monitoring strategy while keeping costs manageable. Using HP SiteScope's URL monitoring capability is indeed a viable alternative. Here’s a structured approach to creating a custom monitoring solution that can cover your needs without incurring ... | 33,677 | [
{
"from": "human",
"value": "We currently use Hp SiteScope for monitoring synthetic transactions across some of our web apps. This works pretty well except for the licensing cost for each synthetic transaction makes it prohibitive to ensure adequate coverage across our applications.\nSo, an alternative woul... |
Hi I am new and I am used to MS SQL Manager's Attach/Detatch functionality to drop a database into a single file so I can move it to other computers/SQL instances. In a nut shell, this is what I want to do.
I have a large Oracle Express database (instance name Zeus) that I need to move onto other Oracle Express instanc... | Welcome! Migrating and managing Oracle databases can be a bit different than what you might be used to with MS SQL Server. In Oracle, you typically use the Data Pump utility or the traditional export/import utilities to handle these tasks. Below, I’ll guide you through the process of exporting your Oracle Express datab... | 31,967 | [
{
"from": "human",
"value": "Hi I am new and I am used to MS SQL Manager's Attach/Detatch functionality to drop a database into a single file so I can move it to other computers/SQL instances. In a nut shell, this is what I want to do.\nI have a large Oracle Express database (instance name Zeus) that I need... |
The Problem
I use a tool at work that lets me do queries and get back HTML tables of info. I do not have any kind of back-end access to it.
A lot of this info would be much more useful if I could put it into a spreadsheet for sorting, averaging, etc. How can I screen-scrape this data to a CSV file?
My First Idea
Since ... | It's great to hear you found a solution that works for you! Copying and pasting directly from an HTML table into a spreadsheet can be surprisingly effective, especially if the formatting is consistent.
For future reference or for others who might face similar challenges, here are some additional tips and techniques fo... | 33,334 | [
{
"from": "human",
"value": "The Problem\nI use a tool at work that lets me do queries and get back HTML tables of info. I do not have any kind of back-end access to it.\nA lot of this info would be much more useful if I could put it into a spreadsheet for sorting, averaging, etc. How can I screen-scrape th... |
I've got a iSeries to .Net compact framework project. It includes rgple programs exposed as web services and a Windows mobile app that uses the webservices. Each iSeries program has a specific webservice wrapper and the .net app reference each. I would like to come up with a more generic messaging service using XML.... | Working with XML on the IBM i (formerly known as iSeries or AS/400) can be a powerful approach to create a more flexible messaging service. Here are some recommendations on XML tools and how to get started with XML processing on the iSeries:
### Recommended XML Tools for IBM i
1. **IBM i XML Toolkit**:
- The IBM i... | 34,186 | [
{
"from": "human",
"value": "I've got a iSeries to .Net compact framework project. It includes rgple programs exposed as web services and a Windows mobile app that uses the webservices. Each iSeries program has a specific webservice wrapper and the .net app reference each. I would like to come up with a ... |
I realize this is a quite general question, but I am wondering about the performance impact of implementing business logic with WF contra imperative code in fairly large enterprise system. I would like to hear others experiences in this regard.
| Implementing business logic using Workflow Foundation (WF) versus imperative code can significantly impact performance, maintainability, and overall architecture of large enterprise systems. Here’s a breakdown of various aspects to consider based on experiences and best practices:
### Performance Considerations
1. **... | 33,161 | [
{
"from": "human",
"value": "I realize this is a quite general question, but I am wondering about the performance impact of implementing business logic with WF contra imperative code in fairly large enterprise system. I would like to hear others experiences in this regard.\n"
},
{
"from": "gpt",
... |
There is this example code, but then it starts talking about millisecond / nanosecond problems.
The same question is on MSDN, Seconds since the Unix epoch in C#.
This is what I've got so far:
public Double CreatedEpoch
{
get
{
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();
TimeSpan spa... | The code you've provided is designed to convert a `DateTime` object (`this.Created`) to and from Unix epoch time (the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC). However, there are a few things to consider regarding the precision of Unix time and how to correctly handle it in C#.
### I... | 31,656 | [
{
"from": "human",
"value": "There is this example code, but then it starts talking about millisecond / nanosecond problems.\nThe same question is on MSDN, Seconds since the Unix epoch in C#.\nThis is what I've got so far:\npublic Double CreatedEpoch\n{\n get\n {\n DateTime epoch = new DateTime(1970, 1... |
Is there any easy way to access the SVN repository revision number and store it in a c++ string in a c++ visual studio application?
Thanks for your help in advance!
| Yes, you can access the SVN revision number in a C++ Visual Studio application using the following steps. The process involves using the `svn:keywords` property to automatically insert the revision number into your source code. Here's how you can do it:
### Step 1: Set the `svn:keywords` Property
1. **Open your comma... | 31,149 | [
{
"from": "human",
"value": "Is there any easy way to access the SVN repository revision number and store it in a c++ string in a c++ visual studio application?\nThanks for your help in advance!\n"
},
{
"from": "gpt",
"value": "Yes, you can access the SVN revision number in a C++ Visual Studio a... |
I am trying to set the background color of a DataGridView row to red. I tried with the following line:
dgvActiveCalls.Rows[1].DefaultCellStyle.BackColor = Color.Red;
but it doesn't work. Then just to see if something is wrong with update I tried to paint the column instead of row:
dgvActiveCalls.Columns[1].DefaultCellS... | Setting the background color of a `DataGridView` row should typically work as you've described, but it's possible that certain conditions in your application are preventing it from rendering correctly. Here are a few things you can check or try:
1. **Ensure the Row Index Exists**: Double-check that the row index you a... | 34,989 | [
{
"from": "human",
"value": "I am trying to set the background color of a DataGridView row to red. I tried with the following line:\ndgvActiveCalls.Rows[1].DefaultCellStyle.BackColor = Color.Red;\nbut it doesn't work. Then just to see if something is wrong with update I tried to paint the column instead of ... |
I'm trying to find a way to determine how many parameters a constructor has.
Now I've built one constructor with no parameters and 1 constructor with 4 parameters.
Is there, in C#, a way to find out how many parameters a used or given constructor has?
Thing is, I'm using a third constructor to read log files. These log... | In C#, you can use reflection to determine the number of parameters a constructor has. Reflection provides a way to inspect the metadata of classes and their members, including constructors, methods, and properties at runtime.
Here's how you can check the number of parameters for a constructor using reflection:
1. Us... | 31,681 | [
{
"from": "human",
"value": "I'm trying to find a way to determine how many parameters a constructor has.\nNow I've built one constructor with no parameters and 1 constructor with 4 parameters.\nIs there, in C#, a way to find out how many parameters a used or given constructor has?\nThing is, I'm using a th... |
I would like to generate a report file from a view&template in django.
Preferred file formats would be OpenOffice/ODF or PDF.
What is the best way to do this?
I do want to reuse the page layout defined in the template, possibly by redefining some blocks in a derived template.
Ideally, the report should be inserted into... | Generating report files in Django, especially in OpenOffice/ODF or PDF format, can be accomplished using a few different libraries and methods. Below are the steps you can follow to create reports that reuse templates defined in Django, including page layouts, headers, and footers.
### PDF Generation with WeasyPrint
... | 32,596 | [
{
"from": "human",
"value": "I would like to generate a report file from a view&template in django.\nPreferred file formats would be OpenOffice/ODF or PDF.\nWhat is the best way to do this?\nI do want to reuse the page layout defined in the template, possibly by redefining some blocks in a derived template.... |
I am calling a csh script that the first thing it does is starts a new group.
I need to be able to see the standard output from the child process that is executed after the fork. I also want the parent process to 'hang' unitl the child process is finished.
Here is the script (razor_from_cgwin.sh).
(sort of)
newgrp na... | To achieve the behavior you want in your C shell script (`razor_from_cgwin.sh`), you will need to make some adjustments to ensure that the parent process waits for the child process to complete and also captures the output from the child process. Here’s a refined version of your script:
```csh
#!/bin/csh
# Start a ne... | 35,241 | [
{
"from": "human",
"value": "I am calling a csh script that the first thing it does is starts a new group.\nI need to be able to see the standard output from the child process that is executed after the fork. I also want the parent process to 'hang' unitl the child process is finished.\nHere is the script... |
What steps do I need to take to get HTML documentation automatically building via the build step in Visual Studio? I have all the comments in place and the comments.xml file being generated, and Sandcastle installed. I just need to know what to add to the post-build step in order to generate the docs.
| To automatically generate HTML documentation using Sandcastle in Visual Studio after building your project, you need to add a post-build step that invokes the Sandcastle tools to process your comments and generate the documentation. Below are the steps you should follow to set this up:
### Prerequisites
- Ensure you h... | 32,160 | [
{
"from": "human",
"value": "What steps do I need to take to get HTML documentation automatically building via the build step in Visual Studio? I have all the comments in place and the comments.xml file being generated, and Sandcastle installed. I just need to know what to add to the post-build step in orde... |
I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.
Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enter... | The issue you are facing stems from the handling of time zones. When the user enters a timestamp, it is interpreted as being in the user's local time zone, but you need to treat it as if it is in GMT before sending it to your web service.
In your example, when the user inputs `5/1/2008 6:12 PM (EST)`, the application ... | 23,873 | [
{
"from": "human",
"value": "I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.\nSince this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker:... |
I am trying to clone a database from one machine to another using the DUPLICATE command in RMAN. For both machines the OS is Windows 2003 and the database software is 10.2.0.3. The problem is that my clone only has a C:\ drive and my hosts backups are kept on the L:\ drive. Is there a way to tell RMAN that the backu... | Yes, you can specify the location of the backup files using RMAN when you are cloning a database. In RMAN, you can use the `SET NEWNAME` command or the `FORCE` option along with the `DUPLICATE` command to direct RMAN to use the backups from the specified location.
Here's how you can do it:
1. **Set Up RMAN Connection... | 35,353 | [
{
"from": "human",
"value": "I am trying to clone a database from one machine to another using the DUPLICATE command in RMAN. For both machines the OS is Windows 2003 and the database software is 10.2.0.3. The problem is that my clone only has a C:\\ drive and my hosts backups are kept on the L:\\ drive. ... |
Ok so I have an abstract base class called Product, a KitItem class that inherits Product and a PackageKitItem class that inherits KitItem. ie.
Product
KitItem : Product
PackageKitItem : KitItem
I have my KitItems loaded and I need to load up a collection of PackageKitItems which are, effectively, shallow copies of Ki... | It looks like you're trying to create shallow copies of your `KitItem` objects into `PackageKitItem` objects, and you're encountering issues with casting. The `MemberwiseClone` method creates a shallow copy of the object, but it returns the new object as the base type of the class that called it. This is why you're enc... | 35,116 | [
{
"from": "human",
"value": "Ok so I have an abstract base class called Product, a KitItem class that inherits Product and a PackageKitItem class that inherits KitItem. ie.\nProduct\nKitItem : Product\nPackageKitItem : KitItem\n\nI have my KitItems loaded and I need to load up a collection of PackageKitItem... |
Which XML validation tools can you recommend for both performance and accuracy, each of which is a critical issue on our system? We have the following requirements:
It is not xmllint (see below)
Supports RelaxNG
Can easily integrate with Perl (this is optional, but it would be nice)
Why not xmllint? (This is backgr... | Given your specific requirements and the issues you've encountered with `xmllint`, here are some XML validation tools that support RelaxNG, focus on performance and accuracy, and provide potential for integration with Perl:
1. **Jing**
- **Overview**: Jing is a reference implementation of the RelaxNG schema languag... | 32,236 | [
{
"from": "human",
"value": "Which XML validation tools can you recommend for both performance and accuracy, each of which is a critical issue on our system? We have the following requirements:\n\nIt is not xmllint (see below)\nSupports RelaxNG\nCan easily integrate with Perl (this is optional, but it woul... |
Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.
| Yes, "placement new" in C++ is a feature that allows you to construct an object in a specific memory location. It is primarily used for scenarios where you need more control over memory allocation, such as when dealing with memory pools, embedded systems, or low-level system programming, including interfacing with hard... | 35,420 | [
{
"from": "human",
"value": "Has anyone here ever used C++'s \"placement new\"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.\n"
},
{
"from": "gpt",
"value": "Yes, \"placement new\" in C++ is a feature that allows you to construct an object in a specific... |
Anyone have a C# example showing an owner drawn tabcontrol with hot-tracking effects?
I've implemented a nice owner drawn tabcontrol using C# and .NET 2.0 but i'm stumped when it comes to implementing hot-tracking effects.
Any Ideas?
| Certainly! Hot-tracking in an owner-drawn `TabControl` involves changing the appearance of the tab items when the mouse hovers over them. Below, I’ll provide a simplified example that demonstrates how to achieve hot-tracking effects in an owner-drawn `TabControl`.
### Step-by-step Implementation
1. **Create a new Win... | 31,768 | [
{
"from": "human",
"value": "Anyone have a C# example showing an owner drawn tabcontrol with hot-tracking effects?\nI've implemented a nice owner drawn tabcontrol using C# and .NET 2.0 but i'm stumped when it comes to implementing hot-tracking effects.\nAny Ideas?\n"
},
{
"from": "gpt",
"value":... |
I am trying to find an algorithm to count from 0 to 2n-1 but their bit pattern reversed. I care about only n LSB of a word. As you may have guessed I failed.
For n=3:
000 -> 0
100 -> 4
010 -> 2
110 -> 6
001 -> 1
101 -> 5
011 -> 3
111 -> 7
You get the idea.
Answers in pseudo-code is great. Code fragments in any langua... | To count from 0 to \(2^n - 1\) while generating the numbers with their bit patterns reversed, we can utilize a modified counting approach instead of simply reversing the bits of a number after counting.
The approach is to count in binary, but at each step, we can construct the reversed bits directly. The idea is to sy... | 33,918 | [
{
"from": "human",
"value": "I am trying to find an algorithm to count from 0 to 2n-1 but their bit pattern reversed. I care about only n LSB of a word. As you may have guessed I failed.\nFor n=3: \n000 -> 0\n100 -> 4\n010 -> 2\n110 -> 6\n001 -> 1\n101 -> 5\n011 -> 3\n111 -> 7\n\nYou get the idea.\nAnswers ... |
Desktop clients will be pushing data using WCF to a central server.
When the schema changes etc, say 100 computers have the old version of the desktop client while the rest are using the latest build.
What do I have to do on the server end to handle both versions?
Do I create 2 endpoints in WCF or a single smart endpoi... | When dealing with versioning in WCF services, you have a few different strategies to handle backward compatibility between different versions of your client applications. Here are two common approaches:
### 1. Separate Endpoints for Each Version
**Description:**
You create separate WCF service endpoints for each vers... | 33,737 | [
{
"from": "human",
"value": "Desktop clients will be pushing data using WCF to a central server.\nWhen the schema changes etc, say 100 computers have the old version of the desktop client while the rest are using the latest build.\nWhat do I have to do on the server end to handle both versions?\nDo I create... |
I have a Windows Forms TreeView (node, subnodes). Each node contains some additional information in its Tag. Also, each nodes maps a file on the disk. What's the easiest way copy/cut/paste nodes/files in C#?
It would be nice to have some sample code.
| To implement copy/cut/paste functionality for a `TreeView` in a Windows Forms application, we can use a simple approach that involves maintaining a clipboard mechanism that will hold the copied or cut node, along with its associated file information.
Here is a step-by-step implementation, along with sample code:
1. *... | 31,834 | [
{
"from": "human",
"value": "I have a Windows Forms TreeView (node, subnodes). Each node contains some additional information in its Tag. Also, each nodes maps a file on the disk. What's the easiest way copy/cut/paste nodes/files in C#?\nIt would be nice to have some sample code.\n"
},
{
"from": "gp... |
I ported gchecky to the google app engine. you can try it here
It implements both level 1 (cart submission) and level 2 (notifications from google checkout).
Is there any other payment option that works on the google app engine (paypal for example) and supports level 2 (notifications)?
| Yes, there are several payment options that can work with Google App Engine and support notifications similar to Level 2 notifications from Google Checkout. One of the most popular options is PayPal, which offers several integration methods that can be used in web applications, including those hosted on Google App Engi... | 37,384 | [
{
"from": "human",
"value": "I ported gchecky to the google app engine. you can try it here\nIt implements both level 1 (cart submission) and level 2 (notifications from google checkout).\nIs there any other payment option that works on the google app engine (paypal for example) and supports level 2 (notifi... |
I'm trying to call a web service in an Excel Macro:
Set objHTTP = New MSXML.XMLHTTPRequest
objHTTP.Open "post", "https://www.server.com/EIDEServer/EIDEService.asmx"
objHTTP.setRequestHeader "Content-Type", "text/xml"
objHTTP.setRequestHeader "SOAPAction", "PutSchedule"
objHTTP.send strXML
And I get back the foll... | The error message you received indicates that the server did not recognize the value of the `SOAPAction` header you provided. This often means that the `SOAPAction` value you are using is incorrect for the operation you are trying to perform.
Here are some steps you can take to troubleshoot and resolve the issue:
###... | 30,737 | [
{
"from": "human",
"value": "I'm trying to call a web service in an Excel Macro:\nSet objHTTP = New MSXML.XMLHTTPRequest\nobjHTTP.Open \"post\", \"https://www.server.com/EIDEServer/EIDEService.asmx\"\nobjHTTP.setRequestHeader \"Content-Type\", \"text/xml\"\nobjHTTP.setRequestHeader \"SOAPAction\", \"PutSche... |
I'd like to find a way to do a SQL query that will calculate the cidr (bit representation) of a subnet mask stored in the database. So for example, I've got either 255.255.255.0 or its decimal value (4294967040) stored in the database. I'd like to do a select and get back /24 representation via the query.
I've done t... | Calculating the CIDR representation of a subnet mask can vary slightly across different SQL dialects. Below is a SQL solution that should work for MySQL and PostgreSQL. For Oracle, the logic remains the same, but you'll need to adjust the syntax accordingly.
### SQL Query for MySQL/PostgreSQL
Assuming you have a tabl... | 34,012 | [
{
"from": "human",
"value": "I'd like to find a way to do a SQL query that will calculate the cidr (bit representation) of a subnet mask stored in the database. So for example, I've got either 255.255.255.0 or its decimal value (4294967040) stored in the database. I'd like to do a select and get back /24 ... |
I have a Php application using stream_socket_client(), to get data through tcp from a back-end server, but would like to keep the connections alive or even better in a pool or something to avoid the connect/disconnect over head.
But I'm not a Php guru, so I have no idea how to do this. And although I could probably fig... | Creating a connection pool for a PHP application that uses `stream_socket_client()` is a good idea to reduce the overhead associated with establishing TCP connections repeatedly. A connection pool maintains a set of open connections that can be reused, improving performance and responsiveness. Below are some steps and ... | 33,266 | [
{
"from": "human",
"value": "I have a Php application using stream_socket_client(), to get data through tcp from a back-end server, but would like to keep the connections alive or even better in a pool or something to avoid the connect/disconnect over head.\nBut I'm not a Php guru, so I have no idea how to ... |
I am having trouble setting the path to jquery in an mvc app. In my master page I have the script declared and jquery works at the root of my app. When I navigate to a content view page in my app jquery does not get loaded properly. Do I need to set the path in the content page as well or declare the path differently?
... | In an ASP.NET MVC application, when you reference JavaScript files (or any resources), it’s important to ensure that the path to those files is correct relative to the root of the application, especially when dealing with different views or content pages.
In your case, the script path is:
```html
<script src="Views/S... | 36,094 | [
{
"from": "human",
"value": "I am having trouble setting the path to jquery in an mvc app. In my master page I have the script declared and jquery works at the root of my app. When I navigate to a content view page in my app jquery does not get loaded properly. Do I need to set the path in the content page ... |
I'm in the process of establishing some new source control best practices for my organization, so I've been immersing myself in things like TreeSurgeon for the past few days.
One thing I see a lot is that it's a best practice to include your references in your source control tree, but in a seperate directory (lib/ in t... | Hi Brian,
Establishing source control best practices is crucial for maintaining code quality and facilitating collaboration. Including references in a separate directory (like `lib/`) rather than directly in the `bin/` folder of your ASP.NET projects is a practice that offers several advantages. Let's break down the r... | 34,209 | [
{
"from": "human",
"value": "I'm in the process of establishing some new source control best practices for my organization, so I've been immersing myself in things like TreeSurgeon for the past few days.\nOne thing I see a lot is that it's a best practice to include your references in your source control tr... |
I'm developing a web app for an Apache shared hosting server. I have already written some code in Perl but I recently found out, to my surprise, the shared hosting provider does not provided mod_perl or a way to install it.
I have been a bit worried that running a Perl web app through CGI without mod_perl would make i... | When considering the performance of web applications using Perl through CGI versus PHP, there are several factors to keep in mind. Let's explore your options and their implications.
### Perl CGI vs. PHP
1. **Performance:**
- **CGI (Common Gateway Interface)**: Running a Perl application via CGI can be slower compa... | 35,938 | [
{
"from": "human",
"value": "I'm developing a web app for an Apache shared hosting server. I have already written some code in Perl but I recently found out, to my surprise, the shared hosting provider does not provided mod_perl or a way to install it.\nI have been a bit worried that running a Perl web app... |
What is the keyboard short cut in Eclipse to jump to the closing brace of a scope?
| In Eclipse, you can use the keyboard shortcut `Ctrl + Shift + ]` to jump to the closing brace of a scope. This shortcut allows you to navigate easily through your code by moving the cursor to the matching bracket or brace. | 39,292 | [
{
"from": "human",
"value": "What is the keyboard short cut in Eclipse to jump to the closing brace of a scope?\n"
},
{
"from": "gpt",
"value": "In Eclipse, you can use the keyboard shortcut `Ctrl + Shift + ]` to jump to the closing brace of a scope. This shortcut allows you to navigate easily t... |
So I have a column with different numbers and wish to categorize them by range within 30 minute intervals. So 5 would be 0-30, 697 would be 690-720, and 169 would be 150-180. I was first thinking of doing a case statement, but it doesn't look like Access 2003 supports it. Is there perhaps some sort of algorithm that co... | In Microsoft Access 2003, you can achieve the categorization of numbers into specified ranges without using a CASE statement by employing a combination of simple mathematical operations in your query. Since you want to categorize your numbers into 30-minute intervals, we can determine the lower bound of each range by u... | 36,666 | [
{
"from": "human",
"value": "So I have a column with different numbers and wish to categorize them by range within 30 minute intervals. So 5 would be 0-30, 697 would be 690-720, and 169 would be 150-180. I was first thinking of doing a case statement, but it doesn't look like Access 2003 supports it. Is the... |
I'm writing a JPA connector to a legacy sistem. The problem is, DB design in the system is.. well.. horrible.
I need to implement an entity that maps to three tables. I can do it using named sql queries, but the probem is, I have to use this entity in a OneToMany relation (this entity is on the many side). So how do I ... | Mapping an entity to multiple tables in JPA can be a bit tricky, especially when dealing with legacy databases. Given your scenario where you need to use a single entity that combines data from three tables and you want to maintain a `OneToMany` relationship, here are a few approaches you can take:
### Approach 1: Use... | 34,096 | [
{
"from": "human",
"value": "I'm writing a JPA connector to a legacy sistem. The problem is, DB design in the system is.. well.. horrible.\nI need to implement an entity that maps to three tables. I can do it using named sql queries, but the probem is, I have to use this entity in a OneToMany relation (this... |
I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:
>>> foo = 'baz "\"'
>>> foo
'baz ""'
So instead of baz "\" like I want I'm getting baz "". If I then tr... | In Python, when you assign a string to a variable, the representation of that string may display differently than what you intended, especially with escape characters like backslashes and quotes.
To include both double quotes and backslashes in a string while keeping the intended representation, you can use one of th... | 37,365 | [
{
"from": "human",
"value": "I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:\n>>> foo = 'baz \"\\\"'\n>>> foo\n'baz \"\"'\n\nSo instead of b... |
Is there any designer for rdl files (visual studio .net reports) that can be used on a web browser?
| Yes, there are several options for designing RDL (Report Definition Language) files used in SQL Server Reporting Services (SSRS) directly from a web browser. Here are a few approaches you could consider:
1. **Microsoft Power BI Report Builder**:
- Although primarily a desktop application, Power BI Report Builder ca... | 8,400 | [
{
"from": "human",
"value": "Is there any designer for rdl files (visual studio .net reports) that can be used on a web browser?\n"
},
{
"from": "gpt",
"value": "Yes, there are several options for designing RDL (Report Definition Language) files used in SQL Server Reporting Services (SSRS) direc... |
Just wondering if anyone has any favourite SQL references they to use when creating new queries. Possibly something that shows syntax, or available functions?
| Absolutely! Here are some excellent SQL references that can help you with syntax, functions, and best practices while creating new queries:
1. **SQL Documentation by Major Database Systems**:
- **MySQL**: [MySQL Documentation](https://dev.mysql.com/doc/)
- **PostgreSQL**: [PostgreSQL Documentation](https://www.p... | 33,544 | [
{
"from": "human",
"value": "Just wondering if anyone has any favourite SQL references they to use when creating new queries. Possibly something that shows syntax, or available functions?\n"
},
{
"from": "gpt",
"value": "Absolutely! Here are some excellent SQL references that can help you with s... |
in the System.Linq namespace, we can now extend our IEnumerable's to have the Any() and Count() extension methods.
I was told recently that if i want to check that a collection contains 1 or more items inside it, I should use the .Any() extension method instead of the .Count() > 0 extension method because the .Count() ... | Yea, you're correct in your understanding of the differences between using `.Any()`, `.Count()`, and the `Count` or `Length` properties of collections.
1. **Using `.Any()`**: This method is optimized to check if there is at least one element in the collection. It will return `true` as soon as it finds the first elemen... | 36,542 | [
{
"from": "human",
"value": "in the System.Linq namespace, we can now extend our IEnumerable's to have the Any() and Count() extension methods.\nI was told recently that if i want to check that a collection contains 1 or more items inside it, I should use the .Any() extension method instead of the .Count() ... |
Is there a way that I can get a full crash dump when my application crashes suddenly?
The problem is that I suspect that it's due to unmanaged code that kills the .net framework itself, and because of that, unless there's a debugger attached to the application at the moment of the crash, the application doesn't even g... | To capture a full crash dump of a .NET application without needing to attach a debugger each time, you can consider the following methods:
### 1. **Windows Error Reporting (WER)**
Windows Error Reporting can be configured to create a crash dump file whenever an application crashes. You can enable WER to create dump f... | 35,609 | [
{
"from": "human",
"value": "Is there a way that I can get a full crash dump when my application crashes suddenly? \nThe problem is that I suspect that it's due to unmanaged code that kills the .net framework itself, and because of that, unless there's a debugger attached to the application at the moment of... |
I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (for desktop applications, and long running processes). Are there any best p... | Developing libraries for a REST API in multiple programming languages can indeed be challenging. Here are some best practices to help maintain sanity and ensure a consistent and maintainable codebase across your PHP and Python libraries:
### 1. **Common Design Patterns**
- **Use Similar Abstractions**: Strive to ke... | 29,522 | [
{
"from": "human",
"value": "I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (for desktop applications, and long ... |
What web based interface for browsing Subversion repositories do you like the most? We have tried Viewvc, but the installation seemed too complex for us.
This is no poll. I'd really love to allow people at the office to be able to access the data at the repositories with their web browsers and see who modified each fil... | If you're looking for a more user-friendly web interface for browsing Subversion repositories, here are a few alternatives you might consider:
1. **WebSVN**: This is a simpler alternative to ViewVC and provides a straightforward web interface for browsing Subversion repositories. It allows users to view files, see com... | 36,128 | [
{
"from": "human",
"value": "What web based interface for browsing Subversion repositories do you like the most? We have tried Viewvc, but the installation seemed too complex for us.\nThis is no poll. I'd really love to allow people at the office to be able to access the data at the repositories with their ... |
OK, so I readily concede that I'm a newbie when it comes to continuous integration.
That being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up.
As I understand it, in C# the .csproj file produced by VS 200... | It's great that you're diving into Continuous Integration (CI) and MSBuild, as it can greatly improve your development workflow. Let's address your questions and concerns regarding using CC.NET, MSBuild, and MbUnit.
### 1. Using VS-Generated `.csproj` Files
**Is it advisable to use the VS-generated .csproj file as th... | 33,280 | [
{
"from": "human",
"value": "OK, so I readily concede that I'm a newbie when it comes to continuous integration.\nThat being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up.\nAs I understand it... |
I have created an web service I need to publish this service. I need to host and authenticated users need to access my services using ASP.net 2.0
| Publishing a web service and ensuring it is accessible to authenticated users involves several steps. Since you mentioned you're using ASP.NET 2.0, here's a general guide to help you through the process.
### 1. Hosting Your Web Service
You have a few options for hosting your ASP.NET web service:
- **Shared Hosting**... | 31,537 | [
{
"from": "human",
"value": "I have created an web service I need to publish this service. I need to host and authenticated users need to access my services using ASP.net 2.0\n"
},
{
"from": "gpt",
"value": "Publishing a web service and ensuring it is accessible to authenticated users involves s... |
I know about using a -vsdoc.js file for IntelliSense, and the one for jQuery is easy to find. What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files? Also, is there a document which outlines the specifications for -vsdoc.js files?
| IntelliSense for JavaScript libraries in Visual Studio can greatly enhance your development experience, and the use of `-vsdoc.js` files is a common way to provide this functionality. Below are some popular JavaScript libraries and frameworks along with where you can find their corresponding `-vsdoc.js` files:
### Lib... | 33,393 | [
{
"from": "human",
"value": "I know about using a -vsdoc.js file for IntelliSense, and the one for jQuery is easy to find. What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files? Also, is there a document which outlines the specifications for -vsdoc.js files?\n"
},
... |
I'm using event delegation to listen for events lower in the DOM, but it's not working for an onchange event on a select box. Does the onchange event propagate or bubble up the DOM?
Googling has failed in finding a conclusive answer.
| The `change` event on a `<select>` element (and other form elements) does **not** bubble up in the same way that some other events do. However, it is important to note that the `change` event does bubble in general, meaning it can be caught by event listeners on parent elements, but it only does so when the change occu... | 33,942 | [
{
"from": "human",
"value": "I'm using event delegation to listen for events lower in the DOM, but it's not working for an onchange event on a select box. Does the onchange event propagate or bubble up the DOM?\nGoogling has failed in finding a conclusive answer.\n"
},
{
"from": "gpt",
"value":... |
Lists in C# have the .ToArray() method. I want the inverse, where an array is transformed into a list. I know how to create a list and loop through it but I would like a one liner to swap it back.
I am using the String.Split method in the .NET 2.0 environment, so LINQ, etc. is not available to me.
| In .NET 2.0, since LINQ and other modern features aren't available, you can convert an array to a list using the `ArrayList` class. Here's a simple one-liner to convert an array of strings into an `ArrayList`, which can be considered a form of a list:
```csharp
ArrayList myList = new ArrayList(myArray);
```
If you're... | 36,322 | [
{
"from": "human",
"value": "Lists in C# have the .ToArray() method. I want the inverse, where an array is transformed into a list. I know how to create a list and loop through it but I would like a one liner to swap it back.\nI am using the String.Split method in the .NET 2.0 environment, so LINQ, etc. is ... |
There are several similar Oracle technologies - Oracle Streams, Oracle Change Data Capture and Database Change Notification.
What are the differences between these?
Are they related to Oracle Advanced Queueing?
| Oracle provides several technologies for data replication, change tracking, and notification, each designed for different use cases. Here’s a breakdown of Oracle Streams, Oracle Change Data Capture (CDC), and Database Change Notification (DCN), along with their relation to Oracle Advanced Queuing (AQ).
### Oracle Stre... | 32,862 | [
{
"from": "human",
"value": "There are several similar Oracle technologies - Oracle Streams, Oracle Change Data Capture and Database Change Notification. \nWhat are the differences between these? \nAre they related to Oracle Advanced Queueing?\n"
},
{
"from": "gpt",
"value": "Oracle provides sev... |
I'm relatively new to Python and am having problems programming with Scapy, the Python network manipulation tool. However, I can't tell if it's as much a Scapy problem as it is a being-a-Python-newbie problem. On the scapy site, they give a sample program which I'm not able to run on my own machine:
#! /usr/bin/env pyt... | It looks like you're encountering an ImportError when trying to import `sr1` from Scapy, which can sometimes happen if there are issues with the installation or if you are using an older version of Scapy.
### Steps to Troubleshoot and Fix the Issue:
1. **Install/Upgrade Scapy:**
Make sure you have Scapy installed ... | 23,304 | [
{
"from": "human",
"value": "I'm relatively new to Python and am having problems programming with Scapy, the Python network manipulation tool. However, I can't tell if it's as much a Scapy problem as it is a being-a-Python-newbie problem. On the scapy site, they give a sample program which I'm not able to r... |
What would be the best way of inserting functionality into a binary application (3d party, closed source).
The target application is on OSX and seems to have been compiled using gcc 3+. I can see the listing of functions implemented in the binary and have debugged and isolated one particular function which I would like... | Injecting functionality into a closed-source binary application on macOS can be quite complex, but here are some possible approaches that you can consider, especially since you have debugging and binary patching capabilities:
### 1. Direct Binary Patching
Since you already have experience modifying the binary, you ca... | 32,113 | [
{
"from": "human",
"value": "What would be the best way of inserting functionality into a binary application (3d party, closed source).\nThe target application is on OSX and seems to have been compiled using gcc 3+. I can see the listing of functions implemented in the binary and have debugged and isolated ... |
I am trying to use a business object that I am passing to the report.rdlc. The properties in my object are not directly exposed. The properties I require are embedded within another object inside the top level object. As this is a WCF project I can't control what goes on at the server end. I am just able to request the... | When dealing with nested objects in RDLC reports, especially when the properties you need are deeply embedded in the object structure, you have to follow a specific approach to access those properties.
Since your object hierarchy indicates that `ClientName` and `ClientID` are likely properties of a collection, you ne... | 32,455 | [
{
"from": "human",
"value": "I am trying to use a business object that I am passing to the report.rdlc. The properties in my object are not directly exposed. The properties I require are embedded within another object inside the top level object. As this is a WCF project I can't control what goes on at the ... |
Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry with it's data transformed ?
Ex: I Have a Path object that has it's Path.Data set to a PathGeometry object, I want to tranform the points of the PathGeometry object in place using a transform, and not apply ... | To transform the points of a `PathGeometry` in place using a `Transform`, you'll want to iterate through the various segments of the geometry and apply the transform to each point. Unfortunately, the `Transform` class does not provide a direct way to transform an entire `Geometry` object at once; you will need to manua... | 33,223 | [
{
"from": "human",
"value": "Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry with it's data transformed ?\nEx: I Have a Path object that has it's Path.Data set to a PathGeometry object, I want to tranform the points of the PathGeometry object ... |
Is it possible to do something like this:
<% Dim foo as string = "bar" %>
<script type="text/javascript">
var baz = <%=foo %>
</script>
Where the <script> tag is embedded on my index page?
| Yes, you can use server-side code to output a value into a `<script>` tag in an ASP.NET page. However, there are some syntax considerations when embedding server-side code in JavaScript.
### Using ASP.NET with Inline Script
Here is a correct way to achieve what you're trying to do:
```aspx
<%@ Page Language="VB" %>
... | 36,740 | [
{
"from": "human",
"value": "Is it possible to do something like this:\n<% Dim foo as string = \"bar\" %>\n\n<script type=\"text/javascript\">\n var baz = <%=foo %>\n</script>\n\nWhere the <script> tag is embedded on my index page?\n"
},
{
"from": "gpt",
"value": "Yes, you can use server-side... |
The ragged right flat file option is great for a single trailing field terminated with a CRLF, but when any number of trailing fields which are blank are suppressed and the line terminated early with CRLF, I have found no alternative in SSIS but to read a few columns in with a single "REMAINDER" column and then used a ... | Dealing with ragged right flat files in SQL Server Integration Services (SSIS) can be challenging, especially when you have optional fields that may be blank and result in lines being terminated prematurely. While you've already outlined some options you've considered, here are a few additional suggestions to help with... | 34,559 | [
{
"from": "human",
"value": "The ragged right flat file option is great for a single trailing field terminated with a CRLF, but when any number of trailing fields which are blank are suppressed and the line terminated early with CRLF, I have found no alternative in SSIS but to read a few columns in with a s... |
I'm quite new to programming, and I was wondering if there is a good source of well-programmed non-standard C code and libraries.
I Googled and didn't find anything.
I was a bit surprised by this, especially because I used to search for many Python examples and libraries and never had trouble finding anything.
I alrea... | Welcome to the world of programming! While it's true that C doesn't have as many high-level libraries available compared to languages like Python, there are still many resources and libraries available for various purposes. Here are some suggestions for finding well-programmed, non-standard C code and libraries:
### O... | 28,533 | [
{
"from": "human",
"value": "I'm quite new to programming, and I was wondering if there is a good source of well-programmed non-standard C code and libraries.\nI Googled and didn't find anything. \nI was a bit surprised by this, especially because I used to search for many Python examples and libraries and ... |
I have a dialog where each entry in a JTree has its corresponding options in a different panel, which is updated when the selection changes. If options for one of the entries is set to an invalid state, when the user attempts to change to a different entry in the tree, I want there to be an error dialog and have the se... | You're right that using a `valueChanged` listener to control selection in a `JTree` can lead to complex and potentially problematic code, especially when managing state like an error condition. Instead of trying to revert the selection in the `valueChanged` method and using a boolean flag to avoid recursion, you can ma... | 28,156 | [
{
"from": "human",
"value": "I have a dialog where each entry in a JTree has its corresponding options in a different panel, which is updated when the selection changes. If options for one of the entries is set to an invalid state, when the user attempts to change to a different entry in the tree, I want th... |
If you have a Property that gets and sets to an instance variable then normally you always use the Property from outside that class to access it.
My question is should you also always do so within the class? I've always used the Property if there is one, even within the class, but would like to hear some arguments for... | When deciding whether to use a property from within its own class or directly access the instance variable, both options have their merits and drawbacks. Here’s a breakdown of the arguments for and against each approach:
### Using Properties Within the Class
**Pros:**
1. **Encapsulation**: By using properties, you e... | 34,074 | [
{
"from": "human",
"value": "If you have a Property that gets and sets to an instance variable then normally you always use the Property from outside that class to access it. \nMy question is should you also always do so within the class? I've always used the Property if there is one, even within the class,... |
I was using mysql++ library and compiling with GCC 3.3.4.
That GCC version had some bugs so I upgraded to GCC 3.4.6.
After upgrading GCC I rebuilt mysql++ and recompiled my program. But now I get a segmentation fault error.
I get the following message:
./mysqlTest: Symbol `_ZTVSt15basic_stringbufIcSt11char_traitsIcESa... | When you upgrade GCC and rebuild a library like mysql++, several issues may arise that can lead to segmentation faults or other compatibility problems. Here are the steps you can take to troubleshoot and resolve the segmentation fault you're experiencing:
### 1. **Rebuild All Dependencies**
When you upgrade GCC, it is... | 34,359 | [
{
"from": "human",
"value": "I was using mysql++ library and compiling with GCC 3.3.4.\nThat GCC version had some bugs so I upgraded to GCC 3.4.6.\nAfter upgrading GCC I rebuilt mysql++ and recompiled my program. But now I get a segmentation fault error.\nI get the following message:\n\n./mysqlTest: Symbol ... |
Why is it that in a C# switch statement, for a variable used in multiple cases, you only declare it in the first case?
For example, the following throws the error "A local variable named 'variable' is already defined in this scope".
switch (Type)
{
case Type.A:
string variable = "x";
bre... | In C#, the scope of variables declared within a `switch` statement is limited to the block in which they are declared. However, C# treats all the `case` labels in a `switch` statement as part of the same block, which is why you can run into the issue you're experiencing.
When you declare a variable like `string variab... | 35,644 | [
{
"from": "human",
"value": "Why is it that in a C# switch statement, for a variable used in multiple cases, you only declare it in the first case?\nFor example, the following throws the error \"A local variable named 'variable' is already defined in this scope\".\nswitch (Type)\n{\n case Type.A:\n ... |
I'm running a website using ASP.NET 2.0. Every now and then (10+ times per day on 100+ users daily) I receive this error: Forms authentication failed - ticket supplied has expired.
Here's my web.config snippet:
<authentication mode="Forms">
<forms name=".CLLSAUTH" loginUrl="login.aspx" protection="All" path="/" ti... | The issue you are encountering with the "Forms authentication failed - ticket supplied has expired" error typically arises from a few potential causes, especially in an ASP.NET application using Forms Authentication. Here are some possible reasons and solutions:
1. **Authentication Ticket Expiration**:
- The `time... | 33,032 | [
{
"from": "human",
"value": "I'm running a website using ASP.NET 2.0. Every now and then (10+ times per day on 100+ users daily) I receive this error: Forms authentication failed - ticket supplied has expired.\nHere's my web.config snippet:\n<authentication mode=\"Forms\">\n <forms name=\".CLLSAUTH\" lo... |
I'm sure this problem has been solved before and I'm curious how its done. I have code in which, when run, I want to scan the contents of a directory and load in functionality.
Specifically, I am working with a scripting engine that I want to be able to add function calls to. I want the core engine to provide very limi... | The problem you're describing is often approached in programming using a plugin or module system. This allows your core engine to load additional functionality dynamically from external scripts or libraries. Here are some general steps and considerations for implementing this feature, along with an example in Python.
... | 32,462 | [
{
"from": "human",
"value": "I'm sure this problem has been solved before and I'm curious how its done. I have code in which, when run, I want to scan the contents of a directory and load in functionality.\nSpecifically, I am working with a scripting engine that I want to be able to add function calls to. I... |
In SQL it is easy to do a join and only return the columns you want from the joined table. What is the best way to map this in JPA / Hibernate?
For example, there is a Folder entity mapped to the EMAIL_FOLDER and an Email entity mapped to the EMAIL table. There is a one-to-many relationship from Folder to Email. The Em... | Using JPA and Hibernate, there are several strategies you can employ to handle the situation where you want to selectively fetch data from your entities without the overhead of loading the entire entity, especially in the case of a heavy entity like `Email`. Your idea of creating a `LightEmail` DTO (Data Transfer Objec... | 27,043 | [
{
"from": "human",
"value": "In SQL it is easy to do a join and only return the columns you want from the joined table. What is the best way to map this in JPA / Hibernate?\nFor example, there is a Folder entity mapped to the EMAIL_FOLDER and an Email entity mapped to the EMAIL table. There is a one-to-many... |
Can someone show me how to get the top & left position of a div or span element when one is not specified?
ie:
<span id='11a' style='top:55px;' onmouseover="GetPos(this);">stuff</span>
<span id='12a' onmouseover="GetPos(this);">stuff</span>
In the above, if I do:
document.getElementById('11a').style.top
The value of ... | To get the actual position of a `<div>` or `<span>` element on a page, you can use the `getBoundingClientRect()` method. This method returns the size of an element and its position relative to the viewport, allowing you to determine where it is located on the screen, regardless of whether the `top` or `left` properties... | 34,914 | [
{
"from": "human",
"value": "Can someone show me how to get the top & left position of a div or span element when one is not specified?\nie:\n<span id='11a' style='top:55px;' onmouseover=\"GetPos(this);\">stuff</span>\n<span id='12a' onmouseover=\"GetPos(this);\">stuff</span>\n\nIn the above, if I do:\ndocu... |
Is there any free IDE for Pl/SQL development
| Yes, there are several free Integrated Development Environments (IDEs) and tools available for PL/SQL development. Here are some popular options:
1. **Oracle SQL Developer**: This is a free IDE provided by Oracle for PL/SQL and SQL development. It offers a user-friendly interface, and features like code completion, de... | 35,927 | [
{
"from": "human",
"value": "Is there any free IDE for Pl/SQL development\n"
},
{
"from": "gpt",
"value": "Yes, there are several free Integrated Development Environments (IDEs) and tools available for PL/SQL development. Here are some popular options:\n\n1. **Oracle SQL Developer**: This is a f... |
In ASP.NET, is it possible to use both code behind and inline on the same page? I want to add some inline code that's related to the UI of the page, the reason to make it inline is to make it easy to modify as it outputs some HTML which is why I don't want to add it in the code behind, is this possible in ASP.NET?
Edit... | Yes, in ASP.NET Web Forms, it is indeed possible to use both code-behind and inline code on the same page. You can have a `<script runat="server">` block within your ASPX page, allowing you to mix inline server-side code directly within your markup.
Here’s a brief example to illustrate how you can achieve this:
```as... | 34,742 | [
{
"from": "human",
"value": "In ASP.NET, is it possible to use both code behind and inline on the same page? I want to add some inline code that's related to the UI of the page, the reason to make it inline is to make it easy to modify as it outputs some HTML which is why I don't want to add it in the code ... |
Inspired by this question
The choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or maintain a measurement) of how well sorted the collection is? Can we do this in such a way that the cost of maintaining or me... | Yes, it is indeed possible to measure how well sorted a collection is, and this can help in selecting the most appropriate sorting algorithm. Here are several approaches you could take to assess the degree of sorting, along with considerations for their efficiency:
### 1. **Inversion Count:**
An inversion in an array ... | 33,349 | [
{
"from": "human",
"value": "Inspired by this question\nThe choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or maintain a measurement) of how well sorted the collection is? Can we do this in suc... |
I am working on an Orbited-powered website and I'm experiencing some annoying behavior with IE7. Everything works fine and dandy in FF3, but in IE7, I get a recurring error if I reload the page:
Error: Can't execute code from a freed script
In other words, the site works in IE7 when you first browse to it, but breaks... | The issue you're experiencing with Internet Explorer 7 and the "Can't execute code from a freed script" error is a known quirk of IE's handling of JavaScript, particularly in scenarios involving dynamically loaded scripts or scripts that are executed after an iframe reload.
Given that the problem doesn't occur on loca... | 33,668 | [
{
"from": "human",
"value": "I am working on an Orbited-powered website and I'm experiencing some annoying behavior with IE7. Everything works fine and dandy in FF3, but in IE7, I get a recurring error if I reload the page: \nError: Can't execute code from a freed script\n\nIn other words, the site works in... |
There seem to be a number of weird things one could do if one wanted, for hooking up page-load type events. Here are some specific questions:
I know about the auto-hooked-up pageLoad function. Are there any others like it?
Where do I hook up events like those from, e.g., Sys.Application.add_init or Sys.WebForms.PageRe... | In ASP.NET AJAX, there are several mechanisms available for hooking up to page-load events and managing asynchronous behavior. Here's a detailed look at the questions you've raised:
### 1. Other Events Similar to `pageLoad`
Aside from the `pageLoad` event, you can hook up to several other events in ASP.NET AJAX:
- **... | 32,571 | [
{
"from": "human",
"value": "There seem to be a number of weird things one could do if one wanted, for hooking up page-load type events. Here are some specific questions:\n\nI know about the auto-hooked-up pageLoad function. Are there any others like it?\nWhere do I hook up events like those from, e.g., Sys... |
I have created a proc that grabs all the user tables in a local DB on my machine. I want to be able to create a flat file of all my tables using BCP and SQL. Its a dummy database in SQL 2000 connecting through windows authentication. I have set my enviroment path variable in WinXP SP2. I have created new users to acces... | The error message you're encountering, `SQLState = 37000, NativeError = 4060`, indicates a login failure related to the database connection. The issue seems to revolve around how you're trying to authenticate with SQL Server, especially considering that you want to use Windows Authentication.
### Possible Issues and F... | 28,653 | [
{
"from": "human",
"value": "I have created a proc that grabs all the user tables in a local DB on my machine. I want to be able to create a flat file of all my tables using BCP and SQL. Its a dummy database in SQL 2000 connecting through windows authentication. I have set my enviroment path variable in Win... |
I am working in Visual Studio 2008 on an ASP.NET application, which has been deployed to a test server. I would like to make a build without debug information to place in production, but the configuration manager only shows "Debug" in the configuration dropdown for my project.
My other Visual Studio projects show "Deb... | The absence of the "Release" option and the "New..." and "Edit..." commands in the Configuration Manager in your Visual Studio 2008 project could be due to several reasons. Here's how to troubleshoot and resolve this issue:
1. **Check Project Type**: Ensure that your project is a web application project. If you have a... | 35,107 | [
{
"from": "human",
"value": "I am working in Visual Studio 2008 on an ASP.NET application, which has been deployed to a test server. I would like to make a build without debug information to place in production, but the configuration manager only shows \"Debug\" in the configuration dropdown for my project... |
I am building a calendaring application in ruby on rails. I am using my own schema for storing events, but I don't know how to display events in calendar, and also how to add a calendar in my application.
Will I have to write code to display calendar or can I use any plugin to display calendar.
| When building a calendaring application in Ruby on Rails, you have a few options for displaying events in a calendar format. You can either implement the calendar display from scratch using custom code or leverage existing libraries or plugins that simplify this task.
### Option 1: Using a Library or Plugin
Using a l... | 31,591 | [
{
"from": "human",
"value": "I am building a calendaring application in ruby on rails. I am using my own schema for storing events, but I don't know how to display events in calendar, and also how to add a calendar in my application. \nWill I have to write code to display calendar or can I use any plugin t... |
When developing on a system with dual monitors, I like to make the most of the extra space by stretching Visual Studio across both. It is fantastic to be able to see the Output, Breakpoints, Error List, Object Browser, and ReSharper windows at the same time without having to make them tiny and dock them in the main wi... | To enhance your Visual Studio experience with a dual-monitor setup, there are a few options and add-ins that might help with your needs:
### 1. **Visual Studio Extensions:**
While Visual Studio doesn’t natively support having maximizable secondary windows like you described, there are a few extensions that might help ... | 33,589 | [
{
"from": "human",
"value": "When developing on a system with dual monitors, I like to make the most of the extra space by stretching Visual Studio across both. It is fantastic to be able to see the Output, Breakpoints, Error List, Object Browser, and ReSharper windows at the same time without having to ma... |
In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page.
Ex: Welcome 'user'!
I'm trying to find the way where i can strip the quotations around the user and ha... | You can easily remove single quotes from a string in PHP using the `stripslashes()` or `str_replace()` functions. Since you want to specifically remove single quotes, you can use `str_replace()`.
Here’s how you can modify your code to strip the single quotes from the username:
```php
$login = $_SESSION['login'];
// ... | 32,503 | [
{
"from": "human",
"value": "In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page.\nEx: Welcome 'user'!\nI'm trying to find the way where i can ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.