instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I am working with a large Java web application from a commercial vendor. I've received a patch from the vendor in the form of a new .class file that is supposed to resolve an issue we're having with the software. In the past, applying patches from this vendor have caused new and completely unrelated problems to arise... | It sounds like you've done a thorough job investigating the differences between the two .class files. To summarize what you've done and to suggest a few additional steps, here are the key approaches you can take when analyzing .class files:
1. **Decompilation**: As you've already done, using tools like JAD and JRevers... | 7,020 | [
{
"from": "human",
"value": "I am working with a large Java web application from a commercial vendor. I've received a patch from the vendor in the form of a new .class file that is supposed to resolve an issue we're having with the software. In the past, applying patches from this vendor have caused new a... |
Here's my scenario - I have an SSIS job that depends on another prior SSIS job to run. I need to be able to check the first job's status before I kick off the second one. It's not feasible to add the 2nd job into the workflow of the first one, as it is already way too complex. I want to be able to check the first job's... | To manage dependencies between two SQL Server Integration Services (SSIS) jobs, querying the `msdb` database is indeed a common and effective approach to check the status of the first job. However, if you're looking for alternatives, the WMI Data Reader Task is generally used for monitoring Windows Management Instrumen... | 771 | [
{
"from": "human",
"value": "Here's my scenario - I have an SSIS job that depends on another prior SSIS job to run. I need to be able to check the first job's status before I kick off the second one. It's not feasible to add the 2nd job into the workflow of the first one, as it is already way too complex. I... |
I'm working with a large (270+ project) VS.Net solution. Yes, I know this is pushing the friendship with VS but it's inherited and blah blah. Anyway, to speed up the solution load and compile time I've removed all projects that I'm not currently working on... which in turn has removed those project references from th... | Indeed, working with a large Visual Studio solution that has many projects can be cumbersome, especially when managing project references. Here are some strategies that might help streamline your process:
### 1. Use **Solution Explorer** Features
In Visual Studio, you can use the **Solution Explorer** to find referenc... | 6,325 | [
{
"from": "human",
"value": "I'm working with a large (270+ project) VS.Net solution. Yes, I know this is pushing the friendship with VS but it's inherited and blah blah. Anyway, to speed up the solution load and compile time I've removed all projects that I'm not currently working on... which in turn has... |
When I downloaded Skype, I noticed that, in place of a normal "disk image" icon, there was a custom icon, and when I double clicked on the icon, the window used a colorful image as the background, prompting me to drag the skype icon into the applications folder.
How can I do that with my applications?
Thanks,
Jason
| Hi Jason,
Creating a custom installation experience for your applications on macOS, similar to what you've described for Skype, involves a few steps. Below is a guide on how to create a custom disk image with a background and a custom icon.
### Step 1: Prepare Your Application
1. **Ensure your application is properl... | 3,174 | [
{
"from": "human",
"value": "When I downloaded Skype, I noticed that, in place of a normal \"disk image\" icon, there was a custom icon, and when I double clicked on the icon, the window used a colorful image as the background, prompting me to drag the skype icon into the applications folder.\nHow can I do ... |
I'd like to know what's the way to actually set the icon of a .bat file to an arbitrary icon.
How would I go about doing that programmatically, independently of the language I may be using.
| Setting a custom icon for a `.bat` file programmatically can be a bit tricky because Windows does not allow you to change the icon of a `.bat` file directly. Instead, a common approach is to create a shortcut to the `.bat` file and then set the icon for that shortcut. Here’s how you can achieve this programmatically in... | 3,420 | [
{
"from": "human",
"value": "I'd like to know what's the way to actually set the icon of a .bat file to an arbitrary icon.\nHow would I go about doing that programmatically, independently of the language I may be using.\n"
},
{
"from": "gpt",
"value": "Setting a custom icon for a `.bat` file pro... |
I'd like to render to svg data in a swf at runtime (not in Flex - not using degrafa) - how would I go about doing that?
| Rendering SVG data in a SWF (Adobe Flash) file at runtime, without using Flex or libraries like Degrafa, can be a bit challenging, but it can be done using ActionScript and the built-in capabilities of Flash Player. Here's a general approach on how to accomplish this:
### 1. Using ActionScript to Load SVG
While Flash... | 5,520 | [
{
"from": "human",
"value": "I'd like to render to svg data in a swf at runtime (not in Flex - not using degrafa) - how would I go about doing that?\n"
},
{
"from": "gpt",
"value": "Rendering SVG data in a SWF (Adobe Flash) file at runtime, without using Flex or libraries like Degrafa, can be a ... |
I have an MFC application compiled with /clr and I'm trying to implement a final handler for otherwise un-caught managed exceptions. For native exceptions, overriding CWinApp::ProcessWndProcException works.
The two events suggested in Jeff's CodeProject article,Application.ThreadException and AppDomain.CurrentDomain.Un... | You're correct that handling unhandled exceptions in a mixed (managed and unmanaged) MFC application can be a bit tricky. The .NET `Application.ThreadException` and `AppDomain.CurrentDomain.UnhandledException` events won't be triggered in certain contexts, particularly when exceptions occur in a context where they aren... | 4,141 | [
{
"from": "human",
"value": "I have an MFC application compiled with /clr and I'm trying to implement a final handler for otherwise un-caught managed exceptions. For native exceptions, overriding CWinApp::ProcessWndProcException works.\nThe two events suggested in Jeff's CodeProject article,Application.Thre... |
I'm wondering how you can implement a program similar to tail -f in C/C++, a program that watches for and processes new lines added to a log file?
| Implementing a program similar to `tail -f` in C or C++ requires reading a file and continuously monitoring it for new lines. Below, I will outline the basic steps and provide a simple implementation in C++.
### Steps to Implement a `tail -f` Program
1. **Open the File**: Open the file in read mode.
2. **Seek to the ... | 5,312 | [
{
"from": "human",
"value": "I'm wondering how you can implement a program similar to tail -f in C/C++, a program that watches for and processes new lines added to a log file?\n"
},
{
"from": "gpt",
"value": "Implementing a program similar to `tail -f` in C or C++ requires reading a file and con... |
I added some custom fields (public booleans) to the global class in global.asax.cs which are initialized during the Application_Start event. How do I access them in a webhandler (ashx)? Or is it better to save them in the Application state object?
| Accessing custom fields that you've added to the `Global.asax.cs` class can be done directly, but there are a few considerations that may influence your choice of approach. Below are the methods to access these custom fields and a recommendation on whether to store them in the `Application` state object.
### Accessing... | 3,717 | [
{
"from": "human",
"value": "I added some custom fields (public booleans) to the global class in global.asax.cs which are initialized during the Application_Start event. How do I access them in a webhandler (ashx)? Or is it better to save them in the Application state object?\n"
},
{
"from": "gpt",
... |
How can I improve the look and feel of my Linux desktop to suit my programming needs?
I found Compiz and it makes switching between my workspaces (which is something I do all the time to make the most of my 13.3" screen laptop) easy and look great - so what else don't I know about that make my programming environment m... | Improving the look and feel of your Linux desktop to enhance productivity and make it more enjoyable for programming involves several factors, including aesthetics, functionality, and customizability. Here are some tips and tools you might find useful:
### 1. **Desktop Environment:**
- **Choose a lightweight DE:** ... | 3,045 | [
{
"from": "human",
"value": "How can I improve the look and feel of my Linux desktop to suit my programming needs?\nI found Compiz and it makes switching between my workspaces (which is something I do all the time to make the most of my 13.3\" screen laptop) easy and look great - so what else don't I know a... |
How do you determine when to use table clusters? There are two types, index and hash, to use for different cases. In your experience, have the introduction and use of table clusters paid off?
If none of your tables are set up this way, modifying them to use table clusters would add to the complexity of the set up. But ... | Table clustering can be a beneficial strategy for improving the performance of certain database operations in Oracle, particularly in scenarios where related rows from different tables are often accessed together. Here’s a breakdown of how to determine when to use table clusters, the implications of introducing them, a... | 1,587 | [
{
"from": "human",
"value": "How do you determine when to use table clusters? There are two types, index and hash, to use for different cases. In your experience, have the introduction and use of table clusters paid off?\nIf none of your tables are set up this way, modifying them to use table clusters would... |
The question is how to make the similar thing like symlink in windows like in *nix. It's really hard to write whole path to the file in console (even using [tab], it's not the way if you need to change language). Adding everything in PATH is tiring too. It'll be great to make a symlink running one command.
Actually I'm... | In Windows, you can create symbolic links (symlinks) using the `mklink` command in the Command Prompt. This command works similarly to symlinks in Unix-like systems. Here’s how to do it:
### Steps to Create a Symbolic Link in Windows:
1. **Open Command Prompt as Administrator:**
- Press `Win + X` and select "Windo... | 6,097 | [
{
"from": "human",
"value": "The question is how to make the similar thing like symlink in windows like in *nix. It's really hard to write whole path to the file in console (even using [tab], it's not the way if you need to change language). Adding everything in PATH is tiring too. It'll be great to make a ... |
I want to point a file dialog at a particular folder in the current user's Local Settings folder on Windows. What is the shortcut to get this path?
| In Windows, the Local Settings folder is typically located within the user's AppData folder. The path to the Local Settings folder for the current user can generally be constructed using the `%LOCALAPPDATA%` environment variable.
To point a file dialog at the Local Settings folder, you can use the following path:
```... | 7,286 | [
{
"from": "human",
"value": "I want to point a file dialog at a particular folder in the current user's Local Settings folder on Windows. What is the shortcut to get this path?\n"
},
{
"from": "gpt",
"value": "In Windows, the Local Settings folder is typically located within the user's AppData ... |
I'm trying to get the GWTShell mode to load my context.xml file in which my database is described.
The only usable info can be found here, but this doesn't seem to work for the context.xml part.
| To help you configure your `context.xml` file correctly for use with GWTShell, I'll provide a general outline and some common troubleshooting steps.
### Steps to Load context.xml in GWTShell
1. **Location of context.xml**: Ensure that your `context.xml` file is in the appropriate location. In a typical setup, it shou... | 5,538 | [
{
"from": "human",
"value": "I'm trying to get the GWTShell mode to load my context.xml file in which my database is described.\nThe only usable info can be found here, but this doesn't seem to work for the context.xml part.\n"
},
{
"from": "gpt",
"value": "To help you configure your `context.xm... |
In C++, I can have take input like this:
cin >> a >> b >> c;
And a can be int, b can be float, and c can be whatever... How do I do the same in python?
input() and raw_input(), the way I'm using them, don't seem to be giving me the desired results.
| In Python, you can achieve similar functionality to C++'s `cin >> a >> b >> c;` using the `input()` function along with type conversion. In Python, `input()` reads user input as a string, so you will need to convert the input to the desired types.
Here's how you can read multiple inputs of different types in Python:
... | 7,556 | [
{
"from": "human",
"value": "In C++, I can have take input like this: \ncin >> a >> b >> c;\n\nAnd a can be int, b can be float, and c can be whatever... How do I do the same in python?\ninput() and raw_input(), the way I'm using them, don't seem to be giving me the desired results.\n"
},
{
"from": ... |
I want to use SQL Profiler to trace the queries executed agains my database, track performance, etc. However it seems that the SQL Profiler is only available in the Enterprise edition of SQL Server 2005. Is this the case indeed, and can I do something about it?
| SQL Server Profiler is a tool included with SQL Server that allows you to monitor and analyze SQL Server events and performance. However, it is not restricted only to the Enterprise edition of SQL Server 2005; it is available in several editions, including Standard and Developer editions.
If you are using SQL Server 2... | 6,806 | [
{
"from": "human",
"value": "I want to use SQL Profiler to trace the queries executed agains my database, track performance, etc. However it seems that the SQL Profiler is only available in the Enterprise edition of SQL Server 2005. Is this the case indeed, and can I do something about it?\n"
},
{
"... |
Say I have a list as follows:
item1
item2
item3
Is there a CSS selector that will allow me to directly select the last item of a list? In this case item 3.
Cheers!
| Yes, you can use the `:last-child` pseudo-class selector in CSS to directly select the last item of a list. Here's an example of how you would apply it if your list is structured in HTML:
```html
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
```
You can use the following CSS:
```css
li:last-chi... | 8,896 | [
{
"from": "human",
"value": "Say I have a list as follows:\n\nitem1\nitem2\nitem3\n\nIs there a CSS selector that will allow me to directly select the last item of a list? In this case item 3.\nCheers!\n"
},
{
"from": "gpt",
"value": "Yes, you can use the `:last-child` pseudo-class selector in C... |
It's known that you should declare events that take as parameters (object sender, EventArgs args). Why?
| In .NET and many event-driven programming environments, the convention for declaring events involves using a specific signature that typically takes two parameters: `object sender` and `EventArgs args`. This design pattern serves several purposes:
1. **Sender Context**: The `object sender` parameter allows the event h... | 7,059 | [
{
"from": "human",
"value": "It's known that you should declare events that take as parameters (object sender, EventArgs args). Why?\n"
},
{
"from": "gpt",
"value": "In .NET and many event-driven programming environments, the convention for declaring events involves using a specific signature th... |
How do you debug PHP scripts?
I am aware of basic debugging such as using the Error Reporting. The breakpoint debugging in PHPEclipse is also quite useful.
What is the best (in terms of fast and easy) way to debug in phpStorm or any other IDE?
| Debugging PHP scripts effectively can significantly improve your development experience and help you identify issues quickly. Here are some methods and tools you can use for debugging in PHP, especially with an IDE like PhpStorm:
### 1. **Error Reporting**
- Enable error reporting in your PHP script by adding the f... | 3,100 | [
{
"from": "human",
"value": "How do you debug PHP scripts?\nI am aware of basic debugging such as using the Error Reporting. The breakpoint debugging in PHPEclipse is also quite useful.\nWhat is the best (in terms of fast and easy) way to debug in phpStorm or any other IDE?\n"
},
{
"from": "gpt",
... |
For years, I've been investigating how to create music streams from my computer. I've seen programs, but anything useful I've seen is Windows only (I use a Mac).
Eventually, I got interested in how streams work. Is there any way I could create my own stream, possibly using socket functions in PHP? Is there a PHP lib... | Creating your own music stream on a Mac using PHP is certainly possible, but it requires some understanding of streaming concepts and the use of PHP alongside other technologies. PHP alone isn’t typically used for real-time streaming, as it is generally a server-side scripting language focused on web development. Howev... | 1,542 | [
{
"from": "human",
"value": "For years, I've been investigating how to create music streams from my computer. I've seen programs, but anything useful I've seen is Windows only (I use a Mac).\nEventually, I got interested in how streams work. Is there any way I could create my own stream, possibly using so... |
I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents.
The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome.
The part I need help ... | To achieve the functionality you're describing, you can implement a few steps to ensure that the textbox behaves as required when the user interacts with it. Below are suggestions on how you can implement this in a typical Windows Forms application using C# as an example.
### Steps to Implement the Desired Functional... | 6,431 | [
{
"from": "human",
"value": "I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. \nThe contents need to be handle when enter is pushed. That part I think I have figured out but any suggestion... |
I am familiar with several approaches to making the back button work in AJAX applications in various situations, but I have not found a solution that will work gracefully in my specific scenario.
The pages I am working with are the search interface for a site. You enter terms in a normal search box, click "go and wind... | In your scenario, you want to maintain the state of a search results page in an AJAX-heavy application, while ensuring that when users navigate away and return using the browser's back button, they experience minimal latency without resorting to cookies or session storage. Here’s a refined solution using the History AP... | 4,230 | [
{
"from": "human",
"value": "I am familiar with several approaches to making the back button work in AJAX applications in various situations, but I have not found a solution that will work gracefully in my specific scenario.\nThe pages I am working with are the search interface for a site. You enter terms ... |
I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display the messages between the user and the recipient. How do I get the control to automatically scroll to the bottom every time I update the DocumentText of the control?
| To ensure that the `WebBrowser` control in your Windows Forms application automatically scrolls to the bottom whenever you update its `DocumentText`, you can achieve this by using JavaScript to manipulate the scrolling after updating the content. Below is a step-by-step approach on how to implement this:
1. **Update t... | 5,524 | [
{
"from": "human",
"value": "I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display the messages between the user and the recipient. How do I get the control to automatically scroll to the bottom every time I update the DocumentText of the control?\n"
},
{
... |
The compiler usually chokes when an event doesn't appear beside a += or a -=, so I'm not sure if this is possible.
I want to be able to identify an event by using an Expression tree, so I can create an event watcher for a test. The syntax would look something like this:
using(var foo = new EventWatcher(target, x => x.M... | To achieve your goal of creating an `EventWatcher` using an expression tree that can identify an event to watch, you will need to use reflection to inspect the expression passed to the constructor. Let's address your questions one by one:
### 1. Will the Compiler Choke?
The compiler will not choke when you use an exp... | 3,386 | [
{
"from": "human",
"value": "The compiler usually chokes when an event doesn't appear beside a += or a -=, so I'm not sure if this is possible.\nI want to be able to identify an event by using an Expression tree, so I can create an event watcher for a test. The syntax would look something like this:\nusing(... |
Right now my ant task looks like.
<javadoc sourcepath="${source}" destdir="${doc}">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
</javadoc>
And I'm getting this warning:
javadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api/package-list
How do I get the javadoc to properly lin... | When you're behind a proxy and trying to fetch external resources like Javadoc API documentation, you may need to configure your environment to route HTTP requests through the proxy. Here's how you can adjust your Ant setup to work properly with a proxy:
1. **Set Proxy Parameters in the Ant Command Line:**
You can ... | 5,370 | [
{
"from": "human",
"value": "Right now my ant task looks like.\n<javadoc sourcepath=\"${source}\" destdir=\"${doc}\">\n <link href=\"http://java.sun.com/j2se/1.5.0/docs/api/\" />\n</javadoc>\n\nAnd I'm getting this warning:\njavadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api/p... |
So I have about 10 short css files that I use with mvc app.
There are like
error.css
login.css
etc...
Just some really short css files that make updating and editing easy (At least for me). What I want is something that will optimize the if else branch and not incorporate it within the final bits. I want to do somethin... | To achieve the goal of conditionally including CSS files during development and serving a combined, minified file in production without including the conditional logic in the final output, you can use Razor views in your ASP.NET MVC application.
Here's a step-by-step approach to do this:
1. **Razor View Condition**:
... | 5,763 | [
{
"from": "human",
"value": "So I have about 10 short css files that I use with mvc app.\nThere are like\nerror.css\nlogin.css\netc...\nJust some really short css files that make updating and editing easy (At least for me). What I want is something that will optimize the if else branch and not incorporate i... |
My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief.
However recently I have needed to debug some very poorly written TSQL stored procs. As usual I found many of ... | Your observations about the differences between T-SQL stored procedures and CLR stored procedures are well-founded, and your perspective reflects a common debate among database developers. Here are several points to consider based on your views and experiences, along with some additional insights:
### Advantages of T-... | 4,612 | [
{
"from": "human",
"value": "My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief.\nHowever recently I have needed to debug some very poorly written TSQ... |
Can anyone recommend software or a .NET library that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then.
I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email).
| To handle bounced emails and automate the process of updating your user database, you can consider using several approaches involving libraries and services. Here's a combination of options, focusing on .NET libraries and services that can help you check for bounced emails and reason codes.
### Libraries and Tools
1.... | 2,803 | [
{
"from": "human",
"value": "Can anyone recommend software or a .NET library that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then.\nI need it to keep my user database clean from invalid email addresses and want to automate this (mark... |
Let's say I have a list of categories for navigation on a web app. Rather than selecting from the database for every user, should I add a function call in the application_onStart of the global.asax to fetch that data into an array or collection that is re-used over and over. If my data does not change at all - (Edit ... | Yes, if your category data does not change frequently and is relatively static, caching this data in memory when the application starts (using `Application_Start` in the `global.asax` file) can be a very efficient approach. This way, you avoid making repeated database calls for every user request, which can significant... | 6,388 | [
{
"from": "human",
"value": "Let's say I have a list of categories for navigation on a web app. Rather than selecting from the database for every user, should I add a function call in the application_onStart of the global.asax to fetch that data into an array or collection that is re-used over and over. I... |
I get the following error when building my Windows Forms solution:
"LC.exe" exited with code -1
I use two commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also use Visual Sourcesafe as our Source Control.
Wh... | The error you're encountering, "LC.exe exited with code -1," typically relates to issues with the licensing tool that Visual Studio uses to process the `licenses.licx` files for commercial components in Windows Forms applications. Here are some suggestions to resolve this issue:
1. **Check the Licenses.licx File Conte... | 4,272 | [
{
"from": "human",
"value": "I get the following error when building my Windows Forms solution: \n\n\"LC.exe\" exited with code -1\n\nI use two commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also ... |
Most mathematicians agree that:
eπi + 1 = 0
However, most floating point implementations disagree. How well can we settle this dispute?
I'm keen to hear about different languages and implementations, and various methods to make the result as close to zero as possible. Be creative!
| The equation \( e^{\pi i} + 1 = 0 \) is known as Euler's identity and it elegantly connects five fundamental mathematical constants. However, when computed using floating-point arithmetic, small precision errors can cause deviations from the expected result of zero. Let's explore how different programming languages and... | 3,410 | [
{
"from": "human",
"value": "Most mathematicians agree that:\n\neπi + 1 = 0\n\nHowever, most floating point implementations disagree. How well can we settle this dispute?\nI'm keen to hear about different languages and implementations, and various methods to make the result as close to zero as possible. Be ... |
I have a Rakefile with a Rake task that I would normally call from the command line:
rake blog:post Title
I'd like to write a Ruby script that calls that Rake task multiple times, but the only solution I see is shelling out using `` (backticks) or system.
What's the right way to do this?
| To call a Rake task programmatically from a Ruby script without using backticks or `system`, you can use the Rake API directly. This allows you to invoke Rake tasks from within your Ruby code in a more integrated way. Here's how to do it:
1. **Require Rake**: You'll need to require Rake in your script.
2. **Load the R... | 2,015 | [
{
"from": "human",
"value": "I have a Rakefile with a Rake task that I would normally call from the command line:\nrake blog:post Title\n\nI'd like to write a Ruby script that calls that Rake task multiple times, but the only solution I see is shelling out using `` (backticks) or system.\nWhat's the right w... |
My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real concern is someone embedding a virus in a pdf that is then viewed/altered (and the virus executed). I just read something on a procedure that cou... | Ensuring the safety of uploaded files, particularly those that may contain potentially harmful content, is a critical concern. Here are several strategies and considerations for handling file uploads securely, specifically for PDFs and TIFFs:
### 1. **File Type Validation**
- Only allow specific file types (e.g., P... | 6,193 | [
{
"from": "human",
"value": "My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real concern is someone embedding a virus in a pdf that is then viewed/altered (and the virus executed). I ju... |
A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the .h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, and invite others to post other useful resources for this, whether they be l... | One useful resource for understanding the conversion of C/C++ headers to Delphi is the **"C to Delphi Header File Converter"**. This tool helps automate the process of translating C/C++ header files into Delphi-compatible units, reducing manual effort and minimizing errors.
You can find more about this converter and d... | 9,479 | [
{
"from": "human",
"value": "A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the .h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, and invite others to post other use... |
I'm looking for a way to delete a file which is locked by another process using C#. I suspect the method must be able to find which process is locking the file (perhaps by tracking the handles, although I'm not sure how to do this in C#) then close that process before being able to complete the file delete using File.D... | Deleting a file that is locked by another process can be a challenging task, especially if you want to do it safely and programmatically. Here’s a general approach you can use in C# to identify the process that is locking the file and then terminate it, followed by deleting the file.
### Important Note
Before proceedi... | 3,368 | [
{
"from": "human",
"value": "I'm looking for a way to delete a file which is locked by another process using C#. I suspect the method must be able to find which process is locking the file (perhaps by tracking the handles, although I'm not sure how to do this in C#) then close that process before being able... |
example:
a_list = [1, 2, 3]
a_list.len() # doesn't work
len(a_list) # works
Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object.
Plus I keep trying the wrong solution since it appears as the logical one to me
| In Python, `len()` is a built-in function that returns the number of items in an object. While Python is indeed an object-oriented language, it does not work in the way you might expect when it comes to built-in functions.
### Understanding `len()`
1. **Built-in Functions**: `len()` is a built-in function that is not... | 3,871 | [
{
"from": "human",
"value": "example:\na_list = [1, 2, 3]\na_list.len() # doesn't work\nlen(a_list) # works\n\nPython being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object. \nPlus I keep trying the wrong solution since it appears as the logical one to me\n"
... |
I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF.
On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
| On Windows, you can use Python with libraries that can handle PDF files and generate JPEG images easily. One of the most straightforward ways to achieve this is by using the `pdf2image` library, which relies on `Poppler` (a PDF rendering library). Below are the steps to set it up and generate a JPEG preview of the firs... | 2,631 | [
{
"from": "human",
"value": "I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF.\nOn the Mac I am spawning sips. Is there something similarly simple I can do on Windows?\n"
},
{
"from": "gpt",
"value": "On Windows, you can use Python w... |
I work for a very small company (~5 employees, 2.5 coders). We have gotten away with no code or document management for several years, but it's starting to catch up with us as we grow a bit.
Any suggestions for a management system. Free is better, but cheap is acceptable. We just don't want to spend more time on ins... | Given your situation, it's important to choose a management system that is easy to set up and maintain, especially since you're working with a small team and don't want to invest too much time in installation and configuration. Below are several suggestions for code and document management that should fit your needs:
... | 4,035 | [
{
"from": "human",
"value": "I work for a very small company (~5 employees, 2.5 coders). We have gotten away with no code or document management for several years, but it's starting to catch up with us as we grow a bit.\nAny suggestions for a management system. Free is better, but cheap is acceptable. We... |
In what order are the following parameters tested (in C++)?
if (a || b && c)
{
}
I've just seen this code in our application and I hate it, I want to add some brackets to just clarify the ordering. But I don't want to add the brackets until I know I'm adding them in the right place.
Edit: Accepted Answer & Follow Up
T... | In C++, the logical operators `&&` (logical AND) and `||` (logical OR) have different precedence levels. The `&&` operator has a higher precedence than the `||` operator.
In the expression `a || b && c`, the logical AND (`&&`) is evaluated before the logical OR (`||`). Thus, the expression is effectively grouped as f... | 8,689 | [
{
"from": "human",
"value": "In what order are the following parameters tested (in C++)?\nif (a || b && c)\n{\n}\n\nI've just seen this code in our application and I hate it, I want to add some brackets to just clarify the ordering. But I don't want to add the brackets until I know I'm adding them in the ri... |
I was messing around with RhinoMocks this morning and couldn't run my tests because RhinoMocks.dll was not in a "trusted location". The assembly is in my c:\documents and settings\\My Documents\Visual Studio 2008\Projects (and so on) folder. What's the deal?
| The issue you're encountering with Rhino Mocks and the "trusted location" warning is likely related to security settings in .NET that restrict the execution of code from certain locations on your file system.
In .NET, assemblies (DLLs) need to be loaded from "trusted" locations to prevent potentially malicious code fr... | 6,423 | [
{
"from": "human",
"value": "I was messing around with RhinoMocks this morning and couldn't run my tests because RhinoMocks.dll was not in a \"trusted location\". The assembly is in my c:\\documents and settings\\\\My Documents\\Visual Studio 2008\\Projects (and so on) folder. What's the deal?\n"
},
{
... |
An odd issue that I have been trying to address in a project - my calls to WebClient.DownloadFileAsync seem to be getting ignored and no exceptions are being raised. So far I have been able to determine this might be due to destination folder not existing, but from the looks of the MSDN documentation for Webclient.Dow... | When using `WebClient.DownloadFileAsync`, it's important to note that it operates asynchronously, which means that the method call returns immediately and does not block the calling thread. If the destination folder does not exist, it's true that a `WebException` should generally be raised when the download attempt is ... | 6,712 | [
{
"from": "human",
"value": "An odd issue that I have been trying to address in a project - my calls to WebClient.DownloadFileAsync seem to be getting ignored and no exceptions are being raised. So far I have been able to determine this might be due to destination folder not existing, but from the looks of... |
I have a need to convert images from CMYK to RGB - not necessarily back again, but hey, if it can be done...
With the release of ColdFusion 8, we got the CFImage tag, but it doesn't support this conversion; and nor does Image.cfc, or Alagad's Image Component.
However, it should be possible in Java; which we can leverag... | Certainly! To convert images from CMYK to RGB using Java in ColdFusion, you'll want to leverage Java's image processing capabilities through the Java Advanced Imaging (JAI) library. Unfortunately, JAI is not part of the standard Java library, so you'll need to include it in your ColdFusion server's classpath.
Here’s a... | 5,327 | [
{
"from": "human",
"value": "I have a need to convert images from CMYK to RGB - not necessarily back again, but hey, if it can be done...\nWith the release of ColdFusion 8, we got the CFImage tag, but it doesn't support this conversion; and nor does Image.cfc, or Alagad's Image Component.\nHowever, it shoul... |
Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ?
If you've been mentored in the past what kind of things did you find most helpful ?
| Mentoring a junior programmer can be a rewarding experience for both the mentor and the mentee. Here are some suggestions on how to approach mentorship effectively, along with insights from both perspectives.
### Suggestions for Mentoring a Junior Programmer
1. **Set Clear Expectations:**
- At the beginning of the... | 3,678 | [
{
"from": "human",
"value": "Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ?\nIf you've been mentored in the past what kind of things did you find most helpful ?\n"
},
{
"from": "gpt",
"val... |
We need is to push sports data to a number of different client types such as ajax/javascript, flash, .NET and Mac/iPhone. Data updates need to only be near-real time with delays of several seconds being acceptable.
How to best accomplish this?
| To push sports data to various client types, you can employ a combination of technologies and strategies that allow for near-real-time updates while ensuring compatibility across different platforms. Here are some steps and considerations to accomplish this:
### 1. Choose a Data Source
- **APIs**: If you have access t... | 5,477 | [
{
"from": "human",
"value": "We need is to push sports data to a number of different client types such as ajax/javascript, flash, .NET and Mac/iPhone. Data updates need to only be near-real time with delays of several seconds being acceptable. \nHow to best accomplish this?\n"
},
{
"from": "gpt",
... |
i have a wcf service that does an operation. and in this operation there could be a fault. i have stated that there could be a fault in my service contract.
here is the code below;
public void Foo()
{
try
{
DoSomething(); // throws FaultException<FooFault>
}
catch (FaultExce... | When you encounter a situation where an exception is caught in your `catch(Exception ex)` block and you are breaking on the line where the exception is caught, it is likely due to how your development environment (for example, Visual Studio) is configured to handle exceptions.
### Reasons for the Breakpoint Behavior
... | 5,883 | [
{
"from": "human",
"value": "i have a wcf service that does an operation. and in this operation there could be a fault. i have stated that there could be a fault in my service contract. \nhere is the code below;\npublic void Foo()\n{\n try\n {\n DoSomething(); // throws FaultExcepti... |
So I've got a hobby site I'm working on. I've got items that are tagged and I want to associate those items with photos from Flickr. Even with restrictive searches, I might get results numbering in the thousands.
Requirements:
I want to display between 10-20 pictures but I want to randomize the photos each time. ... | To implement a solution that meets your requirements of displaying 10-20 Flickr photos associated with your hobby site's items while avoiding excessive requests to Flickr, you can follow these steps:
### 1. Fetch Relevant Photos from Flickr
Start by developing a process to fetch relevant photos from Flickr using thei... | 3,879 | [
{
"from": "human",
"value": "So I've got a hobby site I'm working on. I've got items that are tagged and I want to associate those items with photos from Flickr. Even with restrictive searches, I might get results numbering in the thousands.\nRequirements:\n\nI want to display between 10-20 pictures but I... |
I need to automate a process involving a website that is using a login form. I need to capture some data in the pages following the login page.
I know how to screen-scrape normal pages, but not those behind a secure site.
Can this be done with the .NET WebClient class?
How would I automatically login?
How would I k... | Automating the login process to a secure website and scraping data from pages that require authentication is a common task. While the .NET `WebClient` class can be used for making HTTP requests, it has limitations regarding managing sessions and cookies. Instead, it's often more effective to use `HttpClient` which prov... | 5,075 | [
{
"from": "human",
"value": "I need to automate a process involving a website that is using a login form. I need to capture some data in the pages following the login page.\nI know how to screen-scrape normal pages, but not those behind a secure site.\n\nCan this be done with the .NET WebClient class? \n\n\... |
Let's say I have a drive such as C:\, and I want to find out if it's shared and what it's share name (e.g. C$) is.
To find out if it's shared, I can use NetShareCheck.
How do I then map the drive to its share name? I thought that NetShareGetInfo would do it, but it looks like that takes the share name, not the local dr... | To determine if a local drive (like C:\) is shared and to get its share name, you can use a combination of Windows API functions or commands. Here's a way to do this using the command line, as well as an overview of how you would implement it programmatically.
### Using Command Line
1. **Check for Shares**: You can u... | 2,199 | [
{
"from": "human",
"value": "Let's say I have a drive such as C:\\, and I want to find out if it's shared and what it's share name (e.g. C$) is.\nTo find out if it's shared, I can use NetShareCheck.\nHow do I then map the drive to its share name? I thought that NetShareGetInfo would do it, but it looks like... |
Possible Duplicate:
Algorithm to find which numbers from a list of size n sum to another number
What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers? In my case, I am determining whether a certain currency amount (such as $40) can be met by adding up some com... | The problem you are describing is essentially a variant of the "subset sum problem," which is a well-known problem in computer science and combinatorial optimization. Given a target amount and a set of bill denominations, you want to determine whether you can create the target amount by summing some of the denomination... | 3,827 | [
{
"from": "human",
"value": "\nPossible Duplicate:\nAlgorithm to find which numbers from a list of size n sum to another number \n\nWhat is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers? In my case, I am determining whether a certain currency amount (... |
Ran into an “Out of Stack Space” error trying to serialize an ASP.Net AJAX Array object.
Here is the scenario with simplified code:
Default.aspx
MainScript.js
function getObject(){
return new Array();
}
function function1(obj){
var s=Sys.Serialization.JavaScriptSerializer.serialize(obj);
alert(s);
}
fun... | The "Out of Stack Space" error you're encountering is likely due to a circular reference or a recursive structure that the `JavaScriptSerializer` in ASP.NET AJAX cannot handle, especially when the objects are created in different execution contexts (like between a parent window and an iframe).
Here are some suggestio... | 5,613 | [
{
"from": "human",
"value": "Ran into an “Out of Stack Space” error trying to serialize an ASP.Net AJAX Array object. \nHere is the scenario with simplified code:\n\nDefault.aspx\nMainScript.js\nfunction getObject(){\n return new Array();\n}\n\nfunction function1(obj){\n var s=Sys.Serialization.JavaSc... |
We have a codebase that is several years old, and all the original developers are long gone. It uses many, many threads, but with no apparent design or common architectural principles. Every developer had his own style of multithreaded programming, so some threads communicate with one another using queues, some lock ... | Dealing with a complex, multithreaded codebase that lacks proper documentation and design can be quite challenging. Fortunately, there are several tools and techniques that can assist you in analyzing and documenting thread interactions in C++ on Linux. Here are some more sophisticated approaches you can consider:
###... | 4,159 | [
{
"from": "human",
"value": "We have a codebase that is several years old, and all the original developers are long gone. It uses many, many threads, but with no apparent design or common architectural principles. Every developer had his own style of multithreaded programming, so some threads communicate ... |
Does anybody have experience working with PHP accelerators such as MMCache or Zend Accelerator? I'd like to know if using either of these makes PHP comparable to faster web-technologies. Also, are there trade offs for using these?
| Yes, many developers have experience working with PHP accelerators like MMCache and Zend Accelerator. These tools are designed to improve the performance of PHP applications by caching the compiled opcode of PHP scripts, which can significantly reduce execution time by avoiding the overhead of parsing and compiling PHP... | 4,954 | [
{
"from": "human",
"value": "Does anybody have experience working with PHP accelerators such as MMCache or Zend Accelerator? I'd like to know if using either of these makes PHP comparable to faster web-technologies. Also, are there trade offs for using these?\n"
},
{
"from": "gpt",
"value": "Y... |
I had to delete all the rows from a log table that contained about 5 million rows. My initial try was to issue the following command in query analyzer:
delete from client_log
which took a very long time.
| Deleting a large number of rows, especially in a table with millions of records, can be quite slow because the `DELETE` command logs each row deletion and locks the table, which can lead to performance issues.
Here are some strategies to improve the deletion process:
### 1. **Batch Deletion**
Instead of deleting all ... | 6,258 | [
{
"from": "human",
"value": "I had to delete all the rows from a log table that contained about 5 million rows. My initial try was to issue the following command in query analyzer:\ndelete from client_log\nwhich took a very long time.\n"
},
{
"from": "gpt",
"value": "Deleting a large number of r... |
This question is about removing sequences from an array, not duplicates in the strict sense.
Consider this sequence of elements in an array;
[0] a
[1] a
[2] b
[3] c
[4] c
[5] a
[6] c
[7] d
[8] c
[9] d
In this example I want to obtain the following...
[0] a
[1] b
[2] c
[3] a
[4] c
[5] d
Notice that duplicate elements ... | To solve the problem of removing consecutive duplicate elements from an array while retaining the first instance of each sequence, we can use a simple algorithm that iterates through the array and keeps track of the last added element. We'll build a new list to hold the results.
Here’s how you can implement this in C#... | 6,190 | [
{
"from": "human",
"value": "This question is about removing sequences from an array, not duplicates in the strict sense.\nConsider this sequence of elements in an array;\n[0] a\n[1] a\n[2] b\n[3] c\n[4] c\n[5] a\n[6] c\n[7] d\n[8] c\n[9] d\n\nIn this example I want to obtain the following...\n[0] a\n[1] b\... |
What is the best C++ IDE or editor for using on Windows? I use Notepad++, but am missing IntelliSense from Visual Studio.
| When looking for a C++ IDE or editor on Windows that offers features like IntelliSense, there are several excellent options to consider:
1. **Visual Studio Community Edition**:
- **Overview**: This is a free, fully-featured version of Visual Studio suitable for individual developers and small teams. It offers robus... | 5,422 | [
{
"from": "human",
"value": "What is the best C++ IDE or editor for using on Windows? I use Notepad++, but am missing IntelliSense from Visual Studio.\n"
},
{
"from": "gpt",
"value": "When looking for a C++ IDE or editor on Windows that offers features like IntelliSense, there are several excell... |
For a situation like capturing text incrementally, for example if you were receiving all of the output.write calls when a page was rendering, and those were being appended into a textwriter over a stringbuilder.
Is there a more efficient way to do this? Something that exists in dotnet already preferably? Especially if ... | When dealing with scenarios that involve capturing incremental output, such as in a web application where `Response.Write` calls are made to render HTML content, there are several efficient techniques in .NET that you can consider. If you want to avoid using a large contiguous block of memory (like a `StringBuilder` or... | 5,458 | [
{
"from": "human",
"value": "For a situation like capturing text incrementally, for example if you were receiving all of the output.write calls when a page was rendering, and those were being appended into a textwriter over a stringbuilder.\nIs there a more efficient way to do this? Something that exists in... |
After answering on this question I thought it would be nice to collect some tips & tricks for working with MSVS solutions and projects.
Here is my list:
How to avoid saving new projects
automatically to reduce garbage in
file system.
Uncheck Tools->Options->Projects and Solutions->Save new projects when created
Ho... | That's a great list of tips for working with Microsoft Visual Studio solutions and projects! Here are some additional tips and tricks that might be helpful:
### Tips & Tricks for Working with Visual Studio Solutions and Projects
1. **Use Solution Folders for Organization**:
- Organize your projects into solution f... | 4,584 | [
{
"from": "human",
"value": "After answering on this question I thought it would be nice to collect some tips & tricks for working with MSVS solutions and projects. \nHere is my list: \n\nHow to avoid saving new projects\nautomatically to reduce garbage in\nfile system.\nUncheck Tools->Options->Projects a... |
Why does n not equal to 8 in the following function?
void foo(char cvalue[8])
{
int n = sizeof (cvalue);
}
But n does equal to 8 in this version of the function:
void bar()
{
char cvalue[8];
int n = sizeof (cvalue);
}
| The difference in the value of `n` in the two functions you provided relates to how arrays are treated in the context of function parameters in C and C++.
1. **In the function `foo`:**
```c
void foo(char cvalue[8])
{
int n = sizeof (cvalue);
}
```
Here, `cvalue` is declared as a parameter of the... | 6,652 | [
{
"from": "human",
"value": "Why does n not equal to 8 in the following function?\nvoid foo(char cvalue[8])\n{\n int n = sizeof (cvalue);\n}\n\nBut n does equal to 8 in this version of the function:\nvoid bar()\n{\n char cvalue[8];\n int n = sizeof (cvalue);\n}\n\n"
},
{
"from": "gpt",
"value... |
RPO 1.0 (Runtime Page Optimizer) is a recently (today?) released component for ASP and Sharepoint that compresses, combines and minifies (I can’t believe that is a real word) Javascript, CSS and other things.
What is interesting is that it was developed for ActionThis.com a NZ shop that saw at TechEd last year. They b... | It sounds like you've had an engaging experience integrating RPO 1.0 (Runtime Page Optimizer) into your site, and it’s great to hear that the vendor provided proactive support throughout the process. Here are a few comments and considerations based on your updates:
1. **Performance Improvement**: Compressing, combinin... | 5,723 | [
{
"from": "human",
"value": "RPO 1.0 (Runtime Page Optimizer) is a recently (today?) released component for ASP and Sharepoint that compresses, combines and minifies (I can’t believe that is a real word) Javascript, CSS and other things.\nWhat is interesting is that it was developed for ActionThis.com a NZ ... |
I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own messages.
It would also work to monitor for when a paste operation is executed,... | Extending drag and drop behavior and customizing paste operations in existing applications can be a complex task, and your idea of using a library like Microsoft Detours is indeed a viable approach. By intercepting and modifying API calls related to drag-and-drop functionality or clipboard operations, you can implement... | 6,221 | [
{
"from": "human",
"value": "I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own messages.\nIt would also work to monit... |
This is re-posted from something I posted on the DDD Yahoo! group.
All things being equal, do you write phone.dial(phoneNumber) or phoneNumber.dialOn(phone)? Keep in mind possible future requirements (account numbers in addition to phone numbers, calculators in addition to phones).
The choice tends to illustrate how th... | This is a classic design question that touches upon several important principles in object-oriented design, as you pointed out. Let's break down the implications of each option:
### Option 1: `phone.dial(phoneNumber)`
**Pros:**
- **Single Responsibility Principle (SRP):** The `phone` object is responsible for the dia... | 4,839 | [
{
"from": "human",
"value": "This is re-posted from something I posted on the DDD Yahoo! group.\nAll things being equal, do you write phone.dial(phoneNumber) or phoneNumber.dialOn(phone)? Keep in mind possible future requirements (account numbers in addition to phone numbers, calculators in addition to phon... |
Many times I have seen Visual Studio solutions which have multiple projects that share source files. These common source files are usually out in a common directory and in the solution explorer their icon shows up with a link arrow in the bottom left.
However, any time I try to add a source file to the project that is... | Yes, in Visual Studio, you can add existing files as links to your project instead of copying them into the project's directory. This will allow you to share the same source files across multiple projects without duplicating them.
Here’s how to do it from within the Visual Studio IDE:
1. **Right-click on the Project*... | 3,137 | [
{
"from": "human",
"value": "Many times I have seen Visual Studio solutions which have multiple projects that share source files. These common source files are usually out in a common directory and in the solution explorer their icon shows up with a link arrow in the bottom left.\nHowever, any time I try t... |
When and how should table stats gathering be performed for Oracle, version 9 and up? How would you go about gathering stats for a large database, where stats gathering would collide with "business hours".
| Gathering statistics in Oracle is essential for the optimizer to make informed decisions about how to execute queries efficiently. This is particularly important in Oracle versions 9 and up, as the optimizer relies heavily on accurate statistics to choose the best execution plans.
### When to Gather Statistics
1. **A... | 3,701 | [
{
"from": "human",
"value": "When and how should table stats gathering be performed for Oracle, version 9 and up? How would you go about gathering stats for a large database, where stats gathering would collide with \"business hours\".\n"
},
{
"from": "gpt",
"value": "Gathering statistics in Ora... |
The following code is causing an intermittent crash on a Vista machine.
using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE))
myPlayer.Play();
I highly suspect it is this code because the program crashes mid-beep or just before the beep is played every time. I have top-level traps for all... | The intermittent crash you're experiencing when trying to play a sound using `SoundPlayer` could be due to a few potential issues, especially given the context of the error message you're seeing in the Event Viewer. The `STATUS_ACCESS_VIOLATION` indicates that there’s an attempt to read from or write to memory that the... | 2,973 | [
{
"from": "human",
"value": "The following code is causing an intermittent crash on a Vista machine.\nusing (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE))\n myPlayer.Play();\n\nI highly suspect it is this code because the program crashes mid-beep or just before the beep is playe... |
What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
| The GNU Compiler for Java (GCJ) allows you to compile Java code to native executables. However, it's important to note that as of version 4.0, GCJ's support for Java has diminished and it is not actively maintained in more recent GCC versions. If you're set on using GCJ 4.x to create a Windows executable, here are the ... | 5,748 | [
{
"from": "human",
"value": "What compiler (I'm using gcj 4.x) options should I use to generate an \"exe\" file for my java application to run in windows?\n"
},
{
"from": "gpt",
"value": "The GNU Compiler for Java (GCJ) allows you to compile Java code to native executables. However, it's importa... |
Has anyone had any luck of using Oracle from .Net on a 64 bit machine, and using the UDT capabilities of Oracle?
I've been able to use an x64 ODP.Net client, but cannot find one with any support for UDTs.
Thanks
Nick
[Edit]
I've posted an answer below. The latest (as of December 2008) release is 11.1.0.7. This has supp... | Yes, using Oracle's ODP.NET (Oracle Data Provider for .NET) on a 64-bit machine to access UDTs (User Defined Types) has been supported since certain versions. As you've mentioned, starting from Oracle Client version 11.1.0.7, there is support for 64-bit environments and UDT capabilities.
To use UDTs with ODP.NET on a ... | 6,693 | [
{
"from": "human",
"value": "Has anyone had any luck of using Oracle from .Net on a 64 bit machine, and using the UDT capabilities of Oracle?\nI've been able to use an x64 ODP.Net client, but cannot find one with any support for UDTs.\nThanks\nNick\n[Edit]\nI've posted an answer below. The latest (as of Dec... |
I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the concrete type?
| You're on the right track by considering when to use the interface (`IList`) versus the concrete type (`List<T>`). Here's a more structured way to decide when to use each:
### Use the Interface (`IList`):
1. **Abstraction**: Use `IList` when you want to provide a level of abstraction. This allows you to change the un... | 3,949 | [
{
"from": "human",
"value": "I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the concr... |
I'm reading lines of input on a TCP socket, similar to this:
class Bla
def getcmd
@sock.gets unless @sock.closed?
end
def start
srv = TCPServer.new(5000)
@sock = srv.accept
while ! @sock.closed?
ans = getcmd
end
end
end
If the endpoint terminates the connection while getline()... | You're correct that using `gets` (or `getline`) on a TCP socket can block indefinitely if the other side closes the connection while you're waiting for input. To work around this issue, you can use a couple of strategies.
### Option 1: Use Non-blocking I/O
One way to avoid blocking behavior is to use non-blocking soc... | 3,187 | [
{
"from": "human",
"value": "I'm reading lines of input on a TCP socket, similar to this:\nclass Bla \n def getcmd\n @sock.gets unless @sock.closed?\n end\n\n def start \n srv = TCPServer.new(5000)\n @sock = srv.accept\n while ! @sock.closed?\n ans = getcmd\n end\n end\nend\n\nI... |
Why doesn't this Google Chart API URL render both data sets on this XY scatter plot?
http://chart.apis.google.com/chart?cht=lxy&chd=t:10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200|0.10,0.23,0.33,0.44,0.56,0.66,0.79,0.90,0.99,1.12,1.22,1.33,1.44,1.56,1.68,1.79,1.90,2.02,2.12,2.22|0.28,0.56,0.8... | The issue with your Google Chart API URL seems to be related to how you've structured the data sets for the XY scatter plot and how you're trying to use the `chd` parameter.
In the Google Chart API for scatter plots (i.e., `cht=lxy`), the data is structured as follows:
- The first data set represents the X values.
- T... | 6,323 | [
{
"from": "human",
"value": "Why doesn't this Google Chart API URL render both data sets on this XY scatter plot? \nhttp://chart.apis.google.com/chart?cht=lxy&chd=t:10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200|0.10,0.23,0.33,0.44,0.56,0.66,0.79,0.90,0.99,1.12,1.22,1.33,1.44,1.56,1... |
I have 2 SQLite databases, one downloaded from a server (server.db), and one used as storage on the client (client.db). I need to perform various sync queries on the client database, using data from the server database.
For example, I want to delete all rows in the client.db tRole table, and repopulate with all rows in... | In SQLite, there isn't a direct way to reference multiple databases in the same SQL statement like you would in SQL Server. However, SQLite does allow you to attach another database file to your current database connection, which will enable you to perform queries across both databases.
Here’s how you can achieve what... | 2,364 | [
{
"from": "human",
"value": "I have 2 SQLite databases, one downloaded from a server (server.db), and one used as storage on the client (client.db). I need to perform various sync queries on the client database, using data from the server database.\nFor example, I want to delete all rows in the client.db tR... |
Of all the forms of CAPTCHA available, which one is the "least crackable" while remaining fairly human readable?
| Among the various forms of CAPTCHA, the "least crackable" while remaining fairly human-readable is often considered to be the "reCAPTCHA v3" system by Google. This version operates differently from traditional CAPTCHAs. Instead of requiring user interaction (like typing distorted text or selecting images), reCAPTCHA v3... | 8,630 | [
{
"from": "human",
"value": "Of all the forms of CAPTCHA available, which one is the \"least crackable\" while remaining fairly human readable?\n"
},
{
"from": "gpt",
"value": "Among the various forms of CAPTCHA, the \"least crackable\" while remaining fairly human-readable is often considered t... |
We are creating a Real-Time Process in VxWorks 6.x, and we would like to limit the amount of memory which can be allocated to the heap. How do we do this?
| In VxWorks 6.x, you can limit the amount of memory available to the heap by configuring the system memory settings when you create your project or by modifying system configuration parameters. Here are some ways to do this:
1. **Using the `malloc` and `free` Configuration**:
You can define a heap size for your appl... | 5,896 | [
{
"from": "human",
"value": "We are creating a Real-Time Process in VxWorks 6.x, and we would like to limit the amount of memory which can be allocated to the heap. How do we do this?\n"
},
{
"from": "gpt",
"value": "In VxWorks 6.x, you can limit the amount of memory available to the heap by co... |
I saw this same question for VIM and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs?
| In Emacs, if you're looking to duplicate the current line or region (similar to what you might do in ReSharper with `CTRL-D`), you can achieve this with a combination of built-in commands. Here's a straightforward way to do it:
1. **Select the Line (or Region):**
- Move the cursor to the line you want to duplicate.... | 7,405 | [
{
"from": "human",
"value": "I saw this same question for VIM and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs?\n"
},
{
"from": "gpt",
"value": "In Emacs, if you're... |
I've been trying to convert SVG images to PNG using C#, without having to write too much code. Can anyone recommend a library or example code for doing this?
| To convert SVG images to PNG in C#, you can use the **Svg** library in combination with the **System.Drawing** namespace. The Svg library provides an easy way to load SVG files, and System.Drawing can be used to render them as PNG images.
Here’s a simple example that demonstrates how to perform the conversion:
1. Fi... | 6,700 | [
{
"from": "human",
"value": "I've been trying to convert SVG images to PNG using C#, without having to write too much code. Can anyone recommend a library or example code for doing this?\n"
},
{
"from": "gpt",
"value": "To convert SVG images to PNG in C#, you can use the **Svg** library in combi... |
I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration.
Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level.
Does anyone know the equivalent setup when using just Resin as the web server?
| When transitioning from an Apache + Resin setup to a Resin-only configuration, you'll need to replicate the functionality of `.htaccess` for password protection and access control directly within the Resin configuration files. Resin doesn't support `.htaccess` files, so you'll configure security at the application leve... | 2,638 | [
{
"from": "human",
"value": "I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration.\nCurrently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level.\nDoes anyone know the equivalent setup when using just R... |
In a custom module for drupal 4.7 I hacked together a node object and passed it to node_save($node) to create nodes. This hack appears to no longer work in drupal 6. While I'm sure this hack could be fixed I'm curious if there is a standard solution to create nodes without a form. In this case the data is pulled in ... | In Drupal 6, the way nodes are handled has changed a bit compared to Drupal 4.7, and it's important to use the proper structure when creating nodes programmatically. Here’s a straightforward approach to create nodes without using a form.
You can create a node programmatically by building a node object, filling in its ... | 7,562 | [
{
"from": "human",
"value": "In a custom module for drupal 4.7 I hacked together a node object and passed it to node_save($node) to create nodes. This hack appears to no longer work in drupal 6. While I'm sure this hack could be fixed I'm curious if there is a standard solution to create nodes without a f... |
I am trying to do something I've done a million times and it's not working, can anyone tell me why?
I have a table for people who sent in resumes, and it has their email address in it...
I want to find out if any of these people have NOT signed up on the web site. The aspnet_Membership table has all the people who ARE ... | Your logic for identifying emails from the `jobseeker` table that are not present in the `aspnet_Membership` table seems sound, but there may be a few reasons why your second query returns no results. Here are some possibilities to consider:
1. **Null Values in the `aspnet_Membership` Table**: If the `email` column in... | 6,974 | [
{
"from": "human",
"value": "I am trying to do something I've done a million times and it's not working, can anyone tell me why?\nI have a table for people who sent in resumes, and it has their email address in it...\nI want to find out if any of these people have NOT signed up on the web site. The aspnet_M... |
Is there any Visual Studio Add-In that can do the remove method refactoring?
Suppose you have the following method:
Result DoSomething(parameters)
{
return ComputeResult(parameters);
}
Or the variant where Result is void.
The purpose of the refactoring is to replace all the calls to DoSomething with call... | While there might not be a specific Visual Studio Add-In solely dedicated to the "remove method" refactoring you described, you can achieve similar functionality with built-in features and some third-party tools. Here's how you can approach this:
### Built-in Refactoring Tools
Visual Studio has a built-in refactoring ... | 2,404 | [
{
"from": "human",
"value": "Is there any Visual Studio Add-In that can do the remove method refactoring?\nSuppose you have the following method: \nResult DoSomething(parameters) \n{ \n return ComputeResult(parameters); \n} \n\nOr the variant where Result is void.\nThe purpose of the refactoring is ... |
I have a database with a table Customers that have some data
I have another database in the office that everything is the same, but my table Customers is empty
How can I create a sql file in SQL Server 2005 (T-SQL) that takes everything on the table Customers from the first database, creates a, let's say, buildcustomer... | To achieve what you want—exporting data from a `Customers` table in one SQL Server database to a `.sql` file, and then executing that file in another database—you can use a combination of SQL Server Management Studio (SSMS), T-SQL, and possibly some additional command-line tools. Below are the steps to create a SQL fil... | 2,649 | [
{
"from": "human",
"value": "I have a database with a table Customers that have some data\nI have another database in the office that everything is the same, but my table Customers is empty\nHow can I create a sql file in SQL Server 2005 (T-SQL) that takes everything on the table Customers from the first da... |
I use fdopen to associate a stream with an open file.
When I close() the file, is the stream automatically disassociated as well, and all stream memory returned to the OS, or do I need to be aware of the fdopen'd file and close it in a specific manner?
-Adam
| When you use `fdopen` to associate a stream with an open file descriptor, closing the file descriptor using `close()` does not automatically close the associated stream. You need to handle the stream separately.
Here's a summary of what happens:
1. When you use `fdopen`, it creates a `FILE*` stream that is associated... | 7,432 | [
{
"from": "human",
"value": "I use fdopen to associate a stream with an open file.\nWhen I close() the file, is the stream automatically disassociated as well, and all stream memory returned to the OS, or do I need to be aware of the fdopen'd file and close it in a specific manner?\n-Adam\n"
},
{
"f... |
I've done several flash projects working as the ActionScripter with a designer doing all the pretty things and animation. When starting out I found quite a lot of information about ActionScript coding and flash design. Most of the information available seems to focus on one or the other.
I didn't find any information a... | It's great to hear about your experience working with Flash and ActionScript, and your insights are quite valuable for anyone looking to create a collaborative environment between designers and developers. Here are some additional thoughts and tips that might help enhance the workflow between coders and designers:
###... | 4,293 | [
{
"from": "human",
"value": "I've done several flash projects working as the ActionScripter with a designer doing all the pretty things and animation. When starting out I found quite a lot of information about ActionScript coding and flash design. Most of the information available seems to focus on one or t... |
I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line.
I could do this in Perl rather quickly, but I was wondering if there was an easy solution using ba... | You can achieve this task using a combination of `awk` and shell scripting in bash. Here's a way to do it:
1. Use `awk` to read through the file, process each line, and write the output to separate files based on the line number.
2. Alternate between the first 5 characters and the last 5 characters of each line.
Here... | 4,924 | [
{
"from": "human",
"value": "I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line.\nI could do this in Perl rather quickly, but I was wonder... |
I was listening to a podcast. Where they talked about principles Toyota was using:
Never do anything until you are ready to use it.
I think this tells us to look in other places, to learn what other practices have been known for years.
| It sounds like the podcast was discussing principles related to Toyota's approach to lean manufacturing and continuous improvement, often referred to as the Toyota Production System (TPS). The principle you mentioned, "Never do anything until you are ready to use it," emphasizes the importance of readiness and efficien... | 8,391 | [
{
"from": "human",
"value": "I was listening to a podcast. Where they talked about principles Toyota was using:\n\nNever do anything until you are ready to use it.\n\nI think this tells us to look in other places, to learn what other practices have been known for years.\n"
},
{
"from": "gpt",
"v... |
I've followed this otherwise excellent tutorial on getting Xen working with Ubuntu but am not able to get a console into my virtual machine (domU). I've got the extra = '2 console=xvc0' line in my /etc/xen/hostname_here.cfg file like they say, but am not able to get a console on it.
If I statically assign an IP to the ... | It sounds like you're trying to access the console of your Xen virtual machine (domU) but are experiencing issues. Here are a few troubleshooting steps and suggestions you can try:
1. **Check Xen Console Output**:
Ensure that the Xen hypervisor is correctly configured to allow console access. In your domU configura... | 2,486 | [
{
"from": "human",
"value": "I've followed this otherwise excellent tutorial on getting Xen working with Ubuntu but am not able to get a console into my virtual machine (domU). I've got the extra = '2 console=xvc0' line in my /etc/xen/hostname_here.cfg file like they say, but am not able to get a console on... |
I am planning to give a Technical presentation for a product we are building.
Intended audience is Technical developers. So, most of the time, I will be debugging trough the code in Visual Studio, performance analysis, some architecture review etc.
I have read couple of blogs on font sizes to use, templates to use on V... | Keeping a technical presentation engaging, especially when diving into code, performance analysis, or architecture, can be challenging. Here are some strategies and stories to help make your session interesting and interactive:
### 1. Start with a Story
Begin your presentation with a relatable story or anecdote that c... | 5,487 | [
{
"from": "human",
"value": "I am planning to give a Technical presentation for a product we are building.\nIntended audience is Technical developers. So, most of the time, I will be debugging trough the code in Visual Studio, performance analysis, some architecture review etc.\nI have read couple of blogs ... |
If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be?
Please explain how you arrived at your answer (since if all you did was pick a number, then I could have done that all by myself ;)
| When considering a mandate for minimum percentage code coverage for unit tests, a common range is between **70% and 90%** coverage. This range strikes a balance between ensuring that a significant portion of the codebase is tested while acknowledging the practical realities of software development. Here's how I arrived... | 5,983 | [
{
"from": "human",
"value": "If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be?\nPlease explain how you arrived at your answer (since if all you did was pick a number, then I could have done that all by my... |
Background
Last year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but for data analysis, it's a real pain. On top of th... | It's great to hear about your experiences and the reflections you've made regarding software development in the natural sciences. Let's break down your questions and summarize the insights based on common practices and experiences in scientific programming.
### Languages/Environments for Scientific Software Developmen... | 5,463 | [
{
"from": "human",
"value": "Background\nLast year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but for dat... |
How do I Unit Test a MVC redirection?
public ActionResult Create(Product product)
{
_productTask.Save(product);
return RedirectToAction("Success");
}
public ActionResult Success()
{
return View();
}
Is Ayende's approach still the best way to go, with preview 5:
public static void RenderView(this Con... | Unit testing MVC actions that involve redirection is a common scenario, and you can definitely test your `Create` action without using reflection or invoking private methods. The use of `Ayende's approach` you mentioned is not necessary; there are simpler ways to accomplish this using testing frameworks and the built-i... | 5,799 | [
{
"from": "human",
"value": "How do I Unit Test a MVC redirection?\npublic ActionResult Create(Product product)\n{\n _productTask.Save(product);\n return RedirectToAction(\"Success\"); \n}\n\npublic ActionResult Success()\n{ \n return View();\n}\n\nIs Ayende's approach still the best way to go, ... |
How do i measure how long a client has to wait for a request.
On the server side it is easy, through a filter for example.
But if we want to take into accout the total time including latency and data transfer, it gets diffcult.
is it possible to access the underlying socket to see when the request is finished?
or is i... | Measuring the total time a client has to wait for a request, including server processing time, network latency, and data transfer time, can be challenging. Here are some methods and considerations for achieving this:
### 1. Server-Side Timing
On the server side, you can measure the time taken to process the request, a... | 3,859 | [
{
"from": "human",
"value": "How do i measure how long a client has to wait for a request. \nOn the server side it is easy, through a filter for example.\nBut if we want to take into accout the total time including latency and data transfer, it gets diffcult.\nis it possible to access the underlying socket ... |
What is the best way to use ResolveUrl() in a Shared/static function in Asp.Net? My current solution for VB.Net is:
Dim x As New System.Web.UI.Control
x.ResolveUrl("~/someUrl")
Or C#:
System.Web.UI.Control x = new System.Web.UI.Control();
x.ResolveUrl("~/someUrl");
But I realize that isn't the best way of calling it.... | Using `ResolveUrl` in a shared or static function in ASP.NET can be a little tricky because `ResolveUrl` is an instance method of the `Control` class, and it typically requires a reference to a control that is part of a page or a user control.
The approach you've taken—creating a new instance of `Control` just to call... | 6,245 | [
{
"from": "human",
"value": "What is the best way to use ResolveUrl() in a Shared/static function in Asp.Net? My current solution for VB.Net is:\nDim x As New System.Web.UI.Control\nx.ResolveUrl(\"~/someUrl\")\n\nOr C#:\nSystem.Web.UI.Control x = new System.Web.UI.Control();\nx.ResolveUrl(\"~/someUrl\");\n\... |
How can I resize an image, with the image quality unaffected?
| Resizing an image while maintaining its quality can be achieved through several methods and techniques. Here are some steps and tips to help you resize an image effectively:
### 1. Use High-Quality Software
- **Photoshop**: Adobe Photoshop is a professional tool that offers advanced resizing options.
- **GIMP**: A fre... | 6,205 | [
{
"from": "human",
"value": "How can I resize an image, with the image quality unaffected?\n"
},
{
"from": "gpt",
"value": "Resizing an image while maintaining its quality can be achieved through several methods and techniques. Here are some steps and tips to help you resize an image effectively... |
I have a "watcher" module that is currently using global hierarchies inside it. I need to instantiate a second instance of this with a second global hierarchy.
Currently:
module watcher;
wire sig = `HIER.sig;
wire bar = `HIER.foo.bar;
...
endmodule
watcher w; // instantiation
Desired:
module watcher(input base_hier)... | You can achieve this more elegantly by utilizing parameterized modules in Verilog instead of generating separate copies of your module using a preprocessor. Here's how you can modify your `watcher` module to accept a hierarchical base as a parameter:
1. **Define a Parameterized Module**: Instead of using a hard-coded ... | 5,299 | [
{
"from": "human",
"value": "I have a \"watcher\" module that is currently using global hierarchies inside it. I need to instantiate a second instance of this with a second global hierarchy.\nCurrently:\nmodule watcher;\nwire sig = `HIER.sig;\nwire bar = `HIER.foo.bar;\n...\nendmodule\n\nwatcher w; // inst... |
What are the essential vim commands? What does a new-user need to know to keep themselves from getting into trouble? One command per comment, please.
| Sure! Here's the first essential vim command:
1. **`:q`** - Quit Vim. This command will close the editor if no changes have been made to the file. If there are unsaved changes, Vim will warn you. | 8,533 | [
{
"from": "human",
"value": "What are the essential vim commands? What does a new-user need to know to keep themselves from getting into trouble? One command per comment, please.\n"
},
{
"from": "gpt",
"value": "Sure! Here's the first essential vim command:\n\n1. **`:q`** - Quit Vim. This comm... |
I have:
<?php
$file=fopen(date("Y-m-d").".txt","r+") or exit("Unable to open file!");
if ($_POST["lastname"] <> "")
{
fwrite($file,$_POST["lastname"]."\n");
}
fclose($file);
?>
but it overwrites the beginning of the file. How do I make it insert?
| To modify your code so that it appends new content to the end of the file instead of overwriting it, you need to ensure that you're opening the file in a mode that allows for appending. The mode `"r+"` opens the file for reading and writing but does not automatically append. Instead, you can use the `"a"` mode to appen... | 8,360 | [
{
"from": "human",
"value": "I have:\n<?php\n\n$file=fopen(date(\"Y-m-d\").\".txt\",\"r+\") or exit(\"Unable to open file!\");\n\nif ($_POST[\"lastname\"] <> \"\")\n{\n fwrite($file,$_POST[\"lastname\"].\"\\n\");\n}\n\nfclose($file);\n\n?>\n\nbut it overwrites the beginning of the file. How do I make it ... |
PL/SQL is not my native tongue. Oracle supports writing stored procedures in Java. What are the advantages of doing this over writing the stored procedures in PL/SQL
| Using Java to write stored procedures in Oracle databases can offer several advantages over using PL/SQL. Here are some key benefits:
1. **Object-Oriented Features**: Java is an object-oriented programming language, which allows for the use of concepts like inheritance, polymorphism, and encapsulation. This can help i... | 6,122 | [
{
"from": "human",
"value": "PL/SQL is not my native tongue. Oracle supports writing stored procedures in Java. What are the advantages of doing this over writing the stored procedures in PL/SQL\n"
},
{
"from": "gpt",
"value": "Using Java to write stored procedures in Oracle databases can offer ... |
I've googled around for this, but I still have trouble relating to what Django defines as "apps".
Should I create a new app for each piece of functionality in a site, even though it uses models from the main project?
Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality to... | Django’s concept of "apps" can be a bit confusing at first, but it’s essentially a way to organize your project into manageable components. Here are some guidelines and rules of thumb to help you decide when to create a new app versus keeping functionality together:
### What is a Django App?
A Django app is a self-co... | 6,348 | [
{
"from": "human",
"value": "I've googled around for this, but I still have trouble relating to what Django defines as \"apps\". \nShould I create a new app for each piece of functionality in a site, even though it uses models from the main project? \nDo you guys have good rule of thumb of when to split off... |
I'm passing raw HTTP requests to an apache server (received by PHP). The request is of type multipart/form-data, i.e. the same MIME type used when submitting HTML forms.
However, I'm not sure what HTTP header to use for setting the form field name (I'm just assuming it's a header defining this, don't know what else it... | When sending a multipart/form-data request, the fields in the form need to include a `Content-Disposition` header to specify the name of the field, the filename (if applicable), and any other relevant parameters. The `Content-Disposition` header is essential for the server-side code (like PHP) to recognize and correctl... | 7,387 | [
{
"from": "human",
"value": "I'm passing raw HTTP requests to an apache server (received by PHP). The request is of type multipart/form-data, i.e. the same MIME type used when submitting HTML forms. \nHowever, I'm not sure what HTTP header to use for setting the form field name (I'm just assuming it's a hea... |
I've searched on the Internet for comparisons between F# and Haskell but haven't found anything really definitive. What are the primary differences and why would I want to choose one over the other?
| F# and Haskell are both functional programming languages, but they have different design philosophies, ecosystems, and intended use cases. Here's a detailed comparison that highlights their primary differences:
### 1. **Language Paradigms and Design Goals**
- **F#:**
- **Multi-paradigm:** While primarily a functiona... | 624 | [
{
"from": "human",
"value": "I've searched on the Internet for comparisons between F# and Haskell but haven't found anything really definitive. What are the primary differences and why would I want to choose one over the other?\n"
},
{
"from": "gpt",
"value": "F# and Haskell are both functional ... |
I want to know how to fully uninstall MSSQL 2005.
I've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade to MSSQL 2005 SP2. Anyway, the "full" version of the software w... | Uninstalling SQL Server 2005, especially when dealing with trial versions and potential leftover components, can sometimes be tricky. Here's a step-by-step guide on how to ensure a complete uninstallation before trying to reinstall MSSQL 2005:
### Step 1: Uninstall SQL Server 2005 Components
1. **Stop SQL Server Serv... | 3,931 | [
{
"from": "human",
"value": "I want to know how to fully uninstall MSSQL 2005. \nI've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade to MSSQL 2005 SP2. An... |
Is there a way to check to see if an iPhone is online from a web app. That is, in mobile Safari, can I check the online status of the device to see if I should try an AJAX call or not.
In Firefox/regular WebKit, this would be:
if(navigator.onLine)
{
onlineCode()
}
| Yes, you can check if an iPhone (or any device) is online from a web app using the `navigator.onLine` property, which is part of the HTML5 specification. This property returns a Boolean value indicating whether the browser is online or offline.
Here's a basic example of how you can use `navigator.onLine` to determine ... | 6,546 | [
{
"from": "human",
"value": "Is there a way to check to see if an iPhone is online from a web app. That is, in mobile Safari, can I check the online status of the device to see if I should try an AJAX call or not.\nIn Firefox/regular WebKit, this would be:\nif(navigator.onLine) \n{\n onlineCode() \n}\n\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.