instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
There's an in-house program we use and it's stored on a UNC share so that updates are transparent. I'd like to supply it some command line parameters like so:
\\server\share\in_house_thingy.exe myusername mypassword
But I can't seem to get it to work in either CMD or PowerShell or via a shortcut.
Anyone got any ideas... | Running executables from a UNC path in Windows can sometimes pose challenges, especially when it comes to passing command line parameters. Here are a few methods to help you run your program with parameters:
### Method 1: Use CMD with Quotation Marks
When dealing with UNC paths in CMD, it's a good idea to enclose the... | 49,775 | [
{
"from": "human",
"value": "There's an in-house program we use and it's stored on a UNC share so that updates are transparent. I'd like to supply it some command line parameters like so:\n\\\\server\\share\\in_house_thingy.exe myusername mypassword\n\nBut I can't seem to get it to work in either CMD or Po... |
I would like to be able to query whether or not a service is running from a windows batch file. I know I can use:
sc query "ServiceName"
but, this dumps out some text. What I really want is for it to set the errorlevel environment variable so that I can take action on that.
Do you know a simple way I can do this?... | You can indeed check whether a service is running without parsing text output, using the `sc` command and interpreting the error level. The `sc query` command sets the error level based on the status of the service. Here’s a simple way to do this in a Windows batch file:
```batch
@echo off
SET SERVICE_NAME="YourServic... | 49,286 | [
{
"from": "human",
"value": "I would like to be able to query whether or not a service is running from a windows batch file. I know I can use: \n\nsc query \"ServiceName\" \n\nbut, this dumps out some text. What I really want is for it to set the errorlevel environment variable so that I can take action o... |
I'm using PUT and DELETE more and more w/ my ajax work and wanted to see if it would be a "bad idea" to add these verbs to the .aspx application extension in IIS.
| Using HTTP methods like PUT and DELETE with AJAX requests can be a powerful way to interact with your server, especially in RESTful applications. However, there are several considerations when enabling these methods in your IIS-hosted ASP.NET application.
### Considerations for Allowing PUT and DELETE in IIS
1. **Sec... | 47,474 | [
{
"from": "human",
"value": "I'm using PUT and DELETE more and more w/ my ajax work and wanted to see if it would be a \"bad idea\" to add these verbs to the .aspx application extension in IIS.\n"
},
{
"from": "gpt",
"value": "Using HTTP methods like PUT and DELETE with AJAX requests can be a po... |
What is best way to show Date Picker for iPhone based Web Application. Can we show something like iPhone native date picker like shown below in web application:
| When developing a web application for iPhone, achieving a native-like date picker experience can enhance usability and align your app's design with user expectations. Here are some methods to implement a date picker in a web application that feels native to iOS:
### 1. Use `<input type="date">`
The simplest way to cr... | 49,408 | [
{
"from": "human",
"value": "What is best way to show Date Picker for iPhone based Web Application. Can we show something like iPhone native date picker like shown below in web application:\n\n"
},
{
"from": "gpt",
"value": "When developing a web application for iPhone, achieving a native-like d... |
What is the best way to add records to a database from an external script. I would like to use activerecord but I'm not sure how to do so outside the rails directory structure.
| If you want to use ActiveRecord to add records to a database from an external script, you can do this without being inside a Rails application directory. Here’s how to set it up:
1. **Create a new Ruby script**: Start by creating a new Ruby file, e.g., `add_records.rb`.
2. **Install ActiveRecord**: Make sure you have... | 46,834 | [
{
"from": "human",
"value": "What is the best way to add records to a database from an external script. I would like to use activerecord but I'm not sure how to do so outside the rails directory structure.\n"
},
{
"from": "gpt",
"value": "If you want to use ActiveRecord to add records to a datab... |
I seem to be unable to find the "link" between a controller's ViewData collection and a ViewPage's ViewData collection. Can anyone point me to where in the MVC framework a controlle's ViewData collection is transferred to a ViewPage's ViewData collection?
I have spent quite a lot of time using Reflector to try and work... | In ASP.NET MVC, the `ViewData` collection in a controller is transferred to the view when the view is rendered. The connection between a controller's `ViewData` and a view's `ViewData` is part of the framework's design, and it happens at a specific point during the view rendering process.
Here's a high-level overview ... | 44,243 | [
{
"from": "human",
"value": "I seem to be unable to find the \"link\" between a controller's ViewData collection and a ViewPage's ViewData collection. Can anyone point me to where in the MVC framework a controlle's ViewData collection is transferred to a ViewPage's ViewData collection?\nI have spent quite a... |
I need to be able to display some data in Eclipse in a grid/table control... I need things like paging, multiple column sorting, column choosing, etc. There is an SWT Table and the Nebula project has a grid in alpha.
Does what I need exist? 3rd party maybe? Doesn't have to be free, we can pay for the functionality.
| If you're looking for a grid/table control in SWT that offers advanced functionalities like paging, multiple column sorting, and customizable columns, there are several options you can consider, both in the SWT ecosystem and third-party libraries. Here are some recommendations:
### 1. **JFace TableViewer**
JFace provi... | 49,343 | [
{
"from": "human",
"value": "I need to be able to display some data in Eclipse in a grid/table control... I need things like paging, multiple column sorting, column choosing, etc. There is an SWT Table and the Nebula project has a grid in alpha.\nDoes what I need exist? 3rd party maybe? Doesn't have to be f... |
I wanted to know what the public opinion is about Resharper vs Devxpress CodeRush vs Visual AssitX.
some of my co-workers are CodeRush fans.. I like Resharper...would be great if someone could finish the debate for us.
| The debate between ReSharper, DevExpress CodeRush, and Visual Assist X often comes down to personal preference and specific use cases, as each tool has its strengths and weaknesses. Here's a breakdown of the public opinion and the features commonly associated with each tool:
### ReSharper:
1. **Code Analysis and Refac... | 48,926 | [
{
"from": "human",
"value": "I wanted to know what the public opinion is about Resharper vs Devxpress CodeRush vs Visual AssitX.\nsome of my co-workers are CodeRush fans.. I like Resharper...would be great if someone could finish the debate for us.\n"
},
{
"from": "gpt",
"value": "The debate bet... |
Trying to make a pure css dropdown list that works well, and can't find any good resources.
| Creating a pure CSS dropdown menu is a great way to enhance your web page without relying on JavaScript. Below is an example of a simple, responsive dropdown list using only HTML and CSS. This will work well across modern browsers.
### HTML Structure
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="... | 47,632 | [
{
"from": "human",
"value": "Trying to make a pure css dropdown list that works well, and can't find any good resources.\n"
},
{
"from": "gpt",
"value": "Creating a pure CSS dropdown menu is a great way to enhance your web page without relying on JavaScript. Below is an example of a simple, resp... |
I'm trying to setup a second ruby install in my home directory (a different version of ruby for testing). I've compiled ruby into ~/bin/ and everything is working until I try to install rubygems.
I have GEM_HOME set to ~/gems directory and GEM_PATH set to the same. Then I try to install rubygems with
~/bin/ruby setup.r... | When you install RubyGems, it typically installs the gems in the specified GEM_HOME directory, but it may not update the load paths automatically. Here are a few steps you can take to troubleshoot and resolve the issue of Ruby not being able to find RubyGems:
1. **Check GEM_HOME and GEM_PATH**: Make sure that both `GE... | 49,059 | [
{
"from": "human",
"value": "I'm trying to setup a second ruby install in my home directory (a different version of ruby for testing). I've compiled ruby into ~/bin/ and everything is working until I try to install rubygems.\nI have GEM_HOME set to ~/gems directory and GEM_PATH set to the same. Then I try t... |
like whether it is pentium or AMD etc.
| It seems like you're asking about different types of processors, such as Intel's Pentium and AMD's processors. Here's a brief overview of each:
### Intel Processors:
1. **Pentium**:
- Historically positioned as an entry-level processor for basic computing tasks.
- Newer Pentium models (like Pentium Gold) can h... | 46,597 | [
{
"from": "human",
"value": "like whether it is pentium or AMD etc. \n"
},
{
"from": "gpt",
"value": "It seems like you're asking about different types of processors, such as Intel's Pentium and AMD's processors. Here's a brief overview of each:\n\n### Intel Processors:\n1. **Pentium**: \n - H... |
I want to use the standard ADO connection string dialog box in MS Access.
How can I do that?
| In Microsoft Access, if you want to display the standard ADO (ActiveX Data Objects) connection string dialog box, you can utilize VBA (Visual Basic for Applications) to accomplish this. While Access doesn’t directly have a built-in dialog for setting ADO connection strings, you can create a custom form or use the `ADOD... | 47,218 | [
{
"from": "human",
"value": "I want to use the standard ADO connection string dialog box in MS Access.\nHow can I do that?\n"
},
{
"from": "gpt",
"value": "In Microsoft Access, if you want to display the standard ADO (ActiveX Data Objects) connection string dialog box, you can utilize VBA (Visua... |
I have a 3 table SQLServer Database.
Project
ProjectID
ProjectName
Thing
ThingID
ThingName
ProjectThingLink
ProjectID
ThingID
CreatedDate
When a Thing is ascribed to a Project an entry is put in the ProjectThingLink table.
Things can move between Projects. The CreatedDate is used to know which Project a Thing was la... | Yes, you can accomplish this by writing a SQL query that joins the three tables (Project, Thing, and ProjectThingLink) to get a list of all Projects and their currently linked Things. Since you want to find the current relationships based on the `CreatedDate`, you will also need to ensure that you only get the latest e... | 47,166 | [
{
"from": "human",
"value": "I have a 3 table SQLServer Database.\nProject\nProjectID\nProjectName\n\nThing\nThingID\nThingName\n\nProjectThingLink\nProjectID\nThingID\nCreatedDate\n\nWhen a Thing is ascribed to a Project an entry is put in the ProjectThingLink table.\nThings can move between Projects. The ... |
In my C++ application (developed with Visual Studio 2003) and Qt4, I'd like to print the stack trace from a specific line of code, either to the console output or into a file.
What would it take ?
Is Qt of any help to do this ?
| In C++, particularly in an application using Qt4 and developed in Visual Studio 2003, obtaining a stack trace programmatically can be somewhat complex, as C++ itself does not provide built-in facilities for capturing stack traces.
### Options for Getting Stack Trace
1. **Using Windows API**:
Since you are using Vi... | 45,623 | [
{
"from": "human",
"value": "In my C++ application (developed with Visual Studio 2003) and Qt4, I'd like to print the stack trace from a specific line of code, either to the console output or into a file.\nWhat would it take ?\nIs Qt of any help to do this ?\n"
},
{
"from": "gpt",
"value": "In C... |
Can someone give some hints of how to delete the last n lines from a file in Perl? I have a very large file of around 400 MB, and I want to delete some 125,000 last lines from it.
| Certainly! To delete the last `n` lines from a large file in Perl, you can follow these hints to achieve this efficiently:
### Hints:
1. **Read the File**: Instead of loading the entire file into memory (which might not be feasible with a large file), you can read the file line by line or in chunks.
2. **Use a Buffe... | 48,652 | [
{
"from": "human",
"value": "Can someone give some hints of how to delete the last n lines from a file in Perl? I have a very large file of around 400 MB, and I want to delete some 125,000 last lines from it.\n"
},
{
"from": "gpt",
"value": "Certainly! To delete the last `n` lines from a large f... |
How can I change CSS from javascript.
I'm using jQuery-ui Dialog and I want to change the style of a DIV from javascript.
Thanks
| You can change the CSS of a `<div>` using JavaScript (or jQuery) quite easily. If you are using jQuery, you can utilize the `.css()` method to change the style directly. Here’s how you can do it:
### Example Using jQuery
If you have a jQuery UI Dialog, you can change the CSS of a `<div>` (for example, the dialog's co... | 49,861 | [
{
"from": "human",
"value": "How can I change CSS from javascript. \nI'm using jQuery-ui Dialog and I want to change the style of a DIV from javascript.\nThanks\n"
},
{
"from": "gpt",
"value": "You can change the CSS of a `<div>` using JavaScript (or jQuery) quite easily. If you are using jQuery... |
Is there any example code of a cpython (not IronPython) client which can call Windows Communication Foundation (WCF) service?
| Yes, you can create a CPython client to call a Windows Communication Foundation (WCF) service using the `zeep` library, which is a SOAP client for Python. Below is an example that shows how to set up a WCF service and how to call it from a Python client using `zeep`.
### Step 1: Create a WCF Service
First, you'll nee... | 46,104 | [
{
"from": "human",
"value": "Is there any example code of a cpython (not IronPython) client which can call Windows Communication Foundation (WCF) service?\n"
},
{
"from": "gpt",
"value": "Yes, you can create a CPython client to call a Windows Communication Foundation (WCF) service using the `zee... |
I have a Question model & Form, one of the fields in this model is userid=ForeignKey(User), this Works perfectly well on the Question Model, am able to pick the user from a drop down.
But kind a tricky when i want to list the question from the model, which is the best way to lookup the user name from the Users table? ... | To display the username associated with each question in your list, you can access the `userid` ForeignKey relationship you established in your `Question` model. Assuming you have a `Question` model that looks something like this:
```python
from django.db import models
from django.contrib.auth.models import User
clas... | 49,053 | [
{
"from": "human",
"value": "I have a Question model & Form, one of the fields in this model is userid=ForeignKey(User), this Works perfectly well on the Question Model, am able to pick the user from a drop down. \nBut kind a tricky when i want to list the question from the model, which is the best way to l... |
How can the styling be changed on the sharepoint page so that my data in access datasheet view is visible
| To change the styling of a SharePoint page so that data from Access in datasheet view is visible, you'll typically need to adjust the layout and possibly customize the view settings within SharePoint. Here are some general steps you might consider:
### 1. **Embed Access Data**
If you're looking to display data from an... | 49,818 | [
{
"from": "human",
"value": "How can the styling be changed on the sharepoint page so that my data in access datasheet view is visible\n"
},
{
"from": "gpt",
"value": "To change the styling of a SharePoint page so that data from Access in datasheet view is visible, you'll typically need to adjus... |
Can anyone send me JavaScript code on how I can construct a time delay from the time I click a button on a page to the time the function called by the button click is executed. I am a novice with JavaScript, and I have some code that performs a function when I click a button, and I just want to have a time delay.
| Certainly! You can achieve a time delay in JavaScript using the `setTimeout` function, which allows you to execute a function after a specified number of milliseconds. Below is a simple example that demonstrates how to create a button that, when clicked, will execute a function with a delay.
Here's a complete example ... | 49,974 | [
{
"from": "human",
"value": "Can anyone send me JavaScript code on how I can construct a time delay from the time I click a button on a page to the time the function called by the button click is executed. I am a novice with JavaScript, and I have some code that performs a function when I click a button, an... |
I have NUnit installed on my machine in "C:\Program Files\NUnit 2.4.8\" but on my integration server(running CruiseControl.Net) I have it installed in "D:\Program Files\NUnit 2.4.8\". The problem is that on my development machine my NAnt build file works correctly because in the task I'm using the path "C:\Program Fil... | You don't necessarily have to have NUnit installed at the same location on both your development machine and your integration server, and there are better ways to manage references in your NAnt build file to avoid hardcoding paths. Here are a few approaches to consider:
### 1. Use Relative Paths
Instead of specifying ... | 49,507 | [
{
"from": "human",
"value": "I have NUnit installed on my machine in \"C:\\Program Files\\NUnit 2.4.8\\\" but on my integration server(running CruiseControl.Net) I have it installed in \"D:\\Program Files\\NUnit 2.4.8\\\". The problem is that on my development machine my NAnt build file works correctly beca... |
If you look at the following link: What's new at New Hope
Look at the widget on the page entitled "What's new at New Hope" which contains the Web2.0 equivalent of a MARQUEE (I guess that's what you'd call it) complete with fading images and "Read More" links.
Question: Can you identify the exact specific JQuery plugin... | I'm unable to access external links or specific web pages directly, so I can't view the widget you're referring to. However, I can provide you with some common jQuery plugins that are often used to create similar "marquee" or fading image sliders with "Read More" links:
1. **Slick Slider**: A responsive carousel slide... | 47,806 | [
{
"from": "human",
"value": "If you look at the following link: What's new at New Hope \nLook at the widget on the page entitled \"What's new at New Hope\" which contains the Web2.0 equivalent of a MARQUEE (I guess that's what you'd call it) complete with fading images and \"Read More\" links.\nQuestion: Ca... |
i need a C# library about strict HTML validation and filtering
| For strict HTML validation and filtering in C#, you can consider using the following libraries:
### 1. **HtmlAgilityPack**
- **Description**: This is a popular library for parsing and manipulating HTML documents. While it is primarily used for reading and modifying HTML, you can implement strict validation by checking... | 43,413 | [
{
"from": "human",
"value": "i need a C# library about strict HTML validation and filtering \n"
},
{
"from": "gpt",
"value": "For strict HTML validation and filtering in C#, you can consider using the following libraries:\n\n### 1. **HtmlAgilityPack**\n- **Description**: This is a popular librar... |
I want to to create a window not sizable and without caption like vista sndvol.exe
DlgSimpleVolume
| To create a window that is not resizable and does not have a caption (like the `sndvol.exe` in Windows Vista), you can use the Windows API to set the style of the window accordingly. Below is an example of how you can create such a window using C++:
### Example Code
```cpp
#include <windows.h>
// Window Procedure
LR... | 49,743 | [
{
"from": "human",
"value": "I want to to create a window not sizable and without caption like vista sndvol.exe \nDlgSimpleVolume\n\n\n"
},
{
"from": "gpt",
"value": "To create a window that is not resizable and does not have a caption (like the `sndvol.exe` in Windows Vista), you can use the Wi... |
I just don't know that, is there any technical reason for that? Is it more difficult to implement a compiler for a language with weak typing? What is it?
| The question of whether a language's type system is weakly typed or strongly typed can have implications for the design and implementation of its compiler, but it's essential to clarify what weak typing and strong typing mean:
1. **Strong Typing**: In strongly typed languages, types are strictly enforced, and implicit... | 47,786 | [
{
"from": "human",
"value": "I just don't know that, is there any technical reason for that? Is it more difficult to implement a compiler for a language with weak typing? What is it?\n"
},
{
"from": "gpt",
"value": "The question of whether a language's type system is weakly typed or strongly typ... |
How can you access and display the row index of a gridview item as the command argument in a buttonfield column button?
<gridview>
<Columns>
<asp:ButtonField ButtonType="Button"
CommandName="Edit" Text="Edit" Visible="True"
CommandArgument=" ? ? ? " />
.....
| To access and display the row index of a GridView item as the command argument in a ButtonField column button, you can use the `RowIndex` property of the GridView's row in combination with a custom button or by handling the `RowDataBound` event of the GridView.
However, the `ButtonField` does not directly support sett... | 49,789 | [
{
"from": "human",
"value": "How can you access and display the row index of a gridview item as the command argument in a buttonfield column button?\n<gridview>\n<Columns>\n <asp:ButtonField ButtonType=\"Button\" \n CommandName=\"Edit\" Text=\"Edit\" Visible=\"True\" \n CommandArgument=\" ... |
I want the Perl script to extract a data from a text file and save it as another text file. Each line of the text file contains an URL to a jpg like "http://pics1.riyaj.com/thumbs/000/082/104//small.jpg". I want the script to extract the last 6 numbers of each jpg URL, (i.e 082104) to a variable. I want the variable to... | You can achieve this with a simple Perl script that reads from the input text file, extracts the desired portion of the URLs, and then writes the new format to an output text file. Below is a sample Perl script that demonstrates how to do this:
```perl
#!/usr/bin/perl
use strict;
use warnings;
# Check for proper comm... | 49,547 | [
{
"from": "human",
"value": "I want the Perl script to extract a data from a text file and save it as another text file. Each line of the text file contains an URL to a jpg like \"http://pics1.riyaj.com/thumbs/000/082/104//small.jpg\". I want the script to extract the last 6 numbers of each jpg URL, (i.e 08... |
I am unable to select Microsoft.Office.Interop.Excel from my window/assembly directory. I can see that one is there but it does not give me the option to reference it. How can i select it?
| If you're having trouble selecting `Microsoft.Office.Interop.Excel` from your assembly directory in a .NET project, there are several steps you can follow to troubleshoot the issue. Here are some potential solutions:
### 1. Install the Interop Assembly via NuGet
Instead of manually trying to reference the DLL, a more ... | 49,166 | [
{
"from": "human",
"value": "I am unable to select Microsoft.Office.Interop.Excel from my window/assembly directory. I can see that one is there but it does not give me the option to reference it. How can i select it?\n"
},
{
"from": "gpt",
"value": "If you're having trouble selecting `Microsoft... |
Can you tell me how can I use threads in C++ programs, and how can I compile it as it will be multithreaded? Can you tell me some good site where I can start from root?
Thanks
| Using threads in C++ programs can be achieved using the C++ Standard Library's `<thread>` header, which provides a simple interface for creating and managing threads. Here’s a basic overview of how to use threads, compile a multithreaded program, and some resources to learn more.
### Basic Usage of Threads in C++
1. ... | 47,635 | [
{
"from": "human",
"value": "Can you tell me how can I use threads in C++ programs, and how can I compile it as it will be multithreaded? Can you tell me some good site where I can start from root?\nThanks\n"
},
{
"from": "gpt",
"value": "Using threads in C++ programs can be achieved using the C... |
Is it possible to provide Basic authentication to clients using ASP.Net to authenticate the request in IIS 6.0 (I am pretty sure this is doable in 7.0 without much pain).
| Yes, it is possible to implement Basic authentication for clients using ASP.NET on IIS 6.0, although it may not be as straightforward as in later versions like IIS 7.0. Here are the steps you can follow to set up Basic authentication in IIS 6.0 for an ASP.NET application:
### Step 1: Configure IIS 6.0
1. **Open IIS M... | 48,038 | [
{
"from": "human",
"value": "Is it possible to provide Basic authentication to clients using ASP.Net to authenticate the request in IIS 6.0 (I am pretty sure this is doable in 7.0 without much pain).\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to implement Basic authentication for clien... |
I accidentally committed an unwanted file (filename.orig while resolving a merge) to my repository several commits ago, without me noticing it until now. I want to completely delete the file from the repository history.
Is it possible to rewrite the change history such that filename.orig was never added to the reposit... | Yes, it's possible to rewrite the commit history in Git to completely remove a file, including commits that added it, using `git filter-branch` or the `git filter-repo` tool. However, be aware that rewriting history will change commit hashes, which can cause issues for others working on the same repository. It's best t... | 49,981 | [
{
"from": "human",
"value": "I accidentally committed an unwanted file (filename.orig while resolving a merge) to my repository several commits ago, without me noticing it until now. I want to completely delete the file from the repository history. \nIs it possible to rewrite the change history such that fi... |
I am looking for a taxonomy of embedded processors. Which processors belong to which families? Who decends from whom?
Does anyone here know of a simple article that describes it?
| Creating a taxonomy of embedded processors involves categorizing various processors based on their architecture, design, application, and heritage. Below is a simplified overview of some major families of embedded processors and notable examples of each:
### 1. **Microcontrollers (MCUs)**
- **8-bit Microcontrollers... | 45,880 | [
{
"from": "human",
"value": "I am looking for a taxonomy of embedded processors. Which processors belong to which families? Who decends from whom?\nDoes anyone here know of a simple article that describes it?\n"
},
{
"from": "gpt",
"value": "Creating a taxonomy of embedded processors involves ca... |
Is there a list describing all of the data_type parameters you can use in PDOStatement::bindParam() ? If none, what do you commonly use, and for what type of field ?
According to PHP manual: data_type Explicit data type for the parameter using the PDO::PARAM_* constants.
I know about the PDO::PARAM_INT and PDO::PARAM_... | In PDO (PHP Data Objects), when using the `PDOStatement::bindParam()` method, you can specify the data type of the parameter using predefined constants that are part of the PDO class. Here's a list of the commonly used `PDO::PARAM_*` constants for binding parameters:
1. **PDO::PARAM_NULL**: Represents a `NULL` value.
... | 49,796 | [
{
"from": "human",
"value": "Is there a list describing all of the data_type parameters you can use in PDOStatement::bindParam() ? If none, what do you commonly use, and for what type of field ?\nAccording to PHP manual: data_type Explicit data type for the parameter using the PDO::PARAM_* constants. \nI kn... |
How can I mock the database calls to make my application logic been tested without database?
| Mocking database calls is an essential technique for testing application logic without needing to connect to an actual database. This allows you to isolate your unit tests and make them faster and more reliable. Here's how you can go about it, depending on the technology stack you're using. Below are general principles... | 49,103 | [
{
"from": "human",
"value": "How can I mock the database calls to make my application logic been tested without database?\n"
},
{
"from": "gpt",
"value": "Mocking database calls is an essential technique for testing application logic without needing to connect to an actual database. This allows ... |
I run a small browser MMO, and I have a problem where a couple users are embedding scripts into their profile images, and using them to make attacks against said users, and my game in general. Is there a way to protect against this, or do I need to start blocking people from being able to use their own custom images?
... | Embedding scripts in profile images is a common attack vector known as XSS (Cross-Site Scripting). It’s important to take preventive measures to safeguard your users and your application. Here are some strategies you can implement to protect against such attacks:
### 1. **Sanitize User Input:**
- Ensure that any us... | 49,067 | [
{
"from": "human",
"value": "I run a small browser MMO, and I have a problem where a couple users are embedding scripts into their profile images, and using them to make attacks against said users, and my game in general. Is there a way to protect against this, or do I need to start blocking people from be... |
Master table contains ID and PersonName.
Course table contains ID, CourseName.
Detail table contains ID, MasterID, CourseID, StartDate,EndDate
I want to create report that shows list of persons (PersonName) and the only last course they took (so every person is listed only once):
PersonName - CourseName - StartDate - E... | To generate a report that shows each person along with the last course they took, you will need to utilize SQL to join the tables and filter for the most recent courses. Below is a step-by-step guide on how to accomplish this, assuming you are working with a SQL database.
### SQL Query Explanation
1. **Join the table... | 44,487 | [
{
"from": "human",
"value": "Master table contains ID and PersonName.\nCourse table contains ID, CourseName.\nDetail table contains ID, MasterID, CourseID, StartDate,EndDate\nI want to create report that shows list of persons (PersonName) and the only last course they took (so every person is listed only on... |
is it possible to convert their method to scrum in a small concern
| Yes, it's definitely possible to convert a project management method or workflow to Scrum in a small organization. Scrum is a flexible and adaptive framework that can be tailored to suit the specific needs of a team or organization, regardless of its size. Here are some steps to consider when making the transition:
##... | 47,202 | [
{
"from": "human",
"value": "is it possible to convert their method to scrum in a small concern\n"
},
{
"from": "gpt",
"value": "Yes, it's definitely possible to convert a project management method or workflow to Scrum in a small organization. Scrum is a flexible and adaptive framework that can ... |
I am wondering if Unittesting and using statements can really go hand in hand as there is no way to mock the disposable object instantiated in the using statement. How would I be able to effectively unittest a method containing the following using statement?
public void MyMethod()
{
using(MyDisposableClass disp = n... | Using statements are not forbidden in unit testing, but they do present challenges when it comes to mocking and testing the behavior of the code that involves disposable resources. However, there are several strategies to effectively unit test methods that use `using` statements. Below are some of those strategies:
##... | 43,723 | [
{
"from": "human",
"value": "I am wondering if Unittesting and using statements can really go hand in hand as there is no way to mock the disposable object instantiated in the using statement. How would I be able to effectively unittest a method containing the following using statement?\n\npublic void MyMet... |
I've have searched on this and it seems to be a catch all, unfortunately everything I've read doesn't help figure it out. Here is the class:
public interface IMockInterface
{
MockClass MockedMethod();
MockClass MockThis();
}
public class MockClass : IMockInterface
{
public virtual MockClass MockedMethod()
... | It looks like you're trying to use Rhino Mocks to set up a test for a method that depends on an interface. The issue arises because your `MockClass` implementation of the `IMockInterface` is not using the mocked version of the `IMockInterface`, which results in the call to `MockedMethod` not being tracked by your mock.... | 47,445 | [
{
"from": "human",
"value": "I've have searched on this and it seems to be a catch all, unfortunately everything I've read doesn't help figure it out. Here is the class:\npublic interface IMockInterface\n{\n MockClass MockedMethod();\n MockClass MockThis();\n}\n\npublic class MockClass : IMockInterfa... |
In the Visual Studio application I'm creating, I want to include an .xsd file that is used in the application.
The xsd file is in the same directory as the rest of my .cs files, and I dragged/dropped it into the Solution Explorer window as an item in my project.
But in my C# code... how do I make use of it? It doesn't... | To use an `.xsd` file in your Visual Studio C# project, you have a few options. Typically, `.xsd` files are used for XML schema validation or to generate classes for XML serialization/deserialization. Here’s how you can work with the `.xsd` file effectively:
### 1. Include the .xsd in your Project
When you drag and dr... | 48,770 | [
{
"from": "human",
"value": "In the Visual Studio application I'm creating, I want to include an .xsd file that is used in the application.\nThe xsd file is in the same directory as the rest of my .cs files, and I dragged/dropped it into the Solution Explorer window as an item in my project.\nBut in my C# c... |
What is best language to learn next to Java?
Criteria for this secondary language are:
High potential of being the "next big thing". e.g. If the market for Java open positions hypothetically dies/dwindles, what is the next programming language that will have a bigger market for open positions? Another way to frame thi... | Based on your criteria, a strong candidate for the next language to learn after Java is **Python**. Here's how Python aligns with your requirements:
1. **High Potential**: Python has seen explosive growth in recent years and continues to be popular across various domains, including web development, data science, machi... | 48,538 | [
{
"from": "human",
"value": "What is best language to learn next to Java?\nCriteria for this secondary language are:\n\nHigh potential of being the \"next big thing\". e.g. If the market for Java open positions hypothetically dies/dwindles, what is the next programming language that will have a bigger marke... |
I've been thinking, just how deep into everything do you have to go before something is automatically thread-safe?
Quick example:
int dat = 0;
void SetInt(int data)
{
dat = data;
}
.. Would this method be considered threadsafe? I ussually wrap all my set-methods in mutex'es, just to be sure, but everytime I do so ... | Your questions delve into some fundamental concepts of multithreading, synchronization, and thread safety. Let’s unpack these concepts step by step:
### Understanding Thread Safety
1. **Thread Safety Definition**: A piece of code is considered thread-safe if it functions correctly when executed from multiple threads ... | 49,940 | [
{
"from": "human",
"value": "I've been thinking, just how deep into everything do you have to go before something is automatically thread-safe?\nQuick example:\nint dat = 0;\nvoid SetInt(int data)\n{\n dat = data;\n}\n\n.. Would this method be considered threadsafe? I ussually wrap all my set-methods in ... |
So I was thinking about creating a dynamic sql question, meaning that i want the amount of parameters to be dynamic.
Having looked at this: Parameterize an SQL IN clause i was thinking that using like '%x%' is SLOW and not good.
What i actually would like to do is using the IN keyword and have it somewhat like this:
se... | To achieve dynamic searching using SQL and the LINQ to SQL or Entity Framework in C#, we can build a query that utilizes the `IN` keyword effectively while ensuring we can search for multiple names associated with users.
Given your scenario, where you want to find users by matching against multiple names (potentially ... | 47,244 | [
{
"from": "human",
"value": "So I was thinking about creating a dynamic sql question, meaning that i want the amount of parameters to be dynamic.\nHaving looked at this: Parameterize an SQL IN clause i was thinking that using like '%x%' is SLOW and not good.\nWhat i actually would like to do is using the IN... |
I have been working on a script with PHP4 that relies on NuSOAP. Now, I'm trying to move this to PHP5, and use the buildin support for SOAP there.
$wsdlPath = ""; // I have obviously set these variables to something meaningful, just hidden for the sake of security
$apiPath = "";
$username = "";
$password = "";
// P... | You're experiencing a SOAP-related issue while transitioning from NuSOAP in PHP4 to the built-in SOAP support in PHP5. The error message you provided indicates that the `SoapClient` in PHP5 is unable to load the WSDL file from the specified URL. Here are some steps and considerations to help you resolve the issue:
###... | 48,285 | [
{
"from": "human",
"value": "I have been working on a script with PHP4 that relies on NuSOAP. Now, I'm trying to move this to PHP5, and use the buildin support for SOAP there.\n$wsdlPath = \"\"; // I have obviously set these variables to something meaningful, just hidden for the sake of security\n$apiPat... |
I am creating a Windows service. When an exception occurrs, I handle it appropriately and create a log. I am using the decorator pattern, as there are many different ways people will be looking at these logs. I have an email logger, a file logger, and a windows event logger, all which inherit from LoggingDecorator, whi... | Handling exceptions in logging can indeed be tricky, especially when you want to maintain logging integrity while ensuring that any logging failures do not disrupt the overall operation of your application. Here’s a strategy that you can adopt to improve your logging mechanism, particularly for handling exceptions that... | 49,710 | [
{
"from": "human",
"value": "I am creating a Windows service. When an exception occurrs, I handle it appropriately and create a log. I am using the decorator pattern, as there are many different ways people will be looking at these logs. I have an email logger, a file logger, and a windows event logger, all... |
I'm managing an established site which is currently in the process of being upgraded (completely replaced anew), but I'm worried that I'll lose all my Google indexing (that is, there will be a lot of pages in Google's index which won't exist in that place any more).
The last time I upgraded a (different) site, someone ... | When upgrading a site and restructuring URLs, it's crucial to implement proper 301 redirects to preserve your SEO rankings and ensure users and search engines can find the new pages. Here’s a step-by-step guide on how to achieve this:
### Step 1: Create a Redirect Map
First, you need to determine how old URLs will ma... | 49,066 | [
{
"from": "human",
"value": "I'm managing an established site which is currently in the process of being upgraded (completely replaced anew), but I'm worried that I'll lose all my Google indexing (that is, there will be a lot of pages in Google's index which won't exist in that place any more).\nThe last ti... |
I am trying to get all the properties of MS Access DB using vb.net like Author, Last Modified Date, Last Modified By etc..
| To retrieve the properties of an MS Access database using VB.NET, you can use the `OleDb` namespace. Specifically, you can access the `OleDbConnection` to connect to your Access database and then retrieve the properties using the `OleDbConnectionStringBuilder`.
Below is an example that demonstrates how to get various ... | 48,433 | [
{
"from": "human",
"value": "I am trying to get all the properties of MS Access DB using vb.net like Author, Last Modified Date, Last Modified By etc..\n"
},
{
"from": "gpt",
"value": "To retrieve the properties of an MS Access database using VB.NET, you can use the `OleDb` namespace. Specifical... |
What is the clearest explanation of what computer scientists mean by "the naive implementation"? I need a good clear example which will illustrate — ideally, even to non-technical people — that the naive implementation may technically be a functioning solution to the problem, but practically be utterly unusable.
| The term "naive implementation" in computer science refers to a straightforward or simplistic approach to solving a problem. While it may be correct in terms of functionality, it often lacks efficiency and practicality, making it unsuitable for real-world applications, especially when dealing with larger datasets or mo... | 41,443 | [
{
"from": "human",
"value": "What is the clearest explanation of what computer scientists mean by \"the naive implementation\"? I need a good clear example which will illustrate — ideally, even to non-technical people — that the naive implementation may technically be a functioning solution to the problem,... |
I've got a cocoa app that's got a TableView with bindings to a model through an NSArrayController.
The app works as I want, but the default sort order of the table is wrong.
buildwatch http://public.west.spy.net/BuildWatch.png
I typically start the program and click on the last header twice to get it sorting the right ... | To set a default sort order for a `NSTableView` bound to an `NSArrayController` in a Cocoa app, you can achieve this programmatically in your view controller or window controller. Here’s a step-by-step guide on how to do this:
### Setting Default Sort Order in Code
1. **Define the Sort Descriptor:**
You can define... | 48,940 | [
{
"from": "human",
"value": "I've got a cocoa app that's got a TableView with bindings to a model through an NSArrayController.\nThe app works as I want, but the default sort order of the table is wrong.\nbuildwatch http://public.west.spy.net/BuildWatch.png\nI typically start the program and click on the la... |
Linux 2.6.18-92.el5, ruby 1.8.7, Rails 2.2.2, mysql gem 2.7
I installed the MySQL binary distribution under /usr/local, then installed the mysql gem like this:
gem install mysql --no-rdoc --no-ri \
-- --with-mysql-include=/usr/local/mysql/include \
--with-mysql-lib=/usr/local/mysql/lib \
--with-mysql-config=/usr/... | Hi Ethan,
The error you're encountering is related to how dynamic linking works in Linux. When you load a shared library (like `mysql.so`), the dynamic linker needs to know where to find the corresponding shared object files (like `libmysqlclient.so.16` in your case). Here’s a brief overview of why you were facing thi... | 47,135 | [
{
"from": "human",
"value": "Linux 2.6.18-92.el5, ruby 1.8.7, Rails 2.2.2, mysql gem 2.7\nI installed the MySQL binary distribution under /usr/local, then installed the mysql gem like this:\ngem install mysql --no-rdoc --no-ri \\\n -- --with-mysql-include=/usr/local/mysql/include \\\n --with-mysql-lib=/us... |
Is there a way to set the prefix on the Signature of a Signed XML Document (SignedXml class in .Net)?
So instead of:
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#>
...
</Signature>
I could have the following:
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#>
...
</ds:Signature>
| Yes, you can set a prefix on the `<Signature>` element when using the `SignedXml` class in .NET, but it requires a bit of a workaround since the `SignedXml` class does not provide direct support for prefix customization.
Here's how you can achieve that:
1. **Create a Custom SignedXml Class**: You can create a subclas... | 47,865 | [
{
"from": "human",
"value": "Is there a way to set the prefix on the Signature of a Signed XML Document (SignedXml class in .Net)?\nSo instead of:\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#>\n...\n</Signature>\n\nI could have the following:\n<ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xml... |
When I am editing a cell in a dataGrid, the changes are not applied to the dataProvider until I finish editing. Is there a way that I can make the changes appear in the dataProvider whilst editing?
I would assume that the way of doing this would be to subclass the editor I am using, in this case NumericStepper, but I ... | To have changes in a `NumericStepper` editor immediately reflected in your data provider while editing in a DataGrid, you typically need to listen for events that are triggered during editing and manually update the data provider. Here's how you can do this:
### Step 1: Subclass `NumericStepper`
First, you'll need to... | 47,776 | [
{
"from": "human",
"value": "When I am editing a cell in a dataGrid, the changes are not applied to the dataProvider until I finish editing. Is there a way that I can make the changes appear in the dataProvider whilst editing?\nI would assume that the way of doing this would be to subclass the editor I am ... |
So this question will get technical – eventually – but first check out Hanselminutes with Atwood (et. al.) where Scott basically invites developers to try to hack this site. It’s a hoot. I first thought (out loud of course, because with headphones on you get the best stares from people as you think out loud) “he eith... | Your question touches on several important aspects of web security, architecture, and the philosophy around security practices in software development. Let’s break it down:
### 1. **Single Point of Failure vs. Security Layers**
A website that runs on a single server (or "one box") can indeed survive for a while, espec... | 49,909 | [
{
"from": "human",
"value": "So this question will get technical – eventually – but first check out Hanselminutes with Atwood (et. al.) where Scott basically invites developers to try to hack this site. It’s a hoot. I first thought (out loud of course, because with headphones on you get the best stares fr... |
I recently switched over to a MacBook Pro so I'm still really new at Mac software ecosystem. What is the best guide or what tips do you have to quickly get adept at using Mac for developing on both Mac/Unix and MS platforms (*.NET, SharePoint, SQL Server, etc) using VMWare Fusion? For example, I've setup NetBeans, Flex... | Welcome to the Mac ecosystem! It sounds like you're off to a great start with your setup. Here are some tips and best practices to help you get adept at using your MacBook Pro for development, particularly when working with both Mac/Unix and Microsoft platforms:
### 1. **Get Familiar with macOS Basics**
- **Keyboar... | 49,099 | [
{
"from": "human",
"value": "I recently switched over to a MacBook Pro so I'm still really new at Mac software ecosystem. What is the best guide or what tips do you have to quickly get adept at using Mac for developing on both Mac/Unix and MS platforms (*.NET, SharePoint, SQL Server, etc) using VMWare Fusio... |
I am using UrlRewrite in a JSP project over JBoss. I have configured some rules, so that stuff like:
http://mysite/parameter
Is read as:
http://mysite/index.jsp?parameter=parameter
And so on.
Now, what I would like to know if there's a way to replace certain characters submitted in the URL by the users with others. Som... | Yes, UrlRewrite can help you achieve URL rewriting and transforming certain characters in user-submitted URLs. While UrlRewrite primarily focuses on rewriting and redirecting URLs, you can implement a custom solution that integrates with your existing setup.
To replace certain characters in the URLs, you can use UrlRe... | 49,719 | [
{
"from": "human",
"value": "I am using UrlRewrite in a JSP project over JBoss. I have configured some rules, so that stuff like:\nhttp://mysite/parameter\nIs read as:\nhttp://mysite/index.jsp?parameter=parameter\nAnd so on.\nNow, what I would like to know if there's a way to replace certain characters subm... |
I'm reading "Pro JavaScript Techniques" by John Resig, and I'm confused with an example. This is the code:
// Create a new user object that accepts an object of properties
function User( properties ) {
// Iterate through the properties of the object, and make sure
// that it's properly scoped (as discussed previous... | Let's break down the code and your questions step by step.
### Understanding the Code
In the provided code, you are trying to create a `User` object with private properties and dynamically generated getter and setter methods. However, there are issues in the way closures are being used.
Here’s the relevant part of y... | 49,042 | [
{
"from": "human",
"value": "I'm reading \"Pro JavaScript Techniques\" by John Resig, and I'm confused with an example. This is the code:\n// Create a new user object that accepts an object of properties\nfunction User( properties ) {\n // Iterate through the properties of the object, and make sure\n // t... |
suppose I declare a dynamic array like
int *dynArray = new int [1];
which is initialized with an unknown amount of int values at some point.
How would I iterate till the end of my array of unknown size?
Also, if it read a blank space would its corresponding position in the array end up junked?
Copying Input From users... | To address your questions about dynamic arrays in C++, let's break it down step by step.
1. **Iterating Through a Dynamic Array of Unknown Size**:
When you allocate a dynamic array using `new`, you must know its size beforehand, or you should use a sentinel value to mark the end of valid data. In C++, dynamic array... | 49,718 | [
{
"from": "human",
"value": "suppose I declare a dynamic array like\nint *dynArray = new int [1];\n\nwhich is initialized with an unknown amount of int values at some point.\nHow would I iterate till the end of my array of unknown size?\nAlso, if it read a blank space would its corresponding position in the... |
I have a pseudorandom number generator (PRNG) with nice properties which uses six UInt32s as state. I need to come up with a reasonable way to seed it. Two obvious possibilities are: 1) generate six random numbers using System.Random and use them as seeds; 2) generate two GUIDs with Guid.NewGuid(). Which would be bette... | When choosing a method for seeding your pseudorandom number generator (PRNG) that uses six `UInt32` values as state, both options you've proposed have their merits. Let’s evaluate each one:
### Option 1: Using `System.Random` to generate six random numbers
1. **Pros**:
- `System.Random` is designed to generate uni... | 47,267 | [
{
"from": "human",
"value": "I have a pseudorandom number generator (PRNG) with nice properties which uses six UInt32s as state. I need to come up with a reasonable way to seed it. Two obvious possibilities are: 1) generate six random numbers using System.Random and use them as seeds; 2) generate two GUIDs ... |
Background: I'm currently debugging an application written over a custom-built GUI framework in C++. I've managed to pin down most bugs, but the bugs I'm having the most trouble with tend to have a common theme.
All of them seem to be to do with the screen refreshing, redrawing or updating to match provided data. This ... | Debugging screen refresh and redrawing issues in a custom-built GUI can be quite challenging, especially when the problems are time-sensitive. Here are some tips and strategies you can employ to tackle these types of bugs:
1. **Logging**: Implement detailed logging around the areas responsible for redrawing components... | 49,790 | [
{
"from": "human",
"value": "Background: I'm currently debugging an application written over a custom-built GUI framework in C++. I've managed to pin down most bugs, but the bugs I'm having the most trouble with tend to have a common theme.\nAll of them seem to be to do with the screen refreshing, redrawing... |
I have two websites, let's say they're example.com and anotherexample.net.
On anotherexample.net/page.html, I have an IFRAME SRC="http://example.com/someform.asp". That IFRAME displays a form for the user to fill out and submit to http://example.com/process.asp. When I open the form ("someform.asp") in its own browser ... | The issue you're experiencing with Internet Explorer (IE) not saving cookies when using an iframe is related to the way IE handles third-party cookies. By default, IE has strict privacy settings that can prevent third-party cookies from being set or sent, which can result in the behavior you're observing.
Here’s a sum... | 49,870 | [
{
"from": "human",
"value": "I have two websites, let's say they're example.com and anotherexample.net.\nOn anotherexample.net/page.html, I have an IFRAME SRC=\"http://example.com/someform.asp\". That IFRAME displays a form for the user to fill out and submit to http://example.com/process.asp. When I open t... |
I have a Spring web application which is configured to use JDK proxying for AOP. The AOP annotations (such as @Transactional) are declared on the interfaces, rather than the implementation classes.
The application itself works fine, but when I run the unit tests, it seems to be attempting to use CGLIB for the AOP funct... | The issue you're experiencing is related to how the Spring AOP proxying mechanism is configured in your application context and the specific context in which your tests are running. Let's break down the relevant parts of the configuration and the potential causes of the problem.
### Understanding the Problem
1. **Prox... | 42,946 | [
{
"from": "human",
"value": "I have a Spring web application which is configured to use JDK proxying for AOP. The AOP annotations (such as @Transactional) are declared on the interfaces, rather than the implementation classes.\nThe application itself works fine, but when I run the unit tests, it seems to be... |
I have a program that writes to a FILE *cgiOut and just after it has written to the stream, I need to fork and run a background process. The trouble is that after the fork, the FILE * stream seems to flush out sometimes and I get duplicated output (after the fork, all open files are closed which I guess causes the buf... | When dealing with file streams in C, particularly when you're using `fork()` and writing to a `FILE *` stream (like `cgiOut`), there are certain considerations to be aware of concerning buffering and process forking.
The issue you're encountering — the output being duplicated after the `fork()` — stems from the fact t... | 45,640 | [
{
"from": "human",
"value": "I have a program that writes to a FILE *cgiOut and just after it has written to the stream, I need to fork and run a background process. The trouble is that after the fork, the FILE * stream seems to flush out sometimes and I get duplicated output (after the fork, all open file... |
Let's consider the following program and try to compile it under Cygwin:
#include <GL/glut.h>
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glLoadIdentity();
}
It compiles and runs just fine. -I/usr/include/opengl seems to be terribly important.
g++ -I/usr/include/opengl -I../include/cygwin -L../lib... | To successfully compile and run the second OpenGL application that uses GLEW under Cygwin, you may need to make a few adjustments to your environment and build commands. Here’s a comprehensive guide to help you troubleshoot and build your application correctly.
### Step 1: Ensure Correct Libraries and Headers
1. **In... | 49,901 | [
{
"from": "human",
"value": "Let's consider the following program and try to compile it under Cygwin:\n#include <GL/glut.h>\nint main(int argc, char** argv)\n{\n glutInit(&argc, argv);\n glLoadIdentity();\n}\n\nIt compiles and runs just fine. -I/usr/include/opengl seems to be terribly important.\ng++ ... |
I'm trying to refactor a large, old project and one thing I've noticed is a range of different Iterator implementations:
while($iterator->moveNext()) {
$item = $iterator->current();
// do something with $item;
}
for($iterator = getIterator(), $iterator->HasNext()) {
$item = $iterator->Next();
// do ... | When working with iterators in PHP (or in any language), consistency is key to maintainability and readability of the code. As you've noted, having different implementations of iterators can lead to confusion and make the code harder to understand and maintain. Let's break down the advantages of various iterator styles... | 43,857 | [
{
"from": "human",
"value": "I'm trying to refactor a large, old project and one thing I've noticed is a range of different Iterator implementations:\nwhile($iterator->moveNext()) {\n $item = $iterator->current();\n // do something with $item;\n} \n\nfor($iterator = getIterator(), $iterator->HasNext... |
I get this message when trying to communicate with software that communicates with SOAP?
Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
I am using a third party API to communicate with an Ardome MAM system.
| The error message you're encountering indicates that the necessary Java classes for handling attachments in SOAP communication—specifically, `javax.activation.DataHandler` and `javax.mail.internet.MimeMultipart`—are missing from your classpath. These classes are part of the Java EE (now Jakarta EE) API and are typicall... | 41,650 | [
{
"from": "human",
"value": "I get this message when trying to communicate with software that communicates with SOAP?\n\nUnable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.\n\nI am using a third party API to communicate with a... |
Is it possible to raise a "custom event" in an ASP.NET user control and to subscribe to the event in the calling page? This way I can have any containing page react to changes in a user control without having to do a partial or full postback.
| Yes, it is indeed possible to raise a custom event in an ASP.NET user control and have a calling page subscribe to that event. This is a common pattern in ASP.NET Web Forms, allowing for a clean separation of concerns and enabling you to react to user interactions within the control without needing to perform a full or... | 49,867 | [
{
"from": "human",
"value": "Is it possible to raise a \"custom event\" in an ASP.NET user control and to subscribe to the event in the calling page? This way I can have any containing page react to changes in a user control without having to do a partial or full postback.\n"
},
{
"from": "gpt",
... |
Using ASP.net, how do you write ANSI characters to a text file?
I need to write this file's text to the web browser. Do they support ANSI?
| In ASP.NET, you can write ANSI characters to a text file by specifying the correct encoding when creating or writing to the file. While ANSI is often colloquially used to refer to a single-byte character encoding for the Latin alphabet, in most .NET applications, you would typically use `Encoding.ASCII` or `Encoding.De... | 48,471 | [
{
"from": "human",
"value": "Using ASP.net, how do you write ANSI characters to a text file?\nI need to write this file's text to the web browser. Do they support ANSI?\n"
},
{
"from": "gpt",
"value": "In ASP.NET, you can write ANSI characters to a text file by specifying the correct encoding wh... |
In a software-project written in java you often have resources, that are part of the project and should be included on the classpath. For instance some templates or images, that should be accessible through the classpath (getResource). These files should be included into a produced JAR-file.
It's clear that these resou... | In a standard Java project structure, the resources that need to be included in the JAR file and accessible via the classpath are typically placed in a designated `resources` directory, which is parallel to the `src/main/java` directory. This structure allows for a clear separation between Java source code and resource... | 49,327 | [
{
"from": "human",
"value": "In a software-project written in java you often have resources, that are part of the project and should be included on the classpath. For instance some templates or images, that should be accessible through the classpath (getResource). These files should be included into a produ... |
I have a Perl script that sets up variables near the top for directories and files that it will use. It also requires a few variables to be set as command-line arguments.
Example:
use Getopt::Long;
my ($mount_point, $sub_dir, $database_name, $database_schema);
# Populate variables from the command line:
GetOptions(
... | Yes, you can call `GetOptions` multiple times in your Perl script, but it's generally cleaner and more maintainable to combine the required and optional parameters into a single call. You can set default values for variables before calling `GetOptions`, and then any values provided through command-line arguments will o... | 45,709 | [
{
"from": "human",
"value": "I have a Perl script that sets up variables near the top for directories and files that it will use. It also requires a few variables to be set as command-line arguments.\nExample:\nuse Getopt::Long;\n\nmy ($mount_point, $sub_dir, $database_name, $database_schema);\n# Populate ... |
I've got a list of points, and a route that an external provider has generated through those points.
I would like to generate a route using those same point with my own road network.
Then I want to be able to detect if there is any significant difference between the two routes.
One suggestion is that for the 2 route... | Your approach to comparing the two routes by analyzing the road segments is valid and can provide insights into how different the routes are. Here’s a step-by-step guide to achieve this using ArcGIS Server and the tools you mentioned:
### Steps to Compare Two Routes
1. **Extract Road Segments from Both Routes:**
-... | 48,928 | [
{
"from": "human",
"value": "I've got a list of points, and a route that an external provider has generated through those points. \nI would like to generate a route using those same point with my own road network. \nThen I want to be able to detect if there is any significant difference between the two rout... |
I am trying to do a multi rollover with Javascript. I know a lot of people say to use css, but it's going to be done in Javascript this time around.
Anyway, I am having much trouble with this rollover hierarchy. I have a button image nav with five buttons. When you mouseover one of the buttons, the button changes colo... | Your attempt to create a multi-rollover functionality using JavaScript looks like it's off to a good start! However, there are some improvements you can make to simplify your code and ensure it works as intended. Let's break down a better approach while keeping the functionality intact.
Here's a more structured versio... | 48,872 | [
{
"from": "human",
"value": "I am trying to do a multi rollover with Javascript. I know a lot of people say to use css, but it's going to be done in Javascript this time around. \nAnyway, I am having much trouble with this rollover hierarchy. I have a button image nav with five buttons. When you mouseover o... |
Is there anyone out there using iPython with emacs 23? The documents on the emacs wiki are a bit of a muddle and I would be interested in hearing from anyone using emacs for Python development. Do you use the download python-mode and ipython.el? What do you recommend?
| Yes, many users have successfully integrated IPython with Emacs for Python development. While Emacs 23 is an older version, you can still find useful tools and configurations to enhance your Python development experience.
Here are some recommendations for setting up your environment:
1. **Install Python Mode**: You c... | 49,811 | [
{
"from": "human",
"value": "Is there anyone out there using iPython with emacs 23? The documents on the emacs wiki are a bit of a muddle and I would be interested in hearing from anyone using emacs for Python development. Do you use the download python-mode and ipython.el? What do you recommend?\n"
},
... |
As a growing dev team we are beginning to encounter the problem of rewriting functions that behave in similar/identical ways.
We are all guilty of failing to write documentation as time is a limiting factor, however the idea of gathering all current functions (duplicates and all) and using that list along with applied ... | It sounds like you're facing a common issue in software development—duplicate or similar function implementations that can lead to inefficiencies and maintenance headaches. While there may not be a single "perfect" tool specifically tailored to your exact needs, there are several approaches and tools that can help you ... | 49,101 | [
{
"from": "human",
"value": "As a growing dev team we are beginning to encounter the problem of rewriting functions that behave in similar/identical ways.\nWe are all guilty of failing to write documentation as time is a limiting factor, however the idea of gathering all current functions (duplicates and al... |
What is the best way to encrypt a value in INI file?
Using Encryption/Decryption key??
| When it comes to encrypting values in an INI file, using an encryption/decryption key is indeed a sound approach. Here are steps and recommendations to implement secure encryption for values stored in an INI file:
### Steps to Encrypt Values in INI Files
1. **Choose a Strong Encryption Algorithm**:
- Use a well-es... | 48,630 | [
{
"from": "human",
"value": "What is the best way to encrypt a value in INI file?\nUsing Encryption/Decryption key??\n"
},
{
"from": "gpt",
"value": "When it comes to encrypting values in an INI file, using an encryption/decryption key is indeed a sound approach. Here are steps and recommendatio... |
I have a hosting account with servergrid.com. I want to backup my database, they say I have to use Sql Server Integration Service to backup the database and I would need a commercial version of Sql Server management studio.
I have Sql Server 2005 Developer Edition. I have no idea how to do SSIS backup. I tried playing... | Backing up a database using SQL Server Integration Services (SSIS) can seem daunting, especially if you're not familiar with it. Below, I'll walk you through a step-by-step process to create an SSIS package that backs up a SQL Server database and then provide instructions on how to restore that backup.
### Step-by-Ste... | 40,954 | [
{
"from": "human",
"value": "I have a hosting account with servergrid.com. I want to backup my database, they say I have to use Sql Server Integration Service to backup the database and I would need a commercial version of Sql Server management studio. \nI have Sql Server 2005 Developer Edition. I have no i... |
I would like to learn the best practices in reloading the application state, such that when my app is started, it should automatically load the "correct" view/subview when it is opened again.
In my particular case, my app has a bunch of view controllers, each taking care of a UITableView. I would like for my app to "ju... | To effectively implement application state reloading in a way that your app resumes at the correct view or subview, consider the following best practices:
### 1. **State Preservation and Restoration**
Leverage the `UIStateRestoration` protocol in your app. This allows you to save the state of your view controllers an... | 49,986 | [
{
"from": "human",
"value": "I would like to learn the best practices in reloading the application state, such that when my app is started, it should automatically load the \"correct\" view/subview when it is opened again.\nIn my particular case, my app has a bunch of view controllers, each taking care of a... |
I'm using selenium to run some functional tests on the UI for our current application.
I want to ensure that strings from the resource files in the Web project are being displayed at the correct time and place.
Simple (I thought) all I have to do is reference the assembly of the web application and assert that the tex... | I understand the problem you're facing with the `App_GlobalResources` in your ASP.NET application. Since the resource files are compiled into a separate assembly, it can be tricky to reference them directly in your functional tests. Here are several approaches you might consider:
### 1. **Use a Mock or Separate Resour... | 47,561 | [
{
"from": "human",
"value": "I'm using selenium to run some functional tests on the UI for our current application. \nI want to ensure that strings from the resource files in the Web project are being displayed at the correct time and place.\nSimple (I thought) all I have to do is reference the assembly of ... |
What is the difference between MySQL unique and non-unique index in terms of performance?
Let us say I want to make an index on a combo of 2 columns, and the combination is unique, but I create a non-unique index. Will that have any significant effect on the performance or the memory MySQL uses?
Same question, is th... | The concepts of unique and non-unique indexes in MySQL can have implications for performance, memory usage, and data integrity. Let's break down these differences:
### Unique vs. Non-Unique Index
1. **Data Integrity**:
- **Unique Index**: Enforces that all values in the indexed columns are distinct. If you attempt... | 49,524 | [
{
"from": "human",
"value": "What is the difference between MySQL unique and non-unique index in terms of performance? \nLet us say I want to make an index on a combo of 2 columns, and the combination is unique, but I create a non-unique index. Will that have any significant effect on the performance or t... |
During coding I frequently encounter this situation:
I have several objects (ConcreteType1, ConcreteType2, ...) with the same base type AbstractType, which has abstract methods save and load . Each object can (and has to) save some specific kind of data, by overriding the save method.
I have a list of AbstractType ob... | You've raised a common challenge in object-oriented design, particularly in the context of serialization and deserialization (or saving and loading) of polymorphic objects. While your current solution of using markers to indicate the type for loading might work, it does lead to a tight coupling between the loading mech... | 46,437 | [
{
"from": "human",
"value": "During coding I frequently encounter this situation:\n\nI have several objects (ConcreteType1, ConcreteType2, ...) with the same base type AbstractType, which has abstract methods save and load . Each object can (and has to) save some specific kind of data, by overriding the sav... |
I am working on a little bookmark managing app written in C#, using WPF. It just sits in the system tray and is idle 99% of the time. Recently I looked in the task manager and discovered that it uses around 25 megs of memory (and around 12 megs before it is activated for the first time) which I thought was a bit much f... | Reducing memory usage in a WPF application can be a bit challenging due to the overhead that comes with using a rich UI framework like WPF. However, there are some general practices and strategies you can consider to optimize your application's memory usage and minimize the number of threads. Here are some suggestions:... | 49,566 | [
{
"from": "human",
"value": "I am working on a little bookmark managing app written in C#, using WPF. It just sits in the system tray and is idle 99% of the time. Recently I looked in the task manager and discovered that it uses around 25 megs of memory (and around 12 megs before it is activated for the fir... |
How do I read from the performance counter "NumberOfActiveConnections" of the category ".NET Data Provider for SqlServer" from a unit test in MS Test?
I'm trying the following but it seems like I get the instance name wrong. The MSDN documentation claims this is a correct way of getting the instance name of a WinForms ... | To read performance counters in a unit test environment, you need to ensure that you're using the correct instance name for your application. The key issue you are encountering is that the instance name you are retrieving is not applicable to the context of the test runner.
In the case of performance counters associat... | 45,430 | [
{
"from": "human",
"value": "How do I read from the performance counter \"NumberOfActiveConnections\" of the category \".NET Data Provider for SqlServer\" from a unit test in MS Test?\nI'm trying the following but it seems like I get the instance name wrong. The MSDN documentation claims this is a correct w... |
I have a webService hosted at http://recpushdata.cyndigo.com/jobs.asmx. I would like to call this webservice using XMLHttpRequest and SOAP. The thing why I would like to do this is that I have hosted a client application which is accessing the webservice perfectly, but when client is trying to access the same webservic... | The error message you are encountering indicates that the server encountered an issue while processing the request, specifically an "Object reference not set to an instance of an object." This usually means that the server-side code is trying to access a property or method of an object that has not been instantiated.
... | 46,296 | [
{
"from": "human",
"value": "I have a webService hosted at http://recpushdata.cyndigo.com/jobs.asmx. I would like to call this webservice using XMLHttpRequest and SOAP. The thing why I would like to do this is that I have hosted a client application which is accessing the webservice perfectly, but when clie... |
Is there anyway to change the ASPNETDB and also using SQLExpress (2005) user instance ?
I have changed my web.config's connectin string to
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\Kooft.mdf;
User Instance=true... | To change the database that ASP.NET uses for membership, roles, and profiles, and ensure it uses your custom database (`Kooft.mdf`), you'll need to follow several steps. When you're using SQL Server Express with User Instances, ASP.NET will by default create a new `ASPNETDB.mdf` if it doesn’t find an existing database ... | 48,665 | [
{
"from": "human",
"value": "Is there anyway to change the ASPNETDB and also using SQLExpress (2005) user instance ?\nI have changed my web.config's connectin string to \n<remove name=\"LocalSqlServer\"/>\n<add name=\"LocalSqlServer\"\n connectionString=\"Data Source=.\\SQLEXPRESS;\n AttachDbFilenam... |
I have cyclical references in my hibernate domain model which is causing Betwixt to fail. I don't want to change my domain model.
How do I change Betwixt to ignore the cyclical reference?
| If you're facing issues with cyclical references in your Hibernate domain model while using Apache Betwixt for XML serialization, and you don't want to change your domain model, you can configure Betwixt to ignore these references during the serialization process. Here are a few approaches you can take:
### 1. Use Cus... | 49,980 | [
{
"from": "human",
"value": "I have cyclical references in my hibernate domain model which is causing Betwixt to fail. I don't want to change my domain model. \nHow do I change Betwixt to ignore the cyclical reference?\n"
},
{
"from": "gpt",
"value": "If you're facing issues with cyclical refe... |
I'm writing a java app using eclipse which references a few external jars and requires some config files to be user accessable.
What is the best way to package it up for deployment?
My understanding is that you cant put Jars inside another jar file, is this correct?
Can I keep my config files out of the jars and still... | When packaging a Java application for deployment, especially when it relies on external JARs and configuration files, there are a few best practices you should consider. Here are some guidelines and answers to your questions:
### JAR Packaging
1. **JAR Inside a JAR**: It is indeed not possible to directly place JAR fi... | 48,214 | [
{
"from": "human",
"value": "I'm writing a java app using eclipse which references a few external jars and requires some config files to be user accessable.\n\nWhat is the best way to package it up for deployment?\nMy understanding is that you cant put Jars inside another jar file, is this correct?\nCan I k... |
I was asking about specifics with this approach earlier today here but the confused responses has me wondering if I'm going about this all wrong.
So here's the problem. I need to architect a WinForms application that periodically checks a value from some external service. If it is in a certain state the application i... | The scenario you described is common in WinForms applications and can be handled in a way that maintains a responsive UI while blocking user interactions when necessary. To achieve this, you can use a combination of `Task`, `async/await`, and a `CancellationToken` for managing periodic checks without causing threading ... | 46,526 | [
{
"from": "human",
"value": "I was asking about specifics with this approach earlier today here but the confused responses has me wondering if I'm going about this all wrong.\nSo here's the problem. I need to architect a WinForms application that periodically checks a value from some external service. If ... |
In C#, it is possible to retrieve assembly related information like product name, version etc using reflection:
string productName = Assembly.GetCallingAssembly().GetName().Name;
string versionString = Assembly.GetCallingAssembly().GetName().Version.ToString();
How do I do the equivalent if the executing assembly is w... | Yes, it's possible to retrieve the product name and version of a calling unmanaged C++ executable from a .NET assembly that is invoked via COM. However, because you are operating in a mixed environment, you'll need to use the `System.Diagnostics.FileVersionInfo` class from .NET to get the file version information of th... | 49,757 | [
{
"from": "human",
"value": "In C#, it is possible to retrieve assembly related information like product name, version etc using reflection:\nstring productName = Assembly.GetCallingAssembly().GetName().Name;\nstring versionString = Assembly.GetCallingAssembly().GetName().Version.ToString();\n\nHow do I do ... |
I'm working on a tool which would need to communitacte: send and recieve files with other remote instances of the tool over the internet. Which communication option would be best to use in this case ? Sockets?
| When deciding on a communication option for sending and receiving files between remote instances of your tool over the internet, several factors come into play, such as ease of implementation, performance, reliability, and the specific requirements of your application. Here are some common communication options along w... | 48,477 | [
{
"from": "human",
"value": "I'm working on a tool which would need to communitacte: send and recieve files with other remote instances of the tool over the internet. Which communication option would be best to use in this case ? Sockets?\n"
},
{
"from": "gpt",
"value": "When deciding on a commu... |
T have used checkbox column in gridview. On click of a linkbutton, it should be checked that checkboxes in gridview are checked or not. If none check box is checked then it should display alert("Check at leat one check box").
| To implement the functionality you've described, you need to handle the click event of a `LinkButton` and check the state of checkboxes in a GridView. If none of the checkboxes are checked, you should display an alert.
Here’s a step-by-step example of how you can achieve this using ASP.NET Web Forms:
### ASPX Page
`... | 44,938 | [
{
"from": "human",
"value": "T have used checkbox column in gridview. On click of a linkbutton, it should be checked that checkboxes in gridview are checked or not. If none check box is checked then it should display alert(\"Check at leat one check box\"). \n"
},
{
"from": "gpt",
"value": "To im... |
I'm new to both ASP.Net MVC and jQuery and what I'm trying to do is make a form that either adds a new RockBand or updates an existing RockBand based on if the rockbandid is an empty guid or not. I figured now is a good time to get rolling with jQuery. So the first step is to make a list of bands and put an edit link... | It looks like you're on the right track, but there are a few small issues that need to be addressed in your code. Here's a breakdown of the changes you can make to resolve the "Object Required" error and ensure that your form works as intended:
1. **Ensure jQuery is Loaded**: Before using any jQuery code, make sure th... | 48,139 | [
{
"from": "human",
"value": "I'm new to both ASP.Net MVC and jQuery and what I'm trying to do is make a form that either adds a new RockBand or updates an existing RockBand based on if the rockbandid is an empty guid or not. I figured now is a good time to get rolling with jQuery. So the first step is to ... |
I'm playing with Java for the first time and need to be able to replace some words in a template. example template -
"Dear PUT_THEIR_NAME_HERE,
I'm contacting you ..... bla bla bla
Regards,
PUT_COMPANY_NAME_HERE"
What's the simplest way (preferably using the standard library) to make a copy of this template file and a... | Hi Chris,
To accomplish your task in Java, you can use a simple approach to read the template file, replace the placeholders with the actual values, and then write the output to a new file. Below is a basic implementation that should work well for your requirements.
### Step-by-Step Implementation:
1. **Create the T... | 49,184 | [
{
"from": "human",
"value": "I'm playing with Java for the first time and need to be able to replace some words in a template. example template - \n\"Dear PUT_THEIR_NAME_HERE,\nI'm contacting you ..... bla bla bla\nRegards,\nPUT_COMPANY_NAME_HERE\"\nWhat's the simplest way (preferably using the standard lib... |
I'm new to jQuery, and I'm totally struggling with using jQuery UI's sortable.
I'm trying to put together a page to facilitate grouping and ordering of items.
My page has a list of groups, and each group contains a list of items. I want to allow users to be able to do the following:
Reorder the groups
Reorder the... | To achieve your goal of enabling reordering of groups, reordering items within groups, and moving items between groups using jQuery UI's sortable functionality, you can follow these steps:
1. **Set up the sortable for groups**.
2. **Set up the sortable for items within groups**.
3. **Connect all item lists together** ... | 47,347 | [
{
"from": "human",
"value": "I'm new to jQuery, and I'm totally struggling with using jQuery UI's sortable.\nI'm trying to put together a page to facilitate grouping and ordering of items.\nMy page has a list of groups, and each group contains a list of items. I want to allow users to be able to do the foll... |
I have binary data in an unsigned char variable.
I need to convert them to PEM base64 in c.
I looked in openssl library but i could not find any function.
Does any body have any idea?
| To convert binary data to PEM Base64 format in C, you can use the OpenSSL library's functions to handle the Base64 encoding and to format the output according to the PEM standard. PEM encoding is essentially Base64 encoding of the data, surrounded by header and footer lines.
Here's a step-by-step guide on how to do th... | 47,410 | [
{
"from": "human",
"value": "I have binary data in an unsigned char variable.\nI need to convert them to PEM base64 in c.\nI looked in openssl library but i could not find any function.\nDoes any body have any idea?\n"
},
{
"from": "gpt",
"value": "To convert binary data to PEM Base64 format in ... |
I came across the case where depending on the execution path I may need to invoke an inclusion of .js file from controller. Is there a nice way of doing it? (besides setting some view variable with actual .js include code)?
| In a scenario where you want to conditionally include a JavaScript file based on the execution path within a controller, there are several methods you can use that are cleaner than directly embedding the JS code into a view variable. Here are a few approaches:
### 1. Using a View Variable
Although you mentioned you w... | 48,736 | [
{
"from": "human",
"value": "I came across the case where depending on the execution path I may need to invoke an inclusion of .js file from controller. Is there a nice way of doing it? (besides setting some view variable with actual .js include code)?\n"
},
{
"from": "gpt",
"value": "In a scena... |
Can anyone suggest a way, or a link to an example, of building a function in PHP that allows users to send a link via e-mail to multiple friends?
| Certainly! Below is a simple example of how you can create a PHP function to send a link via email to multiple friends. This example assumes you have a basic understanding of HTML forms and PHP mail functions.
### Step 1: Create an HTML Form
Create a file named `send_link.php` with the following code:
```php
<!DOCTY... | 45,673 | [
{
"from": "human",
"value": "Can anyone suggest a way, or a link to an example, of building a function in PHP that allows users to send a link via e-mail to multiple friends?\n"
},
{
"from": "gpt",
"value": "Certainly! Below is a simple example of how you can create a PHP function to send a link... |
Vista has introduced a new API to display a text in the list view control when it doesn't have any items. As the MSDN library states, I should process the LVN_GETEMPTYMARKUP notification.
In the inherited ListView control the WndProc method is overriden:
protected override void WndProc(ref Message m) {
try {
if(m... | If you're not receiving the `LVN_GETEMPTYMARKUP` notification in your `WndProc`, there are a few things to check and try. Here are some possible reasons and solutions:
1. **Control Style**: Make sure your ListView is using the correct style that allows for empty markup. You need to ensure that your ListView has the `L... | 49,143 | [
{
"from": "human",
"value": "Vista has introduced a new API to display a text in the list view control when it doesn't have any items. As the MSDN library states, I should process the LVN_GETEMPTYMARKUP notification.\nIn the inherited ListView control the WndProc method is overriden:\nprotected override voi... |
I am using the ListView Control with the following datasource List<MyObject>
On my listview control i have an OnItemDataBound
My question is how do get the current value of MyObject. Ie myObj[5].FirstName
protected void ItemsListViewDataBound(object sender, ListViewItemEventArgs e)
{
// I want to do some kind of a cas... | In the `OnItemDataBound` event of the ListView control, you can access the current data item (in your case, an instance of `MyObject`) by casting the `DataItem` property of the `ListViewItemEventArgs`. Here’s how you can achieve that:
```csharp
protected void ItemsListViewDataBound(object sender, ListViewItemEventArgs... | 49,248 | [
{
"from": "human",
"value": "I am using the ListView Control with the following datasource List<MyObject>\nOn my listview control i have an OnItemDataBound\n\nMy question is how do get the current value of MyObject. Ie myObj[5].FirstName\nprotected void ItemsListViewDataBound(object sender, ListViewItemEven... |
Beyond offering an API for my website, I'd like to offer users the ability to write simple scripts that would run on my servers . The scripts would have access to objects owned by the user and be able to manipulate, modify, and otherwise process their data.
I'd like to be able to limit resources taken by these scripts ... | Creating a secure, sandboxed environment for users to write and execute scripts on your server is a challenging but exciting project. Here are some languages and technologies you can consider, along with examples and considerations for each:
### 1. **Python (with Restricted Execution)**
- **Language:** Python, with re... | 46,778 | [
{
"from": "human",
"value": "Beyond offering an API for my website, I'd like to offer users the ability to write simple scripts that would run on my servers . The scripts would have access to objects owned by the user and be able to manipulate, modify, and otherwise process their data.\nI'd like to be able ... |
I have a client of my web based application who heavily uses the data from our system for powerpoint presentations.
We currently allow data to export in more traditional file types...PDF, CSV, HTML, and a few others. Powerpoint doesn't seem to be really automated.
Is there a way, on the ASP.NET server side, to automat... | Yes, it is certainly possible to automate the creation of PowerPoint presentations on the server side using ASP.NET. There are several libraries available that can help you generate PowerPoint files programmatically. Here are a few popular options:
### 1. **Open XML SDK**
This is a Microsoft library that allows you to... | 47,802 | [
{
"from": "human",
"value": "I have a client of my web based application who heavily uses the data from our system for powerpoint presentations.\nWe currently allow data to export in more traditional file types...PDF, CSV, HTML, and a few others. Powerpoint doesn't seem to be really automated.\nIs there a ... |
I am setting up a very small MySQL database that stores, first name, last name, email and phone number and am struggling to find the 'perfect' datatype for each field. I know there is no such thing as a perfect answer, but there must be some sort of common convention for commonly used fields such as these. For instance... | When designing a MySQL database, it's important to choose the right data types for your fields, as this can impact performance, storage, and data integrity. Below are some common fields along with recommended data types and considerations for each.
### 1. **First Name and Last Name**
- **Data Type:** `VARCHAR(50)` ... | 43,522 | [
{
"from": "human",
"value": "I am setting up a very small MySQL database that stores, first name, last name, email and phone number and am struggling to find the 'perfect' datatype for each field. I know there is no such thing as a perfect answer, but there must be some sort of common convention for commonl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.