instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have a .net (3.5) WinForms application and want to display some html on one of the forms. Is there a control that I can use for this?
| In a .NET Framework 3.5 WinForms application, you can use the `WebBrowser` control to display HTML content. The `WebBrowser` control is a built-in control that allows you to embed a web browser in your Windows Forms application, and it can render HTML, display web pages, and handle various web functionalities.
Here's ... | 9,974 | [
{
"from": "human",
"value": "I have a .net (3.5) WinForms application and want to display some html on one of the forms. Is there a control that I can use for this?\n"
},
{
"from": "gpt",
"value": "In a .NET Framework 3.5 WinForms application, you can use the `WebBrowser` control to display HTML... |
I have jQuery but I'm not sure if it has any built-in sorting helpers. I could make a 2d array of each item's text, value, and selected properties, but I don't think that javascript's built in Array.sort() would work correctly.
| jQuery itself does not provide built-in sorting helpers, but you can effectively use JavaScript's native Array methods to sort your data, including multidimensional arrays. The `Array.sort()` method can indeed work for 2D arrays, but you'll need to provide a custom sorting function that specifies how to compare the ele... | 4,530 | [
{
"from": "human",
"value": "I have jQuery but I'm not sure if it has any built-in sorting helpers. I could make a 2d array of each item's text, value, and selected properties, but I don't think that javascript's built in Array.sort() would work correctly.\n"
},
{
"from": "gpt",
"value": "jQuery... |
Is there a way to draw a line along a curved path with a gradient that varies in a direction perpendicular to the direction of the line? I am using the GDI+ framework for my graphics.
| Yes, you can create a line along a curved path with a gradient that varies in a direction perpendicular to the line in GDI+. Here’s how you can achieve this:
1. **Create a Path for the Curved Line**: You will use `GraphicsPath` to define the path of the curve.
2. **Use a LinearGradientBrush**: To fill the path with a... | 1,943 | [
{
"from": "human",
"value": "Is there a way to draw a line along a curved path with a gradient that varies in a direction perpendicular to the direction of the line? I am using the GDI+ framework for my graphics.\n"
},
{
"from": "gpt",
"value": "Yes, you can create a line along a curved path wit... |
We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows.
Are there any good alternatives? I know about Visio and MS SQL Diagrams, but looking for other options.
| There are several alternatives to PowerDesigner that you can consider for database modeling, especially if your primary need is to create physical diagrams for MS SQL. Here are some options to explore:
1. **dbForge Studio for SQL Server**:
- A comprehensive IDE for SQL Server that includes a visual database designe... | 8,923 | [
{
"from": "human",
"value": "We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows.\nAre there any good alternatives? I know about Visio and MS SQL Di... |
I'm using the following JavaScript code:
<script language="JavaScript1.2" type="text/javascript">
function CreateBookmarkLink(title, url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( window.external ) {
window.external.AddFavorite( url, title); }
else if(window... | Creating bookmarks in browsers through JavaScript has become increasingly limited, and the ability to programmatically add bookmarks has been deprecated in modern web browsers, including Firefox and others.
However, the issue you are facing with bookmarks opening in the sidebar (or not behaving the way you'd like) is ... | 8,361 | [
{
"from": "human",
"value": "I'm using the following JavaScript code:\n<script language=\"JavaScript1.2\" type=\"text/javascript\">\n function CreateBookmarkLink(title, url) {\n if (window.sidebar) {\n window.sidebar.addPanel(title, url,\"\");\n } else if( window.external ) {\n window.ex... |
What are good methodologies for creating sprocs that reduce the pain of debugging? And what tools are out there for debugging stored procedures?
Perhaps most importantly, what are indications to look out for that errors are happening in a sproc and not in the code? I hope I'm not all over the board too terribly bad her... | Creating stored procedures (sprocs) that are easy to debug involves following best practices in both their design and the tools you use. Here are some methodologies, tools, and indications to help you:
### Methodologies for Creating Debug-Friendly Stored Procedures:
1. **Clear Structure and Documentation**:
- Writ... | 6,813 | [
{
"from": "human",
"value": "What are good methodologies for creating sprocs that reduce the pain of debugging? And what tools are out there for debugging stored procedures?\nPerhaps most importantly, what are indications to look out for that errors are happening in a sproc and not in the code? I hope I'm n... |
let's say we have a c++ class like:
class MyClass
{
void processArray( <an array of 255 integers> )
{
int i ;
for (i=0;i<255;i++)
{
// do something with values in the array
}
}
}
and one instance of the class like:
MyClass myInstance ;
and 2 threads which call the processArray m... | In your example, each thread calling the `processArray` method of the `MyClass` instance will have its own separate instance of the local variable `i` within the method. This means that the `i` variable is stored on the stack for each thread, and thus they do not interfere with each other.
Here's how it works:
1. Whe... | 11,872 | [
{
"from": "human",
"value": "let's say we have a c++ class like:\nclass MyClass\n{\n void processArray( <an array of 255 integers> )\n {\n int i ;\n for (i=0;i<255;i++)\n {\n // do something with values in the array\n }\n }\n}\n\nand one instance of the class like: \nMyClass my... |
So I have a backlog of features and we are about to get started on a sizable project. I am working on defining the structure of our sprints and I'm interested in the communities feedback.
What I'm thinking is:
One day sprint planning
Fill the backlog and figure out what each dev will go after this sprint
Three wee... | It sounds like you're off to a solid start in defining your sprint structure! Here are some additional considerations and suggestions that might help refine your agile process and address common challenges:
### Additional Suggestions:
1. **Backlog Grooming/Refinement Sessions**:
- **Frequency**: Schedule regular (... | 4,666 | [
{
"from": "human",
"value": "So I have a backlog of features and we are about to get started on a sizable project. I am working on defining the structure of our sprints and I'm interested in the communities feedback.\nWhat I'm thinking is:\n\nOne day sprint planning\n\n\nFill the backlog and figure out wha... |
I have a need to close a parent form from within child form from a Windows application. What would be the best way to do this?
| To close a parent form from within a child form in a Windows Forms application, there are several approaches you can take. Here are a couple of the most common methods:
### 1. Using Events
You can use events to notify the parent form that the child form needs to be closed. Here’s how to do it:
#### Step 1: Define an... | 5,133 | [
{
"from": "human",
"value": "I have a need to close a parent form from within child form from a Windows application. What would be the best way to do this?\n"
},
{
"from": "gpt",
"value": "To close a parent form from within a child form in a Windows Forms application, there are several approache... |
We are starting a new SOA project with a lot of shared .net assemblies. The code for these assemblies will be stored in SVN.
In development phase, we would like to be able to code these assemblies as an entire solution with as little SVN 'friction' as possible.
When the project enters more of a maintenance mode, the... | When organizing .NET assemblies in SVN for your SOA project, it’s crucial to strike a balance between ease of development and maintainability. Here are some considerations to help you structure your project effectively:
### Recommended SVN Structure
1. **Trunk/Branches/Tags Structure:**
- Create a top-level direct... | 7,464 | [
{
"from": "human",
"value": "We are starting a new SOA project with a lot of shared .net assemblies. The code for these assemblies will be stored in SVN.\nIn development phase, we would like to be able to code these assemblies as an entire solution with as little SVN 'friction' as possible. \nWhen the pro... |
I'll soon be posting an article on my blog, but I'd like to verify I haven't missed anything first.
Find an example I've missed, and I'll cite you on my post.
The topic is failed Singleton implementations: In what cases can you accidentally get multiple instances of a singleton?
So far, I've come up with:
Race Conditi... | You’re on the right track with your points about failed Singleton implementations. Here are a couple more examples that could lead to multiple instances of a singleton:
1. **Reflection**: In some languages, like Java, using reflection to instantiate a singleton can bypass the private constructor. If someone uses refle... | 11,745 | [
{
"from": "human",
"value": "I'll soon be posting an article on my blog, but I'd like to verify I haven't missed anything first.\nFind an example I've missed, and I'll cite you on my post.\nThe topic is failed Singleton implementations: In what cases can you accidentally get multiple instances of a singleto... |
I have a procedure with a lot of
i := i +1;
in it and I think
inc(i);
looks a lot better. Is there a performance difference or does the function call just get inlined by the compiler? I know this probably doesn't matter at all to my app, I'm just curious.
EDIT: I did some gauging of the performance and found the... | In many programming languages, including those that support procedural and imperative paradigms, using `inc(i)` instead of `i := i + 1` can lead to cleaner and more readable code. However, from a performance perspective, the difference is typically negligible, particularly in modern compilers and runtimes.
Here are a... | 10,478 | [
{
"from": "human",
"value": "I have a procedure with a lot of \ni := i +1;\n\nin it and I think \n inc(i);\n\nlooks a lot better. Is there a performance difference or does the function call just get inlined by the compiler? I know this probably doesn't matter at all to my app, I'm just curious.\nEDIT: I d... |
Does full trust mean the same as Run As Administrator? I have read things stating that "for this to work, the application must be a full-trust application." Is that the same as you must have administrator privileges to run the application? If not, what's the difference? How can you tell if an app is "full-trust"?
I... | The concepts of "full trust," "Run As Administrator," and "trusted locations" relate to security and permissions in .NET applications, and they have distinct meanings:
### Full Trust vs. Run As Administrator
1. **Full Trust**:
- In the context of .NET applications, "full trust" refers to the level of permission gr... | 10,023 | [
{
"from": "human",
"value": "Does full trust mean the same as Run As Administrator? I have read things stating that \"for this to work, the application must be a full-trust application.\" Is that the same as you must have administrator privileges to run the application? If not, what's the difference? Ho... |
In a database-centric application that is designed for multiple clients, I've always thought it was "better" to use a single database for ALL clients - associating records with proper indexes and keys. In listening to the Stack Overflow podcast, I heard Joel mention that FogBugz uses one database per client (so if the... | The choice between a single database for all clients and multiple databases (one per client) is a common architectural decision in application design, especially for multi-tenant applications. Each approach has its advantages and disadvantages, and the right choice often depends on the specific requirements of your app... | 6,516 | [
{
"from": "human",
"value": "In a database-centric application that is designed for multiple clients, I've always thought it was \"better\" to use a single database for ALL clients - associating records with proper indexes and keys. In listening to the Stack Overflow podcast, I heard Joel mention that FogB... |
I'm writing some JavaScript code that needs to fire the click event for a link. In Internet Explorer I can do this
var button = document.getElementById('myButton');
button.click();
But this doesn't work in Firefox, and I assume any other browser. In Firefox, I've done this
var button = document.getElementById('myB... | To programmatically trigger a click event for a link in a way that works across various browsers, you can use the `dispatchEvent` method. This method allows you to create a new `MouseEvent` and dispatch it on the desired element. Here's how you can do it:
```javascript
var button = document.getElementById('myButton');... | 11,754 | [
{
"from": "human",
"value": "I'm writing some JavaScript code that needs to fire the click event for a link. In Internet Explorer I can do this \nvar button = document.getElementById('myButton');\nbutton.click();\n\nBut this doesn't work in Firefox, and I assume any other browser. In Firefox, I've done thi... |
Here's a problem I've been trying to solve at work. I'm not a database expert, so that perhaps this is a bit sophomoric. All apologies.
I have a given database D, which has been duplicated on another machine (in a perhaps dubious manner), resulting in database D'. It is my task to check that database D and D' are in... | To compare two identical databases (D and D') and check for differences across all tables without explicitly enumerating columns, you can create a stored procedure that dynamically generates and executes the necessary SQL queries. Below are the steps you can follow to implement this solution on SQL Server (assuming tha... | 8,467 | [
{
"from": "human",
"value": "Here's a problem I've been trying to solve at work. I'm not a database expert, so that perhaps this is a bit sophomoric. All apologies.\nI have a given database D, which has been duplicated on another machine (in a perhaps dubious manner), resulting in database D'. It is my t... |
In an Adobe flex applicaiton using BlazeDS AMF remoting, what is the best stategy for keeping the local data fresh and in synch with the backend database?
In a typical web application, web pages refresh the view each time they are loaded, so the data in the view is never too old.
In a Flex application, there is the ... | To keep local data fresh and in sync with the backend database in an Adobe Flex application using BlazeDS AMF remoting, option **c**—**something else**—is the best approach. Here are some strategies you can implement to strike a balance between performance and data freshness:
### 1. **Polling**
Implement a polling mec... | 8,555 | [
{
"from": "human",
"value": "In an Adobe flex applicaiton using BlazeDS AMF remoting, what is the best stategy for keeping the local data fresh and in synch with the backend database? \nIn a typical web application, web pages refresh the view each time they are loaded, so the data in the view is never too ... |
Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system.
Pre-SP1, this was working fine (and still works fine on our developer ... | It sounds like you are running into a complex issue with the Visual Studio 2008 SP1 DLLs and the way side-by-side assemblies are configured. Here are several steps and considerations that might help you resolve this issue:
### 1. **Verify Manifest Files:**
Ensure that the manifest files you are deploying with your app... | 8,703 | [
{
"from": "human",
"value": "Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system.\nPre-SP1, this was working fi... |
Visual Studio randomly crashes when adding/removing references and projects.
Any thoughts why? Will installing Sp1 help?
EDIT: I do not work with any addons except SourceSafe. I do most of my development in connected mode.
Developing using:
Visual Studio 2008
WinXp Terminal Service -> Win2k3 Sp2 (64bit)
VS... | Crashes in Visual Studio can be frustrating and are often caused by a variety of factors. Here are some potential causes and solutions to help address the crashing issue when adding or removing references and projects:
### Potential Causes
1. **Corrupted Visual Studio Installation**: Sometimes, an incomplete or corru... | 9,880 | [
{
"from": "human",
"value": "Visual Studio randomly crashes when adding/removing references and projects.\nAny thoughts why? Will installing Sp1 help?\nEDIT: I do not work with any addons except SourceSafe. I do most of my development in connected mode.\nDeveloping using:\n Visual Studio 2008 \n WinXp... |
I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it creating these lock files?
| When working with Paradox databases in Delphi (including DBIV), the creation of lock files like `Paradox.lck` and `Pdoxusrs.lck` is standard behavior. These lock files are used for record locking and concurrency control, ensuring that multiple users can access the database safely without causing data corruption.
### R... | 9,977 | [
{
"from": "human",
"value": "I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it creating these lock files?\n"
},
... |
For a long time i have tried to work out the best way to access certain site files which i don't wish to be apart of a project or to ease integration with multiple developers (and talents, e.g. designers) on a single project.
A lot of sites i have created have had folders with large amounts of images and other binary f... | Managing binary files and large assets in a web project can indeed be challenging, especially when considering version control, collaboration, and deployment processes. Here are several strategies and thoughts to address your concerns:
### 1. **External Asset Storage**
- **Cloud Storage Solutions**: Consider using ... | 8,064 | [
{
"from": "human",
"value": "For a long time i have tried to work out the best way to access certain site files which i don't wish to be apart of a project or to ease integration with multiple developers (and talents, e.g. designers) on a single project.\nA lot of sites i have created have had folders with ... |
Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve the code but do not fix a bug or add a feat... | In an environment where every code change must be associated with a bug report or feature request, and where those reports are visible to managers and customers, it’s important to handle code refactorings carefully to maintain transparency and uphold coding standards. Here are some strategies to approach this:
1. **Cr... | 9,413 | [
{
"from": "human",
"value": "Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve th... |
How compatible is code written under Solaris with Open Solaris ? I would be interested specifically in some kernel modules .
| Code compatibility between Solaris and OpenSolaris can vary depending on several factors, especially when dealing with kernel modules. Here are some key points to consider regarding compatibility:
1. **Common Base**: OpenSolaris was derived from Solaris, which means that they share a significant amount of code and con... | 10,082 | [
{
"from": "human",
"value": "How compatible is code written under Solaris with Open Solaris ? I would be interested specifically in some kernel modules .\n"
},
{
"from": "gpt",
"value": "Code compatibility between Solaris and OpenSolaris can vary depending on several factors, especially when dea... |
A lot of contact management programs do this - you type in a name (e.g., "John W. Smith") and it automatically breaks it up internally into:
First name: John
Middle name: W.
Last name: Smith
Likewise, it figures out things like "Mrs. Jane W. Smith" and "Dr. John Doe, Jr." correctly as well (assuming you allow for field... | Parsing names into distinct components such as first name, middle name, last name, prefix, and suffix is indeed a common challenge in software development, particularly in contact management systems. While there's no one-size-fits-all solution due to the cultural variations and complexities of names around the world, y... | 8,066 | [
{
"from": "human",
"value": "A lot of contact management programs do this - you type in a name (e.g., \"John W. Smith\") and it automatically breaks it up internally into:\nFirst name: John\nMiddle name: W.\nLast name: Smith\nLikewise, it figures out things like \"Mrs. Jane W. Smith\" and \"Dr. John Doe, Jr... |
I need to query existing rules, as well as being able to easily add and delete rules. I haven't found any API's for doing this. Is there something that I'm missing?
The closest I've come to a solution is using iptables-save | iptables-xml for querying and manually calling the iptables command itself to add/delete rules... | Managing `iptables` rules through a high-level API can indeed be challenging, as the native `iptables` command-line tool does not have a built-in API. However, there are several approaches you can consider for querying, adding, and deleting rules without dropping packets and possibly with the use of an API.
### 1. **U... | 7,769 | [
{
"from": "human",
"value": "I need to query existing rules, as well as being able to easily add and delete rules. I haven't found any API's for doing this. Is there something that I'm missing?\nThe closest I've come to a solution is using iptables-save | iptables-xml for querying and manually calling the i... |
Has anybody any useful links that can be used to consume a web service using flex?
The easier the solution the better
Thanks
| Certainly! Consuming a web service in Adobe Flex can be straightforward, especially if you use the built-in HTTPService or URLLoader classes. Here are some useful links and snippets to help you get started:
### Useful Links:
1. **Adobe Documentation on HTTPService**:
- [HTTPService Documentation](https://help.adobe... | 8,990 | [
{
"from": "human",
"value": "Has anybody any useful links that can be used to consume a web service using flex?\nThe easier the solution the better\nThanks\n"
},
{
"from": "gpt",
"value": "Certainly! Consuming a web service in Adobe Flex can be straightforward, especially if you use the built-in... |
I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going quickly. Is there any IDE even remotely similar to Visual ... | If you're looking to get started with Cocoa development for macOS and want a setup that resembles Visual Studio, you have a few options, but Xcode is indeed the primary IDE for macOS development, and most resources are geared towards it. Here's a breakdown of your options and some suggestions to make your experience sm... | 4,120 | [
{
"from": "human",
"value": "I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going quickly. Is there... |
How can I visually customize autocomplete fields in Wicket (change colors, fonts, etc.)?
| Customizing the appearance of autocomplete fields in Apache Wicket can be achieved through a combination of CSS for styling and possibly JavaScript for functionality. Below are steps on how to visually customize these fields, including changing colors, fonts, and more.
### 1. Define Your Autocomplete Field
Start by c... | 6,434 | [
{
"from": "human",
"value": "How can I visually customize autocomplete fields in Wicket (change colors, fonts, etc.)?\n"
},
{
"from": "gpt",
"value": "Customizing the appearance of autocomplete fields in Apache Wicket can be achieved through a combination of CSS for styling and possibly JavaScri... |
I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation.
Is there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself?
| Yes, there are several open-source implementations of Radix Trees (also known as Patricia Tries or MTRIE) available that you can consider for your routing implementation. Here are a few options you might explore:
1. **libtrie**: This is a library that implements various trie data structures, including Radix Trees. It ... | 11,331 | [
{
"from": "human",
"value": "I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. \nIs there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself?\n"
},
{
"from": "gpt",
"valu... |
What's the simplest way to connect and query a database for a set of records in C#?
| The simplest way to connect to a database and query for records in C# is to use ADO.NET or Entity Framework. Below, I will demonstrate both methods.
### Method 1: Using ADO.NET
Here’s how you can connect to a SQL Server database and execute a query using ADO.NET:
1. **Add a connection string** to your `app.config` o... | 3,168 | [
{
"from": "human",
"value": "What's the simplest way to connect and query a database for a set of records in C#?\n"
},
{
"from": "gpt",
"value": "The simplest way to connect to a database and query for records in C# is to use ADO.NET or Entity Framework. Below, I will demonstrate both methods.\n... |
I have a string which is like this:
this is "a test"
I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:
['this', 'is', 'a test']
PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application... | You can achieve the desired behavior by using regular expressions. Specifically, you can use the `re` module in Python to split the string while ignoring spaces that are enclosed within quotes. Here’s how you can do it:
```python
import re
def split_string(input_string):
# This regex pattern matches either quoted... | 10,033 | [
{
"from": "human",
"value": "I have a string which is like this:\nthis is \"a test\"\n\nI'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:\n['this', 'is', 'a test']\n\nPS. I know you are going to ask \"what happens if there are... |
I'm looking for a simple solution for a yes/no dialog to use in a Java ME midlet. I'd like to use it like this but other ways are okey.
if (YesNoDialog.ask("Are you sure?") == true) {
// yes was chosen
} else {
// no was chosen
}
| Creating a simple yes/no dialog in a Java ME midlet can be accomplished by using the `Alert` class to show an alert message along with two options for the user to select. Below is a simple implementation of a `YesNoDialog` class that matches your requirements.
### YesNoDialog Class Implementation
```java
import javax... | 5,820 | [
{
"from": "human",
"value": "I'm looking for a simple solution for a yes/no dialog to use in a Java ME midlet. I'd like to use it like this but other ways are okey.\nif (YesNoDialog.ask(\"Are you sure?\") == true) {\n // yes was chosen\n} else {\n // no was chosen\n}\n\n"
},
{
"from": "gpt",
"... |
I need to reverse engineer a Microsoft SQL Server 2008 in order to create a Microsoft Visio 2007 Database Model Diagram. So I choose "Reverse Engineer" from the Database menu to connect to the DB.
I configured the Microsoft SQL Server Visio driver so that is uses SQL Server Native Client 10.0 as the ODBC driver. Afterw... | The error you're encountering when trying to reverse engineer a Microsoft SQL Server 2008 database in Visio 2007 indicates a compatibility issue between the ODBC driver you are using and the version of SQL Server you're connecting to. Here are some steps and considerations to help you resolve this issue:
### Steps to ... | 9,393 | [
{
"from": "human",
"value": "I need to reverse engineer a Microsoft SQL Server 2008 in order to create a Microsoft Visio 2007 Database Model Diagram. So I choose \"Reverse Engineer\" from the Database menu to connect to the DB.\nI configured the Microsoft SQL Server Visio driver so that is uses SQL Server N... |
I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main source of discomfort is that I don't have Slime (ye... | While there isn't a direct equivalent of SLIME for Scheme, there are several Emacs modes and packages that provide similar features for Scheme development. Here are some of the most notable ones that cater to your requirements:
### 1. **Geiser**
- **Overview**: Geiser is a popular Emacs extension for interacting with ... | 8,739 | [
{
"from": "human",
"value": "I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main source of ... |
I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so all the original numbers can all be multiplied out to the same scale and be processed by a sealed system that will only deal wit... | What you're looking for is a way to find the smallest integer that will allow you to multiply all the numbers in your array so that they become whole numbers (integers). This is fundamentally a problem of finding a common multiplier based on the decimal fractions represented by the numbers in your array.
### Mathemati... | 5,680 | [
{
"from": "human",
"value": "I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so all the original numbers can all be multiplied out to the same scale and be processed b... |
I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself.
I'd really love for that form to be transparent and to have the transparency be user-configurable.
Is there any easy way to achieve this?
| Certainly! Creating a transparent form in a desktop application can vary depending on the framework and programming language you are using. Below are methods to achieve transparency for a form in a couple of popular programming languages: C# (for Windows Forms) and JavaScript (for Electron apps).
### C# WinForms Exam... | 2,333 | [
{
"from": "human",
"value": "I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself.\nI'd really love for that form to be transparent and to have the transparency be user-configurable.\nIs there any easy way to achieve this?\n"
},
{
"from": "gp... |
Is anyone using Virtual PC to maintain multiple large .NET 1.1 and 2.0 websites? Are there any lessons learned? I used Virtual PC recently with a small WinForms app and it worked great, but then everything works great with WinForms. ASP.NET development hogs way more resources, requires IIS to be running, requires a ... | Using Virtual PC for maintaining multiple large .NET 1.1 and 2.0 websites can definitely work, but there are several factors to consider, especially given the resource demands of ASP.NET applications, the use of IIS, and potential database interactions like with Oracle. Here are some lessons learned and considerations:... | 4,165 | [
{
"from": "human",
"value": "Is anyone using Virtual PC to maintain multiple large .NET 1.1 and 2.0 websites? Are there any lessons learned? I used Virtual PC recently with a small WinForms app and it worked great, but then everything works great with WinForms. ASP.NET development hogs way more resources... |
I have a user control which is loaded in the page dynamically using the following code in Init of the Page.
Dim oCtl As Object
oCtl = LoadControl("~/Controls/UserControl1.ascx")
oCtl.Id = "UserControl11"
PlaceHolder1.Controls.Clear()
PlaceHolder1.Controls.Add(oCtl)
The user control also contains a button and I am una... | When dynamically loading a user control in ASP.NET, you need to make sure that the event handlers for the controls within the user control are wired up at the correct time in the page lifecycle. If you're dynamically loading controls in the `Init` method, you might miss the event wiring if the control's lifecycle isn't... | 9,373 | [
{
"from": "human",
"value": "I have a user control which is loaded in the page dynamically using the following code in Init of the Page.\nDim oCtl As Object\noCtl = LoadControl(\"~/Controls/UserControl1.ascx\")\n\noCtl.Id = \"UserControl11\"\nPlaceHolder1.Controls.Clear()\nPlaceHolder1.Controls.Add(oCtl)\n\... |
Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?
For instance, I currently do something like this depending on the circumstances:
int i = 0;
foreach (Object o in collection)... | In C#, there isn't a built-in language construct that directly gives you the current iteration index within a `foreach` loop. However, you can use a couple of common techniques to achieve similar results without manually maintaining a counter variable, and depending on your context, these can be quite clean:
### 1. Us... | 7,917 | [
{
"from": "human",
"value": "Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?\nFor instance, I currently do something like this depending on the circumstances:\n... |
I create a GUID (as a string) and get the hash of it. Can I consider this hash to be unique?
| When you create a GUID (Globally Unique Identifier) and then hash it, you can generally expect that the hash will be unique, but there are important considerations:
1. **GUID Uniqueness**: GUIDs are designed to be unique across space and time. The chance of two GUIDs being the same is exceedingly low, given their stru... | 11,694 | [
{
"from": "human",
"value": "I create a GUID (as a string) and get the hash of it. Can I consider this hash to be unique?\n"
},
{
"from": "gpt",
"value": "When you create a GUID (Globally Unique Identifier) and then hash it, you can generally expect that the hash will be unique, but there are im... |
The .NET System.Security.Cryptography namespace has a rather bewildering collection of algorithms that I could use for encryption of credit card details. Which is the best?
It clearly needs to be secure for a relatively short string.
EDIT: I'm in the UK, where I understand we're OK storing encrypted credit card detail... | When it comes to encrypting sensitive data like credit card details, choosing the right encryption algorithm is crucial for ensuring security. The .NET `System.Security.Cryptography` namespace offers several strong algorithms that you can use for this purpose. Here are a few considerations to keep in mind when choosing... | 6,165 | [
{
"from": "human",
"value": "The .NET System.Security.Cryptography namespace has a rather bewildering collection of algorithms that I could use for encryption of credit card details. Which is the best?\nIt clearly needs to be secure for a relatively short string. \nEDIT: I'm in the UK, where I understand we... |
I'm trying to use JVLC but I can't seem to get it work. I've downloaded the jar, I installed VLC and passed the -D argument to the JVM telling it where VLC is installed. I also tried:
NativeLibrary.addSearchPath("libvlc", "C:\\Program Files\\VideoLAN\\VLC");
with no luck. I always get:
Exception in thread "main"
ja... | When working with JVLC (Java bindings for VLC), encountering a `java.lang.UnsatisfiedLinkError` usually indicates an issue with the native library (libvlc) not being found or loaded properly. Here are some steps and tips to help you troubleshoot the problem:
1. **Verify Installation**: Ensure that VLC is installed cor... | 10,655 | [
{
"from": "human",
"value": "I'm trying to use JVLC but I can't seem to get it work. I've downloaded the jar, I installed VLC and passed the -D argument to the JVM telling it where VLC is installed. I also tried:\nNativeLibrary.addSearchPath(\"libvlc\", \"C:\\\\Program Files\\\\VideoLAN\\\\VLC\");\n\nwith n... |
I am wondering if anyone is already using Entity Framework with an Oracle database in a production environment? There seems to be no support for EF in ODP.Net and only 3rd party data providers (OraDirect) seem to be available to connect with Oracle. Someone mentioned asample data provider available on Codeplex but it i... | Yes, there are indeed ways to use Entity Framework with Oracle databases in production environments, even though the support can be a bit more limited compared to SQL Server. Here are some of the common approaches and providers that are used:
1. **Oracle's ODP.NET Managed Driver**: Oracle does provide a managed driver... | 9,962 | [
{
"from": "human",
"value": "I am wondering if anyone is already using Entity Framework with an Oracle database in a production environment? There seems to be no support for EF in ODP.Net and only 3rd party data providers (OraDirect) seem to be available to connect with Oracle. Someone mentioned asample dat... |
I know how to create a SEL at compile time using @selector(MyMethodName:) but what I want to do is create a selector dynamically from an NSString. Is this even possible?
What I can do:
SEL selector = @selector(doWork:);
[myobj respondsToSelector:selector];
What I want to do: (pseudo code, this obviously doesn't work)
... | Yes, you can create a `SEL` from a string at runtime in Objective-C using the `NSSelectorFromString` function. This allows you to convert an `NSString` representing the name of a method to a `SEL`.
Here's how you can do it:
```objc
NSString *methodName = @"doWork:"; // Ensure that the method name matches the exact se... | 11,145 | [
{
"from": "human",
"value": "I know how to create a SEL at compile time using @selector(MyMethodName:) but what I want to do is create a selector dynamically from an NSString. Is this even possible?\nWhat I can do:\nSEL selector = @selector(doWork:);\n[myobj respondsToSelector:selector];\n\nWhat I want to d... |
I have to setup team foundation server for a company, something that I don't have any experience in.
The company will have about 5 or so developers that will be using it.
Is this a big task or something that is fairly easy to do (with instructions)?
Any helpful tutorials that you can recommend?
Any recommendations on s... | Setting up Team Foundation Server (TFS), now known as Azure DevOps Server, can be a manageable task, especially for a small team of around 5 developers. While the setup may seem daunting at first, with proper documentation and planning, it can be accomplished smoothly.
### Task Complexity:
- **Initial Setup**: If you'... | 8,615 | [
{
"from": "human",
"value": "I have to setup team foundation server for a company, something that I don't have any experience in.\nThe company will have about 5 or so developers that will be using it.\nIs this a big task or something that is fairly easy to do (with instructions)?\nAny helpful tutorials that... |
I have an old C library with a function that takes a void**:
oldFunction(void** pStuff);
I'm trying to call this function from managed C++ (m_pStuff is a member of the parent ref class of type void*):
oldFunction( static_cast<sqlite3**>( &m_pStuff ) );
This gives me the following error from Visual Studio:
error C24... | When using managed C++ (C++/CLI), it can be tricky to work with native pointers and manage the differences between managed and unmanaged memory. Your situation involves passing a `void**` to a native function from managed code, and you're encountering a type conversion issue.
The error you're seeing is due to the fact... | 9,437 | [
{
"from": "human",
"value": "I have an old C library with a function that takes a void**:\noldFunction(void** pStuff);\n\nI'm trying to call this function from managed C++ (m_pStuff is a member of the parent ref class of type void*):\noldFunction( static_cast<sqlite3**>( &m_pStuff ) );\n\nThis gives me the... |
That's the question. Give only one reason you think why have OODB failed or why many systems nowadays still use relational databases.
| One key reason OODBs (Object-Oriented Databases) have faced challenges is their complexity in integration with existing systems and workflows, as many developers are already familiar with relational databases and their established standards, making the transition to OODBs less appealing. | 14,287 | [
{
"from": "human",
"value": "That's the question. Give only one reason you think why have OODB failed or why many systems nowadays still use relational databases.\n"
},
{
"from": "gpt",
"value": "One key reason OODBs (Object-Oriented Databases) have faced challenges is their complexity in integr... |
Could you recommend me a way to place a coundown timer on ASP.NET page?
Now I use this code:
Default.aspx
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server">60</asp:Label>
<asp:Tim... | Yes, you can implement a countdown timer using pure client-side JavaScript without relying on server-side processing like the `asp:Timer` control you are currently using. This will reduce the amount of server traffic since it doesn't require round trips to the server for every tick of the timer.
Here’s how you can do ... | 10,390 | [
{
"from": "human",
"value": "Could you recommend me a way to place a coundown timer on ASP.NET page?\nNow I use this code:\nDefault.aspx\n<asp:ScriptManager ID=\"ScriptManager1\" runat=\"server\">\n</asp:ScriptManager>\n<asp:UpdatePanel ID=\"UpdatePanel1\" runat=\"server\">\n<ContentTemplate>\n <asp:Labe... |
Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!).
I currently have to track code back through ancestors and compare against the filelog, and there just has to be an easier way -- maybe a F/OSS utility?
| In Perforce, the equivalent command to SVN's `blame` is indeed `p4 annotate`. However, as you pointed out, `p4 annotate` typically displays changelist numbers rather than usernames directly, which can make it difficult to trace back who made specific changes without additional commands.
To work around this limitation,... | 7,566 | [
{
"from": "human",
"value": "Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!).\nI currently have to track code back through ancestors and compare against the filelog, and there just has to be a... |
I'm trying to do this
SELECT `Name`,`Value` FROM `Constants`
WHERE `Name` NOT IN ('Do not get this one'|'or this one');
But it doesn't seem to work.
How do I get all the values, except for a select few, without doing this:
SELECT `Name`,`Value` FROM `Constants`
WHERE `Name` != 'Do not get this one'
AND `Name` != 'o... | Your initial query has a syntax error because the list of values in the `NOT IN` clause is incorrectly formatted. The values should be separated by commas, not by the pipe (`|`) symbol. Here's the corrected version of your query:
```sql
SELECT `Name`, `Value` FROM `Constants`
WHERE `Name` NOT IN ('Do not get this one... | 13,170 | [
{
"from": "human",
"value": "I'm trying to do this\nSELECT `Name`,`Value` FROM `Constants` \nWHERE `Name` NOT IN ('Do not get this one'|'or this one');\n\nBut it doesn't seem to work.\nHow do I get all the values, except for a select few, without doing this:\nSELECT `Name`,`Value` FROM `Constants` \nWHERE `... |
I just want an ASP.NET DropDownList with no selected item. Setting SelectedIndex to -1 is of no avail, so far. I am using Framework 3.5 with AJAX, i.e. this DropDownList is within an UpdatePanel.
Here is what I am doing:
protected void Page_Load (object sender, EventArgs e)
{
this.myDropDownList.Selecte... | In ASP.NET Web Forms, the behavior you're experiencing with the `DropDownList` control is indeed expected. The `SelectedIndex` will default to the first item in the list when you add items to the `DropDownList`. Unfortunately, there is no direct way to set the `SelectedIndex` to -1 in the `DropDownList`, as this will a... | 6,058 | [
{
"from": "human",
"value": "I just want an ASP.NET DropDownList with no selected item. Setting SelectedIndex to -1 is of no avail, so far. I am using Framework 3.5 with AJAX, i.e. this DropDownList is within an UpdatePanel.\nHere is what I am doing:\n protected void Page_Load (object sender, EventArgs e... |
It's really annoying that visual studio hides typos in aspx pages (not the code behind).
If the compiler would compile them, I would get a compile error.
| I understand how frustrating it can be when you don't receive immediate feedback on typos in ASPX pages. In ASP.NET Web Forms, the ASPX markup is processed and transformed into a class behind the scenes, and because of this, any errors in the markup typically won't be caught until runtime, which can lead to some confus... | 8,947 | [
{
"from": "human",
"value": "It's really annoying that visual studio hides typos in aspx pages (not the code behind).\nIf the compiler would compile them, I would get a compile error.\n"
},
{
"from": "gpt",
"value": "I understand how frustrating it can be when you don't receive immediate feedbac... |
How is it possible in Eclipse JDT to convert a multiline selection to String. Like the following
From:
xxxx
yyyy
zzz
To:
"xxxx " +
"yyyy " +
"zzz"
I tried the following template
"${line_selection}${cursor}"+
but that way I only get the whole block surrounded not each line separately. How can I achieve a multiline p... | To achieve a transformation of a multiline selection in Eclipse JDT into a formatted string (with each line quoted and concatenated), you can use the following steps to create a custom template or utilize some existing functionalities:
### Step 1: Use a Template in Eclipse
1. **Create a new template**:
- Go to `Wi... | 9,672 | [
{
"from": "human",
"value": "How is it possible in Eclipse JDT to convert a multiline selection to String. Like the following\nFrom:\nxxxx\nyyyy\nzzz\n\nTo:\n\"xxxx \" +\n\"yyyy \" +\n\"zzz\"\n\nI tried the following template \n\"${line_selection}${cursor}\"+\n\nbut that way I only get the whole block surro... |
Given a path such as "mydir/myfile.txt", how do I find the file's absolute path in Python? E.g. on Windows, I might end up with:
"C:/example/cwd/mydir/myfile.txt"
| To find the absolute path of a file in Python, you can use the `os` module which provides a method called `os.path.abspath()`. This function takes a relative path and returns its absolute path. Here's how you can do it:
```python
import os
# Relative path to the file
relative_path = "mydir/myfile.txt"
# Get the abso... | 11,989 | [
{
"from": "human",
"value": "Given a path such as \"mydir/myfile.txt\", how do I find the file's absolute path in Python? E.g. on Windows, I might end up with:\n\"C:/example/cwd/mydir/myfile.txt\"\n\n"
},
{
"from": "gpt",
"value": "To find the absolute path of a file in Python, you can use the `... |
I have a need to manually setup the registry settings for an entry in Window's Add/Remove Programs (for XP and Vista). Everything works except for the displayed size.
According to this 2004 post by Raymond Chen it should be possible by setting the EstimatedSize registry value but it doesn't work. This more recent MSD... | Modifying the registry to manually set the size displayed in the Add/Remove Programs for an application in Windows XP or Vista can be quite challenging. As you mentioned, the `EstimatedSize` value is typically determined by the Windows Installer, and this behavior can complicate manual setups.
If you are trying to set... | 9,742 | [
{
"from": "human",
"value": "I have a need to manually setup the registry settings for an entry in Window's Add/Remove Programs (for XP and Vista). Everything works except for the displayed size.\nAccording to this 2004 post by Raymond Chen it should be possible by setting the EstimatedSize registry value ... |
I'm looking into sending regular automated text-messages to a list of subscribed users. Having played with Windows Mobile devices, I could easily implement this using the compact .Net framework + a device hooked up to usb and send the messages through this. I would like to explore other solutions like having a server o... | Setting up an automated text messaging system using a server can be a robust solution that eliminates the need for physical devices. Here are some steps and considerations to help you implement this solution:
### 1. **Choose a Messaging API**
Using a third-party API to send text messages is one of the easiest ways to... | 5,530 | [
{
"from": "human",
"value": "I'm looking into sending regular automated text-messages to a list of subscribed users. Having played with Windows Mobile devices, I could easily implement this using the compact .Net framework + a device hooked up to usb and send the messages through this. I would like to explo... |
I have a version number of the following form:
version.release.modification
where version, release and modification are either a set of digits or the '*' wildcard character. Additionally, any of these numbers (and any preceding .) may be missing.
So the following are valid and parse as:
1.23.456 = version 1, release 23... | You can use the following regular expression to validate and capture the version, release, and modification components according to the rules you've described:
```regex
^(?P<version>\d+|\*)?(?:\.(?P<release>\d+|\*))?(?:\.(?P<modification>\d+|\*))?$
```
### Explanation of the Regex:
- `^` asserts the start of the stri... | 8,659 | [
{
"from": "human",
"value": "I have a version number of the following form:\nversion.release.modification\nwhere version, release and modification are either a set of digits or the '*' wildcard character. Additionally, any of these numbers (and any preceding .) may be missing.\nSo the following are valid an... |
I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries.
I had hoped to take advantage of .net's built-in XML-based serialization like in DataTabl... | You can leverage the `DataTable` class in .NET to help serialize and deserialize the results of your SQL queries to and from XML without having to write your own serialization/deserialization methods from scratch. While it’s true that `SqlCeCommand` doesn’t directly provide a built-in method to serialize the result of ... | 7,245 | [
{
"from": "human",
"value": "I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries.\nI had hoped to take advantage of .net's built-i... |
If I have 2 query sources how do I find ones that are in one that are not in the other?
example of join to find items in both:
var results = from item1 in qs1.Items
join item2 in qs2 on item1.field1 equals item2.field2
select item1;
So what would the linq code be to return the items in qs1 that are not in qs2?
| To find items in `qs1` that are not in `qs2`, you can use the `GroupJoin` method followed by `SelectMany` and `Where` to filter out the items that do not have a match. Alternatively, you can use the `Except` method, which is often simpler and more expressive for this kind of operation.
Here are two approaches to achie... | 4,336 | [
{
"from": "human",
"value": "If I have 2 query sources how do I find ones that are in one that are not in the other?\nexample of join to find items in both:\nvar results = from item1 in qs1.Items\n join item2 in qs2 on item1.field1 equals item2.field2\n select item1;\n\nSo what would the linq code be to... |
What is the best way of implementing a cache for a PHP site? Obviously, there are some things that shouldn't be cached (for example search queries), but I want to find a good solution that will make sure that I avoid the 'digg effect'.
I know there is WP-Cache for WordPress, but I'm writing a custom solution that isn't... | Implementing a caching solution for a PHP site is a great way to improve performance and reduce server load, especially when dealing with traffic spikes like the "Digg effect". Below are some strategies and tools you can use for caching in a custom PHP application.
### 1. Caching Strategies
- **Page Caching**: Cache e... | 7,183 | [
{
"from": "human",
"value": "What is the best way of implementing a cache for a PHP site? Obviously, there are some things that shouldn't be cached (for example search queries), but I want to find a good solution that will make sure that I avoid the 'digg effect'.\nI know there is WP-Cache for WordPress, bu... |
Does anybody use anything else to document their PHP code than PHPDoc?
Are there any tools that read the same documentation syntax but give richer output?
| Yes, while PHPDoc is the most widely used documentation standard for PHP code, there are several other tools and formats that can be utilized for documenting PHP code, often providing richer output or additional features. Here are some alternatives and complementary tools:
1. **Sami**: Sami is a tool designed for gene... | 11,413 | [
{
"from": "human",
"value": "Does anybody use anything else to document their PHP code than PHPDoc?\nAre there any tools that read the same documentation syntax but give richer output?\n"
},
{
"from": "gpt",
"value": "Yes, while PHPDoc is the most widely used documentation standard for PHP code,... |
I am using forms authentication. My users are redirected to a page (written in web.config) when they login, but some of them may not have the privilages to access this default page. In this case, I want them to redirect to another page but RedirectFromLoginPage method always redirects to the default page in web.config.... | In ASP.NET Forms Authentication, the `RedirectFromLoginPage` method indeed redirects users to the default URL specified in the `web.config` file after a successful login. However, if you want to redirect users to different pages based on their roles or permissions after logging in, you will need to handle this logic ma... | 4,142 | [
{
"from": "human",
"value": "I am using forms authentication. My users are redirected to a page (written in web.config) when they login, but some of them may not have the privilages to access this default page. In this case, I want them to redirect to another page but RedirectFromLoginPage method always red... |
I want to wrap a piece of code that uses the Windows Impersonation API into a neat little helper class, and as usual, I'm looking for a way to go test-first. However, while WindowsIdentity is a managed class, the LogonUser call that is required to actually perform the logging in as another user is an unmanaged function... | You're on the right track with your approach to use an interface for your impersonation helper class, which allows you to abstract away the P/Invoke calls and makes testing easier. Here's a strategy you can follow to create a testable impersonation helper class without actually performing the impersonation in your unit... | 6,640 | [
{
"from": "human",
"value": "I want to wrap a piece of code that uses the Windows Impersonation API into a neat little helper class, and as usual, I'm looking for a way to go test-first. However, while WindowsIdentity is a managed class, the LogonUser call that is required to actually perform the logging in... |
My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I am currently processing:
I put a DropDownList of the 4-digit year on the page.
I validate the expiration date in a DateTime field to be sure that the expiration date being passed to the CC processor isn't expi... | You can certainly continue to process it as you are currently doing. Extracting the last two digits from a four-digit year using a substring is a straightforward and common approach, especially since your credit card processor specifically requires the two-digit year format.
However, if you are looking for a more form... | 8,835 | [
{
"from": "human",
"value": "My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I am currently processing:\n\nI put a DropDownList of the 4-digit year on the page.\nI validate the expiration date in a DateTime field to be sure that the expiration date... |
There are many posts on the internet about the ReadDirectoryChangesW API function missing files when there is a lot of file activity. Most blame the speed at which the ReadDirectoryChangesW function loop is called. This is an incorrect assumption. The best explanation I have seen is in the following post, the commen... | The issue you're encountering with `ReadDirectoryChangesW` is indeed related to how Windows handles file system notifications, and it's a known limitation of the API. As you noted, `ReadDirectoryChangesW` listens for file system changes that have been committed to the file system, but if a large number of changes happe... | 6,988 | [
{
"from": "human",
"value": "There are many posts on the internet about the ReadDirectoryChangesW API function missing files when there is a lot of file activity. Most blame the speed at which the ReadDirectoryChangesW function loop is called. This is an incorrect assumption. The best explanation I have ... |
What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? For example, is there a WaitOnFile() somewhere in the .NET Framework?
I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the file created e... | In .NET, there isn't a built-in method like `WaitOnFile()` that waits for a file to become accessible. However, you can implement a simple polling mechanism to check for file availability. Here's a method that checks if a file is not being used by another process and can wait for a specified timeout:
```csharp
using S... | 4,491 | [
{
"from": "human",
"value": "What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? For example, is there a WaitOnFile() somewhere in the .NET Framework?\nI have a service that uses a FileSystemWatcher to look for files that are to be transmit... |
I want to compile an example code which using google`s webdriver.
I saved webdriver into /home/iyo/webdriver. My code is:
package com.googlecode.webdriver.example;
import com.googlecode.webdriver.By;
import com.googlecode.webdriver.WebDriver;
import com.googlecode.webdriver.WebElement;
import com.googlecode.webd... | The errors you're encountering suggest that the Java compiler (`javac`) can't find the necessary classes from the Google WebDriver library. In your code, it looks like you are using the `HtmlUnitDriver` class and related classes from Selenium WebDriver, but you’re trying to import them from the wrong package.
To compi... | 6,236 | [
{
"from": "human",
"value": "I want to compile an example code which using google`s webdriver.\nI saved webdriver into /home/iyo/webdriver. My code is:\n\npackage com.googlecode.webdriver.example;\n\n\n\nimport com.googlecode.webdriver.By;\n\nimport com.googlecode.webdriver.WebDriver;\n\nimport com.googleco... |
I'm developing a performance critical application for Intel Atom processor.
What are the best gcc optimization flags for this CPU?
| When developing a performance-critical application for the Intel Atom processor, using the appropriate GCC optimization flags can significantly enhance the performance of your code. The Intel Atom architecture is primarily designed for low power consumption, so you'll want to balance performance with efficient resource... | 7,879 | [
{
"from": "human",
"value": "I'm developing a performance critical application for Intel Atom processor.\nWhat are the best gcc optimization flags for this CPU?\n"
},
{
"from": "gpt",
"value": "When developing a performance-critical application for the Intel Atom processor, using the appropriate... |
I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like #ifdef IPHONE_SDK....
Presumably Xcode defines something, but I can't see anything under project properties, and Google isn't much help.
| To detect if you're compiling for the iPhone SDK (iOS), you can use the predefined macro `TARGET_OS_IOS`. This macro is defined in the standard headers included with the iOS SDK. Here’s how you can use it in your code:
```c
#if TARGET_OS_IOS
// Code specific to iOS
#endif
```
In case you want to differentiate between... | 12,765 | [
{
"from": "human",
"value": "I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like #ifdef IPHONE_SDK.... \nPresumably Xcode defines something, but I can't see anything under project properties, and Google isn't much help.\n"
},
{
"f... |
Suppose I have a set of commits in a repository folder...
123 (250 new files, 137 changed files, 14 deleted files)
122 (150 changed files)
121 (renamed folder)
120 (90 changed files)
119 (115 changed files, 14 deleted files, 12 added files)
118 (113 changed files)
117 (10 changed files)
I want to get a working copy th... | To achieve your goal of keeping all changes from revision 117 onward while excluding the changes made in revisions 118 and 120, you will need to follow a two-step process using Subversion (SVN) merge commands. Here's how you can do it:
1. **Get the working copy at the desired state:**
First, make sure your working ... | 10,942 | [
{
"from": "human",
"value": "Suppose I have a set of commits in a repository folder...\n123 (250 new files, 137 changed files, 14 deleted files)\n122 (150 changed files)\n121 (renamed folder)\n120 (90 changed files)\n119 (115 changed files, 14 deleted files, 12 added files)\n118 (113 changed files)\n117 (10... |
I have a rails model that looks something like this:
class Recipe < ActiveRecord::Base
has_many :ingredients
attr_accessor :ingredients_string
attr_accessible :title, :directions, :ingredients, :ingredients_string
before_save :set_ingredients
def ingredients_string
ingredients.join("\n")
end
... | The issue you're facing is related to how you handle the `ingredients_string` in your model and how you make it accessible to the view. You want to ensure that `ingredients_string` can be populated from the associated `ingredients` when editing a recipe, while also allowing the creation of ingredients when saving.
Her... | 8,272 | [
{
"from": "human",
"value": "I have a rails model that looks something like this:\nclass Recipe < ActiveRecord::Base\n has_many :ingredients\n attr_accessor :ingredients_string\n attr_accessible :title, :directions, :ingredients, :ingredients_string\n\n before_save :set_ingredients\n\n def ingredi... |
This is my first experience using the Zend Framework. I am attempting to follow the Quick Start tutorial. Everything was working as expected until I reached the section on the Error Controller and View. When I navigate to a page that does not exist, instead of receiving the error page I get the Fatal Error screen dump ... | It looks like you are facing an issue with the error handling in your Zend Framework application. The error message indicates that the framework is unable to find the 'error' controller, which is supposed to handle requests for non-existing pages.
Here are some things you should check to resolve the problem:
### 1. E... | 5,150 | [
{
"from": "human",
"value": "This is my first experience using the Zend Framework. I am attempting to follow the Quick Start tutorial. Everything was working as expected until I reached the section on the Error Controller and View. When I navigate to a page that does not exist, instead of receiving the erro... |
Wondering if anyone has gotten the infamous "database is locked" error from Trac and how you solved it. It is starting to occur more and more often for us. Will we really have to bite the bullet and migrate to a different DB backend, or is there another way?
See these two Trac bug entries for more info:
http://trac.edg... | It sounds like you've already gone through a successful migration from SQLite to PostgreSQL to address the "database is locked" error in Trac, which is great to hear! The locking issue is quite common with SQLite, especially in environments with high concurrency or multiple write operations, as SQLite uses a single fil... | 10,570 | [
{
"from": "human",
"value": "Wondering if anyone has gotten the infamous \"database is locked\" error from Trac and how you solved it. It is starting to occur more and more often for us. Will we really have to bite the bullet and migrate to a different DB backend, or is there another way?\nSee these two Tra... |
I'm currently using the Infragistics component set for .Net 2.0, Visual Studio 2005 and C#. I have the following chunk of javascript code (text and other variables are declared elsewhere):
***alert(box[select].value);
text.value(box[select].value);
alert(text.value);***
'text' is an Infragistics webTextEdit, while bo... | It seems like you're trying to update the value of an Infragistics `webTextEdit` control using JavaScript, but the value isn't appearing in the UI after you set it. Here are a few considerations and suggestions to help troubleshoot and resolve the issue:
1. **Setting the Value**:
Make sure you are using the correc... | 9,187 | [
{
"from": "human",
"value": "I'm currently using the Infragistics component set for .Net 2.0, Visual Studio 2005 and C#. I have the following chunk of javascript code (text and other variables are declared elsewhere):\n\n***alert(box[select].value);\ntext.value(box[select].value);\nalert(text.value);***\n\n... |
I'm using a Visual Studio generated proxy class to access a web service (added the web service as a web reference to my project). The problem is that the function the web service exposes expects a CDATA element, i.e.:
<Function><![CDATA[<Blah></Blah>]]></Function>
Unfortunately, when I pass in "" into the proxy class... | When using a Visual Studio generated proxy class for a web service, the issue you're experiencing with CDATA handling arises from how XML serialization and escaping works in .NET. The proxy class automatically escapes special characters like `<`, `>`, and `&` which leads to the double-escaping you're observing.
To sol... | 9,527 | [
{
"from": "human",
"value": "I'm using a Visual Studio generated proxy class to access a web service (added the web service as a web reference to my project). The problem is that the function the web service exposes expects a CDATA element, i.e.:\n<Function><![CDATA[<Blah></Blah>]]></Function>\n\nUnfortuna... |
Let's say I've got Alpha things that may or may not be or be related to Bravo or Charlie things.
These are one-to-one relationships: No Alpha will relate to more than one Bravo. And no Bravo will relate to more than one Alpha.
I've got a few goals:
a system that's easy to learn and
maintain.
data integrity enforced w... | To determine the best database schema for your scenario, we need to consider the requirements and constraints you've outlined, especially regarding how the different entities (Alpha, Bravo, Charlie, etc.) relate to each other and the constraints on those relationships. Here’s a breakdown of the options and what might w... | 6,633 | [
{
"from": "human",
"value": "Let's say I've got Alpha things that may or may not be or be related to Bravo or Charlie things.\nThese are one-to-one relationships: No Alpha will relate to more than one Bravo. And no Bravo will relate to more than one Alpha.\nI've got a few goals:\n\na system that's easy to ... |
I am a fan of static metaprogramming in C++. I know Java now has generics. Does this mean that static metaprogramming (i.e., compile-time program execution) is possible in Java? If so, can anyone recommend any good resources where one can learn more about it?
| Java’s generics do provide some compile-time type safety and can achieve some level of metaprogramming, but they do not support full static metaprogramming in the same way C++ does. C++ allows for complex compile-time computations using templates, while Java’s generics are primarily a way to achieve type safety and do ... | 9,737 | [
{
"from": "human",
"value": "I am a fan of static metaprogramming in C++. I know Java now has generics. Does this mean that static metaprogramming (i.e., compile-time program execution) is possible in Java? If so, can anyone recommend any good resources where one can learn more about it?\n"
},
{
... |
Emacs Lisp has replace-string but has no replace-char. I want to replace "typographic" curly quotes (Emacs code for this character is hexadecimal 53979) with regular ASCII quotes, and I can do so with:
(replace-string (make-string 1 ?\x53979) "'")
I think it would be better with replace-char.
What is the best way to ... | While Emacs Lisp doesn't provide a built-in `replace-char` function, you can easily implement your own function to achieve the same effect. Below is a sample implementation that defines a `replace-char` function, which will replace occurrences of a specified character with another character in a string.
You can then u... | 9,774 | [
{
"from": "human",
"value": "Emacs Lisp has replace-string but has no replace-char. I want to replace \"typographic\" curly quotes (Emacs code for this character is hexadecimal 53979) with regular ASCII quotes, and I can do so with:\n(replace-string (make-string 1 ?\\x53979) \"'\")\n\nI think it would be be... |
Does anyone know if it's possible to get a Win32 application to run under wine / crossover but have the main toolbar appear as a Mac toolbar (i.e. outside the wine / crossover app)?
| Running a Win32 application under Wine or CrossOver on macOS typically presents the application in its own window, which includes its own toolbar. However, if you want the application's toolbar to behave like a native macOS toolbar (i.e., appearing outside of the Wine application), there are a few potential approaches ... | 11,267 | [
{
"from": "human",
"value": "Does anyone know if it's possible to get a Win32 application to run under wine / crossover but have the main toolbar appear as a Mac toolbar (i.e. outside the wine / crossover app)?\n"
},
{
"from": "gpt",
"value": "Running a Win32 application under Wine or CrossOver ... |
I'm sure we all have received the wonderfully vague "Object reference not set to instance of an Object" exception at some time or another. Identifying the object that is the problem is often a tedious task of setting breakpoints and inspecting all members in each statement.
Does anyone have any tricks to easily and e... | The "Object reference not set to an instance of an object" exception is indeed one of the most common and frustrating exceptions in .NET programming, and it can be challenging to debug when you're trying to identify which object is causing the issue without relying solely on breakpoints.
Here are several strategies an... | 9,021 | [
{
"from": "human",
"value": "I'm sure we all have received the wonderfully vague \"Object reference not set to instance of an Object\" exception at some time or another. Identifying the object that is the problem is often a tedious task of setting breakpoints and inspecting all members in each statement. \... |
I've been utilizing the command pattern in my Flex projects, with asynchronous callback routes required between:
whoever instantiated a given command object and the command object,
the command object and the "data access" object (i.e. someone who handles the remote procedure calls over the network to the servers) that... | Your current approach of using callback function references for handling asynchronous operations in your Flex projects is a valid and straightforward way to manage one-to-one relationships in a command pattern. However, there are alternative patterns and techniques that could enhance your code's readability, maintainab... | 5,540 | [
{
"from": "human",
"value": "I've been utilizing the command pattern in my Flex projects, with asynchronous callback routes required between:\n\nwhoever instantiated a given command object and the command object,\nthe command object and the \"data access\" object (i.e. someone who handles the remote procedu... |
mysql_real_escape_string and addslashes are both used to escape data before the database query, so what's the difference? (This question is not about parametrized queries/PDO/mysqli)
| `mysql_real_escape_string` and `addslashes` are both functions used in PHP to escape special characters in strings, but they serve slightly different purposes and have different behaviors, especially in the context of database interactions.
### 1. Purpose:
- **`mysql_real_escape_string`:**
- This function is specif... | 10,548 | [
{
"from": "human",
"value": "mysql_real_escape_string and addslashes are both used to escape data before the database query, so what's the difference? (This question is not about parametrized queries/PDO/mysqli)\n"
},
{
"from": "gpt",
"value": "`mysql_real_escape_string` and `addslashes` are bot... |
The __doPostBack is not working in firefox 3 (have not checked 2). Everything is working great in IE 6&7 and it even works in Chrome??
It's a simple asp:LinkButton with an OnClick event
<asp:LinkButton ID="DeleteAllPicturesLinkButton" Enabled="False" OnClientClick="javascript:return confirm('Are you sure you want to d... | It sounds like you encountered a common issue when using ASP.NET Web Forms in combination with AJAX UpdatePanels. Sometimes, when you nest UpdatePanels or use them improperly, it can lead to unexpected behavior, especially in certain browsers.
Here's a summary of the problem and the solution you found, along with some... | 9,173 | [
{
"from": "human",
"value": "The __doPostBack is not working in firefox 3 (have not checked 2). Everything is working great in IE 6&7 and it even works in Chrome??\nIt's a simple asp:LinkButton with an OnClick event\n<asp:LinkButton ID=\"DeleteAllPicturesLinkButton\" Enabled=\"False\" OnClientClick=\"javas... |
I am designing a game to be played in the browser.
Game is a space theme and I need to generate a map of the "Galaxy".
The basic idea of the map is here:
game map http://www.oglehq.com/map.png
The map is a grid, with each grid sector can contain a planet/system and each of these has links to a number of adjacent grids.... | Creating a grid-based map for your game is a fun and engaging challenge! Let’s go through the steps to set this up in a way that allows for flexibility, ease of use, and potential for future expansions.
### 1. Define Your Grid Structure
You want to have a grid where each cell can contain different elements (planets, ... | 7,281 | [
{
"from": "human",
"value": "I am designing a game to be played in the browser.\nGame is a space theme and I need to generate a map of the \"Galaxy\".\nThe basic idea of the map is here:\ngame map http://www.oglehq.com/map.png\nThe map is a grid, with each grid sector can contain a planet/system and each of... |
Grails vs Rails. Which has better support? And which one is a better choice to develop medium size apps with? Most importantly which one has more plug-ins?
| When comparing Grails and Rails, it's important to consider various factors such as community support, plugin availability, and suitability for medium-sized app development. Here's a breakdown of each:
### Community Support
- **Rails (Ruby on Rails)**:
- Ruby on Rails has a larger community and longer history than ... | 7,762 | [
{
"from": "human",
"value": "Grails vs Rails. Which has better support? And which one is a better choice to develop medium size apps with? Most importantly which one has more plug-ins?\n"
},
{
"from": "gpt",
"value": "When comparing Grails and Rails, it's important to consider various factors su... |
Howdy, I have a DataRow pulled out of a DataTable from a DataSet. I am accessing a column that is defined in SQL as a float datatype. I am trying to assign that value to a local variable (c# float datatype) but am getting an InvalidCastExecption
DataRow exercise = _exerciseDataSet.Exercise.FindByExerciseID(65);
_A... | The issue you're encountering is related to how .NET handles data types when retrieving values from a `DataRow`. When you pull a value from a `DataRow`, the data type returned is not always exactly what you expect based on the SQL data type.
In your case, the `DefaultAccelLimit` column in SQL is defined as a `float`,... | 11,305 | [
{
"from": "human",
"value": "Howdy, I have a DataRow pulled out of a DataTable from a DataSet. I am accessing a column that is defined in SQL as a float datatype. I am trying to assign that value to a local variable (c# float datatype) but am getting an InvalidCastExecption \nDataRow exercise = _exercis... |
In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is:
final ArrayList<Integer> result = new ArrayList<Integer>();
GUI.display().syncExec(new Runnable(){ public void run() {
MessageBox mb = /* ... */;
/* set up messagebox */
... | Using a thread-safe container like `ArrayList` to pass results between threads in your SWT application works, but there are indeed other approaches that can be cleaner and more efficient.
Using a single container to hold your result is a common approach, but it's not the only one. Here are a few alternatives:
### 1.... | 8,810 | [
{
"from": "human",
"value": "In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is:\nfinal ArrayList<Integer> result = new ArrayList<Integer>();\nGUI.display().syncExec(new Runnable(){ public void run() {\n MessageBox mb ... |
Table:
UserId, Value, Date.
I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date.
How do I do this in SQL? (Preferably Oracle.)
I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.
| To get the UserId and Value for the maximum Date for each UserId in Oracle SQL, you can use a Common Table Expression (CTE) or a subquery along with the `ROW_NUMBER()` window function. Here is a way to accomplish this:
### Using a CTE with `ROW_NUMBER()`
```sql
WITH RankedValues AS (
SELECT
UserId,
... | 10,299 | [
{
"from": "human",
"value": "Table:\nUserId, Value, Date.\n\nI want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date.\nHow do I do this in SQL? (Preferably Oracle.)\nI need to get ALL the UserIds. But for each UserId, only that row where... |
I've worked with folks who are chatting online with their peers, constantly batting around ideas. I've also worked with folks who adamantly refuse and think it's a waste of time.
Are online live chatting forums of particular use to you? Why or why not?
Internal to your company, or external and world-wide?
Does your em... | Online live chatting forums can be incredibly useful for several reasons, though opinions on their effectiveness can vary widely based on individual preferences and company culture.
### Benefits of Online Live Chatting Forums:
1. **Real-Time Collaboration**: They facilitate immediate communication, allowing for quick... | 9,220 | [
{
"from": "human",
"value": "I've worked with folks who are chatting online with their peers, constantly batting around ideas. I've also worked with folks who adamantly refuse and think it's a waste of time.\nAre online live chatting forums of particular use to you? Why or why not? \nInternal to your compan... |
Since Java 6 there is a class java.awt.Desktop. There are some nice methods but the class is not supported on all platforms. The methods java.awt.Desktop.getDesktop() throws an
java.lang.UnsupportedOperationException: Desktop API is not supported
on the current platform
on some platforms. Or the method java.awt.De... | The `java.awt.Desktop` class in Java is designed to provide methods for launching associated applications on the desktop environment. However, it is indeed not supported on all platforms, and its availability can depend on the underlying operating system and the specific environment.
Here are some platforms and condit... | 10,030 | [
{
"from": "human",
"value": "Since Java 6 there is a class java.awt.Desktop. There are some nice methods but the class is not supported on all platforms. The methods java.awt.Desktop.getDesktop() throws an \n\njava.lang.UnsupportedOperationException: Desktop API is not supported\n on the current platform\n... |
I'm using Python, and would like to insert a string into a text file without deleting or copying the file. How can I do that?
| To insert a string into a text file without deleting or copying the file in Python, you'll need to read the existing contents of the file, modify the contents by adding the new string at the desired position, and then write the modified contents back to the same file. This approach effectively "inserts" the string by c... | 10,571 | [
{
"from": "human",
"value": "I'm using Python, and would like to insert a string into a text file without deleting or copying the file. How can I do that?\n"
},
{
"from": "gpt",
"value": "To insert a string into a text file without deleting or copying the file in Python, you'll need to read the ... |
We just migrated to Visual Studio 2008 from 2005. Now whenever I open our project solution the solution explorer auto expands every directory that is excluded or contains an excluded file.
| This is a known issue with Visual Studio 2008 that can occur after migrating from an earlier version like 2005. It can be frustrating, but here are a few potential solutions to help manage the situation:
1. **Update Visual Studio**: First, make sure that you have installed all the latest updates and service packs for ... | 11,711 | [
{
"from": "human",
"value": "We just migrated to Visual Studio 2008 from 2005. Now whenever I open our project solution the solution explorer auto expands every directory that is excluded or contains an excluded file.\n"
},
{
"from": "gpt",
"value": "This is a known issue with Visual Studio 200... |
I'm using the following code to query a database from my jsp, but I'd like to know more about what's happening behind the scenes.
These are my two primary questions.
Does the tag access the ResultSet directly, or is the query result being stored in a datastructure in memory?
When is the connection closed?
<%@ taglib pr... | Your concerns about the use of SQL queries in JSP pages are valid, especially when it comes to performance, maintainability, and separation of concerns. Let's break down your questions regarding the code snippet you've provided.
### 1. Does the tag access the ResultSet directly, or is the query result being stored in ... | 8,773 | [
{
"from": "human",
"value": "I'm using the following code to query a database from my jsp, but I'd like to know more about what's happening behind the scenes.\nThese are my two primary questions.\nDoes the tag access the ResultSet directly, or is the query result being stored in a datastructure in memory?\n... |
We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C# .NET programmers. We support 50 odd applications and systems that we have developed.
A few members of the team beg... | Transitioning to technologies like WPF (Windows Presentation Foundation), WF (Windows Workflow Foundation), and WCF (Windows Communication Foundation) can provide several benefits that may outweigh the costs associated with retraining your team. Here are some of the key advantages:
### 1. Improved User Experience (WPF... | 9,333 | [
{
"from": "human",
"value": "We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C# .NET programmers. We support 50 odd applications and systems that we have ... |
When applying the Single Responsibility Principle and looking at a class's reason to change, how do you determine whether that reason too change is too granular, or not granular enough?
| Determining the right level of granularity for the Single Responsibility Principle (SRP) involves assessing how changes to a class's functionality might occur in the future and ensuring that the class has a clear, focused purpose. Here are some guidelines to help you determine whether a class's reasons to change are ap... | 8,621 | [
{
"from": "human",
"value": "When applying the Single Responsibility Principle and looking at a class's reason to change, how do you determine whether that reason too change is too granular, or not granular enough?\n"
},
{
"from": "gpt",
"value": "Determining the right level of granularity for t... |
Is there a distributed version control system (git, bazaar, mercurial, darcs etc.) that can handle files larger than available RAM?
I need to be able to commit large binary files (i.e. datasets, source video/images, archives), but I don't need to be able to diff them, just be able to commit and then update when the fil... | When dealing with large binary files in a version control context, traditional VCS solutions like Git, Mercurial, or Bazaar can indeed struggle due to their design around tracking changes with diffs, which typically require loading files into RAM. However, there are tools and approaches that can help you handle large f... | 8,384 | [
{
"from": "human",
"value": "Is there a distributed version control system (git, bazaar, mercurial, darcs etc.) that can handle files larger than available RAM?\nI need to be able to commit large binary files (i.e. datasets, source video/images, archives), but I don't need to be able to diff them, just be a... |
How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code.
| Creating a valid OpenGL context is crucial for rendering graphics using OpenGL. The context needs to be created before any OpenGL function calls are made, and the specifics can vary depending on the platform, windowing system, and the libraries you're using. Below are general steps and concepts that can help you ensure... | 2,336 | [
{
"from": "human",
"value": "How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code.\n"
},
{
"from": "gpt",
"value": "Creating a valid OpenGL context is crucial for rendering graphics using OpenGL. The context needs to be created before... |
On JavaFX's Wikipedia
In May 2008 (...) Sun Also announced a
multi-year agreement with On2
Technologies to bring comprehensive
video capabilities to the JavaFX
product family using the company's
TrueMotion Video codec.
Do you know if it will include encoding capabilities for Webcam Video like Flash or jus... | The original announcements regarding JavaFX and its partnership with On2 Technologies primarily focused on enhancing the video playback and streaming capabilities of the JavaFX platform. At the time, the emphasis was on providing a rich media experience, which included support for various video codecs, particularly for... | 12,011 | [
{
"from": "human",
"value": "On JavaFX's Wikipedia\n\nIn May 2008 (...) Sun Also announced a\n multi-year agreement with On2 \n Technologies to bring comprehensive\n video capabilities to the JavaFX \n product family using the company's\n TrueMotion Video codec.\n\nDo you know if it will include encodi... |
One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk.
The logs giving us hassle resides in
mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log
and the entries in the logfile is just the some kind of entries repeated aga... | It looks like your WebLogic Server is logging a large amount of DEBUG level logs that are filling up your disk space. This can happen due to certain configurations in your application or server settings. Here are steps you can take to control the logging behavior:
### 1. **Check Logging Level Configuration**
- **Admin... | 8,952 | [
{
"from": "human",
"value": "One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk.\nThe logs giving us hassle resides in \nmydrive:\\bea\\weblogic81\\common\\nodemanager\\NodeManagerLogs\\generatedManagedServer1\\managedserveroutput.log\n\nand the entries in the l... |
When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it?
This probably applies to other databases as well.
I'm looking most of all for concrete examples of each scenario, preferably from someone who has used them successful... | In SQL Server (and other relational databases), setting up foreign keys with cascading actions on delete and update can help maintain data integrity and enforce referential constraints between related tables. However, whether to use cascading actions depends on the specific use cases and relationships in your data mode... | 7,716 | [
{
"from": "human",
"value": "When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it?\nThis probably applies to other databases as well.\nI'm looking most of all for concrete examples of each scenario, preferabl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.