instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
The problem is that I have several "h2" tags that have a display:inline attribute, and on Microsoft's wonderful browsers the space between them doesn't appear. Is there a workaround?
I know there is a "non-breaking space" in HTML but I was wondering if one can make a space that may be a "breaking space".
--- edi... | The issue you’re facing with the `<h2>` tags displaying as continuous text in Internet Explorer when using `display: inline;` is due to how IE handles whitespace between inline elements. Here are a few workarounds you can try to create breaking spaces:
### 1. Use CSS `margin` or `padding`
Instead of relying on spaces... | 3,133 | [
{
"from": "human",
"value": "The problem is that I have several \"h2\" tags that have a display:inline attribute, and on Microsoft's wonderful browsers the space between them doesn't appear. Is there a workaround?\nI know there is a \"non-breaking space\" in HTML but I was wondering if one can make a... |
I am having some trouble with the Google Maps API. I have an array which holds a ojbect I created to store points.
My array and class:
var tPoints = [];
function tPoint(name) {
var id = name;
var points = [];
var pointsCount = 0;
...
this.getHeadPoint = function() { return po... | It looks like you're encountering a problem with `NaN` values in your bounds because of how you're using the `getHeadPoint` method within the `tPoint` class. The main issue is likely that `currPoint` is not being correctly set to a valid `GLatLng` object, which is causing the `containsLatLng` method to fail and potenti... | 1,381 | [
{
"from": "human",
"value": "I am having some trouble with the Google Maps API. I have an array which holds a ojbect I created to store points.\nMy array and class:\nvar tPoints = []; \nfunction tPoint(name) {\n var id = name;\n var points = [];\n var pointsCount = 0;\n ...\n ... |
How would you manage the lifecycle and automated build process when some of the projects (C# .csproj projects) are part of the actual build system?
Example:
A .csproj is a project that uses MSBuild tasks that are implemented in BuildEnv.csproj.
Both projects are part of the same product (meaning, BuildEnv.csproj freque... | Managing the lifecycle and automated build process for interdependent C# projects can be challenging, particularly when changes in one project (like `BuildEnv.csproj`) can affect other projects that rely on it. Here’s a strategy for managing such a build process effectively:
### 1. Modular Project Structure
- **Separa... | 325 | [
{
"from": "human",
"value": "How would you manage the lifecycle and automated build process when some of the projects (C# .csproj projects) are part of the actual build system?\nExample:\nA .csproj is a project that uses MSBuild tasks that are implemented in BuildEnv.csproj.\nBoth projects are part of the s... |
Most people with a degree in CS will certainly know what Big O stands for.
It helps us to measure how well an algorithm scales.
But I'm curious, how do you calculate or approximate the complexity of your algorithms?
| Calculating or approximating the time and space complexity of algorithms involves analyzing how the algorithm's resource usage grows with respect to the size of the input. Here are the key steps and concepts involved in determining the Big O notation of an algorithm:
### 1. **Identify the Input Size:**
- Define wha... | 1,085 | [
{
"from": "human",
"value": "Most people with a degree in CS will certainly know what Big O stands for.\nIt helps us to measure how well an algorithm scales. \nBut I'm curious, how do you calculate or approximate the complexity of your algorithms?\n"
},
{
"from": "gpt",
"value": "Calculating or ... |
I am working with Cognos8 Report Studio. In my report there are two date prompts: START date and END date. Users can select two different dates or make them both the same date. But the report has valid data only for the last business date of each month. For example, if Jan 31 is Sunday, valid data is available only for... | Yes, you can customize the date prompt in IBM Cognos 8 Report Studio to restrict the selection to only the last business day of each month. Here's how you can accomplish this:
### Step 1: Create a Data Item for Last Business Days
1. **Create a Query**: Create a query that retrieves the last business day of each month... | 2,051 | [
{
"from": "human",
"value": "I am working with Cognos8 Report Studio. In my report there are two date prompts: START date and END date. Users can select two different dates or make them both the same date. But the report has valid data only for the last business date of each month. For example, if Jan 31 is... |
The demos for the jquery ui dialog all use the "flora" theme. I wanted a customized theme, so I used the themeroller to generate a css file. When I used it, everything seemed to be working fine, but later I found that I can't control any input element contained in the dialog (i.e, can't type into a text field, can't ch... | It sounds like you've resolved your issue with the dialog and the custom theme generated by the Themeroller! Just to summarize for others who might encounter a similar problem:
### Issue
When using a custom theme from Themeroller with jQuery UI dialogs, input elements (like text fields and checkboxes) inside a modal d... | 2,731 | [
{
"from": "human",
"value": "The demos for the jquery ui dialog all use the \"flora\" theme. I wanted a customized theme, so I used the themeroller to generate a css file. When I used it, everything seemed to be working fine, but later I found that I can't control any input element contained in the dialog (... |
I'd like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I want to restrict this user as much as possible. (Authentication will be with public/private keypair).
I know I need to edit the relevant ~/.ssh/authorized_keys file, but I'm not sure exactly what content to ... | To restrict a user to only establishing an SSH tunnel to a particular machine on a specific port (e.g., port 5000), you can use the `authorized_keys` file to specify commands and restrictions for that user's SSH session. Below are the steps to set this up, including the format to use in the `authorized_keys` file.
###... | 1,278 | [
{
"from": "human",
"value": "I'd like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I want to restrict this user as much as possible. (Authentication will be with public/private keypair).\nI know I need to edit the relevant ~/.ssh/authorized_keys file,... |
My gut feel is that document based web services are preferred in practice - is this other peoples experience? Are they easier to support? (I noted that SharePoint uses Any for the "document type" in its WSDL interface, I guess that makes it Document based).
Also - are people offering both WSDL and Rest type services n... | Your observations touch on several important trends and preferences in web services. Let's break down your questions and comments:
### Document-Based Web Services
Document-based web services, often associated with SOAP and WSDL, can indeed be easier to support in certain contexts. They are particularly beneficial when... | 3,421 | [
{
"from": "human",
"value": "My gut feel is that document based web services are preferred in practice - is this other peoples experience? Are they easier to support? (I noted that SharePoint uses Any for the \"document type\" in its WSDL interface, I guess that makes it Document based). \nAlso - are people... |
AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche technology that won't be around for a long tim... | Aspect-Oriented Programming (AOP) is indeed an intriguing paradigm that focuses on separating cross-cutting concerns from the main business logic of an application. This can help in achieving cleaner, more maintainable code by modularizing concerns such as logging, security, transactions, and error handling, which ofte... | 3,104 | [
{
"from": "human",
"value": "AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche techn... |
How can I find the high water mark (the historical maximum number of concurrent users) in an oracle database (9i).
| To find the high water mark (historical maximum number of concurrent users) in an Oracle 9i database, you can track the session information in the database. Oracle does not have a built-in feature that directly shows the historical maximum concurrent users, so you will have to implement a solution to capture and store ... | 1,885 | [
{
"from": "human",
"value": "How can I find the high water mark (the historical maximum number of concurrent users) in an oracle database (9i).\n"
},
{
"from": "gpt",
"value": "To find the high water mark (historical maximum number of concurrent users) in an Oracle 9i database, you can track the... |
I have the following code in a web.config file of the default IIS site.
<httpModules>
<add type="MDL.BexWebControls.Charts.ChartStreamHandler,Charts" name="ChartStreamHandler"/>
</httpModules>
Then when I setup and browse to a virtual directory I get this error
Could not load file or assembly 'Charts' or one of it... | To prevent the inheritance of configuration settings from the parent directory (like the default IIS site) to a virtual directory, you can use the `<location>` element in your `web.config` file for the virtual directory. This will allow you to specifically define settings without inheriting from the parent.
To stop th... | 3,609 | [
{
"from": "human",
"value": "I have the following code in a web.config file of the default IIS site.\n<httpModules>\n <add type=\"MDL.BexWebControls.Charts.ChartStreamHandler,Charts\" name=\"ChartStreamHandler\"/>\n</httpModules>\n\nThen when I setup and browse to a virtual directory I get this error\nCo... |
I want to start using Python for small projects but the fact that a misplaced tab or indent can throw a compile error is really getting on my nerves. Is there some type of setting to turn this off?
I'm currently using NotePad++. Is there maybe an IDE that would take care of the tabs and indenting?
| Python relies heavily on indentation to define code blocks, and unfortunately, there's no setting to turn off this requirement. However, there are tools and IDEs that can help you manage indentation more effectively and even automatically format your code. Here are a few suggestions to make your experience smoother:
#... | 2,347 | [
{
"from": "human",
"value": "I want to start using Python for small projects but the fact that a misplaced tab or indent can throw a compile error is really getting on my nerves. Is there some type of setting to turn this off?\nI'm currently using NotePad++. Is there maybe an IDE that would take care of the... |
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails.
For those who aren't familiar with Symfony or Django, they both allow you to specify some metadata around your models to automatically (dynamicall... | Yes, there are several popular gems in the Rails ecosystem that can help you create an admin interface similar to what you may have experienced in Symfony or Django. While Rails does have scaffolding for quickly generating CRUD interfaces, there are more robust solutions for creating an admin panel. Here are some optio... | 3,006 | [
{
"from": "human",
"value": "My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails.\nFor those who aren't familiar with Symfony or Django, they both allow you to specify some metadata aroun... |
I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ?
Edit: I accepted Konrads answer because it is easier/more intuitive to read.
| You can achieve this using LINQ by utilizing the `Where` method along with the `Contains` method. This allows you to filter the `List<customObject>` to only include the objects whose `ID` property is found in the `List<int>`. Below is an example of how you can do this.
Assuming you have the following `customObject` cl... | 3,842 | [
{
"from": "human",
"value": "I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ?\nEdit: I accepted Konrads answer because it is easier/more intuitive to re... |
What is a good way to perform animation using .NET?
I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing.
The new site is for a magician, so I want to provide animated buttons (Cards turning over, etc.) ... | You can definitely implement animations for a website without using Flash, especially with the tools available in .NET and modern web technologies. Here are several ways to achieve this:
### 1. **CSS Animations and Transitions**
CSS provides powerful features for creating animations and transitions that can be applied... | 2,473 | [
{
"from": "human",
"value": "What is a good way to perform animation using .NET?\nI would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing.\nThe new site is for a magician, so I want to provide a... |
Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab).
I wanted to use a nested anchor, which didn't work because it is not allowed. Then I saw the ta... | The issue you're facing with nested anchors is a common one in HTML. According to the HTML specification, it's not valid to nest `<a>` (anchor) tags within other `<a>` tags. This restriction can create challenges when trying to implement UI elements like tab navigation with close buttons represented as links.
However,... | 3,447 | [
{
"from": "human",
"value": "Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab). \nI wanted to use a nested anchor, which didn't work be... |
I'm trying to setup CruiseControl.net at the moment. So far it works nice, but I have a Problem with the MSBuild Task.
According to the Documentation, it passes CCNetArtifactDirectory to MSBuild. But how do I use it?
I tried this:
<buildArgs>
/noconsolelogger /p:OutputPath=$(CCNetArtifactDirectory)\test
</buildArgs>... | To use the `CCNetArtifactDirectory` variable in your CruiseControl.NET (CCNet) configuration with the MSBuild task, you need to ensure that you are correctly referencing the variable within the context of the build arguments.
The error you encountered, `Reference to unknown symbol CCNetArtifactDirectory`, suggests th... | 3,086 | [
{
"from": "human",
"value": "I'm trying to setup CruiseControl.net at the moment. So far it works nice, but I have a Problem with the MSBuild Task.\nAccording to the Documentation, it passes CCNetArtifactDirectory to MSBuild. But how do I use it?\nI tried this:\n<buildArgs>\n /noconsolelogger /p:OutputPat... |
Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.
Also, on the Intel Macs, can I use generic x86 asm? Or is there a modified instruction set? Any information about post Intel.
Also: I know that on windows, asm can run in an emulated environment ... | When it comes to writing assembly code on a Mac, you have several options for IDEs and text editors that can make the process smoother compared to Xcode:
### IDEs and Text Editors for Assembly on Mac
1. **Visual Studio Code (VSCode)**: While it is not a dedicated IDE for assembly, VSCode is a versatile code editor wi... | 3,454 | [
{
"from": "human",
"value": "Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.\nAlso, on the Intel Macs, can I use generic x86 asm? Or is there a modified instruction set? Any information about post Intel.\nAlso: I know that on windo... |
I haven't touched sharepoint in years. If I want to setup a development environment to get up to speed, what options do I have? I don't have an MSDN license, is there anyway I can get up and running for free? (for development only)
| Setting up a SharePoint development environment can be done in several ways, and there are options available even if you don't have an MSDN license. Here are some approaches you can consider:
### 1. **SharePoint Online with Microsoft 365 Developer Program**
- **Microsoft 365 Developer Program**: You can sign up for th... | 2,673 | [
{
"from": "human",
"value": "I haven't touched sharepoint in years. If I want to setup a development environment to get up to speed, what options do I have? I don't have an MSDN license, is there anyway I can get up and running for free? (for development only)\n"
},
{
"from": "gpt",
"value": "... |
I have a small JS function that does Ajax for me and another like it that adds in POST data to the request. With Ajax being such a big topic with so many libraries about it, what am I missing from my function, is it insecure or something else worrying?
function loadPage(pagePath, displayElement)
{
var xmlHttp;
... | Your function for loading pages with AJAX is a good start, but there are several areas where you could enhance its security, reliability, and usability. Here are some potential concerns and improvements:
### Security Concerns:
1. **Cross-Site Scripting (XSS):**
- If the `pagePath` can be controlled by users, it c... | 203 | [
{
"from": "human",
"value": "I have a small JS function that does Ajax for me and another like it that adds in POST data to the request. With Ajax being such a big topic with so many libraries about it, what am I missing from my function, is it insecure or something else worrying?\nfunction loadPage(pagePat... |
I have a Java application that launches another java application. The launcher has a watchdog timer and receives periodic notifications from the second VM. However, if no notifications are received then the second virtual machine should be killed and the launcher will perform some additional clean-up activities.
The ... | You can achieve this functionality in pure Java by using the `Process` API to launch the second Java application and monitor its execution. When you start the second application using `ProcessBuilder`, you can periodically check if it's still running. If you don't receive notifications within a specified timeframe, you... | 2,690 | [
{
"from": "human",
"value": "I have a Java application that launches another java application. The launcher has a watchdog timer and receives periodic notifications from the second VM. However, if no notifications are received then the second virtual machine should be killed and the launcher will perform ... |
I am charged with designing a web application that displays very large geographical data. And one of the requirements is that it should be optimized so the PC still on dial-ups common in the suburbs of my country could use it as well.
Now I am permitted to use Flash and/or Silverlight if that will help with the limited... | Designing a web application that needs to efficiently handle large geographical data while being performant on slow dial-up connections presents several challenges. Here are some considerations for your decision between using JavaScript/HTML, Flash, or Silverlight:
### 1. **Performance on Slow Connections**
- **Compre... | 1,751 | [
{
"from": "human",
"value": "I am charged with designing a web application that displays very large geographical data. And one of the requirements is that it should be optimized so the PC still on dial-ups common in the suburbs of my country could use it as well.\nNow I am permitted to use Flash and/or Silv... |
Interfaces allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those methods.
Abstract classes allow you to do the same thing, along with adding code to the method.
Now if you can achieve the same goal with abstract classes, why do we even need the concept ... | You're raising a valid question about the distinction between interfaces and abstract classes in object-oriented programming (OOP). Let's break down the reasons why both concepts exist and their unique contributions to software design.
### Key Differences and Reasons for Interfaces
1. **Multiple Inheritance**:
- *... | 2,767 | [
{
"from": "human",
"value": "Interfaces allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those methods.\nAbstract classes allow you to do the same thing, along with adding code to the method.\nNow if you can achieve the same goal with abstrac... |
In my simple OpenGL program I get the following error about exit redefinition:
1>c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1> c:\program files\microsoft visual studio 8\vc\platformsdk\include\gl\glut.h(146) : see declara... | The error you're encountering indicates a conflict between the declaration of the `exit` function in the standard library (`stdlib.h`) and the declaration found in Nate Robins' GLUT header (`glut.h`). In particular, the difference causing the error is related to the `__declspec(noreturn)` specifier in the Visual Studio... | 2,456 | [
{
"from": "human",
"value": "In my simple OpenGL program I get the following error about exit redefinition:\n1>c:\\program files\\microsoft visual studio 8\\vc\\include\\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs\n1> c:\\program files\\microsoft visual studio 8\\... |
What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually arguments for the function. I have trouble including the arguments and still feeling like the paragraph is readable.
Any thou... | When typesetting functions with arguments, it's important to strike a balance between readability, brevity, and accuracy. Here are some best practices to help you effectively present functions in your writing:
1. **Use Clear Syntax**: Always include the parentheses and the arguments, even if they are empty or default.... | 3,206 | [
{
"from": "human",
"value": "What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like func(), even if there are actually arguments for the function. I have trouble including the arguments and still feeling... |
I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts, especially the ones for Sharepoint 2007?
As Web Parts are a layer on another layer of technology, getting resource usage, open handles and stuff only for the web part seems to be a bit difficult.
Does anyone know some good ... | Profiling and optimizing ASP.NET 2.0 Web Parts, particularly in the context of SharePoint 2007, can indeed be challenging due to the layers of abstraction involved. However, there are several tools and practices that can help you analyze and improve the performance of your Web Parts. Here are some recommendations:
###... | 1,602 | [
{
"from": "human",
"value": "I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts, especially the ones for Sharepoint 2007?\nAs Web Parts are a layer on another layer of technology, getting resource usage, open handles and stuff only for the web part seems to be a ... |
I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with Shoes as a graphical front-end. My question to you, kind-sirs, what do I need to become familiar with to start on this great adventure (besides shoes... | That sounds like a fun and educational project! To program an IRC client in Ruby with Shoes as the graphical front-end, there are several areas and concepts you'll want to familiarize yourself with, in addition to Ruby and Shoes. Here’s a structured approach:
### 1. **Understanding IRC Protocol**
- **RFC 1459**: Th... | 291 | [
{
"from": "human",
"value": "I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with Shoes as a graphical front-end. My question to you, kind-sirs, what do I need to become familiar with to sta... |
When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal "close to realtime"?
Obviously it's not possible to make a full database dump every x minutes... | To achieve a setup where you can seamlessly switch between two MySQL servers with minimal downtime and ensure that their data stays close to real-time, you might want to consider using MySQL replication, specifically **asynchronous replication** or **semi-synchronous replication**. Here’s a breakdown of how you can ach... | 1,800 | [
{
"from": "human",
"value": "When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal \"close to realtime\"? \nObviously it's not possible ... |
I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was keeping track of database schema changes and deploying these changes to productive systems. I haven't dared asking for being a... | Yes, Django offers a robust system for managing database schema changes through its built-in migrations framework. Here’s an overview of how you can manage database schema changes effectively with Django, including creating, applying, and even reverting migrations.
### 1. **Migrations in Django**
Django migrations ar... | 1,872 | [
{
"from": "human",
"value": "I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was keeping track of database schema changes and deploying these changes to productive sy... |
The .NET Setup project seems to have a lot of options, but I don't see an "Uninstall" option.
I'd prefer if people could "uninstall" from the standard "start menu" folder rather than send them to the control panel to uninstall my app, so can someone please tell me how to do this?
Also, I am aware of non Microsoft ins... | In a .NET Setup project (specifically when using Visual Studio's built-in Setup and Deployment project templates), the uninstall functionality is typically integrated into the installer itself and is generally managed through the Windows Control Panel. However, there are ways to facilitate uninstalling your application... | 3,199 | [
{
"from": "human",
"value": "The .NET Setup project seems to have a lot of options, but I don't see an \"Uninstall\" option. \nI'd prefer if people could \"uninstall\" from the standard \"start menu\" folder rather than send them to the control panel to uninstall my app, so can someone please tell me how t... |
The discussion of Dual vs. Quadcore is as old as the Quadcores itself and the answer is usually "it depends on your scenario". So here the scenario is a Web Server (Windows 2003 (not sure if x32 or x64), 4 GB RAM, IIS, ASP.net 3.0).
My impression is that the CPU in a Webserver does not need to be THAT fast because requ... | Your reasoning about the characteristics of a web server handling lightweight requests is on point, and your choice between dual-core and quad-core CPUs will indeed depend on the specifics of your application and its workload. Here are some considerations to help guide your decision:
### 1. **Nature of Workloads:**
... | 3,205 | [
{
"from": "human",
"value": "The discussion of Dual vs. Quadcore is as old as the Quadcores itself and the answer is usually \"it depends on your scenario\". So here the scenario is a Web Server (Windows 2003 (not sure if x32 or x64), 4 GB RAM, IIS, ASP.net 3.0).\nMy impression is that the CPU in a Webserve... |
How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost.
| To determine if a PC supports hardware virtualization, you can follow these steps:
### 1. **Check the Processor:**
- **Intel Processors:** Look for "Intel VT-x" or "Intel Virtualization Technology" support. This can typically be found in Intel's specifications for your CPU model.
- **AMD Processors:** Look for "... | 3,103 | [
{
"from": "human",
"value": "How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost.\n"
},
{
"from": "gpt",
"value": "To determine if a PC supports hardware virtualization, you can f... |
What I want to do is something like this: I have enums with combined flagged values.
public static class EnumExtension
{
public static bool IsSet<T>( this T input, T matchTo )
where T:enum //the constraint I want that doesn't exist in C#3
{
return (input & matchTo) != 0;
}
}
So then I ... | You're correct that C# does not currently support a direct `where T : enum` constraint, as enums are not classified as a distinct type in the same way that classes and structs are. However, you can work around this limitation by leveraging the `Enum` type in C# and using a generic method that accepts any value type (st... | 2,823 | [
{
"from": "human",
"value": "What I want to do is something like this: I have enums with combined flagged values.\npublic static class EnumExtension\n{\n public static bool IsSet<T>( this T input, T matchTo ) \n where T:enum //the constraint I want that doesn't exist in C#3\n { \n ret... |
I want to use the Publish.GacRemove function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.
Should it be a path to the original DLL (what if I removed it after installing it in the GAC?) or the path to the assembly in the GAC?
UPDATE:
I finally used these API wrapper... | The `Publish.GacRemove` function is typically used to remove an assembly from the Global Assembly Cache (GAC) during the uninstallation process of a .NET application. The argument you need to pass to `GacRemove` is actually a string that identifies the assembly in the GAC, not the path to the original DLL file on your ... | 3,610 | [
{
"from": "human",
"value": "I want to use the Publish.GacRemove function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.\nShould it be a path to the original DLL (what if I removed it after installing it in the GAC?) or the path to the assembly in the GAC... |
Let's say the first N integers divisible by 3 starting with 9.
I'm sure there is some one line solution using lambdas, I just don't know it that area of the language well enough yet.
| Certainly! If you're looking to generate the first N integers that are divisible by 3, starting from 9, you can use a combination of Python's `map` or list comprehension with a lambda function.
Here's a one-liner that does this using list comprehension:
```python
N = 10 # Example value for N
result = [9 + i * 3 for... | 5,537 | [
{
"from": "human",
"value": "Let's say the first N integers divisible by 3 starting with 9.\nI'm sure there is some one line solution using lambdas, I just don't know it that area of the language well enough yet.\n"
},
{
"from": "gpt",
"value": "Certainly! If you're looking to generate the first... |
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the in... | If you're looking for a Command Prompt replacement that offers features like syntax highlighting, IntelliSense, and a tabbed interface while still being functionally similar to `cmd.exe`, here are a few options you might consider:
1. **ConEmu**: ConEmu is a customizable terminal emulator that allows you to run multipl... | 1,529 | [
{
"from": "human",
"value": "Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed i... |
It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead.
One solution is to embed a version number in the resource's filename, but will placing the resources to be managed in this ... | Yes, using a directory structure with revision numbers (like `/r20/example.js` and `/r21/example.js`) will indeed work in a similar way to embedding version numbers in the filename. The entire URL is used as a key in the browser's cache, which means that if you change the URL, the browser treats it as a different resou... | 3,874 | [
{
"from": "human",
"value": "It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead.\nOne solution is to embed a version number in the resource's filename, but will pl... |
I have a project that I would like to start beta testing soon, it is a PHP/MySQL site for programmers. I have beta tested sites before however it was always in-house, and I have never done betas that could/should be seen by someone other then those associated with the project.
How should I go about starting the beta, a... | Launching a beta test for your PHP/MySQL site is an exciting step, but it also comes with its own set of challenges and considerations. Here’s a comprehensive guide to help you get started and prepare for potential issues:
### 1. Define Your Goals and Scope
- **Objectives**: Clearly outline what you want to achieve wi... | 48 | [
{
"from": "human",
"value": "I have a project that I would like to start beta testing soon, it is a PHP/MySQL site for programmers. I have beta tested sites before however it was always in-house, and I have never done betas that could/should be seen by someone other then those associated with the project.\n... |
I can't seem to find that option.
Surely it's in there?
| It sounds like you might be looking for a specific feature or option in a program or device. Could you provide more details about what you're trying to find? That way, I can assist you better! | 6,679 | [
{
"from": "human",
"value": "I can't seem to find that option.\nSurely it's in there?\n"
},
{
"from": "gpt",
"value": "It sounds like you might be looking for a specific feature or option in a program or device. Could you provide more details about what you're trying to find? That way, I can ass... |
Does anybody know how to get local path of file cached by Firefox based on its URL from an XPCOM component?
| To get the local path of a file cached by Firefox based on its URL using an XPCOM component, you can utilize the cache service available in Firefox. Below is a general approach on how to do this:
1. **Access the Cache Service**: You will need to access the cache service provided by Firefox. This can be done through `n... | 3,098 | [
{
"from": "human",
"value": "Does anybody know how to get local path of file cached by Firefox based on its URL from an XPCOM component?\n"
},
{
"from": "gpt",
"value": "To get the local path of a file cached by Firefox based on its URL using an XPCOM component, you can utilize the cache service... |
In Maybe Normalizing Isn't Normal Jeff Atwood says, "You're automatically measuring all the queries that flow through your software, right?" I'm not but I'd like to.
Some features of the application in question:
ASP.NET
a data access layer which depends on the MS Enterprise Library Data Access Application Block
MS ... | To automatically measure all the queries that flow through your ASP.NET application using the Microsoft Enterprise Library Data Access Application Block, you can implement a logging mechanism. Here’s a step-by-step guide to help you get started:
### Step 1: Configure Logging
1. **Install Logging Library**: First, mak... | 494 | [
{
"from": "human",
"value": "In Maybe Normalizing Isn't Normal Jeff Atwood says, \"You're automatically measuring all the queries that flow through your software, right?\" I'm not but I'd like to. \nSome features of the application in question:\n\nASP.NET\na data access layer which depends on the MS Enter... |
I'm designing a web site navigation hierarchy. It's a tree of nodes. Nodes represent web pages.
Some nodes on the tree are special. I need a name for them.
There are multiple such nodes. Each is the "root" of a sub-tree with pages that have a distinct logo, style sheet, or layout. Think of different departments.
site... | Given the context you've provided, a fitting name for these special nodes that serve as the "root" of sub-trees with distinct logos, style sheets, or layouts could be **"Department Nodes"**. This name conveys the idea that each node represents a different department or section of the website, each with its unique brand... | 5,091 | [
{
"from": "human",
"value": "I'm designing a web site navigation hierarchy. It's a tree of nodes. Nodes represent web pages.\nSome nodes on the tree are special. I need a name for them.\nThere are multiple such nodes. Each is the \"root\" of a sub-tree with pages that have a distinct logo, style sheet, or... |
I would like to be able to use the Tab key within a text box to tab over four spaces. The way it is now, the Tab key jumps my cursor to the next input.
Is there some JavaScript that will capture the Tab key in the text box before it bubbles up to the UI?
I understand some browsers (i.e. FireFox) may not allow this. How... | You can achieve the desired functionality of inserting four spaces in a text box when a specific key combination (like `Shift + Tab` or `Ctrl + Q`) is pressed by using JavaScript to capture those key events. Here’s a simple example using `Shift + Tab` as the custom key combination:
### HTML:
```html
<!DOCTYPE html>
<h... | 1,337 | [
{
"from": "human",
"value": "I would like to be able to use the Tab key within a text box to tab over four spaces. The way it is now, the Tab key jumps my cursor to the next input.\nIs there some JavaScript that will capture the Tab key in the text box before it bubbles up to the UI?\nI understand some brow... |
If I am in a function in the code behind, and I want to implement displaying a "Loading..." in the status bar the following makes sense, but as we know from WinForms is a NoNo:
StatusBarMessageText.Text = "Loading Configuration Settings...";
LoadSettingsGridData();
StatusBarMessageText.Text = "Done";
What ... | In WPF, you can handle the "Loading..." message more effectively by using asynchronous programming and the `Task` class along with the `await` keyword. This approach allows your UI to remain responsive while performing long-running tasks, such as loading settings. Instead of blocking the UI thread, you can use the `asy... | 3,013 | [
{
"from": "human",
"value": "If I am in a function in the code behind, and I want to implement displaying a \"Loading...\" in the status bar the following makes sense, but as we know from WinForms is a NoNo:\nStatusBarMessageText.Text = \"Loading Configuration Settings...\"; \nLoadSettingsGridDat... |
I have an SSIS package that exports data to a couple of Excel files for transfer to a third party. To get this to run as a scheduled job on a 64-bit server I understand that I need to set the step as a CmdExec type and call the 32-bit version of DTExec. But I don't seem to be able to get the command right to pass in th... | When using `DTExec.exe` to run an SSIS package and set connection properties, you need to ensure that the syntax is correct, especially when passing connection string parameters, which can involve complex quoting due to the command-line nature.
In your case, since you decided to move to CSV files, it might not be nec... | 958 | [
{
"from": "human",
"value": "I have an SSIS package that exports data to a couple of Excel files for transfer to a third party. To get this to run as a scheduled job on a 64-bit server I understand that I need to set the step as a CmdExec type and call the 32-bit version of DTExec. But I don't seem to be ab... |
I'm currently working at a small web development company, we mostly do campaign sites and other promotional stuff. For our first year we've been using a "server" for sharing project files, a plain windows machine with a network share. But this isn't exactly future proof.
SVN is great for code (it's what we use now), b... | It sounds like you're looking for a document management solution that provides version control for non-code assets, like design files and documents. Here are some options you might consider that fit your criteria:
1. **Git with LFS (Large File Storage)**: While Git is often associated with code, it can be used for any... | 2,284 | [
{
"from": "human",
"value": "I'm currently working at a small web development company, we mostly do campaign sites and other promotional stuff. For our first year we've been using a \"server\" for sharing project files, a plain windows machine with a network share. But this isn't exactly future proof. \nSVN... |
I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL.
Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?
| Using LINQ with Oracle databases can be a bit tricky, especially if your initial setup is targeting SQL Server. However, there are several libraries and ORM (Object-Relational Mapping) tools that can help you achieve this seamlessly. Here are a few popular options to consider for using LINQ with an Oracle database:
##... | 2,144 | [
{
"from": "human",
"value": "I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL. \nDoes anybody know of a decent easy to use wrapper to use LINQ against an Or... |
I absolutely love the Keep Remote Directory Up-to-date feature in Winscp. Unfortunately, I can't find anything as simple to use in OS X or Linux. I know the same thing can theoretically be accomplished using changedfiles or rsync, but I've always found the tutorials for both tools to be lacking and/or contradictory.
I... | To achieve real-time synchronization of a local directory to a remote server on macOS or Linux, similar to what WinSCP offers, you can use a combination of `rsync` and the `inotify` tools (or their equivalents). Here’s a step-by-step guide to set it up:
### Method 1: Using `inotify-tools` (Linux)
1. **Install inotify... | 787 | [
{
"from": "human",
"value": "I absolutely love the Keep Remote Directory Up-to-date feature in Winscp. Unfortunately, I can't find anything as simple to use in OS X or Linux. I know the same thing can theoretically be accomplished using changedfiles or rsync, but I've always found the tutorials for both too... |
I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08.
After some amount of uptime (usually some days) threads begin getting stuck in native methods.
The threads are locked in something like this:
"pool-2-thread-2571" prio=1 tid=0x08dd0b28 nid=0x319e waiting for monitor entry [0xb91fe000..0xb9... | The situation you're encountering with threads getting stuck in native methods on an older JDK version like 1.5.0_08 running on Fedora Core 6 may be due to various issues related to thread contention, memory management, or even bugs in the JDK itself. Here are some potential causes and steps you can take to troubleshoo... | 1,816 | [
{
"from": "human",
"value": "I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08.\nAfter some amount of uptime (usually some days) threads begin getting stuck in native methods.\nThe threads are locked in something like this:\n\"pool-2-thread-2571\" prio=1 tid=0x08dd0b28 nid=0x31... |
I have a Tomcat Filter that delegates requests to the a handling object depending on the URL. This is the only filter in the FilterChain. I have an Ajax app that hammers this filter with lots of requests.
Recently I noticed an issue where the filter's doFilter method is often called with a committed response as a param... | It seems you're facing an issue where your `doFilter` method in the Tomcat Filter is being invoked with a committed response, which typically indicates that the response has already been written to or flushed, making it impossible to modify headers or status codes. This can happen if the filter or servlet chain is not ... | 1,829 | [
{
"from": "human",
"value": "I have a Tomcat Filter that delegates requests to the a handling object depending on the URL. This is the only filter in the FilterChain. I have an Ajax app that hammers this filter with lots of requests.\nRecently I noticed an issue where the filter's doFilter method is often c... |
In Linux, what is the difference between /dev/ttyS0 and /dev/ttys0?
I know that the first is a serial port, but what about the second, with the small s?
| In Linux, `/dev/ttyS0` and `/dev/ttys0` refer to different types of devices, and understanding the difference between them is important when dealing with serial communications or terminal devices.
- **`/dev/ttyS0`**: This device file represents the first serial port on the system (commonly associated with an RS-232 se... | 4,643 | [
{
"from": "human",
"value": "In Linux, what is the difference between /dev/ttyS0 and /dev/ttys0?\nI know that the first is a serial port, but what about the second, with the small s?\n"
},
{
"from": "gpt",
"value": "In Linux, `/dev/ttyS0` and `/dev/ttys0` refer to different types of devices, and... |
Is there some built-in way to share files between Xen guests? I don't currently need to share the actual images, just some data files.
| Xen does not have a built-in mechanism specifically designed for sharing files between guest virtual machines in the same way that some other virtualization platforms (like VMware or VirtualBox) might provide. However, there are several methods you can use to facilitate file sharing between Xen guests:
1. **Network Sh... | 4,218 | [
{
"from": "human",
"value": "Is there some built-in way to share files between Xen guests? I don't currently need to share the actual images, just some data files.\n"
},
{
"from": "gpt",
"value": "Xen does not have a built-in mechanism specifically designed for sharing files between guest virtu... |
We often hear/read that one should avoid dynamic casting. I was wondering what would be 'good use' examples of it, according to you?
Edit:
Yes, I'm aware of that other thread: it is indeed when reading one of the first answers there that I asked my question!
| Dynamic casting in C++ can be a controversial topic, but there are scenarios where it is appropriate and even necessary. Here are some examples of "good use" cases for dynamic casting:
### 1. Polymorphism in Inheritance Hierarchies
When dealing with polymorphic classes, especially in a class hierarchy where you need t... | 1,638 | [
{
"from": "human",
"value": "We often hear/read that one should avoid dynamic casting. I was wondering what would be 'good use' examples of it, according to you?\nEdit:\nYes, I'm aware of that other thread: it is indeed when reading one of the first answers there that I asked my question!\n"
},
{
"f... |
I am in the middle of reading the excellent Clean Code
One discussion is regarding passing nulls into a method.
public class MetricsCalculator {
public double xProjection(Point p1, Point p2) {
return (p2.x - p1.x) * 1.5;
}
}
...
calculator.xProjection(null, new Point(12,13));
It represents different wa... | The question of how to handle `null` values in method parameters is a common topic in software development, and it touches on broader principles such as robustness, readability, and maintainability. Here are some perspectives on the approaches you've mentioned, along with suggestions on how to enforce the restriction o... | 1,577 | [
{
"from": "human",
"value": "I am in the middle of reading the excellent Clean Code\nOne discussion is regarding passing nulls into a method.\npublic class MetricsCalculator {\n public double xProjection(Point p1, Point p2) {\n return (p2.x - p1.x) * 1.5;\n }\n}\n...\ncalculator.xProjection(nul... |
Unfortunately, my question is not as simple as keeping track of two windows created by the same process.
Here is what I have:
Two users, Jack and Jim are remotely logged in to the same Unix system and run X servers
Jack runs an application, 'AwesomeApp', that opens a GUI in a X window
Jim runs another instance of this... | To distinguish between the two instances of 'AwesomeApp' that are running on the same Unix system but under different user sessions (Jack and Jim), you can approach the problem by leveraging the properties of X11 windows and process ownership.
### Approach:
1. **Process Ownership:**
Each instance of 'AwesomeApp' w... | 2,712 | [
{
"from": "human",
"value": "Unfortunately, my question is not as simple as keeping track of two windows created by the same process.\nHere is what I have:\n\nTwo users, Jack and Jim are remotely logged in to the same Unix system and run X servers\nJack runs an application, 'AwesomeApp', that opens a GUI in... |
Is it completely against the Java way to create struct like objects?
class SomeData1 {
public int x;
public int y;
}
I can see a class with accessors and mutators being more Java like.
class SomeData2 {
int getX();
void setX(int x);
int getY();
void setY(int y);
private int x;
private... | Creating struct-like objects in Java, as you've shown with `SomeData1`, is not inherently against the "Java way," but it is not idiomatic compared to the use of encapsulated classes like `SomeData2`.
### Comparison of the Two Approaches
1. **Public Fields (`SomeData1`)**:
- Pros:
- Simplicity: It's straightf... | 3,011 | [
{
"from": "human",
"value": "Is it completely against the Java way to create struct like objects?\nclass SomeData1 {\n public int x;\n public int y;\n}\n\nI can see a class with accessors and mutators being more Java like.\nclass SomeData2 {\n int getX();\n void setX(int x);\n\n int getY();\n... |
I'm working on a Rails app and am looking to include some functionality from "Getting the Hostname or IP in Ruby on Rails" that I asked.
I'm having problems getting it to work. I was under the impression that I should just make a file in the lib directory, so I named it 'get_ip.rb', with the contents:
require 'socket'
... | In Ruby on Rails, when you're creating a module in the `lib` directory and want to use it across your application, you need to ensure a couple of things:
1. **Autoloading the `lib` directory**: In Rails, files in the `lib` directory are not automatically loaded. You need to make sure the `lib` directory is included in... | 1,635 | [
{
"from": "human",
"value": "I'm working on a Rails app and am looking to include some functionality from \"Getting the Hostname or IP in Ruby on Rails\" that I asked.\nI'm having problems getting it to work. I was under the impression that I should just make a file in the lib directory, so I named it 'get_... |
I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new project with subversion, I get the following error:
Error while creating module: org.... | The error you are encountering indicates that Subversion cannot access the specified repository at the given URL. Here are some steps and suggestions to troubleshoot and potentially resolve the issue:
1. **Check Repository URL**:
Make sure that the URL you are using is correct. Verify that the path to the repositor... | 3,354 | [
{
"from": "human",
"value": "I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new project with subversion, I get the following... |
I have a pretty standard table set-up in a current application using the .NET XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column for the primary department. This column is a foreign key to my Departments table, where I store the basic department name,... | The issue you are encountering arises from the way the DataSet handles relationships between tables when filling them from the database. When you fill the `DepartmentDataTable`, the `Department` entries are correctly retrieved; however, the DataSet also tries to enforce the foreign key relationship between the `Contrac... | 1,031 | [
{
"from": "human",
"value": "I have a pretty standard table set-up in a current application using the .NET XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column for the primary department. This column is a foreign key to my Departments table,... |
I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we wanted to see if we can suggest Windows XP as... | Using Windows XP as a file and SQL server has several limitations and considerations you should be aware of before recommending it to your customers:
1. **End of Support**: Windows XP reached the end of its support from Microsoft in April 2014. This means that it no longer receives security updates or patches, which p... | 3,877 | [
{
"from": "human",
"value": "I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we want... |
I had to use a Microsoft Web Services Enhancements 2.0 service and it raised wse910 error when the time difference between the server and client was more than 5 minutes.
I read in many places that setting the timeToleranceInSeconds, ttlInSeconds and defaultTtlInSeconds values should help, but only setting the clock of ... | The WSE910 error in Microsoft Web Services Enhancements (WSE) 2.0 indicates that there is a time synchronization issue between the client and the server. This usually occurs when the timestamps of messages exchanged between the client and server are not within an acceptable range, which is typically defined as 5 minute... | 3,396 | [
{
"from": "human",
"value": "I had to use a Microsoft Web Services Enhancements 2.0 service and it raised wse910 error when the time difference between the server and client was more than 5 minutes.\nI read in many places that setting the timeToleranceInSeconds, ttlInSeconds and defaultTtlInSeconds values s... |
I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location.
EDIT: I ended up writing a script task.
| It's great to hear that you found a solution by using a Script Task. For anyone facing a similar challenge, I can provide a general outline of how you can use a script (in C# for example) to copy all contents from a directory on an FTP server to a shared network location.
Here’s a simple approach using C#:
### Prereq... | 1,548 | [
{
"from": "human",
"value": "I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location.\nEDIT: I ended up writing a script task.\n"... |
I'd like to add a method to my existing server's CORBA interface. Will that require recompiling all clients?
I'm using TAO.
| When you add a method to an existing CORBA interface, you generally do not need to recompile all clients, but there are some important considerations to keep in mind:
1. **Interface Compatibility**: CORBA supports the concept of interface evolution, which allows you to add new methods to an interface without breaking ... | 4,172 | [
{
"from": "human",
"value": "I'd like to add a method to my existing server's CORBA interface. Will that require recompiling all clients?\nI'm using TAO.\n"
},
{
"from": "gpt",
"value": "When you add a method to an existing CORBA interface, you generally do not need to recompile all clients, but... |
Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)?
Can it be done with Visio alone or do I need a plugin?
What about other diagrams?
| Microsoft Visio itself does not natively support forward engineering sequence diagrams (or other UML diagrams) directly into code, including C#. While Visio is a powerful tool for creating diagrams, including UML diagrams, it primarily serves as a visual design tool rather than a code generation tool.
### Forward Engi... | 3,216 | [
{
"from": "human",
"value": "Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)?\nCan it be done with Visio alone or do I need a plugin?\nWhat about other diagrams?\n"
},
{
"from": "gpt",
"value": "Microsoft Visio itself does not natively support forward enginee... |
I have a query where I wish to retrieve the oldest X records. At present my query is something like the following:
SELECT Id, Title, Comments, CreatedDate
FROM MyTable
WHERE CreatedDate > @OlderThanDate
ORDER BY CreatedDate DESC
I know that normally I would remove the 'DESC' keyword to switch the order of the records... | In SQL Server, you can retrieve the oldest X records while sorting them so that the newest of those oldest records appears first by using a common table expression (CTE) or a subquery. Here's how you can do it:
### Using a Common Table Expression (CTE)
You can first select the oldest records with an additional rankin... | 2,640 | [
{
"from": "human",
"value": "I have a query where I wish to retrieve the oldest X records. At present my query is something like the following:\nSELECT Id, Title, Comments, CreatedDate\nFROM MyTable\nWHERE CreatedDate > @OlderThanDate\nORDER BY CreatedDate DESC\n\nI know that normally I would remove the 'D... |
The command line interface to MySQL works perfectly well in itself, but when using my local copy I'm forced to interact with it using the old-fashioned DOS windows. Is there some way I can redirect it through a better shell?
| Yes, there are several options you can consider to improve your experience when interacting with MySQL, moving beyond the basic command line interface provided by DOS (Command Prompt). Here are some alternatives that can enhance your MySQL experience on Windows:
### 1. Use Windows Subsystem for Linux (WSL)
You can ins... | 2,213 | [
{
"from": "human",
"value": "The command line interface to MySQL works perfectly well in itself, but when using my local copy I'm forced to interact with it using the old-fashioned DOS windows. Is there some way I can redirect it through a better shell?\n"
},
{
"from": "gpt",
"value": "Yes, ther... |
I have one table "orders" with a foreing key "ProductID".
I want to show the orders in a grid with the product name, without LazyLoad for better performance, but I if use DataLoadOptions it retrieves all Product fields, which seams like a overkill.
Is there a way to retrieve only the Product name in the first query?
Ca... | Yes, this is a common scenario when working with LINQ to SQL and foreign keys. LINQ to SQL, by default, retrieves all the fields of the related entity when you access it, which may lead to unnecessary data being fetched if you only need specific fields. Unfortunately, LINQ to SQL does not have a built-in way to load on... | 3,051 | [
{
"from": "human",
"value": "I have one table \"orders\" with a foreing key \"ProductID\".\nI want to show the orders in a grid with the product name, without LazyLoad for better performance, but I if use DataLoadOptions it retrieves all Product fields, which seams like a overkill.\nIs there a way to retrie... |
Let's aggregate a list of free quality web site design templates. There are a million of these sites out there, but most are repetitive and boring.
I'll start with freeCSStemplates.org
I also think other sites should follow some sort of standards, for example here are freeCSStemplates standards
Released for FREE unde... | That's a great initiative! Here’s a list of websites that offer free quality web design templates, along with some information about their standards and offerings:
1. **freeCSSTemplates.org**
- **License**: Creative Commons Attribution 2.5
- **Standards**: Lightweight, tables-free, W3C compliant, public domain p... | 2,440 | [
{
"from": "human",
"value": "Let's aggregate a list of free quality web site design templates. There are a million of these sites out there, but most are repetitive and boring. \nI'll start with freeCSStemplates.org\nI also think other sites should follow some sort of standards, for example here are freeCSS... |
What's the most efficient way to concatenate strings?
| The most efficient way to concatenate strings in Python depends on the context and the specific requirements of your use case. Here are a few common methods:
1. **Using `join()`**: If you have a list of strings, the `str.join()` method is usually the most efficient way to concatenate them.
```python
strings =... | 3,582 | [
{
"from": "human",
"value": "What's the most efficient way to concatenate strings?\n"
},
{
"from": "gpt",
"value": "The most efficient way to concatenate strings in Python depends on the context and the specific requirements of your use case. Here are a few common methods:\n\n1. **Using `join()`... |
It appears that using perldoc perl gives the list of, e.g. perlre, perlvar, etc.
Is this the best place to find the list of what's available as an overview or tutorial or reference manual section? Is there another, better list?
| Yes, using `perldoc perl` is a good way to get an overview of the various sections and documentation available in Perl. The output includes references to important topics like `perlre`, `perlvar`, `perlfunc`, and others, which cover regular expressions, variables, built-in functions, and more.
However, there are a few... | 4,052 | [
{
"from": "human",
"value": "It appears that using perldoc perl gives the list of, e.g. perlre, perlvar, etc.\nIs this the best place to find the list of what's available as an overview or tutorial or reference manual section? Is there another, better list?\n"
},
{
"from": "gpt",
"value": "Yes, ... |
Has anybody come across this problem during an application install?
OS is Windows Server 2k3
I do have local Admin access and I have installed this application on other machines.
Any help would be much appreciated, as Google isn't helping much
| Certainly! While you haven't provided specific details about the error you are encountering, here are some common issues and solutions that can arise during application installation on Windows Server 2003. You can try the following troubleshooting steps:
1. **Check Compatibility**: Ensure the application is compatible... | 2,784 | [
{
"from": "human",
"value": "Has anybody come across this problem during an application install?\n\nOS is Windows Server 2k3\n\nI do have local Admin access and I have installed this application on other machines.\nAny help would be much appreciated, as Google isn't helping much\n"
},
{
"from": "gpt... |
I would like to find out safe ways of implementing three dimensional arrays of integers in C++, using pointer arithmetic / dynamic memory allocation, or, alternatively using STL techniques such as vectors.
Essentially I want my integer array dimensions to look like:
[ x ][ y ][ z ]
x and y are in the range 20-6000
z i... | You can implement a three-dimensional array of integers in C++ using either pointer arithmetic with dynamic memory allocation or by using the C++ Standard Template Library (STL), specifically `std::vector`. Below are examples of both methods.
### Method 1: Using Dynamic Memory Allocation with Pointer Arithmetic
You c... | 1,776 | [
{
"from": "human",
"value": "I would like to find out safe ways of implementing three dimensional arrays of integers in C++, using pointer arithmetic / dynamic memory allocation, or, alternatively using STL techniques such as vectors.\nEssentially I want my integer array dimensions to look like:\n[ x ][ y ]... |
As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I need to include the using for the interface, the IoC container, and the concrete type.
With upwar... | In C#, there's no built-in feature to define macros specifically for `using` statements like you would in some other programming languages (e.g., C/C++). However, there are a few strategies you can adopt to manage long lists of `using` statements effectively:
### 1. **Use Global Usings (C# 10 and later)**
If you're u... | 3,462 | [
{
"from": "human",
"value": "As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I need to include the using for the interface, the IoC conta... |
OK. This is a bit of a vanity app, but I had a situation today at work where I was in a training class and the machine was set to lock every 10 minutes. Well, if the trainers got excited about talking - as opposed to changing slides - the machine would lock up.
I'd like to write a teeny app that has nothing but a task... | Creating a simple C# application that moves the mouse cursor by 1 pixel every 4 minutes and runs in the system tray is a straightforward task. Below is a guide on how to achieve this using C# and Windows Forms.
### Step 1: Set Up Your Project
1. Open Visual Studio and create a new **Windows Forms App (.NET Framework)... | 867 | [
{
"from": "human",
"value": "OK. This is a bit of a vanity app, but I had a situation today at work where I was in a training class and the machine was set to lock every 10 minutes. Well, if the trainers got excited about talking - as opposed to changing slides - the machine would lock up.\nI'd like to wri... |
I have one field that I need to sum lets say named items
However that field can be part of group a or b
In the end I need to have all of the items summed for group a and group b
when I say grouped I mean there is a LEFT OUTER JOIN to another table the previous table has a type for the items and the one being joined has... | It sounds like you're trying to aggregate data from a table based on item types that belong to different groups, and you want to get the sums of items for both groups in a single result row. To help you with this, I can provide a general SQL query template that you can adjust according to your specific table structure ... | 1,352 | [
{
"from": "human",
"value": "I have one field that I need to sum lets say named items\nHowever that field can be part of group a or b\nIn the end I need to have all of the items summed for group a and group b\nwhen I say grouped I mean there is a LEFT OUTER JOIN to another table the previous table has a typ... |
What should I use to virtualize my desktop, vmx, xen, or vmware?
Needs to work on a linux or windows host, sorry virtual pc.
@Derek Park: Free as in speech, not beer. I want to be able to make a new virtual machine from my own licensed copies of windows, for that vmware is kind of expensive.
| If you are looking for free and open-source virtualization solutions to create virtual machines on a Linux or Windows host, here are some options to consider:
1. **KVM (Kernel-based Virtual Machine)**:
- **Host OS**: Primarily Linux
- **Type**: Type 1 hypervisor
- **Features**: KVM is integrated into the Linu... | 3,067 | [
{
"from": "human",
"value": "What should I use to virtualize my desktop, vmx, xen, or vmware?\nNeeds to work on a linux or windows host, sorry virtual pc.\n@Derek Park: Free as in speech, not beer. I want to be able to make a new virtual machine from my own licensed copies of windows, for that vmware is kin... |
Given:
e = 'a' + 'b' + 'c' + 'd'
How do I write the above in two lines?
e = 'a' + 'b' +
'c' + 'd'
| You can write the expression in two lines using a backslash (`\`) to indicate that the line continues, or you can use parentheses to group the strings. Here are both methods:
**Using a backslash:**
```python
e = 'a' + 'b' + 'c' + \
'd'
```
**Using parentheses:**
```python
e = ('a' + 'b' +
'c' + 'd')
```
Bot... | 6,027 | [
{
"from": "human",
"value": "Given:\ne = 'a' + 'b' + 'c' + 'd'\n\nHow do I write the above in two lines?\ne = 'a' + 'b' +\n 'c' + 'd'\n\n"
},
{
"from": "gpt",
"value": "You can write the expression in two lines using a backslash (`\\`) to indicate that the line continues, or you can use paren... |
I am trying to find the virtual file that contains the current users id. I was told that I could find it in the proc directory, but not quite sure which file.
| In a Linux system, you can find the current user's ID in the `/proc/self` directory. Specifically, you can check the `/proc/self/status` file for information about the current process, including the user ID (UID) and effective user ID (EUID).
To find the user ID, you can run the following command in the terminal:
```... | 5,792 | [
{
"from": "human",
"value": "I am trying to find the virtual file that contains the current users id. I was told that I could find it in the proc directory, but not quite sure which file.\n"
},
{
"from": "gpt",
"value": "In a Linux system, you can find the current user's ID in the `/proc/self` d... |
I want to know what a "virtual base class" is and what it means.
Let me show an example:
class Foo
{
public:
void DoSomething() { /* ... */ }
};
class Bar : public virtual Foo
{
public:
void DoSpecific() { /* ... */ }
};
| A **virtual base class** in C++ is a mechanism used primarily in the context of multiple inheritance. It helps to solve the "diamond problem," which arises when a class inherits from two classes that both inherit from a common base class.
### The Diamond Problem
Consider this structure:
```
Foo
/ \
Ba... | 1,027 | [
{
"from": "human",
"value": "I want to know what a \"virtual base class\" is and what it means.\nLet me show an example:\nclass Foo\n{\npublic:\n void DoSomething() { /* ... */ }\n};\n\nclass Bar : public virtual Foo\n{\npublic:\n void DoSpecific() { /* ... */ }\n};\n\n"
},
{
"from": "gpt",
... |
I'm looking for a robust, easy-to-use, regular expression evaluator for native C++, either platform-independent or Windows-specific.
Requirements:
Can't use Boost or ACE regex libraries (unfortunately)
Can't use .NET Regex (or any managed code)
The main requirement is that it should be standalone and open.
| If you're looking for a standalone and open-source regular expression library for native C++ that does not rely on Boost, ACE, or .NET, here are a few good options to consider:
### 1. **RE2**
- **Repository**: [RE2 on GitHub](https://github.com/google/re2)
- **Description**: Developed by Google, RE2 is a fast, safe, a... | 3,369 | [
{
"from": "human",
"value": "I'm looking for a robust, easy-to-use, regular expression evaluator for native C++, either platform-independent or Windows-specific.\nRequirements:\n\nCan't use Boost or ACE regex libraries (unfortunately)\nCan't use .NET Regex (or any managed code)\n\nThe main requirement is th... |
What is the difference between TrueType fonts and Type-1 fonts?
| TrueType fonts and Type 1 fonts are two different font technologies used in digital typography. Here are the key differences between them:
### 1. **Origin and Development:**
- **TrueType Fonts:**
- Developed by Apple in the late 1980s and later adopted by Microsoft.
- Designed to be a flexible and scalable font f... | 3,419 | [
{
"from": "human",
"value": "What is the difference between TrueType fonts and Type-1 fonts?\n"
},
{
"from": "gpt",
"value": "TrueType fonts and Type 1 fonts are two different font technologies used in digital typography. Here are the key differences between them:\n\n### 1. **Origin and Developm... |
I have an if statement with two conditions (separated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed I only want the second condition to be processed if the first condition evaluates to false.
if I or... | In PHP (as well as in many other programming languages), the logical operators are evaluated in a way that allows for short-circuiting. Specifically, the `OR` operator (`||`) and `AND` operator (`&&`) will stop evaluating further conditions as soon as the overall result of the expression is determined.
In your case, i... | 2,313 | [
{
"from": "human",
"value": "I have an if statement with two conditions (separated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed I only want the second condition to be processed if the fi... |
I want to swap two integers, and I want to know which of these two implementations will be faster:
The obvious way with a temp variable:
void swap(int* a, int* b)
{
int temp = *a;
*a = *b;
*b = temp;
}
Or the xor version that I'm sure most people have seen:
void swap(int* a, int* b)
{
*a ^= *b;
*b ... | In terms of performance, the first method of swapping two integers using a temporary variable is generally faster and more efficient than the XOR-based method. Here are the reasons why:
1. **Number of Operations**:
- The temporary variable method uses two assignments: one to store the value of `*a` in `temp` and a... | 4,190 | [
{
"from": "human",
"value": "I want to swap two integers, and I want to know which of these two implementations will be faster:\nThe obvious way with a temp variable:\nvoid swap(int* a, int* b)\n{\n int temp = *a;\n *a = *b;\n *b = temp;\n}\n\nOr the xor version that I'm sure most people have seen:... |
I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?
| To clear the list of recent projects on the start page of an application (assuming you're referring to software like Visual Studio or similar), you can often do this directly within the application itself without having to edit the registry. Here’s a general approach you can follow, which applies to many software appli... | 2,892 | [
{
"from": "human",
"value": "I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?\n"
},
{
"from": "gpt",
"value": "To clear the list of recent projects on the start page of an application (ass... |
I absolutely need to use an IoC container for decoupling dependencies in an ever increasingly complex system of enterprise services. The issue I am facing is one related to configuration (a.k.a. registration). We currently have 4 different environments -- development to production and in between. These environments ... | Using an IoC (Inversion of Control) container in a multi-environment setup can indeed help manage complexity while ensuring loose coupling between components. Given your requirements, there are a few strategies you can use to manage configurations effectively without getting overwhelmed by complexity, especially when u... | 1,576 | [
{
"from": "human",
"value": "I absolutely need to use an IoC container for decoupling dependencies in an ever increasingly complex system of enterprise services. The issue I am facing is one related to configuration (a.k.a. registration). We currently have 4 different environments -- development to produc... |
When Eclipse creates a new file (.c or .h file) in a C project the editor always auto creates a #define at the top of the file like this: If the file is named 'myCFile.c' there will be a #define at the start of the file like this
#ifndef MYCFILE_C_
#define MYCFILE_C_
I have seen other editors do this as well (Codewrig... | The pattern you are seeing with the `#ifndef`, `#define`, and `#endif` preprocessor directives is a common practice in C and C++ programming known as "include guards." However, in the context of `.c` and `.h` files, they serve slightly different purposes.
1. **Purpose of Include Guards**: The primary purpose of includ... | 2,814 | [
{
"from": "human",
"value": "When Eclipse creates a new file (.c or .h file) in a C project the editor always auto creates a #define at the top of the file like this: If the file is named 'myCFile.c' there will be a #define at the start of the file like this\n#ifndef MYCFILE_C_\n#define MYCFILE_C_\n\nI have... |
In the business I work for we are discussion methods to reduce the read load on our primary database.
One option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and write directly to the primary database. So.... | Implementing a one-way replication setup from a primary database to a slave (or read replica) database can provide significant benefits, but it also introduces several challenges. Here are some major pros and cons to consider:
### Pros:
1. **Reduced Load on Primary Database**:
- By offloading read queries to the s... | 2,420 | [
{
"from": "human",
"value": "In the business I work for we are discussion methods to reduce the read load on our primary database.\nOne option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and w... |
When you execute a SQL query, you have to clean your strings or users can execute malicious SQL on your website.
I usually just have a function escape_string(blah), which:
Replaces escapes (\) with double escapes (\\).
Replaces single quotes (') with an escaped single quote (\').
Is this adequate? Is there a hole in... | Using a simple `escape_string` function to sanitize user input can help against SQL injection attacks to some degree, but it is not considered a reliable or adequate solution. Relying solely on escaping strings can still leave you vulnerable, especially if different database systems have different escape rules, or if y... | 2,432 | [
{
"from": "human",
"value": "When you execute a SQL query, you have to clean your strings or users can execute malicious SQL on your website.\nI usually just have a function escape_string(blah), which:\n\nReplaces escapes (\\) with double escapes (\\\\).\nReplaces single quotes (') with an escaped single qu... |
What's the best way to delete all rows from a table in sql but to keep n number of rows on the top?
| To delete all rows from a table in SQL while keeping a specific number of rows at the top, you can use a combination of a Common Table Expression (CTE) or a subquery with a `DELETE` statement, depending on your SQL database (e.g., PostgreSQL, SQL Server, MySQL, etc.).
Assuming you want to keep the top `n` rows based ... | 3,511 | [
{
"from": "human",
"value": "What's the best way to delete all rows from a table in sql but to keep n number of rows on the top? \n"
},
{
"from": "gpt",
"value": "To delete all rows from a table in SQL while keeping a specific number of rows at the top, you can use a combination of a Common Tab... |
We have a PHP project that we would like to version control. Right now there are three of us working on a development version of the project which resides in an external folder to which all of our Eclipse IDEs are linked, and thus no version control.
What is the right way and the best way to version control this?
We ha... | To effectively version control your PHP project using SVN (Subversion), follow these steps to set up your environment properly and ensure that all team members can collaborate seamlessly. Here’s a structured plan to get your team started with SVN:
### Step 1: Organize Your Project Structure
1. **Create an SVN Reposit... | 1,643 | [
{
"from": "human",
"value": "We have a PHP project that we would like to version control. Right now there are three of us working on a development version of the project which resides in an external folder to which all of our Eclipse IDEs are linked, and thus no version control.\nWhat is the right way and t... |
I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system.
Some thoughts I've had were:
Roll my own serializer using DataOutputStream: This would give me the greatest control of what was in the file, but at the cost of microma... | You’re right to consider various approaches to persisting your Java objects, as each has its pros and cons. Here’s a breakdown of the methods you’ve mentioned, along with additional insights and alternative options:
### 1. Custom Serialization with DataOutputStream
**Pros:**
- Complete control over the format and stru... | 204 | [
{
"from": "human",
"value": "I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system.\nSome thoughts I've had were:\n\nRoll my own serializer using DataOutputStream: This would give me the greatest control of what... |
The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says:
The node to be removed is not a child of this node.
Does anyone know the proper way to do this?
public void DeleteProject (string projectName)
{
string ccConfigPath = ConfigurationManager.... | It looks like you were able to identify and fix the issue in your code related to removing a node from the `XmlDocument`. To summarize and clarify for others who may encounter a similar issue, here's a structured approach to properly remove a node from an `XmlDocument`:
### Problem Explanation
The error message you en... | 3,037 | [
{
"from": "human",
"value": "The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says:\nThe node to be removed is not a child of this node.\nDoes anyone know the proper way to do this?\npublic void DeleteProject (string projectName)\n{\n ... |
When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free sources for design templates. However, a problem with these designs is that they just cover a single page, and not many use cases. If you take a look at CSS Zen Gardens, they have 1 single HTML fil... | Yes, there are several projects and methodologies that align with your vision of using a standard HTML layout that can be styled with different CSS files to achieve various looks and use cases. Here are some notable approaches and frameworks that you might find helpful:
### 1. **HTML5 Boilerplate**
- **Description:** ... | 1,283 | [
{
"from": "human",
"value": "When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free sources for design templates. However, a problem with these designs is that they just cover a single page, and not many use cases. If you take a look at CSS... |
Does anyone here know of good batch file code indenters or beautifiers?
Specifically for PHP, JS and SGML-languages.
Preferably with options as to style.
| For batch file code formatting and beautification for languages like PHP, JavaScript, and SGML, there are several tools available. Below are some recommendations for each language along with any style options they may offer:
### PHP
1. **PHP Code Sniffer (PHPCS)**
- A tool that helps you detect violations of a defi... | 1,817 | [
{
"from": "human",
"value": "Does anyone here know of good batch file code indenters or beautifiers?\nSpecifically for PHP, JS and SGML-languages.\nPreferably with options as to style.\n"
},
{
"from": "gpt",
"value": "For batch file code formatting and beautification for languages like PHP, Java... |
I'm looking for a control that the Visual Studio "Toolbox" menu uses. It can be docked and can retract (pin).
Would you know where I can find a control or COM I could use which would look like this?
| Yes, it sounds like you're looking for a docking and retractable panel control similar to the one used in Visual Studio. These types of controls are commonly referred to as "dockable panels" or "toolbox-style panels." There are a few options you can consider depending on the technology stack you are using:
### 1. **Wi... | 3,333 | [
{
"from": "human",
"value": "I'm looking for a control that the Visual Studio \"Toolbox\" menu uses. It can be docked and can retract (pin).\nWould you know where I can find a control or COM I could use which would look like this?\n"
},
{
"from": "gpt",
"value": "Yes, it sounds like you're looki... |
I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane.
Home, End, Page Up, Page Down, Apple-arrow, Ctrl-arrow, alt-arrow etc. quite often do different things depending on the application.
Is there a way t... | Welcome to the world of Mac! Text editing behavior can indeed vary significantly between applications, leading to some frustration. While there's no built-in way to completely standardize keyboard shortcuts across all Mac applications, you can take several steps to achieve more consistent text editing behavior:
### 1.... | 3,130 | [
{
"from": "human",
"value": "I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane.\nHome, End, Page Up, Page Down, Apple-arrow, Ctrl-arrow, alt-arrow etc. quite often do different things depe... |
I have read a lot that LISP can redefine syntax on the fly, presumably with macros. I am curious how far does this actually go? Can you redefine the language structure so much that it borderline becomes a compiler for another language? For example, could you change the functional nature of LISP into a more object or... | LISP, particularly Common Lisp and other dialects, is known for its powerful macro system, which allows programmers to manipulate code as data and create new syntactic constructs. This capability can indeed be leveraged to change the language's syntax and semantics significantly. However, there are limitations and trad... | 1,111 | [
{
"from": "human",
"value": "I have read a lot that LISP can redefine syntax on the fly, presumably with macros. I am curious how far does this actually go? Can you redefine the language structure so much that it borderline becomes a compiler for another language? For example, could you change the functi... |
I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting th... | In XML, comments have specific rules about where they can be placed. According to the XML specification, a comment can be included in the content of an XML document, but it cannot be placed before the XML declaration.
The correct structure of an XML document is as follows:
1. The XML declaration (if present) must be ... | 5,180 | [
{
"from": "human",
"value": "I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it ge... |
My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is on the same LAN running on an OS X machine. I can log into the webby interfac... | It sounds like you've developed a creative workaround to access your FileMaker Pro database, and you've provided a great overview of the challenges you've faced. For others who might be facing similar issues, I'll summarize and expand on your solution with a more structured approach.
Here's a possible outline for you... | 1,194 | [
{
"from": "human",
"value": "My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is on the same LAN running on an OS X m... |
Is there a Windows equivalent of the Unix command, nice?
I'm specifically looking for something I can use at the command line, and not the "Set Priority" menu from the task manager.
My attempts at finding this on Google have been thwarted by those who can't come up with better adjectives.
| Yes, in Windows, you can change the priority of a process from the command line using the `wmic` command or by using PowerShell.
### Using `wmic`:
You can use the Windows Management Instrumentation Command-line (WMIC) tool to change the priority of a process. Here’s how you can do it:
1. Open Command Prompt with adm... | 4,969 | [
{
"from": "human",
"value": "Is there a Windows equivalent of the Unix command, nice?\nI'm specifically looking for something I can use at the command line, and not the \"Set Priority\" menu from the task manager.\nMy attempts at finding this on Google have been thwarted by those who can't come up with bett... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.