instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions.
How does one do this in WPF since the Value property on the Slider is double?
| To create a WPF `Slider` that behaves similarly to a `System.Windows.Forms.TrackBar`, allowing only discrete integer positions, you can use a combination of the `Slider` control and some binding and event handling to restrict the value to integers.
Here's how to achieve this:
1. **Set the `Minimum` and `Maximum` prop... | 16,308 | [
{
"from": "human",
"value": "All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions.\nHow does one do this in WPF since the Value property on the Slider is ... |
How can I setup a shared ccache without falling into a permissions problem?
I would like to run a nightly or CI build with latest changes and share all created binaries throughout the R&D using a large ccache repository.
| Setting up a shared `ccache` repository in a way that avoids permissions problems is a great idea for improving build times across a team. Below are steps to configure a shared `ccache` for a continuous integration (CI) environment or nightly builds, ensuring that permissions issues are minimized:
### Step-by-Step Gui... | 12,762 | [
{
"from": "human",
"value": "How can I setup a shared ccache without falling into a permissions problem?\nI would like to run a nightly or CI build with latest changes and share all created binaries throughout the R&D using a large ccache repository.\n"
},
{
"from": "gpt",
"value": "Setting up a... |
Any useful metrics will be fine
| Sure! Here are some useful metrics across various domains that can provide insights into performance, health, and effectiveness:
### Business Metrics
1. **Customer Acquisition Cost (CAC)**: The total cost of acquiring a new customer, calculated by dividing total marketing and sales expenses by the number of new custom... | 13,107 | [
{
"from": "human",
"value": "Any useful metrics will be fine\n"
},
{
"from": "gpt",
"value": "Sure! Here are some useful metrics across various domains that can provide insights into performance, health, and effectiveness:\n\n### Business Metrics\n1. **Customer Acquisition Cost (CAC)**: The tota... |
There seem to many ways to skin this particular cat - but which is the best and easiest to implement. It would seem that the ASP.net Membership Provider is the one that will save more time, so my questions are:
What are the pros/cons of Membership?
How do you integrate the auto generated user db with your own custom ... | Using the ASP.NET Membership Provider can indeed simplify the implementation of user authentication and management in your application. Let's break down your questions:
### Pros and Cons of ASP.NET Membership Provider
**Pros:**
1. **Built-in Functionality**: Provides a comprehensive set of features including user reg... | 13,872 | [
{
"from": "human",
"value": "There seem to many ways to skin this particular cat - but which is the best and easiest to implement. It would seem that the ASP.net Membership Provider is the one that will save more time, so my questions are:\n\nWhat are the pros/cons of Membership?\nHow do you integrate the ... |
I am developing, a simple SharePoint Sequential Workflow which should be bound to a document library. When associating the little workflow to a document library, I checked these options
Allow this workflow to be manually
started by an authenticated user
with Edit Items Permissions.
Start
this workflow when a new i... | The behavior you're experiencing seems to be related to how SharePoint handles updates to list items through different web services. The issue specifically appears when updating an item using the `Lists.asmx` web service.
### Understanding the Issue
1. **Event Receivers**: Workflows in SharePoint can be triggered by ... | 14,924 | [
{
"from": "human",
"value": "I am developing, a simple SharePoint Sequential Workflow which should be bound to a document library. When associating the little workflow to a document library, I checked these options \n\nAllow this workflow to be manually\nstarted by an authenticated user\nwith Edit Items Per... |
How many people actually write an SDD document before writing a single line of code?
How do you handle large CSCI's?
What standard do you use for SDD content?
What tailoring have you done?
| The Software Design Document (SDD) is a crucial artifact in software development, particularly in large projects or complex systems. However, the practice of formally writing an SDD before writing a single line of code varies widely among organizations, teams, and project methodologies. Here are some insights regarding... | 13,249 | [
{
"from": "human",
"value": "How many people actually write an SDD document before writing a single line of code?\nHow do you handle large CSCI's? \nWhat standard do you use for SDD content?\nWhat tailoring have you done?\n"
},
{
"from": "gpt",
"value": "The Software Design Document (SDD) is a c... |
I want to have a UIScrollView with a set of subviews where each of these subviews has a UITextView with a different text. For this task, I have modified the PageControl example from the apple "iphone dev center" in order to add it a simple UITextView to the view which is used to generate the subviews of the scroll view... | The issue you're experiencing with the `UITextView` in a `UIScrollView` is often related to how `UITextView` handles its text display. When the `UITextView` is created, it may need to be explicitly configured to display its text correctly. Here are a few steps you can take to resolve the issue:
### 1. Set the Text Pro... | 13,319 | [
{
"from": "human",
"value": "I want to have a UIScrollView with a set of subviews where each of these subviews has a UITextView with a different text. For this task, I have modified the PageControl example from the apple \"iphone dev center\" in order to add it a simple UITextView to the view which is used ... |
How do I programmatically force an onchange event on an input?
I've tried something like this:
var code = ele.getAttribute('onchange');
eval(code);
But my end goal is to fire any listener functions, and that doesn't seem to work. Neither does just updating the 'value' attribute.
| To programmatically trigger an `onchange` event on an input element and ensure that all associated event listeners are executed, you can create and dispatch a new event using the `Event` constructor or the `CustomEvent` constructor. Here's how you can do that:
1. Update the value of the input element.
2. Create a new ... | 16,628 | [
{
"from": "human",
"value": "How do I programmatically force an onchange event on an input?\nI've tried something like this:\nvar code = ele.getAttribute('onchange');\neval(code);\n\nBut my end goal is to fire any listener functions, and that doesn't seem to work. Neither does just updating the 'value' att... |
My C(++) program, written and compiled using Visual C(++)/Visual Studio, runs fine on my own machine, but refuses to run on another machine. The error message I get is "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
| The error message you are encountering typically indicates an issue with the application's dependencies, particularly related to the Visual C++ runtime libraries. Here are some steps you can take to resolve this issue:
1. **Check for Missing Dependencies**:
- Your application may rely on certain DLLs (Dynamic Link ... | 15,069 | [
{
"from": "human",
"value": "My C(++) program, written and compiled using Visual C(++)/Visual Studio, runs fine on my own machine, but refuses to run on another machine. The error message I get is \"This application has failed to start because the application configuration is incorrect. Reinstalling the app... |
I am trying to install an svn client on a friend's work windows laptop without much success. It seems that everyone is using TortoiseSVN nowadays, which unfortunately doesn't install without administrator access. Is there any way around it or another client I can try?
I don't need anything fancy - just basic http/https... | If you're looking for an SVN client that doesn't require administrative access to install and provides a GUI, your options are limited, but here are a few suggestions:
1. **Portable Versions**: Look for portable versions of SVN clients, which do not require installation and can run directly from a USB stick or any fol... | 18,087 | [
{
"from": "human",
"value": "I am trying to install an svn client on a friend's work windows laptop without much success. It seems that everyone is using TortoiseSVN nowadays, which unfortunately doesn't install without administrator access. Is there any way around it or another client I can try?\nI don't n... |
Like the title says, If I place an app_offline.htm in the application root, will it cut off currently running requests, or just new ones?
| When you place an `app_offline.htm` file in the root of your ASP.NET application, it will effectively put the application into a "offline" state. This action does not immediately terminate currently running requests, but it will prevent any new requests from being processed.
Here’s what happens:
1. **New Requests**:... | 20,683 | [
{
"from": "human",
"value": "Like the title says, If I place an app_offline.htm in the application root, will it cut off currently running requests, or just new ones?\n"
},
{
"from": "gpt",
"value": "When you place an `app_offline.htm` file in the root of your ASP.NET application, it will effect... |
I'm working on databases that have moving tables auto-generated by some obscure tools. By the way, we have to track information changes in the table via some triggers. And, of course, it occurs that some changes in the table structure broke some triggers, by removing a column or changing its type, for example.
So, the ... | In Oracle databases, triggers can become invalid for a number of reasons, such as changes to the tables they depend on. To determine if a trigger is invalid due to changes in the underlying objects (like the columns in the table), you can query the `USER_TRIGGERS` view along with the `USER_OBJECTS` view.
Here's a way ... | 16,618 | [
{
"from": "human",
"value": "I'm working on databases that have moving tables auto-generated by some obscure tools. By the way, we have to track information changes in the table via some triggers. And, of course, it occurs that some changes in the table structure broke some triggers, by removing a column or... |
I've got a Debian Etch system running Exim4-daemon-heavy.
The system is open to the internet, but the intention is that it will only receive legitimate mail coming from a spam-filtering service, which runs as a proxy ahead of it. (I can't just limit access to those IPs though, because I do have some authorized users w... | To achieve your goal of adding a custom header based on the sending IP address in Exim4, you can modify the configuration file for Exim4 to add a custom header for messages received directly, while allowing authenticated relayers to bypass this.
### Steps to Add a Header Based on the Sender IP:
1. **Edit the Exim Con... | 13,813 | [
{
"from": "human",
"value": "I've got a Debian Etch system running Exim4-daemon-heavy.\nThe system is open to the internet, but the intention is that it will only receive legitimate mail coming from a spam-filtering service, which runs as a proxy ahead of it. (I can't just limit access to those IPs though,... |
I'm trying to add the lucene sandbox contribution called term-highlighter to my pom.xml.
I'm not really that familiar with Maven, but the code has a pom.xml.template which
seems to imply if I add a dependency that looks like:
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifac... | It looks like you're on the right track with adding the Lucene highlighter dependency to your `pom.xml`. To include the `lucene-highlighter` dependency correctly, you need to ensure that the version you specify is compatible with the version of `lucene-core` you are using.
Here's a complete example of how you can add ... | 15,224 | [
{
"from": "human",
"value": "I'm trying to add the lucene sandbox contribution called term-highlighter to my pom.xml.\nI'm not really that familiar with Maven, but the code has a pom.xml.template which \nseems to imply if I add a dependency that looks like:\n<dependency>\n <groupId>org.apache.lucene</group... |
I am writing a coding standards document for a team of about 15 developers with a project load of between 10 and 15 projects a year. Amongst other sections (which I may post here as I get to them) I am writing a section on code formatting. So to start with, I think it is wise that, for whatever reason, we establish som... | Creating a coding standards document is a great step toward improving maintainability and consistency within your team. Below are suggestions for code formatting and naming standards, including justifications for each practice.
### Code Formatting
1. **Indentation and Spacing**:
- **Use 4 spaces per indent**: This... | 14,654 | [
{
"from": "human",
"value": "I am writing a coding standards document for a team of about 15 developers with a project load of between 10 and 15 projects a year. Amongst other sections (which I may post here as I get to them) I am writing a section on code formatting. So to start with, I think it is wise th... |
I know that I can share files using Shared Folders in Virtual PC, but this method seems to have pretty poor performance. Is there another method to share files that provides better performance? (Besides using something other than Virtual PC)
| If you are looking for a method to share files with better performance than Shared Folders in Virtual PC, you might consider the following options:
1. **Network File Sharing**: Set up a shared folder on your host machine and access it through a network share from the virtual machine. This can be done using SMB (Server... | 17,406 | [
{
"from": "human",
"value": "I know that I can share files using Shared Folders in Virtual PC, but this method seems to have pretty poor performance. Is there another method to share files that provides better performance? (Besides using something other than Virtual PC)\n"
},
{
"from": "gpt",
"v... |
I have an ext combobox which uses a store to suggest values to a user as they type.
An example of which can be found here: combobox example
Is there a way of making it so the suggested text list is rendered to an element in the DOM. Please note I do not mean the "applyTo" config option, as this would render the whole ... | To achieve the desired functionality of rendering the suggested text list from an ExtJS ComboBox to a separate element in the DOM while keeping the ComboBox's textbox separate, you can utilize the `listConfig` and `getListParent()` methods. Here's a general approach on how to achieve this:
1. **Create the ComboBox**: ... | 13,502 | [
{
"from": "human",
"value": "I have an ext combobox which uses a store to suggest values to a user as they type. \nAn example of which can be found here: combobox example\nIs there a way of making it so the suggested text list is rendered to an element in the DOM. Please note I do not mean the \"applyTo\" c... |
If you call javascript window.open and pass a url to a .xls file it open on some machines in the browser window. How can you force it into Excel?
| To ensure that a .xls file opens directly in Excel instead of the browser, you can use the following approaches:
### 1. Set the Correct MIME Type
Make sure your web server is set to serve `.xls` files with the correct MIME type. This is crucial because browsers typically decide how to handle files based on their MIME... | 15,746 | [
{
"from": "human",
"value": "If you call javascript window.open and pass a url to a .xls file it open on some machines in the browser window. How can you force it into Excel?\n"
},
{
"from": "gpt",
"value": "To ensure that a .xls file opens directly in Excel instead of the browser, you can use ... |
I'm using the document.form.submit() function for a rather large input form (hundreds of fields, it's an inventory application). I'm calling this after the user has been idle for a certain amount of time and I would like to save any data they've typed. When I try this the page reloads (the action is #) but any new te... | The issue you are experiencing with the `document.form.submit()` function is likely related to how form submission works in the context of a page reload and the timing of when the data is sent.
When you call `document.form.submit()`, the form is submitted immediately, which means the browser prepares to send the curre... | 16,374 | [
{
"from": "human",
"value": "I'm using the document.form.submit() function for a rather large input form (hundreds of fields, it's an inventory application). I'm calling this after the user has been idle for a certain amount of time and I would like to save any data they've typed. When I try this the page... |
The question should be interpreted from a general point of view and not targeted solely at web apps or desktop apps.
I have been looking around to find a simple and easy way of creating interactive prototypes for web applications. I'd like to use a technique that allows simple UI creation and especially UI recreation a... | Creating interactive prototypes for web applications is an essential part of the design and development process. Given your experiences and the tools you’ve explored, I’ll outline some current approaches to prototyping, along with their respective pros and cons.
### 1. **Dedicated Prototyping Tools**
These tools are d... | 13,546 | [
{
"from": "human",
"value": "The question should be interpreted from a general point of view and not targeted solely at web apps or desktop apps.\nI have been looking around to find a simple and easy way of creating interactive prototypes for web applications. I'd like to use a technique that allows simple ... |
I am developing a Joomla component and one of the views needs to render itself as PDF. In the view, I have tried setting the content-type with the following line, but when I see the response, it is text/html anyways.
header('Content-type: application/pdf');
If I do this in a regular php page, everything works as expec... | In Joomla, when you're rendering a view that you want to output as a PDF, you need to ensure that you're overriding the default behavior of the Joomla application to output HTML. Here are the steps you can take to render your Joomla component view as a PDF:
### 1. Disable Joomla's HTML Output
First, ensure that Jooml... | 13,964 | [
{
"from": "human",
"value": "I am developing a Joomla component and one of the views needs to render itself as PDF. In the view, I have tried setting the content-type with the following line, but when I see the response, it is text/html anyways.\nheader('Content-type: application/pdf');\n\nIf I do this in a... |
So I'm programming along in a nice, up to date, object oriented fashion. I regularly make use of the various aspects of OOP that PHP implements but I am wondering when might I need to use closures. Any experts out there that can shed some light on when it would be useful to implement closures?
| Closures, or anonymous functions, can be incredibly useful in PHP for several reasons, especially in object-oriented programming (OOP) contexts. Here are some scenarios where closures can be particularly beneficial:
1. **Callbacks**: Closures are often used as callback functions. If you are working with functions that... | 12,361 | [
{
"from": "human",
"value": "So I'm programming along in a nice, up to date, object oriented fashion. I regularly make use of the various aspects of OOP that PHP implements but I am wondering when might I need to use closures. Any experts out there that can shed some light on when it would be useful to impl... |
Is it possible to send a list of IDs to a stored procedure from c#?
UPDATE Germs
SET Mutated = ~Mutated
WHERE (GermID IN (ids))
| Yes, you can send a list of IDs to a stored procedure from C#. One common approach is to use a comma-separated string of IDs and then split this string in the stored procedure. However, there are more efficient and cleaner methods, especially when dealing with larger lists of IDs.
### Here are two common approaches:
... | 16,200 | [
{
"from": "human",
"value": "Is it possible to send a list of IDs to a stored procedure from c#?\nUPDATE Germs\nSET Mutated = ~Mutated\nWHERE (GermID IN (ids))\n\n"
},
{
"from": "gpt",
"value": "Yes, you can send a list of IDs to a stored procedure from C#. One common approach is to use a comma-... |
I have a contract in the offering from a client to develop an intranet application for capturing/manipulating/displaying a fairly complex set of marketing data. I've done this sort of thing before so the analysis, database etc. holds no issues for me, but the client would most likely prefer ASP.NET as they have some (... | Transitioning to ASP.NET from PHP, given your extensive experience in programming and various languages, should be relatively smooth. Here are some resources and tips to help you quickly get up to speed with ASP.NET:
### Books:
1. **"Pro ASP.NET Core MVC" by Adam Freeman**: This book provides a comprehensive overview ... | 16,009 | [
{
"from": "human",
"value": "I have a contract in the offering from a client to develop an intranet application for capturing/manipulating/displaying a fairly complex set of marketing data. I've done this sort of thing before so the analysis, database etc. holds no issues for me, but the client would most ... |
Please consider both commercial and free debuggers. Would like to see also the pros and cons for each.
| Certainly! Here’s an overview of both commercial and free debuggers, along with their pros and cons.
### Commercial Debuggers
1. **Visual Studio (Debugger)**
- **Pros:**
- Integrated with a robust IDE for C#, C++, and more.
- Excellent support for debugging web applications, mobile apps, and cloud servic... | 12,275 | [
{
"from": "human",
"value": "Please consider both commercial and free debuggers. Would like to see also the pros and cons for each.\n"
},
{
"from": "gpt",
"value": "Certainly! Here’s an overview of both commercial and free debuggers, along with their pros and cons.\n\n### Commercial Debuggers\n\... |
From question How to replace a character for a newline in Vim?. You have to use \r when replacing text for a newline, like this
:%s/%/\r/g
But when replacing end of lines and newlines for a character, you can do it like:
:%s/\n/%/g
What section of the manual documents these behaviors, and what's the reasoning behind... | In Vim, the behavior you've mentioned regarding the replacement of newline characters and the use of `\r` vs. `\n` can be found in the Vim documentation, specifically under the sections related to substitution and special characters.
### Relevant Sections in Vim Documentation
1. **Substitution Command (`:s`)**:
- ... | 17,692 | [
{
"from": "human",
"value": "From question How to replace a character for a newline in Vim?. You have to use \\r when replacing text for a newline, like this\n:%s/%/\\r/g\n\nBut when replacing end of lines and newlines for a character, you can do it like:\n:%s/\\n/%/g \n\nWhat section of the manual document... |
How does googlebot treat iframes? Does it follow the src attribute like a link? Is the iframe content analyzed as if it was part of the page where it is included?
| Googlebot treats iframes somewhat differently than standard HTML elements. Here’s how Googlebot interacts with iframes:
1. **Following the src Attribute**: Googlebot does follow the `src` attribute of an iframe. It makes a request to the URL specified in the `src` and fetches the content of that URL. This means that t... | 12,590 | [
{
"from": "human",
"value": "How does googlebot treat iframes? Does it follow the src attribute like a link? Is the iframe content analyzed as if it was part of the page where it is included?\n"
},
{
"from": "gpt",
"value": "Googlebot treats iframes somewhat differently than standard HTML elemen... |
I have an game application I have written for Windows Mobile and I want to have a timer associated with the puzzle. If the program loses focus for any reason (call comes in, user switches programs, user hits the Windows button) then I want a pop up dialog box to cover the puzzle and the timer to stop. When the user clo... | Implementing a timer that pauses when your application loses focus and resumes when it regains focus is a common requirement in mobile applications. Below are the steps you can take to achieve this in your Windows Mobile application:
### Step 1: Implement the Timer
You can use a `System.Windows.Forms.Timer` for your ... | 16,869 | [
{
"from": "human",
"value": "I have an game application I have written for Windows Mobile and I want to have a timer associated with the puzzle. If the program loses focus for any reason (call comes in, user switches programs, user hits the Windows button) then I want a pop up dialog box to cover the puzzle... |
According to what I have found so far, I can use the following code:
LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean)super.getApplicationContext().getBean("&sessionFactory");
System.out.println(sessionFactory.getConfiguration().buildSettings().getJdbcBatchSize());
but then I get a Hibernate ... | The exception you're encountering indicates that the `LocalSessionFactoryBean` is not properly configured with a `DataSource`. The `LocalSessionFactoryBean` is a Spring factory bean for Hibernate sessions, and it requires a `DataSource` to connect to your database.
Here are the steps to resolve this issue:
1. **Defi... | 16,270 | [
{
"from": "human",
"value": "According to what I have found so far, I can use the following code:\n\n LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean)super.getApplicationContext().getBean(\"&sessionFactory\");\n System.out.println(sessionFactory.getConfiguration().buildSettings().get... |
I need to be able to merge two (very simple) JavaScript objects at runtime. For example I'd like to:
var obj1 = { food: 'pizza', car: 'ford' }
var obj2 = { animal: 'dog' }
obj1.merge(obj2);
//obj1 now has three properties: food, car, and animal
Is there a built in way to do this? I do not need recursion, and I do no... | Yes, you can merge two JavaScript objects using the built-in `Object.assign()` method or the spread operator. However, to implement the `merge` method directly on the object, you can define a method on `Object.prototype` to achieve the desired behavior. Here’s how you can do it:
### Using `Object.assign()`
If you wan... | 14,705 | [
{
"from": "human",
"value": "I need to be able to merge two (very simple) JavaScript objects at runtime. For example I'd like to:\nvar obj1 = { food: 'pizza', car: 'ford' }\nvar obj2 = { animal: 'dog' }\n\nobj1.merge(obj2);\n\n//obj1 now has three properties: food, car, and animal\n\nIs there a built in way... |
I am having issues with a website that I am working on in which images and background-images fail to load in Internet Explorer 6.
Here is an example of a page on which you might experience this issue:
Example Page
So far I have looked at the following possible issues and pretty much ruled them out:
XML/Extraneous data... | When dealing with image loading issues in Internet Explorer 6, it's important to keep in mind the unique quirks of this older browser. Here are several potential solutions and troubleshooting steps you can take to resolve the issue:
1. **CSS Syntax Check**: Ensure that your CSS is valid and uses proper syntax. Sometim... | 16,623 | [
{
"from": "human",
"value": "I am having issues with a website that I am working on in which images and background-images fail to load in Internet Explorer 6.\nHere is an example of a page on which you might experience this issue:\nExample Page\nSo far I have looked at the following possible issues and pret... |
I have a web site using apache httpd as the server and mysql as the backend. It publishes a "thought for the day" that has gotten so popular that the server is crashing due to the number of requests. Since the same page is been requested (the thought only changes once a day), is it possible to put a caching server in f... | Yes, it's definitely possible to set up a caching server in front of your Apache HTTPD server to alleviate the load on your backend and improve performance, especially since the "thought for the day" changes only once a day. Here are a few approaches you can consider:
### 1. **Use a Reverse Proxy Cache**
You can set ... | 14,295 | [
{
"from": "human",
"value": "I have a web site using apache httpd as the server and mysql as the backend. It publishes a \"thought for the day\" that has gotten so popular that the server is crashing due to the number of requests. Since the same page is been requested (the thought only changes once a day), ... |
What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with HAppS.
Edit: I'd like to be free to choose from Postgresql MySql and SQLite as far as the actual databases go.
| When working with databases in Haskell, there are several libraries that can help you interact with your database of choice (PostgreSQL, MySQL, or SQLite). While Haskell does not have a built-in Object-Relational Mapping (ORM) library that is as mature as Django's ORM or Hibernate, you can achieve similar functionality... | 8,420 | [
{
"from": "human",
"value": "What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with HAppS.\nEdit: I'd like to be free to choose from Postgresql MySql and SQLite as f... |
I'm looking for a current (1.2), well-formatted, printable version of the jQuery documentation. I've checked the alternative resources page and see the PDF versions from CF and Java, but both are out of date.
The jQuery site has the API browser with "Printable Version" in the toolbox, but it prints terribly, and I don... | I understand your frustration in trying to find a well-formatted, printable version of the jQuery documentation for version 1.2. Unfortunately, as of my last knowledge update in October 2023, there hasn't been a dedicated printable PDF or similar resource specifically for that version that meets your needs.
Here are s... | 19,739 | [
{
"from": "human",
"value": "I'm looking for a current (1.2), well-formatted, printable version of the jQuery documentation. I've checked the alternative resources page and see the PDF versions from CF and Java, but both are out of date.\nThe jQuery site has the API browser with \"Printable Version\" in th... |
At some point in time I turned on a setting in Visual Studio 2005 that produces a warning when methods/classes don't have an xml comment associated with them. I would like to turn this off, but can't seem to find the setting again. Anyone know where this is?
| In Visual Studio 2005, the warning you are seeing is likely related to the XML documentation comments feature. To turn off the warnings for missing XML documentation comments, you can follow these steps:
1. **Open Your Project**: Start Visual Studio 2005 and open the project for which you want to change the settings.
... | 19,897 | [
{
"from": "human",
"value": "At some point in time I turned on a setting in Visual Studio 2005 that produces a warning when methods/classes don't have an xml comment associated with them. I would like to turn this off, but can't seem to find the setting again. Anyone know where this is?\n"
},
{
"... |
I am building a table using the DataGridView where a user can select items from a dropdown in each cell. To simplify the problem, lets say i have 1 column. I am using the DataGridViewComboBoxColumn in the designer. I am trying to support having each row in that column have a different list of items to choose from.
... | Yes, it is possible to have different lists of items for each row in a `DataGridViewComboBoxColumn` in a `DataGridView`. However, it requires some additional coding because the `DataGridViewComboBoxColumn` does not natively support different values for each row directly through the designer. Instead, you can use the `E... | 12,873 | [
{
"from": "human",
"value": "I am building a table using the DataGridView where a user can select items from a dropdown in each cell. To simplify the problem, lets say i have 1 column. I am using the DataGridViewComboBoxColumn in the designer. I am trying to support having each row in that column have a... |
I am running Ruby and MySQL on a Windows box.
I have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things.
The Ruby code can display a prompt requesting the password, the user types in the password and hits the Enter k... | You can achieve this by using the `io/console` library in Ruby, which allows you to read characters from the keyboard without echoing them to the terminal (console). We can implement a method to read the password while displaying asterisks for each character typed.
Here's a simple example of how you can prompt the use... | 14,629 | [
{
"from": "human",
"value": "I am running Ruby and MySQL on a Windows box.\nI have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things. \nThe Ruby code can display a prompt requesting the password, the user... |
I have a multi-table query, similar to this (simplified version)
SELECT columns, count(table2.rev_id) As rev_count, sum(table2.rev_rating) As sum_rev_rating
FROM table1
LEFT JOIN table2
ON table1.dom_id = table2.rev_domain_from
WHERE dom_lastreview != 0 AND rev_status = 1
GROUP BY dom_url
ORDER BY sum_rev_rating/re... | The error you're encountering is due to the way MySQL handles the `ORDER BY` clause when using aggregate functions. In your case, you are trying to reference `sum_rev_rating` and `rev_count` directly in the `ORDER BY` clause, which results in an error because they are derived from aggregate functions and aren't accessi... | 17,413 | [
{
"from": "human",
"value": "I have a multi-table query, similar to this (simplified version)\nSELECT columns, count(table2.rev_id) As rev_count, sum(table2.rev_rating) As sum_rev_rating \nFROM table1\nLEFT JOIN table2\nON table1.dom_id = table2.rev_domain_from \nWHERE dom_lastreview != 0 AND rev_status = 1... |
Anyone have suggestions for deployment methods for Perl modules to a share nothing cluster?
Our current method is very manual.
Take down half the cluster
Copy Perl modules ( CPAN style modules ) to downed cluster members
ssh to each member and run perl Makefile.pl; make ; make install on each module to be installed
Co... | Deploying Perl modules to a "share nothing" cluster can indeed be cumbersome, especially with a manual process like the one you've described. Here are some suggestions to streamline your deployment process:
### 1. Use a Configuration Management Tool
Consider using a configuration management tool like **Ansible**, **C... | 15,341 | [
{
"from": "human",
"value": "Anyone have suggestions for deployment methods for Perl modules to a share nothing cluster?\nOur current method is very manual.\n\nTake down half the cluster\nCopy Perl modules ( CPAN style modules ) to downed cluster members\nssh to each member and run perl Makefile.pl; make ; ... |
I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?
| Certainly! You can create a simple HTML volume slider using the `<input>` element of type `range`. This slider can then have its value passed to a JavaScript function whenever the user changes it. Below is an example of how to set this up:
### HTML
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UT... | 16,339 | [
{
"from": "human",
"value": "I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?\n"
},
{
"from": "gpt",
"value": "Cert... |
I've been Googling for quite awhile and haven't found a definitive answer. Is it possible to output a table using Apache POI? It looks like it hasn't been implemented, since the main developer stopped working on it like 5 years ago.
Is there an open source alternative to POI that can do this?
| Yes, Apache POI can be used to create and manipulate tables in Excel spreadsheets (XLSX format). Although Apache POI does not have a dedicated table API that is as straightforward as you might find in other libraries, you can use the existing features to create tables in a workbook by using the `XSSFTable` class along ... | 16,687 | [
{
"from": "human",
"value": "I've been Googling for quite awhile and haven't found a definitive answer. Is it possible to output a table using Apache POI? It looks like it hasn't been implemented, since the main developer stopped working on it like 5 years ago.\nIs there an open source alternative to POI ... |
Let's face it. The Singleton Pattern is highly controversial topic with hordes programmers on both sides of the fence. There are those who feel like the Singleton is nothing more then a glorified global variable, and others who swear by pattern and use it incessantly. I don't want the Singleton Controversy to lie at... | Absolutely, exploring alternatives to the Singleton Pattern can open up a variety of design possibilities, and it's great to examine these from a theoretical perspective. Here are several alternatives and design patterns you might consider in a world without Singletons:
### 1. **Dependency Injection (DI)**
- **Over... | 13,891 | [
{
"from": "human",
"value": "Let's face it. The Singleton Pattern is highly controversial topic with hordes programmers on both sides of the fence. There are those who feel like the Singleton is nothing more then a glorified global variable, and others who swear by pattern and use it incessantly. I don't... |
Sometimes it feels that my company is the only company in the world using Ruby but not Ruby on Rails, to the point that Rails has almost become synonymous with Ruby.
I'm sure this isn't really true, but it'd be fun to hear some stories about non-Rails Ruby usage out there.
| It's a common perception that Ruby is primarily associated with Ruby on Rails, given the framework's popularity and influence in web development. However, Ruby has a rich ecosystem and is used in various domains beyond Rails. Here are a few interesting stories and examples of non-Rails Ruby usage:
1. **Automation and ... | 13,267 | [
{
"from": "human",
"value": "Sometimes it feels that my company is the only company in the world using Ruby but not Ruby on Rails, to the point that Rails has almost become synonymous with Ruby.\nI'm sure this isn't really true, but it'd be fun to hear some stories about non-Rails Ruby usage out there.\n"
... |
I know Googling I can find an appropriate answer, but I prefer listening to your personal (and maybe technical) opinions.
What is the main reason of the difference between Java and C# in throwing exceptions?
In Java the signature of a method that throws an exception has to use the "throws" keyword, while in C# you don'... | The differences between exception handling in Java and C# stem from their respective design philosophies and how they approach the concept of checked vs. unchecked exceptions.
### Java's Checked Exceptions
In Java, there is a clear distinction between checked and unchecked exceptions. This is enforced through the use... | 16,209 | [
{
"from": "human",
"value": "I know Googling I can find an appropriate answer, but I prefer listening to your personal (and maybe technical) opinions.\nWhat is the main reason of the difference between Java and C# in throwing exceptions?\nIn Java the signature of a method that throws an exception has to use... |
I'm running Server 2008 64bit with Hyper-V. I've created a virtual machine with Vista 64bit and installed it. I can't get the Vista virtual machine to see the network adapter.
I've set-up an external network on the Virtual Network Manager (Hyper-V) and associated that with the virtual machine (Vista). I've also tried u... | Setting up networking in Hyper-V can sometimes be tricky, especially with older operating systems like Windows Vista. Here are a few steps to troubleshoot and resolve the issue of your Vista VM not recognizing the network adapter:
1. **Check Virtual Switch Configuration**:
- Ensure that the external virtual switch... | 12,331 | [
{
"from": "human",
"value": "I'm running Server 2008 64bit with Hyper-V. I've created a virtual machine with Vista 64bit and installed it. I can't get the Vista virtual machine to see the network adapter.\nI've set-up an external network on the Virtual Network Manager (Hyper-V) and associated that with the ... |
I'd like to get comments from people who have used or evaluated Coverity for statically analysing Java-code. I know it's popular in C/C++ world, but is it worth spending the money for Java analysis or am I better off with PMD, Findbugs and other Open Source tools?
| Coverity is indeed well-regarded for its static analysis capabilities, particularly in the C and C++ domains. However, it also offers support for Java, and many organizations use it for analyzing Java code as well. When evaluating whether to invest in Coverity or rely on open-source tools like PMD, FindBugs (now known ... | 15,201 | [
{
"from": "human",
"value": "I'd like to get comments from people who have used or evaluated Coverity for statically analysing Java-code. I know it's popular in C/C++ world, but is it worth spending the money for Java analysis or am I better off with PMD, Findbugs and other Open Source tools?\n"
},
{
... |
I've tried this:
string newScript = textBox1.Text;
HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0];
HtmlElement scriptEl = browserCtrl.Document.CreateElement("script");
lblStatus.Text = scriptEl.GetType().ToString();
scriptEl.SetAttribute("type", "text/javascript");
head.AppendChild(scriptEl);
s... | In Windows Forms applications that utilize the `WebBrowser` control, injecting JavaScript into the DOM can be a bit tricky due to how the `HtmlElement` class handles different types of elements. The `script` tag does not support the `InnerHtml` property. Instead, you need to set the `text` property, which allows you to... | 18,353 | [
{
"from": "human",
"value": "I've tried this:\nstring newScript = textBox1.Text;\nHtmlElement head = browserCtrl.Document.GetElementsByTagName(\"head\")[0];\nHtmlElement scriptEl = browserCtrl.Document.CreateElement(\"script\");\nlblStatus.Text = scriptEl.GetType().ToString();\nscriptEl.SetAttribute(\"type\... |
I have seen Jetbrain's ReSharper tool on many "must-have" tool lists. I've installed it on a few occasions over the last few years and it's turned my Visual Studio sluggish and erratic. I generally uninstall it after a week or two because it make VS flaky, I want to like it, but I can't get past the instability.
So wh... | It's not uncommon for users to experience performance issues when using ReSharper, especially in larger projects or on systems with limited resources. Here are some insights that might help you understand the situation better and potentially improve your experience with the tool:
### Common Issues with ReSharper
1. **... | 16,465 | [
{
"from": "human",
"value": "I have seen Jetbrain's ReSharper tool on many \"must-have\" tool lists. I've installed it on a few occasions over the last few years and it's turned my Visual Studio sluggish and erratic. I generally uninstall it after a week or two because it make VS flaky, I want to like it, b... |
What are (if any)the implied assumptions or restrictions and the differences of designing like:
A) this:
class SampleClass1
{
IWorker workerA;
IWorker workerB;
void setWorkerA(IWorker w);
void setWorkerB(IWorker w);
WorkResult doWork();
}
B) versus this:
class SampleClass2
{
WorkResult doWork(... | When deciding between the two designs you've presented for `SampleClass1` and `SampleClass2`, there are several implied assumptions, restrictions, and trade-offs to consider. Below, I'll outline some key points to help you understand the differences and guide your design choice:
### SampleClass1: State-Holding Object
... | 11,786 | [
{
"from": "human",
"value": "What are (if any)the implied assumptions or restrictions and the differences of designing like:\nA) this:\nclass SampleClass1\n{\n IWorker workerA;\n IWorker workerB;\n\n void setWorkerA(IWorker w);\n void setWorkerB(IWorker w);\n WorkResult doWork();\n}\n\nB) ver... |
I have mixed feelings about TDD. While I believe in testing I have a issues with the idea of the test driving my development effort.
When you code to satisfy some tests written for an interface for requirements you have right now, you might shift your focus from building maintainable code, from clean design and from so... | It's completely understandable to have mixed feelings about Test-Driven Development (TDD). While TDD can offer several benefits, such as early bug detection, better code coverage, and a clearer understanding of requirements, it also has its downsides. Here are some thoughts to consider regarding your concerns:
1. **Te... | 11,441 | [
{
"from": "human",
"value": "I have mixed feelings about TDD. While I believe in testing I have a issues with the idea of the test driving my development effort.\nWhen you code to satisfy some tests written for an interface for requirements you have right now, you might shift your focus from building mainta... |
There seem to be two rival Eclipse plugins for integrating with Maven:
m2Eclipse
and
q4e.
Has anyone recently evaluated or used these plugins?
Why would I choose one or the other?
| As of my last knowledge update in October 2023, both m2Eclipse and q4e are popular Eclipse plugins for integrating Maven projects into the Eclipse IDE. Here's a breakdown of each, including their features and why you might choose one over the other:
### m2Eclipse (Maven Integration for Eclipse)
- **Overview**: m2Eclip... | 14,510 | [
{
"from": "human",
"value": "There seem to be two rival Eclipse plugins for integrating with Maven:\nm2Eclipse\nand\nq4e. \nHas anyone recently evaluated or used these plugins?\nWhy would I choose one or the other?\n"
},
{
"from": "gpt",
"value": "As of my last knowledge update in October 2023,... |
How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column.
| To capture cell click events in Excel, you can use VBA (Visual Basic for Applications) to create an event handler in the worksheet that tracks clicks on specific cells. Below is a step-by-step guide to help you set this up:
### Step 1: Open the Visual Basic for Applications Editor
1. Open your Excel workbook.
2. Press... | 16,312 | [
{
"from": "human",
"value": "How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column.\n"
},
{
"from": "gpt",
"value": "To capture cell click events ... |
Is there a way to track changes in Windows registry? I'd like to see what changes in the registry are made during installation of various programs.
| Yes, there are several ways to track changes in the Windows Registry during the installation of programs. Here are some methods you can use:
### 1. **Using Regshot**
Regshot is a small utility that can take a snapshot of the Windows Registry before and after changes. You can then compare the two snapshots to see what... | 12,373 | [
{
"from": "human",
"value": "Is there a way to track changes in Windows registry? I'd like to see what changes in the registry are made during installation of various programs. \n"
},
{
"from": "gpt",
"value": "Yes, there are several ways to track changes in the Windows Registry during the insta... |
I recall reading, on multiple occasions and in multiple locations, that when firing the typical event:
protected virtual OnSomethingHappened()
{
this.SomethingHappened(this, EventArgs.Empty);
}
e should be EventArgs.Empty if there are no interesting event args, not null.
I've followed the guidance in my code, but ... | Using `EventArgs.Empty` instead of `null` when raising events in .NET is a common best practice. There are several reasons why this is preferred, and understanding them can help you write more robust and maintainable event-driven code.
### 1. **Consistency**:
Using `EventArgs.Empty` provides a consistent way to signal... | 17,170 | [
{
"from": "human",
"value": "I recall reading, on multiple occasions and in multiple locations, that when firing the typical event:\nprotected virtual OnSomethingHappened()\n{\n this.SomethingHappened(this, EventArgs.Empty);\n}\n\ne should be EventArgs.Empty if there are no interesting event args, not nu... |
I am planning to develop an operating system for the x86 architecture.
What options of programming languages do I have?
What types of compilers are there available, preferably on a Windows environment?
Are there any good sources that will help me learn more about operating system development?
Is it better to test my ... | Developing an operating system is a complex but rewarding project. Here are the answers to your questions regarding programming languages, compilers, learning resources, testing environments, and general suggestions:
### Programming Languages
1. **Assembly Language**: Essential for low-level hardware interaction, espe... | 12,741 | [
{
"from": "human",
"value": "I am planning to develop an operating system for the x86 architecture.\n\nWhat options of programming languages do I have?\nWhat types of compilers are there available, preferably on a Windows environment? \nAre there any good sources that will help me learn more about operating... |
Here on Stack Overflow, you're a "user." On 43things.com you're a "person." On other sites, you're an "account." And then some web apps skip the usage of this kind of signifier, and it's just http://webapp.com/yourusername
Do you think that these signifiers imply anything at all? Do you prefer one over the other?
In b... | The terminology you choose for referring to individuals who interact with your application can indeed have implications for user perception, experience, and the overall branding of your app. Here are some considerations regarding the various terms you mentioned:
1. **User**: This term is quite common in technology and... | 13,461 | [
{
"from": "human",
"value": "Here on Stack Overflow, you're a \"user.\" On 43things.com you're a \"person.\" On other sites, you're an \"account.\" And then some web apps skip the usage of this kind of signifier, and it's just http://webapp.com/yourusername\nDo you think that these signifiers imply anything... |
I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me?
At the moment I am doing:
SlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream & in)
{
qDebug("lynxThreeFile::readSlideInfoHea... | In C++, you can achieve a similar effect using a macro that can automatically capture the function name for you. This can be done using the `__FUNCTION__` or `__func__` predefined identifier. Here's how you can implement it:
```cpp
#include <QDebug>
#include <QString>
#define LOG_FUNCTION() qDebug() << QString("%1::%... | 15,232 | [
{
"from": "human",
"value": "I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me?\nAt the moment I am doing:\nSlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream & in)\n{... |
What is the best way to generate a Unique ID from two (or more) short ints in C++? I am trying to uniquely identify vertices in a graph. The vertices contain two to four short ints as data, and ideally the ID would be some kind of a hash of them. Prefer portability and uniqueness over speed or ease.
There are a lo... | To generate a unique ID from two or more short integers in C++, you can use a combination of techniques, including bitwise operations and simple mathematical transformations. Given that your data consists of short integers (16 bits each), you can create a unique identifier by leveraging the fact that each short can hol... | 15,650 | [
{
"from": "human",
"value": "What is the best way to generate a Unique ID from two (or more) short ints in C++? I am trying to uniquely identify vertices in a graph. The vertices contain two to four short ints as data, and ideally the ID would be some kind of a hash of them. Prefer portability and unique... |
.Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of .net will support tuples or not?
| In .NET Framework, tuples were introduced in version 4.0 with the `System.Tuple` class, but this implementation was somewhat limited. However, with the release of .NET Framework 4.7 and later versions, the experience of working with tuples improved significantly.
In .NET Framework 4.7 and later, you can use the `Valu... | 20,152 | [
{
"from": "human",
"value": ".Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of .net will support tuples or not? \n"
},
{
"from": "gpt",
"value": "In .NET Framework, tuples were introduced in version 4.0 with the `System.Tuple` class, but this implementation was... |
How do I create a file-like object (same duck type as File) with the contents of a string?
| In Python, you can create a file-like object from a string using the `io.StringIO` class from the `io` module. This allows you to use a string as if it were a file, which can be useful for testing or when you need to interface with code that expects a file-like object.
Here's how to do it:
```python
import io
# Crea... | 18,868 | [
{
"from": "human",
"value": "How do I create a file-like object (same duck type as File) with the contents of a string?\n"
},
{
"from": "gpt",
"value": "In Python, you can create a file-like object from a string using the `io.StringIO` class from the `io` module. This allows you to use a string ... |
I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema?
I still want to support having photos as part of an album.
Right now i have a few tables:
Photos
PhotoID
Phot... | Creating a tagging system for your photo website is a great way to enhance the organization and searchability of your photos. Below is a proposed database schema that incorporates tags while still supporting albums. This design utilizes a many-to-many relationship between photos and tags, as each photo can have multipl... | 15,958 | [
{
"from": "human",
"value": "I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? \nI still want to support having photos as part of an album.\nRight no... |
I'm wondering if the need to alter the indentation of code to adjust the nesting has any adverse effects on merging changes in a system like SVN.
| Yes, altering the indentation of code to adjust the nesting can have adverse effects on merging changes in a version control system like SVN (Subversion). Here are some reasons why this can be problematic:
1. **Whitespace Differences**: If different developers use different indentation styles (e.g., spaces vs. tabs), ... | 14,049 | [
{
"from": "human",
"value": "I'm wondering if the need to alter the indentation of code to adjust the nesting has any adverse effects on merging changes in a system like SVN.\n"
},
{
"from": "gpt",
"value": "Yes, altering the indentation of code to adjust the nesting can have adverse effects on ... |
I want to convert a number that is in PRTime format (a 64-bit integer representing the number of microseconds since midnight (00:00:00) 1 January 1970 Coordinated Universal Time (UTC)) to a DateTime.
Note that this is slightly different than the usual "number of milliseconds since 1/1/1970".
| To convert a number in PRTime format (which represents microseconds since midnight on January 1, 1970, UTC) to a `DateTime` object in C#, you can follow these steps:
1. Convert the PRTime value from microseconds to milliseconds by dividing by 1000.
2. Create a `DateTime` object by adding the resulting milliseconds to ... | 18,787 | [
{
"from": "human",
"value": "I want to convert a number that is in PRTime format (a 64-bit integer representing the number of microseconds since midnight (00:00:00) 1 January 1970 Coordinated Universal Time (UTC)) to a DateTime.\nNote that this is slightly different than the usual \"number of milliseconds s... |
I need to do a lot of searches of certain patterns in source files while the user is changing them, so I need to do regexp matching that is efficient in time and memory. The pattern repeats itself so should be compiled once, but I need to be able to retrieve subparts (rather than just confirm a match)
I'm considering u... | When it comes to efficient regular expression matching in Java, you have a few good options, including the built-in `java.util.regex` package and third-party libraries like the Jakarta Perl5Util or even the Eclipse JDT search engine. Here’s a brief overview of the options and their performance characteristics:
### 1. ... | 17,371 | [
{
"from": "human",
"value": "I need to do a lot of searches of certain patterns in source files while the user is changing them, so I need to do regexp matching that is efficient in time and memory. The pattern repeats itself so should be compiled once, but I need to be able to retrieve subparts (rather tha... |
py2exe does not work with the standard email module
Hello. I am trying to use py2exe for converting a script into an exe. The build process shows this:
The following modules appear to be missing
['email.Encoders', 'email.Generator', 'email.Iterators', 'email.MIMEBase', 'email.MIMEMultipart', 'email.MIMEText', 'email.U... | The issue you're encountering with `py2exe` and the `email` module is indeed related to lazy imports and how `py2exe` handles package dependencies. The `email` package uses dynamic importing, which can lead to problems where `py2exe` does not detect all the modules your script relies on.
Here are some potential workar... | 15,453 | [
{
"from": "human",
"value": "py2exe does not work with the standard email module\nHello. I am trying to use py2exe for converting a script into an exe. The build process shows this:\n\nThe following modules appear to be missing\n['email.Encoders', 'email.Generator', 'email.Iterators', 'email.MIMEBase', 'ema... |
I already know the obvious answer to this question: "just download <insert favorite windows grep or grep-like tool here>". However, I work in an environment with strict controls by the local IT staff as to what we're allowed to have on our computers. Suffice it to say: I have access to Perl on Windows XP. Here's a q... | To create a batch script that behaves like `grep` and allows for both piping input and specifying files, you can use the following approach. This script will check if input is being piped, and if not, it will assume that filenames are provided as arguments.
Here's how you can create your `grep.bat` script:
1. Open No... | 16,728 | [
{
"from": "human",
"value": "I already know the obvious answer to this question: \"just download <insert favorite windows grep or grep-like tool here>\". However, I work in an environment with strict controls by the local IT staff as to what we're allowed to have on our computers. Suffice it to say: I hav... |
There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing).
My question is: what does MOSS do that makes it worth the extra cost?
..and does Microsoft Search Server not compete wi... | Microsoft Office SharePoint Server (MOSS) offers a range of advanced features that cater primarily to enterprise-level needs, distinguishing it from Windows SharePoint Services (WSS). Key benefits of MOSS include enhanced content management capabilities, sophisticated workflow management, advanced search functionality,... | 20,740 | [
{
"from": "human",
"value": "There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing).\nMy question is: what does MOSS do that makes it worth the extra cost? \n..and ... |
I thought I understood what the default method does to a hash...
Give a default value for a key if it doesn't exist:
irb(main):001:0> a = {}
=> {}
irb(main):002:0> a.default = 4
=> 4
irb(main):003:0> a[8]
=> 4
irb(main):004:0> a[9] += 1
=> 5
irb(main):005:0> a
=> {9=>5}
All good.
But if I set the default to be a empt... | The behavior you're observing is due to how Ruby handles default values for hashes and mutable objects, such as arrays or hashes.
When you set a default value for a hash using `a.default = []`, you're actually sharing that same empty array across all keys of the hash. This means that if you modify the array (like addi... | 17,792 | [
{
"from": "human",
"value": "I thought I understood what the default method does to a hash... \nGive a default value for a key if it doesn't exist:\nirb(main):001:0> a = {}\n=> {}\nirb(main):002:0> a.default = 4\n=> 4\nirb(main):003:0> a[8]\n=> 4\nirb(main):004:0> a[9] += 1\n=> 5\nirb(main):005:0> a\n=> {9=... |
I am trying to write a Windows Form and ASP.NET C# front-end and MSAccess backend for a pretty small database concept I have.
I have written this application once before in just MSAccess but I now need the app and database to be in different places. I have now figured out (thanks to a StackOverflow user) that ADO will... | There are several open-source projects and resources available that can help you understand how to implement a C# application with a backend database, particularly with MS Access. Here are a few suggestions where you can find example code and projects that demonstrate best practices using ADO.NET with a database backen... | 15,933 | [
{
"from": "human",
"value": "I am trying to write a Windows Form and ASP.NET C# front-end and MSAccess backend for a pretty small database concept I have. \nI have written this application once before in just MSAccess but I now need the app and database to be in different places. I have now figured out (tha... |
I have a Tix.ComboBox with an editable text field. How do I force the variable holding the value for the text to update?
Let me give a more concrete explanation. I have a combo box and a button. When I click the button, it pops up a message box with the value of the combo box. Let's say the combo box text field current... | To ensure that the value in the Tix.ComboBox updates immediately when you click the button without needing to tab away, you can explicitly call the `get()` method on the ComboBox's entry widget in your `go` method. This will get the current text in the entry field, regardless of whether focus has changed.
Here’s how y... | 16,650 | [
{
"from": "human",
"value": "I have a Tix.ComboBox with an editable text field. How do I force the variable holding the value for the text to update?\nLet me give a more concrete explanation. I have a combo box and a button. When I click the button, it pops up a message box with the value of the combo box. ... |
Perforce allows people to check in unchanged files. Why any version control system would allow this is beyond me, but that's a topic for another question. I want to create a trigger that will deny the submission of unchanged files. However, I have no experience with Perforce triggers. From what I've read, I'm guessi... | Setting up a Perforce trigger to deny the submission of unchanged files is a good way to enforce best practices in your version control workflow. You are correct that a "change-content" trigger would be suitable for this purpose, as it allows you to check the content of files before they are accepted into the depot.
H... | 14,002 | [
{
"from": "human",
"value": "Perforce allows people to check in unchanged files. Why any version control system would allow this is beyond me, but that's a topic for another question. I want to create a trigger that will deny the submission of unchanged files. However, I have no experience with Perforce t... |
I would like to refer HTML templates designed/developed especially for form based Web Applications.
I have been searching them but am not able to find out which I find better.
Regards,
Jatan
| Hi Jatan,
There are many HTML templates specifically designed for form-based web applications that can help you create user-friendly interfaces. Below are some popular sources and specific templates you might consider:
### Sources for HTML Templates
1. **ThemeForest**: A marketplace for premium themes, including a w... | 14,581 | [
{
"from": "human",
"value": "I would like to refer HTML templates designed/developed especially for form based Web Applications.\nI have been searching them but am not able to find out which I find better.\nRegards,\nJatan\n"
},
{
"from": "gpt",
"value": "Hi Jatan,\n\nThere are many HTML templat... |
I just started using Log Parser Lizard to examine my IIS and Event logs.
What UI tool do you use on top of LogParser 2.2 to view your log files on production?
| Log Parser Lizard is a popular graphical user interface for Microsoft’s Log Parser tool, making it easier to analyze various types of log files, including IIS and Event logs. If you're looking for alternatives or additional UI tools to complement Log Parser, here are a few suggestions:
1. **Log Parser Studio**: This i... | 19,617 | [
{
"from": "human",
"value": "I just started using Log Parser Lizard to examine my IIS and Event logs. \nWhat UI tool do you use on top of LogParser 2.2 to view your log files on production?\n"
},
{
"from": "gpt",
"value": "Log Parser Lizard is a popular graphical user interface for Microsoft’s L... |
echo $_POST["name"]; //returns the value a user typed into the "name" field
I would like to be able to also return the text of the key. In this example, I want to return the text "name". Can I do this?
| Yes, you can return the text of the key along with the value submitted from a form. In PHP, when you access the `$_POST` array, the key (e.g., "name") is known to you. You can simply use the key directly in your code.
Here's an example of how you can achieve this:
```php
if (isset($_POST["name"])) {
// Get the ke... | 19,918 | [
{
"from": "human",
"value": "echo $_POST[\"name\"]; //returns the value a user typed into the \"name\" field\n\nI would like to be able to also return the text of the key. In this example, I want to return the text \"name\". Can I do this?\n"
},
{
"from": "gpt",
"value": "Yes, you can return the... |
Maps are great to get things done easily, but they are memory hogs and suffer from caching issues. And when you have a map in a critical loop that can be bad.
So I was wondering if anyone can recommend another container that has the same API but uses lets say a vector or hash implementation instead of a tree implementa... | If you are looking for a container that mimics the API of `std::map` but uses a more memory-efficient underlying data structure, you can consider creating a custom wrapper that behaves like a map, but internally utilizes a `std::vector` or `std::unordered_map`. Here, I'll outline a basic approach using a `std::vector` ... | 10,699 | [
{
"from": "human",
"value": "Maps are great to get things done easily, but they are memory hogs and suffer from caching issues. And when you have a map in a critical loop that can be bad.\nSo I was wondering if anyone can recommend another container that has the same API but uses lets say a vector or hash i... |
I need to write a function that generates an id that is unique for a given machine running a Windows OS.
Currently, I'm using WMI to query various hardware parameters and concatenate them together and hash them to derive the unique id. My question is, what are the suggested parameters I should use?
Currently, I'm usin... | To generate a unique identifier for a machine running Windows OS that is consistent across different installations (including dual-boot scenarios), it is essential to choose hardware parameters that remain constant regardless of the operating system installed. Here are a few considerations and suggested parameters:
##... | 16,329 | [
{
"from": "human",
"value": "I need to write a function that generates an id that is unique for a given machine running a Windows OS.\nCurrently, I'm using WMI to query various hardware parameters and concatenate them together and hash them to derive the unique id. My question is, what are the suggested par... |
I miss it so much (used it a lot in C#). can you do it in C++?
| It seems like you're expressing nostalgia for a feature or concept that you used frequently in C#. Without specific details on what you miss, I can suggest a few C# features that might be of interest and how they can be implemented in C++. Here are some common ones:
### 1. **Properties**
In C#, properties allow you to... | 15,168 | [
{
"from": "human",
"value": "I miss it so much (used it a lot in C#). can you do it in C++?\n"
},
{
"from": "gpt",
"value": "It seems like you're expressing nostalgia for a feature or concept that you used frequently in C#. Without specific details on what you miss, I can suggest a few C# featur... |
After my web form is submitted, a regex will be applied to user input on the server side (via PHP). I'd like to have the identical regex running in real-time on the client side to show the user what the real input will be. This will be pretty much the same as the Preview section on the Ask Question pages on Stack Overf... | To ensure that your PHP and JavaScript regular expressions behave consistently across both environments, you'll need to keep several factors in mind:
1. **Regex Syntax Differences**: While both PHP and JavaScript support regular expressions, their syntax and features can differ slightly. PHP's regex functions are ofte... | 11,369 | [
{
"from": "human",
"value": "After my web form is submitted, a regex will be applied to user input on the server side (via PHP). I'd like to have the identical regex running in real-time on the client side to show the user what the real input will be. This will be pretty much the same as the Preview section... |
I am using httpresponse.Transmitfile to download files. If I, in the file download dialog, choose to save in a different folder than the suggested one, the download rate drops down to 10 - 20 kb. If I cancel, or always choose to download in the same folder, then transfer rate are 200 kb and more. Here are my code :
pr... | The issue you're encountering, where the download speed drops significantly when a user chooses a different folder for saving the file in Internet Explorer, could be attributed to various factors related to how Internet Explorer handles file downloads and streaming.
Here are some steps you can take to investigate and ... | 12,269 | [
{
"from": "human",
"value": "I am using httpresponse.Transmitfile to download files. If I, in the file download dialog, choose to save in a different folder than the suggested one, the download rate drops down to 10 - 20 kb. If I cancel, or always choose to download in the same folder, then transfer rate ar... |
I know of a couple of routines that work as follows:
Xn+1 = Routine(Xn, max)
For example, something like a LCG generator:
Xn+1 = (a*Xn + c) mod m
There isn't enough parameterization in this generator to generate every sequence.
Dream Function:
Xn+1 = Routine(Xn, max, permutation number)
This routine... | What you're describing is a generator that produces a sequence of numbers based on a permutation defined by an index, such that you can retrieve the permutation directly without explicitly storing it. This is indeed an interesting problem, and there are ways to achieve this concept without needing to store all permutat... | 14,747 | [
{
"from": "human",
"value": "I know of a couple of routines that work as follows: \n\nXn+1 = Routine(Xn, max) \n\nFor example, something like a LCG generator: \n\nXn+1 = (a*Xn + c) mod m \n\nThere isn't enough parameterization in this generator to generate every sequence. \nDream Function: \n\nXn+1 = ... |
I'm writing an actionscript library for an api. I use a URLLoader object to load data from the api. The problem I'm having is that whenever the api returns an http status in the 400s, actionscript treats this as an io error. This is all find and good, however, it seems like there is no way to access any data that wa... | In ActionScript, when you encounter an HTTP status in the 400 range, `URLLoader` indeed throws an `IOErrorEvent`. Unfortunately, it doesn't provide you with direct access to the response data (like the XML error message) that the server sends back. However, you can work around this limitation by using the `URLLoader` i... | 17,350 | [
{
"from": "human",
"value": "I'm writing an actionscript library for an api. I use a URLLoader object to load data from the api. The problem I'm having is that whenever the api returns an http status in the 400s, actionscript treats this as an io error. This is all find and good, however, it seems like t... |
I've got a Dell XPS M1330 with a 2.2ghz processor, 4gig ram, GeForce 8400M, and a 64GB SSD disk.
I'm primarily doing web-development, sharepoint development, integration (Microsoft BI tools) and biztalk. I use virtual machines for these purposes. I've been using Vista 32Bit up until now but I'm considering moving to 64... | Upgrading to 64-bit Windows Vista can definitely help you make better use of your laptop's 4GB of RAM, especially when you are working with virtual machines, as they can benefit significantly from the additional memory. Here are a few points to consider based on your use case:
### Benefits of Upgrading to 64-bit Vista... | 17,640 | [
{
"from": "human",
"value": "I've got a Dell XPS M1330 with a 2.2ghz processor, 4gig ram, GeForce 8400M, and a 64GB SSD disk.\nI'm primarily doing web-development, sharepoint development, integration (Microsoft BI tools) and biztalk. I use virtual machines for these purposes. I've been using Vista 32Bit up ... |
I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.
For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the C# philosophy is that you... | Dealing with memory management in C# and .NET can indeed be tricky, especially when you come from a background in C++ where memory management is more explicit and deterministic. While .NET provides garbage collection (GC) to handle memory automatically, there are still important considerations, especially when dealing ... | 15,098 | [
{
"from": "human",
"value": "I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.\nFor the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy,... |
What is the difference between a framework and a library?
I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries centered on a parti... | Your understanding of the difference between a library and a framework is quite accurate, and it captures the essence of how these two concepts are typically defined and used in software development. Let’s break down the distinctions further:
### Library
1. **Definition**: A library is a collection of pre-written cod... | 17,066 | [
{
"from": "human",
"value": "What is the difference between a framework and a library? \nI always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a c... |
When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunctioning hardware or software conflicts?
Edit: there is a nativ... | An `EXCEPTION_ACCESS_VIOLATION` error in a Java Virtual Machine (JVM) indicates that the JVM attempted to read or write to a memory location that it does not have access to. This type of error is often associated with a segmentation fault in other contexts and can occur due to various reasons, including:
1. **Bugs in ... | 17,201 | [
{
"from": "human",
"value": "When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunctioning hardware or s... |
I have a class with two class methods (using the classmethod() function) for getting and setting what is essentially a static variable. I tried to use the property() function with these, but it results in an error. I was able to reproduce the error with the following in the interpreter:
class Foo(object):
_var = ... | In Python, the `property()` function is typically used to create properties that work with instance methods, not class methods. When you use `classmethod`, it modifies the method so that it receives the class as its first argument instead of an instance. This is why you're encountering the `TypeError` when trying to us... | 18,563 | [
{
"from": "human",
"value": "I have a class with two class methods (using the classmethod() function) for getting and setting what is essentially a static variable. I tried to use the property() function with these, but it results in an error. I was able to reproduce the error with the following in the in... |
While it would be very convenient to use inline functions at some situations,
Are there any drawbacks with inline functions?
Conclusion:
Apparently, There is nothing wrong with using inline functions.
But it is worth noting the following points!
Overuse of inlining can actually make programs slower. Depending on a fun... | Inline functions can be a valuable tool in programming, but there are indeed several considerations and potential drawbacks to keep in mind. Here's a summary based on the points you've outlined:
### Drawbacks of Inline Functions
1. **Code Size Increase**:
- **Increased Binary Size**: While inlining can eliminate ... | 15,688 | [
{
"from": "human",
"value": "While it would be very convenient to use inline functions at some situations,\nAre there any drawbacks with inline functions?\nConclusion:\nApparently, There is nothing wrong with using inline functions.\nBut it is worth noting the following points!\n\nOveruse of inlining can ac... |
I think everyone would agree that the MATLAB language is not pretty, or particularly consistent. But nevermind! We still have to use it to get things done.
What are your favourite tricks for making things easier? Let's have one per answer so people can vote them up if they agree. Also, try to illustrate your answer wit... | Certainly! One useful trick in MATLAB is to make use of the **`cellfun` function** to apply a function to each element of a cell array. This can simplify code and make it more readable, especially when you're dealing with cell arrays of strings or data.
### Example: Applying a Function to Each Element in a Cell Array
... | 19,767 | [
{
"from": "human",
"value": "I think everyone would agree that the MATLAB language is not pretty, or particularly consistent. But nevermind! We still have to use it to get things done.\nWhat are your favourite tricks for making things easier? Let's have one per answer so people can vote them up if they agre... |
LinkedIn are very cautious of applications using their APIs. I have tried and failed to get access to them.
Has anyone actually built any real applications with them yet? If yes, what strategy did you employ to get access to their API?
BTW I am talking about first class value added applications on top of LinkedIn, ... | Accessing LinkedIn's API can indeed be a challenging process, as they are very protective of their data and have strict usage policies. However, there are some applications and strategies that developers have successfully used to gain access to LinkedIn's APIs and create value-added applications. Here are some strategi... | 17,663 | [
{
"from": "human",
"value": "LinkedIn are very cautious of applications using their APIs. I have tried and failed to get access to them. \nHas anyone actually built any real applications with them yet? If yes, what strategy did you employ to get access to their API?\nBTW I am talking about first class va... |
The most basic task in an object oriented environment is executing a method on an object. To do this, you have to have a reference to the object on which you are invoking the method. Is the proper way to establish this reference to pass the object as a parameter to the constructor (or initializer method) of the calling... | Yes, you're correct in your understanding of object references and method invocation in object-oriented programming (OOP). Let’s break down your points and address your questions about communication between objects.
### Object Reference Initialization
When you create an instance of a class and want another object to ... | 15,880 | [
{
"from": "human",
"value": "The most basic task in an object oriented environment is executing a method on an object. To do this, you have to have a reference to the object on which you are invoking the method. Is the proper way to establish this reference to pass the object as a parameter to the construct... |
In Gmail, I have a bunch of labeled messages.
I'd like to use an IMAP client to get those messages, but I'm not sure what the search incantation is.
c = imaplib.IMAP4_SSL('imap.gmail.com')
c.list()
('OK', [..., '(\\HasNoChildren) "/" "GM"', ...])
c.search(???)
I'm not finding many examples for this sort of thing.
| When using the `imaplib` library in Python to retrieve labeled messages from Gmail via IMAP, you can utilize the `search` method with specific search criteria. Gmail uses a particular format for labels in IMAP.
In your case, if you want to search for messages with a specific label (for example, a label named "GM"), y... | 18,447 | [
{
"from": "human",
"value": "In Gmail, I have a bunch of labeled messages.\nI'd like to use an IMAP client to get those messages, but I'm not sure what the search incantation is.\nc = imaplib.IMAP4_SSL('imap.gmail.com')\nc.list()\n('OK', [..., '(\\\\HasNoChildren) \"/\" \"GM\"', ...])\nc.search(???)\n\nI'm ... |
I'm trying to verify if a schema matches the objects I'm initializing.
Is there a way to get the TableName of a class other than simply reflecting the class name?
I am using some class with explicit TableNames
Edit: using Joe's solution I added the case where you don't specify the table name, it could probably use a co... | Your method for retrieving the table name from a class that uses Castle ActiveRecord attributes looks good, but there are a few improvements you can make to ensure robustness and clarity. Below is a revised version of your method that includes some error handling and optimizations:
1. **Check for the presence of attri... | 19,577 | [
{
"from": "human",
"value": "I'm trying to verify if a schema matches the objects I'm initializing.\nIs there a way to get the TableName of a class other than simply reflecting the class name?\nI am using some class with explicit TableNames\nEdit: using Joe's solution I added the case where you don't specif... |
Due to continuing crash problems, I'm about to uninstall and reinstall my copy of Visual Studio 2005. I know that just running the uninstaller leaves a lot of resources and settings on my machine and would like to be able to reinstall from a pristine state.
Is there any way to completely uninstall VS2k5 from my machine... | To completely uninstall Visual Studio 2005 from your machine and ensure that it is as if it was never installed, you'll need to follow several steps to remove not just the application but also its associated files, settings, and registry entries. Here’s a detailed guide:
### Step 1: Uninstall Visual Studio 2005
1. **C... | 15,253 | [
{
"from": "human",
"value": "Due to continuing crash problems, I'm about to uninstall and reinstall my copy of Visual Studio 2005. I know that just running the uninstaller leaves a lot of resources and settings on my machine and would like to be able to reinstall from a pristine state.\nIs there any way to ... |
Does anyone know how sites that have a real-time feed of a lot of data work? I am referring to something like a stock site, where they can tell you in real time (well, 20 minute delay mostly, but still real-time - 20 minutes as I understand it).
They have thousands of data pieces delivered to them every second, I wo... | Real-time data feeds, like those used in stock trading websites, typically operate using a combination of push and pull mechanisms, often leveraging technologies designed to handle high-frequency updates efficiently. Here’s how they generally work:
### 1. **Data Sources**:
- Financial data providers (like stock exc... | 14,749 | [
{
"from": "human",
"value": "Does anyone know how sites that have a real-time feed of a lot of data work? I am referring to something like a stock site, where they can tell you in real time (well, 20 minute delay mostly, but still real-time - 20 minutes as I understand it). \nThey have thousands of data p... |
I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server.
I need to be able to query the model, modify fields, as well as do insert and delete operations. Is there an easy way to accomplish this?
I noticed another question mentions a ... | Using a LINQ to SQL model directly with a DataSet is not a standard practice because LINQ to SQL is specifically designed to work with databases, primarily SQL Server. However, if you're looking to perform LINQ operations on a DataSet, you can achieve that using LINQ to DataSet, which provides a way to query in-memory ... | 13,932 | [
{
"from": "human",
"value": "I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server.\nI need to be able to query the model, modify fields, as well as do insert and delete operations. Is there an easy way to accomplish th... |
Management wants us to switch to Infragistics. But my boss says that any 3rd party is destined to fail, and at that point there won't be anything we can do about it.
Is he right, is he wrong? I don't know.
What are your opinions, is it better to use something developed inside the company, or do you prefer something li... | Your boss raises a valid point regarding the use of third-party libraries or components, but there are also many factors to consider when deciding whether to use them or stick with internal solutions. Here are some key points to help you weigh the pros and cons:
### Pros of Using Third-Party Libraries (e.g., Infragist... | 15,061 | [
{
"from": "human",
"value": "Management wants us to switch to Infragistics. But my boss says that any 3rd party is destined to fail, and at that point there won't be anything we can do about it.\nIs he right, is he wrong? I don't know. \nWhat are your opinions, is it better to use something developed inside... |
I have a submission table that is very simple: userId, submissionGuid
I want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table.
I would do this with embedded queries and a group by to count submissions... but is there a better way of doing it (without ... | Certainly! To achieve your goal of selecting the usernames of users who have more than 10 submissions without using embedded queries, you can use a `JOIN` along with `GROUP BY` and `HAVING`. This way, you can aggregate the submission counts and filter them in a single query. Here's an example of how you could structure... | 20,165 | [
{
"from": "human",
"value": "I have a submission table that is very simple: userId, submissionGuid\nI want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table. \nI would do this with embedded queries and a group by to count submissions... but ... |
I need to know how I get the stream of the headers and footers of a WordprocessingDocument. I get the MainDocument by the MainDocumentPart of a WordprocessingDocument. Do you know how I get the header? I tried to use the method GetPartsOfType but it returned null.
Greets
Sebastian
| To retrieve the headers and footers from a `WordprocessingDocument` in Open XML, you can use the `HeaderParts` and `FooterParts` properties of the `MainDocumentPart`. Here’s a brief overview of how you can achieve this.
### Example Code to Get Headers and Footers
Here's an example of how you can access the headers an... | 17,576 | [
{
"from": "human",
"value": "I need to know how I get the stream of the headers and footers of a WordprocessingDocument. I get the MainDocument by the MainDocumentPart of a WordprocessingDocument. Do you know how I get the header? I tried to use the method GetPartsOfType but it returned null.\nGreets\nSebas... |
In JavaScript is it wrong to use a try-catch block and ignore the error rather than test many attributes in the block for null?
try{
if(myInfo.person.name == newInfo.person.name
&& myInfo.person.address.street == newInfo.person.address.street
&& myInfo.person.address.zip == newInfo.person.address.zip) {... | Using a `try-catch` block to ignore errors in JavaScript, especially for the purpose of avoiding null checks, is generally not recommended. Here's why:
1. **Performance Overhead**: Exceptions in JavaScript are costly in terms of performance. Throwing and catching exceptions can slow down the execution of your code. Th... | 18,800 | [
{
"from": "human",
"value": "In JavaScript is it wrong to use a try-catch block and ignore the error rather than test many attributes in the block for null?\ntry{ \n if(myInfo.person.name == newInfo.person.name\n && myInfo.person.address.street == newInfo.person.address.street\n && myInfo.person... |
I can't shake this error when compiling my Visual Studio.NET 2008 solution. The project that's generating the error is a VB.NET Web Application in a 12 project solution (mixed types and languages).
I've tried all the tricks I can find on google, and the obvious of removing the directoy and folder manually.
I'm running... | It sounds like you've run into a tricky issue with the Visual Studio.NET 2008 compiler that's related to file writing permissions or some environmental problem on your G: drive. Since moving the project to your C: drive resolved the issue, it's likely that the problem was not directly with Visual Studio but rather with... | 16,978 | [
{
"from": "human",
"value": "I can't shake this error when compiling my Visual Studio.NET 2008 solution. The project that's generating the error is a VB.NET Web Application in a 12 project solution (mixed types and languages).\nI've tried all the tricks I can find on google, and the obvious of removing the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.