instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
In the Vim and Emacs terminal apps, the color schemes look horrid. How do I enable the colors to be as vibrant as the GUI version (or more than 8 colors for that matter)? Should I just give up, and move over to their respective GUI applications? And if so, which?
To enhance the color schemes in the terminal versions of Vim and Emacs and achieve a more vibrant appearance similar to their GUI counterparts, you can follow these guidelines: ### For Vim 1. **Terminal Support**: First, ensure your terminal emulator supports 256 colors or true colors (24-bit color). You can check th...
4,765
[ { "from": "human", "value": "In the Vim and Emacs terminal apps, the color schemes look horrid. How do I enable the colors to be as vibrant as the GUI version (or more than 8 colors for that matter)?\nShould I just give up, and move over to their respective GUI applications? And if so, which?\n" }, { ...
I am looking for a way to create an int\long representation of an arbitrary alpha-numeric String. Hash codes won't do it, because I can't afford hash collisions i.e. the representation must be unique and repeatable. The numeric representation will be used to perform efficient (hopefully) compares. The creation of the ...
If you need to create a unique numeric representation for an arbitrary alphanumeric string, you can consider a few different approaches. Here are some potential methods you could use, along with their advantages and disadvantages. ### 1. **Base Conversion** One approach is to convert your alphanumeric string into a n...
980
[ { "from": "human", "value": "I am looking for a way to create an int\\long representation of an arbitrary alpha-numeric String. Hash codes won't do it, because I can't afford hash collisions i.e. the representation must be unique and repeatable. \nThe numeric representation will be used to perform efficient...
I've been attempting move a directory structure from one location to another in Subversion, but I get an Item '*' is out of date commit error. I have the latest version checked out (so far as I can tell). svn st -u turns up no differences other than the mv commands.
The "Item '*' is out of date" error in Subversion usually occurs when your working copy is out of sync with the repository. This can happen even if you believe you have the latest version, particularly if there have been changes made to the repository after your last update. Here's a step-by-step guide to resolve this...
6,673
[ { "from": "human", "value": "I've been attempting move a directory structure from one location to another in Subversion, but I get an Item '*' is out of date commit error. \nI have the latest version checked out (so far as I can tell). svn st -u turns up no differences other than the mv commands.\n" }, ...
Can anyone point me to a good introduction to coding against the paypal API?
Certainly! Here are some resources that can help you get started with coding against the PayPal API: 1. **PayPal Developer Documentation**: - The official PayPal developer site has comprehensive documentation covering all aspects of the API, including getting started, integration guides, and reference material. ...
5,766
[ { "from": "human", "value": "Can anyone point me to a good introduction to coding against the paypal API?\n" }, { "from": "gpt", "value": "Certainly! Here are some resources that can help you get started with coding against the PayPal API:\n\n1. **PayPal Developer Documentation**:\n - The offi...
I have an array of objects that when another object hits one of them, the object will be removed. I have removed it from the stage using removeChild() and removed from the array using splice(), but somehow the object is still calling some of its functions which is causing errors. How do I completely get rid of an objec...
When you remove an object from the display list using `removeChild()` and from an array using `splice()`, you're usually on the right track to completely remove that object. However, if you're still encountering errors or unexpected behavior, there are a few things you might want to check: 1. **Ensure Proper Cleanup**...
5,918
[ { "from": "human", "value": "I have an array of objects that when another object hits one of them, the object will be removed. I have removed it from the stage using removeChild() and removed from the array using splice(), but somehow the object is still calling some of its functions which is causing errors...
VMware ESX, ESXi, and VirtualCenter are supposed to be able to support HTTP PUT uploads since version 3.5. I know how to do downloads, that's easy. I've never done PUT before. Background information on the topic is here: http://communities.vmware.com/thread/117504
To perform HTTP PUT uploads to VMware ESX or ESXi hosts, you'll generally be working with the VMware API. Since you've mentioned that you are familiar with downloading, the process for uploading is somewhat analogous but involves sending data to the server rather than receiving it. Here's a general outline of how to p...
5,126
[ { "from": "human", "value": "VMware ESX, ESXi, and VirtualCenter are supposed to be able to support HTTP PUT uploads since version 3.5. I know how to do downloads, that's easy. I've never done PUT before.\nBackground information on the topic is here: http://communities.vmware.com/thread/117504\n" }, { ...
How can I stop Visual Studio (both 2005 and 2008) from crashing (sometimes) when I select the "Close All But This" option?This does not happen all the time either.
Experiencing crashes in Visual Studio, particularly with options like "Close All But This", can be frustrating. Here are some troubleshooting steps and potential solutions that may help mitigate this issue: ### General Solutions 1. **Update Visual Studio**: Ensure you have installed all available updates and service p...
5,256
[ { "from": "human", "value": "How can I stop Visual Studio (both 2005 and 2008) from crashing (sometimes) when I select the \"Close All But This\" option?This does not happen all the time either.\n" }, { "from": "gpt", "value": "Experiencing crashes in Visual Studio, particularly with options lik...
I have a report in Reporting services, and when I preview it, the headers for a table wrap, but when I export it to Excel, the don't. They just get cut off. Any ideas on how to force it to wrap when I export to Excel?
In SQL Server Reporting Services (SSRS), the behavior of text wrapping in exported formats can differ from the on-screen preview, especially when exporting to Excel. If your headers are wrapping correctly in the preview but getting cut off in the Excel export, here are a few approaches you can take to ensure that the h...
4,934
[ { "from": "human", "value": "I have a report in Reporting services, and when I preview it, the headers for a table wrap, but when I export it to Excel, the don't. They just get cut off. Any ideas on how to force it to wrap when I export to Excel?\n" }, { "from": "gpt", "value": "In SQL Server R...
I am about to move to SVN as my RCS of choice (after many years using CVS) and have a basic question... I have a number of shared projects - code that I want to use with lots of different projects. Is it possible to 'link' these shared folders to the projects that need them, so checking out a project will also checkou...
In Subversion (SVN), you can achieve a similar effect to what you described with symbolic links in CVS by using "external definitions." SVN has a feature called "svn:externals" that allows you to link to other repositories or parts of the same repository from within a project. This way, you can manage shared components...
6,547
[ { "from": "human", "value": "I am about to move to SVN as my RCS of choice (after many years using CVS) and have a basic question...\nI have a number of shared projects - code that I want to use with lots of different projects. Is it possible to 'link' these shared folders to the projects that need them, s...
What I'm doing is I have a full-screen form, with no title bar, and consequently lacks the minimize/maximize/close buttons found in the upper-right hand corner. I'm wanting to replace that functionality with a keyboard short-cut and a context menu item, but I can't seem to find an event to trigger to minimize the form....
To implement functionality for minimizing a full-screen form without a title bar in a desktop application, you typically need to handle keyboard shortcuts and context menu items explicitly, as there are no standard buttons for these operations. Assuming you're working with a Windows Forms application in C#, you can fo...
6,797
[ { "from": "human", "value": "What I'm doing is I have a full-screen form, with no title bar, and consequently lacks the minimize/maximize/close buttons found in the upper-right hand corner. I'm wanting to replace that functionality with a keyboard short-cut and a context menu item, but I can't seem to find ...
How do I sort a list of dictionaries by a specific key's value? Given: [{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}] When sorted by name, it should become: [{'name': 'Bart', 'age': 10}, {'name': 'Homer', 'age': 39}]
You can sort a list of dictionaries by a specific key's value using the `sorted()` function in Python. To sort by the 'name' key in your list of dictionaries, you can pass a lambda function as the `key` argument to `sorted()`. Here’s how you can do it: ```python data = [{'name': 'Homer', 'age': 39}, {'name': 'Bart', '...
7,962
[ { "from": "human", "value": "How do I sort a list of dictionaries by a specific key's value? Given:\n[{'name': 'Homer', 'age': 39}, {'name': 'Bart', 'age': 10}]\n\nWhen sorted by name, it should become:\n[{'name': 'Bart', 'age': 10}, {'name': 'Homer', 'age': 39}]\n\n" }, { "from": "gpt", "value"...
A Windows Forms application of ours pulls records from a view on SQL Server through ADO.NET and a SOAP web service, displaying them in a data grid. We have had several cases with ~25,000 rows, which works relatively smoothly, but a potential customer needs to have many times that much in a single list. To figure out ho...
To simulate and generate random fictional data in SQL Server for your testing purposes, you can use a stored procedure to populate a table with random data before running your performance tests. Here’s a step-by-step approach to achieve this: ### Step 1: Create a Table for Fictional Data First, create a table in your...
4,462
[ { "from": "human", "value": "A Windows Forms application of ours pulls records from a view on SQL Server through ADO.NET and a SOAP web service, displaying them in a data grid. We have had several cases with ~25,000 rows, which works relatively smoothly, but a potential customer needs to have many times tha...
I want to move various parts of my app into simple scripts, to allow people that do not have a strong knowledge of c++ to be able to edit and implement various features. Because it's a real time app, I need to have some kind of multitasking for these scripts. Ideally I want it so that the c++ app calls a script functio...
Integrating a scripting language into your C++ application while allowing for multitasking and interaction with C++ methods is indeed feasible using either Python or Lua. Both languages have libraries and frameworks that make integration straightforward. Below is a guide to achieve your goals with both Python and Lua, ...
2,715
[ { "from": "human", "value": "I want to move various parts of my app into simple scripts, to allow people that do not have a strong knowledge of c++ to be able to edit and implement various features.\nBecause it's a real time app, I need to have some kind of multitasking for these scripts. Ideally I want it ...
Does Delphi call inherited on overridden procedures if there is no explicit call in the code ie (inherited;), I have the following structure (from super to sub class) TForm >> TBaseForm >> TAnyOtherForm All the forms in the project will be derived from TBaseForm, as this will have all the standard set-up and destructiv...
In Delphi, when you override a method (like `OnCreate` or `OnDestroy`) in a descendant class, you are responsible for explicitly calling the inherited implementation if you want the base class's behavior to execute. This includes methods such as `Create`, `Destroy`, and any overridden event handlers. To answer your qu...
7,412
[ { "from": "human", "value": "Does Delphi call inherited on overridden procedures if there is no explicit call in the code ie (inherited;), I have the following structure (from super to sub class)\nTForm >> TBaseForm >> TAnyOtherForm\nAll the forms in the project will be derived from TBaseForm, as this will ...
What is the best way people have found to do String to Lower case / Upper case in C++? The issue is complicated by the fact that C++ isn't an English only programming language. Is there a good multilingual method?
In C++, converting strings to lowercase or uppercase is straightforward with the help of the Standard Library, but it can get complicated when dealing with non-English characters due to different locale rules. Here's a breakdown of methods to handle case conversion, considering multilingual support. ### Basic Method U...
2,013
[ { "from": "human", "value": "What is the best way people have found to do String to Lower case / Upper case in C++?\nThe issue is complicated by the fact that C++ isn't an English only programming language. Is there a good multilingual method?\n" }, { "from": "gpt", "value": "In C++, converting ...
I've been using user controls extensively but never use a HttpHandler and was wondering if I am doing something suboptimal or wrong
Using user controls and HTTP handlers serves different purposes in ASP.NET, and whether you're doing something suboptimal depends on your specific use case and requirements. Let's discuss both approaches and their appropriate contexts to help you determine if you're on the right track. ### User Controls User controls...
4,770
[ { "from": "human", "value": "I've been using user controls extensively but never use a HttpHandler and was wondering if I am doing something suboptimal or wrong\n" }, { "from": "gpt", "value": "Using user controls and HTTP handlers serves different purposes in ASP.NET, and whether you're doing s...
If I have the following: {"hdrs": ["Make","Model","Year"], "data" : [ {"Make":"Honda","Model":"Accord","Year":"2008"} {"Make":"Toyota","Model":"Corolla","Year":"2008"} {"Make":"Honda","Model":"Pilot","Year":"2008"}] } And I have a "hdrs" name (i.e. "Make"), how can I reference the data array instances? seem...
To reference the values in the `data` array based on the headers in the `hdrs` array, you'll need to loop through the `data` array and then extract the values for the specified header. Your initial attempt using `data["Make"][0]` won't work because `data` is an array of objects, not a dictionary or object that can be a...
5,269
[ { "from": "human", "value": "If I have the following:\n{\"hdrs\": [\"Make\",\"Model\",\"Year\"],\n \"data\" : [ \n {\"Make\":\"Honda\",\"Model\":\"Accord\",\"Year\":\"2008\"}\n {\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Year\":\"2008\"}\n {\"Make\":\"Honda\",\"Model\":\"Pilot\",\"Year\":\"2008\"}]\n...
Are CDATA tags ever necessary in script tags and if so when? In other words, when and where is this: <script type="text/javascript"> //<![CDATA[ ...code... //]]> </script> preferable to this: <script type="text/javascript"> ...code... </script>
CDATA (Character Data) sections were primarily used in XML documents to allow for the inclusion of text data without the need to escape special characters like `<` and `&`. In HTML documents, especially in HTML5, CDATA sections are not necessary and are largely unnecessary because HTML parsers are designed to handle sc...
7,465
[ { "from": "human", "value": "Are CDATA tags ever necessary in script tags and if so when?\nIn other words, when and where is this:\n<script type=\"text/javascript\">\n//<![CDATA[\n...code...\n//]]>\n</script>\n\npreferable to this:\n<script type=\"text/javascript\">\n...code...\n</script>\n\n" }, { ...
When I start my process from Visual Studio, it is always created inside a job object. I would like to know how to turn this behaviour off. Any ideas? I expect that it is created in a job object to be debugged. I want to place my program in a different job object. It's not the hosting process. I'm talking about a Job Ob...
When you start a process for debugging in Visual Studio, it can sometimes create a job object to manage the process, which can limit certain capabilities or make it harder to interact with other processes. If you want to disable this behavior, here are some options you can consider: ### 1. Modify Project Settings Vis...
5,844
[ { "from": "human", "value": "When I start my process from Visual Studio, it is always created inside a job object. I would like to know how to turn this behaviour off. Any ideas?\nI expect that it is created in a job object to be debugged. I want to place my program in a different job object.\nIt's not the ...
I'm learning objective-C and Cocoa and have come across this statement: The Cocoa frameworks expect that global string constants rather than string literals are used for dictionary keys, notification and exception names, and some method parameters that take strings. I've only worked in higher level languages so have ...
Great question! Understanding the difference between string constants and string literals is important, especially in languages like Objective-C that are more closely tied to system performance and memory management. ### String Literal A string literal is a sequence of characters enclosed in double quotes, such as: `...
1,187
[ { "from": "human", "value": "I'm learning objective-C and Cocoa and have come across this statement:\n\nThe Cocoa frameworks expect that global string constants rather than string literals are used for dictionary keys, notification and exception names, and some method parameters that take strings.\n\nI've o...
I want to create an allocator which provides memory with the following attributes: cannot be paged to disk. is incredibly hard to access through an attached debugger The idea is that this will contain sensitive information (like licence information) which should be inaccessible to the user. I have done the usual ...
Your approach to creating a memory allocator that uses Windows-specific memory management functions is a good start. You're right in using `VirtualAlloc` to allocate memory that won't be paged to disk and `VirtualLock` to ensure that it stays in physical memory. Here's some more detailed advice and enhancements you can...
2,180
[ { "from": "human", "value": "I want to create an allocator which provides memory with the following attributes:\n\ncannot be paged to disk. \nis incredibly hard to access through an attached debugger\n\nThe idea is that this will contain sensitive information (like licence information) which should be in...
I have seen this question about deploying to WebSphere using the WAS ant tasks. Is there a simpler way to do this? In the past I have deployed to Tomcat by dropping a war file into a directory. I was hoping there would be a similar mechanism for WebSphere that doesn't involve calling the IBM libraries or rely on RAD ...
Deploying applications to IBM WebSphere Application Server (WAS) can be a bit more complex than deploying to Tomcat, due to the additional features and configuration options that WebSphere provides. However, there are indeed simpler alternatives to using the WAS Ant tasks or relying on IBM Rational Application Develope...
7,029
[ { "from": "human", "value": "I have seen this question about deploying to WebSphere using the WAS ant tasks.\nIs there a simpler way to do this? In the past I have deployed to Tomcat by dropping a war file into a directory. I was hoping there would be a similar mechanism for WebSphere that doesn't involve...
Businesses Analyst from my team keeps sending us the updated Requirements documents often and I end up hunting the recent changes by comparing the old version. Is their a good way of comparing the Word documents? Note: We have the track changes option ON, but now the documents looks like a blood bath, complicating it ...
Comparing Word documents can be challenging, especially when there are many tracked changes. Here are some effective methods to compare documents without getting overwhelmed by the visual clutter: ### 1. **Use the 'Compare' Feature in Word:** Microsoft Word has a built-in feature to compare documents that can highl...
6,054
[ { "from": "human", "value": "Businesses Analyst from my team keeps sending us the updated Requirements documents often and I end up hunting the recent changes by comparing the old version. Is their a good way of comparing the Word documents? \nNote: We have the track changes option ON, but now the documents...
I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or just the content?
When you use HTTPS (which involves SSL/TLS) to secure your REST communications, both the headers and the body of the HTTP request (or response) are encrypted during transmission. This means that any custom request data stored in the header will also be protected by the SSL/TLS encryption. Here's a brief overview of ho...
9,489
[ { "from": "human", "value": "I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or just the content?\n" ...
One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it... I know next to nothing about Unix programming.
The feature you're referring to is known as the Windows Subsystem for Unix-based Applications (SUA), which was included in Windows Vista Ultimate and Enterprise editions. This subsystem allowed developers to run UNIX applications and tools natively on Windows. Here's a bit more detail: ### What is it? 1. **POSIX Comp...
6,754
[ { "from": "human", "value": "One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it... \nI know next to nothing about Unix pr...
Does anyone know the keyboard shortcut in Visual Studio to open the context menu? i.e The equivalent of right clicking. Thanks.
In Visual Studio, you can open the context menu using the keyboard shortcut **Shift + F10**. This will bring up the context menu for the selected item, similar to right-clicking with a mouse. Another alternative is to use the **Menu Key** (also known as the Application Key), which is usually located between the right C...
10,681
[ { "from": "human", "value": "Does anyone know the keyboard shortcut in Visual Studio to open the context menu? i.e The equivalent of right clicking. Thanks.\n" }, { "from": "gpt", "value": "In Visual Studio, you can open the context menu using the keyboard shortcut **Shift + F10**. This will bri...
When should I use an interface and when should I use a base class? Should it always be an interface if I don't want to actually define a base implementation of the methods? If I have a Dog and Cat class. Why would I want to implement IPet instead of PetBase? I can understand having interfaces for ISheds or IBarks (IMa...
The choice between using an interface and using a base class can depend on a number of factors, including the specific requirements of your design, the relationships between classes, and the expected use cases. Here are some considerations to help you decide when to use an interface versus when to use a base class. ##...
5,478
[ { "from": "human", "value": "When should I use an interface and when should I use a base class? \nShould it always be an interface if I don't want to actually define a base implementation of the methods?\nIf I have a Dog and Cat class. Why would I want to implement IPet instead of PetBase? I can understand ...
I've been using the YUI Components and want to begin using the Loader Utility to specify my dependencies on my page. From your experience, is the YUI Loader Utility a reliable way to load Javascript dependencies in web pages?
Yes, the YUI Loader Utility is a reliable and effective way to manage JavaScript dependencies in your web pages when using YUI (Yahoo User Interface) components. It provides a streamlined approach to loading JavaScript files and helps in handling dependencies, which can enhance the overall performance and maintainabili...
5,845
[ { "from": "human", "value": "I've been using the YUI Components and want to begin using the Loader Utility to specify my dependencies on my page. From your experience, is the YUI Loader Utility a reliable way to load Javascript dependencies in web pages?\n" }, { "from": "gpt", "value": "Yes, the...
I've had some trouble forking of processes from a Perl CGI script when running on Windows. The main issue seems to be that 'fork' is emulated when running on windows, and doesn't actually seem to create a new process (just another thread in the current one). This means that web servers (like IIS) which are waiting for ...
Forking processes in Perl on Windows can indeed be tricky since the behavior of `fork` is different compared to Unix-like systems. On Windows, `fork` doesn't create a true new process; it creates a new thread, which is why you're experiencing issues with CGI scripts that run in a web server environment. To achieve sim...
4,036
[ { "from": "human", "value": "I've had some trouble forking of processes from a Perl CGI script when running on Windows. The main issue seems to be that 'fork' is emulated when running on windows, and doesn't actually seem to create a new process (just another thread in the current one). This means that web ...
I need to import a csv file into Firebird and I've spent a couple of hours trying out some tools and none fit my needs. The main problem is that all the tools I've been trying like EMS Data Import and Firebird Data Wizard expect that my CSV file contains all the information needed by my Table. I need to write some cust...
Importing CSV data into Firebird while accommodating specific business logic can be tricky if you're relying on graphical tools that expect a direct one-to-one mapping between CSV fields and database columns. Since you need to execute custom SQL statements for insertion, the best approach is to use a programming langua...
1,931
[ { "from": "human", "value": "I need to import a csv file into Firebird and I've spent a couple of hours trying out some tools and none fit my needs.\nThe main problem is that all the tools I've been trying like EMS Data Import and Firebird Data Wizard expect that my CSV file contains all the information nee...
Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?
In C++, when you declare a global object in a DLL (Dynamic Link Library), its destructor will not be automatically called when the DLL is unloaded unless specific actions are taken to manage the object's lifecycle. In particular, the behavior of global objects in a DLL can be summarized as follows: 1. **Global Object...
7,275
[ { "from": "human", "value": "Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?\n" }, { "from": "gpt", "value": "In C++, when you declare a global object in a DLL (Dynamic Link Library), i...
The company I'm currently working for is using Selenium for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it?
While I don’t personally conduct testing, I can provide insights into various tools and strategies commonly used for unit-testing web UIs, alongside the effectiveness of those approaches. ### Common Tools for UI Unit Testing: 1. **Selenium**: - **Usage**: Automates browsers to test UI interactions. - **Effecti...
2,898
[ { "from": "human", "value": "The company I'm currently working for is using Selenium for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it? \n" }, { "from": "gpt", "value": "While I don’t personally conduct testing, I can provide insigh...
I'm currently using the module URI::URL to generate a full URL from a relative URL; however, it isn't running as fast as I'd like it to be. Does anyone know another way to do this that may be faster?
If you're looking for a faster alternative to `URI::URL` for generating full URLs from relative URLs in Perl, you might consider using the `URI` module, which is part of the same URI ecosystem but can often be lighter in terms of performance, especially for simpler tasks. Here's a basic example of how to use the `URI`...
6,714
[ { "from": "human", "value": "I'm currently using the module URI::URL to generate a full URL from a relative URL; however, it isn't running as fast as I'd like it to be. Does anyone know another way to do this that may be faster?\n" }, { "from": "gpt", "value": "If you're looking for a faster alt...
How can I optimize the following code, which currently takes over 2 minutes to retrieve and loop through 800+ records from a pool of over 100K records, returning 6 fields per record (adds approximately 20 seconds per additional field): <cfset dllPath="C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.DirectoryService...
To optimize the code that retrieves and processes LDAP records, we can focus on several aspects: minimizing the number of calls to the LDAP server, reducing the number of iterations, and leveraging the capabilities of collections and arrays in ColdFusion. Here are some suggested improvements: ### 1. Use Projection to ...
4,411
[ { "from": "human", "value": "How can I optimize the following code, which currently takes over 2 minutes to retrieve and loop through 800+ records from a pool of over 100K records, returning 6 fields per record (adds approximately 20 seconds per additional field):\n<cfset dllPath=\"C:\\WINDOWS\\Microsoft.NE...
I am trying to build a function in C/C++ to sort an array and replace each value with its "score" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the integers. I have tried quite a few times to make it work, but can't get it down. Once...
It looks like you're trying to implement a sorting function that operates on a double pointer array (an array of pointers) in C/C++. You're using a bubble sort algorithm, but there are a few issues with how you're handling the swapping of the pointers. Here’s a corrected version of your function: ```c #include <stdio...
4,719
[ { "from": "human", "value": "I am trying to build a function in C/C++ to sort an array and replace each value with its \"score\" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the integers. I have tried quite a few times to...
JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site? Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: I...
You've brought up some important points regarding the behavior of cookies, particularly with the `HttpOnly` flag, and how they relate to AJAX calls and XSS (Cross-Site Scripting) attacks. Let's clarify the concept and address your concerns. ### Understanding HttpOnly Cookies 1. **HttpOnly Flag**: When a cookie is mar...
1,512
[ { "from": "human", "value": "JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site? \nEdit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFo...
How best to make the selected date of an ASP.NET Calendar control available to JavaScript? Most controls are pretty simple, but the calendar requires more than just a simple document.getElementById().value.
To make the selected date from an ASP.NET Calendar control available to JavaScript, you can use a combination of ASP.NET server-side code and JavaScript client-side code. Here’s a step-by-step guide to achieve this: ### Step 1: ASP.NET Calendar Control Setup First, you need to include the Calendar control in your ASP...
6,564
[ { "from": "human", "value": "How best to make the selected date of an ASP.NET Calendar control available to JavaScript?\nMost controls are pretty simple, but the calendar requires more than just a simple document.getElementById().value.\n" }, { "from": "gpt", "value": "To make the selected date ...
I recently upgraded to Subversion 1.5, and now I cannot commit my code to the repository. I get an error message: "403 Forbidden in response to MKACTIVITY". I know the upgrade worked because my fellow developers are not getting this issue. What's going on?
The "403 Forbidden in response to MKACTIVITY" error typically indicates that your Subversion client is trying to create an "activity" in the repository, but it doesn't have the necessary permissions to do so. This can happen for a couple of reasons, especially after an upgrade. Here are a few troubleshooting steps to ...
6,620
[ { "from": "human", "value": "I recently upgraded to Subversion 1.5, and now I cannot commit my code to the repository. I get an error message: \"403 Forbidden in response to MKACTIVITY\". I know the upgrade worked because my fellow developers are not getting this issue. What's going on?\n" }, { "fro...
Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document. At start: XmlCursor poiting on <a> <b> some text </b> </a> DOM Document: <foo> </foo> At the end I want to have original DOM document changed like this: <foo>   <someO...
To achieve the desired structure in the DOM document, you can follow these steps: 1. Convert the `XmlCursor` content into a string representation. 2. Parse that string into a DOM Node. 3. Insert the newly parsed Node into the desired location in the existing DOM document. Here's a Java example demonstrating this appr...
3,290
[ { "from": "human", "value": "Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document.\nAt start:\nXmlCursor poiting on\n\n<a>\n <b>\n some text\n </b>\n</a>\n\nDOM Document:\n\n<foo>\n</foo>\n\nAt the end I want to have ...
Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a further derived object 'CancelledEntry:Entry' In EntitySQL I can write the following: [...] where it is of (only MyEntities.Entry) [...] to return only objects of type Entry and no Entity or CancelledEntry. In linq to...
In LINQ to SQL, if you want to filter your query to return only the objects of a specific type (in this case, only `Entry` and not any derived types like `CancelledEntry`), you can use the `Where` method in combination with the `GetType` method. Here is an example of how you can achieve this: ```csharp var entries = ...
9,582
[ { "from": "human", "value": "Considering the following architecture:\n\na base object 'Entity'\na derived object 'Entry:Base'\nand a further derived object 'CancelledEntry:Entry'\n\nIn EntitySQL I can write the following: \n[...] where it is of (only MyEntities.Entry) [...]\n\nto return only objects of type...
Is there available any tool for PHP which can be used to generate code for consuming a web service based on its WSDL? Something comparable to clicking "Add Web Reference" in Visual Studio or the Eclipse plugin which does the same thing for Java.
Yes, there are several tools and libraries available for PHP that can help you generate code for consuming a web service based on its WSDL (Web Services Description Language). Here are a few options: 1. **PHP's Built-in SOAP Client**: PHP has a built-in `SoapClient` class that allows you to interact with SOAP web s...
6,334
[ { "from": "human", "value": "Is there available any tool for PHP which can be used to generate code for consuming a web service based on its WSDL? Something comparable to clicking \"Add Web Reference\" in Visual Studio or the Eclipse plugin which does the same thing for Java.\n" }, { "from": "gpt", ...
I have a cross platform app and for my Linux and Mac versions it generates a postscript file for printing reports and then prints them with CUPS. It works for simple characters and images but I would like to have the ability to embed a true type font directly into the postscript file. Does anyone know how to do this?? ...
To embed a TrueType font in a PostScript file and handle a broader range of characters, you can follow these general steps: ### Embedding TrueType Fonts in PostScript 1. **Convert the TrueType Font to a Type 42 Font**: You can use a tool like `ttf2pt1` or `fontforge` to convert the TrueType font into a format that...
4,982
[ { "from": "human", "value": "I have a cross platform app and for my Linux and Mac versions it generates a postscript file for printing reports and then prints them with CUPS. It works for simple characters and images but I would like to have the ability to embed a true type font directly into the postscript...
I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this: procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; So in the new project, Delphi complains t...
In Delphi, `const` is used to define constants that cannot be changed after their initial definition. Therefore, your code snippet where you attempt to assign a new value to `Price` within the `CalculateGP` procedure should indeed raise a compile error in any standard Delphi project. However, there are a few reasons w...
7,653
[ { "from": "human", "value": "I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this:\nprocedure TForm1.CalculateGP(..)\nconst\n Price : money = 0;\nbegin\n ...\n Price := 1.0;\n ......
In my WPF application, I have a number of databound TextBoxes. The UpdateSourceTrigger for these bindings is LostFocus. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and never persist the new value (the one visible...
The issue you're encountering is due to the fact that the `LostFocus` trigger doesn't get activated when the user clicks on the `MenuItem`. Because of that, the values in the `TextBox` controls are not propagated back to the bound properties of your data object (`MyItem`). To solve this problem while still using `Lost...
7,598
[ { "from": "human", "value": "In my WPF application, I have a number of databound TextBoxes. The UpdateSourceTrigger for these bindings is LostFocus. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and nev...
The Wikipedia article on ANSI C says: One of the aims of the ANSI C standardization process was to produce a superset of K&R C (the first published standard), incorporating many of the unofficial features subsequently introduced. However, the standards committee also included several new features, such as function pro...
You raise a good point regarding the evolution of the C programming language from K&R C (the version described in the book by Brian Kernighan and Dennis Ritchie) to ANSI C (also known as C89 or C90). While the K&R book did indeed influence the development of the C language and may label itself as ANSI C in later editio...
5,353
[ { "from": "human", "value": "The Wikipedia article on ANSI C says:\n\nOne of the aims of the ANSI C standardization process was to produce a superset of K&R C (the first published standard), incorporating many of the unofficial features subsequently introduced. However, the standards committee also included...
So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same t...
From your description, it seems you're trying to update a GridView that is bound to a data source, but the changes are not being reflected in the underlying database. There are a few common issues that could cause this behavior. Here are some suggestions to help troubleshoot and resolve the problem: 1. **Update Comman...
3,917
[ { "from": "human", "value": "So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, ...
I want to create cursor rsrc files on the Mac from png files. The application that uses the cursors requires it to be in a .rsrc format and I cannot change that. Does anybody know of any way I can create the cursor .rsrc files from png images.
Creating cursor resource (.rsrc) files on a Mac from PNG images can be a bit of a challenge since the .rsrc format is not directly supported by macOS. However, you can achieve this by using a combination of tools and manual steps. Below is a general approach you can follow: ### 1. Convert PNG to a Suitable Format Fir...
5,889
[ { "from": "human", "value": "I want to create cursor rsrc files on the Mac from png files. The application that uses the cursors requires it to be in a .rsrc format and I cannot change that. Does anybody know of any way I can create the cursor .rsrc files from png images.\n" }, { "from": "gpt", ...
We have a website that uses #include file command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department. My question is this, I don't see anyone using this method and wonder if it is a good idea to keep using it. If...
Using the `#include` file command (often seen in server-side languages like PHP, ASP, or through server configurations like SSI) is a valid approach for including content from external files in your web pages. It can simplify content management, especially for shared elements like headers, footers, or frequently update...
5,830
[ { "from": "human", "value": "We have a website that uses #include file command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department.\nMy question is this, I don't see anyone using this method and wonder ...
Question for YUI experts... I have a table and I've made each cell of the first row draggable by proxy. In IE, when the drag proxy is released, the original table cell actually jumps to wherever the release point was. How can I prevent this from happening? Essentially, I want to know where the proxy was dropped and han...
To prevent the original table cell from moving when dragging in IE while using YUI (Yahoo User Interface), you'll want to ensure that the original element doesn't get affected by the drag-and-drop actions. Here’s a general approach to achieve this: 1. **Use Proxy Dragging**: Ensure that you are using proxy dragging ...
5,661
[ { "from": "human", "value": "Question for YUI experts...\nI have a table and I've made each cell of the first row draggable by proxy. In IE, when the drag proxy is released, the original table cell actually jumps to wherever the release point was. How can I prevent this from happening? Essentially, I want t...
How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like.
Testing can be defined as the systematic process of evaluating a system, product, or component to assess its functionality, performance, reliability, and overall quality. This process typically involves executing specific procedures to identify defects, verify compliance with requirements, and ensure that the item meet...
10,061
[ { "from": "human", "value": "How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like.\n" }, { "from": "gpt", "value": "Testing can be defined as the systematic process of evaluating a system, product, or component to assess it...
I am recently in charge of an older app written in C# using asp.net 1.1. Are there any resources to guide me in converting the application to a newer version of of the .NET Framework. My main pause is that there are ton's of customized DataGrids in the app as it is written now and since so much of the code needs to...
Migrating an older ASP.NET 1.1 application to a newer version of the .NET Framework can be a significant undertaking, particularly if it involves many custom DataGrid components. Here are some resources and strategies to help you with the migration: ### Migration Resources 1. **Microsoft Documentation:** - **ASP.N...
5,958
[ { "from": "human", "value": "I am recently in charge of an older app written in C# using asp.net 1.1. \n\nAre there any resources to guide me in converting the application to a newer version of of the .NET Framework. \nMy main pause is that there are ton's of customized DataGrids in the app as it is writte...
Management is thinking of changing out Content Management Systems. What do you use/recommend? What UCM solution is your company using? How big is your company? Are you happy with the implementation? Current setup: The company I work for uses Oracle ECM (formerly Stellent UCM). We have somewhere over 10,000 employees...
Choosing a new Content Management System (CMS) is a critical decision that can significantly impact your organization's efficiency, collaboration, and overall productivity. Given your current use of Oracle ECM (formerly Stellent UCM) and your experience with it, here are some recommendations and considerations for sele...
698
[ { "from": "human", "value": "Management is thinking of changing out Content Management Systems. What do you use/recommend?\n\nWhat UCM solution is your company using?\nHow big is your company?\nAre you happy with the implementation?\n\nCurrent setup:\n\nThe company I work for uses Oracle ECM (formerly Stell...
Modern database systems today come with loads of features. And you would agree with me that to learn one database you must unlearn the concepts you learned in another database. For example, each database would implement locking differently than others. So to carry the concepts of one database to another would be a reci...
You're raising an important point about the relationship between developers and databases in modern software development. While it may not be necessary for every developer to have a deep, expert-level understanding of every database system they use, a reasonable level of insight and understanding is crucial for develop...
4,870
[ { "from": "human", "value": "Modern database systems today come with loads of features. And you would agree with me that to learn one database you must unlearn the concepts you learned in another database. For example, each database would implement locking differently than others. So to carry the concepts o...
I'm looking for a dead simple mailing list (unix friendly). Robustness, fine-grained configurability, "enterprise-readiness" (whatever that means) are not requirements. I just need to set up a tiny mailing list for a few friends. Rather than hack something up myself, I was wondering if anybody knows of anything already...
If you're looking for a simple and Unix-friendly mailing list manager that you can install on your own server, here are a few options that might fit your needs: 1. **Mailman**: - Mailman is one of the most popular mailing list management software. It's feature-rich but can be configured for simplicity. You can set ...
7,053
[ { "from": "human", "value": "I'm looking for a dead simple mailing list (unix friendly). Robustness, fine-grained configurability, \"enterprise-readiness\" (whatever that means) are not requirements. I just need to set up a tiny mailing list for a few friends. Rather than hack something up myself, I was won...
I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps for the same geometry. In Linux the vertex_...
When working with Pyglet and OpenGL, you may encounter performance variations between using `pyglet.graphics` vertex lists, batches, and raw OpenGL calls like `glVertex`. Here are a few factors and tips to consider when trying to optimize rendering performance in Pyglet, especially regarding the usage of vertex lists a...
4,431
[ { "from": "human", "value": "I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps fo...
I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) where you enter a URL and it scraps the page and ...
To achieve web scraping for address information from a web page using VB.NET, you can utilize the `HtmlAgilityPack` library, which allows you to parse HTML documents easily. Below is a step-by-step guide on how to create a simple ASP.NET web page that accepts a URL, scrapes the content, and returns the extracted addres...
4,390
[ { "from": "human", "value": "I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done.\nIdeally I would like to have a web page on our admin (ASP.NET/VB.NET) where y...
I need to add DVD writing functionality to an application I'm working on. However it needs to be able to write out files that are being grabbed "live" from a camera, over a long period of time. I can't wait until all the files are captured before I start writing them to the DVD, I need to write them out in chunks as I ...
To implement live DVD writing functionality where files can be written directly from memory without needing to save them to disk first, there are a few options you can explore: ### 1. **IMAPI v2 with Session Management** While you mentioned IMAPI v2, it's important to clarify how you can leverage its session managemen...
6,513
[ { "from": "human", "value": "I need to add DVD writing functionality to an application I'm working on. However it needs to be able to write out files that are being grabbed \"live\" from a camera, over a long period of time. I can't wait until all the files are captured before I start writing them to the DV...
I'm working on a multithreaded C++ application that is corrupting the heap. The usual tools to locate this corruption seem to be inapplicable. Old builds (18 months old) of the source code exhibit the same behavior as the most recent release, so this has been around for a long time and just wasn't noticed; on the dow...
Debugging heap corruption, especially in a multithreaded environment, can be quite challenging. Here are several strategies and techniques you might consider to help track down the source of the corruption: ### 1. **Use Tools Wisely** Since you've already considered and used various debugging tools, here are a few add...
3,436
[ { "from": "human", "value": "I'm working on a multithreaded C++ application that is corrupting the heap. The usual tools to locate this corruption seem to be inapplicable. Old builds (18 months old) of the source code exhibit the same behavior as the most recent release, so this has been around for a long...
How can I go about storing a vb.net user defined object in a sql database. I am not trying to replicate the properties with columns. I mean something along the lines of converting or encoding my object to a byte array and then storing that in a field in the db. Like when you store an instance of an object in session, b...
Storing a VB.NET user-defined object in a SQL database as a byte array is certainly possible and can be done using serialization. This allows you to convert the object into a format that can be easily stored and later retrieved. You will have to decide which serialization technique fits your needs best. Common options ...
4,868
[ { "from": "human", "value": "How can I go about storing a vb.net user defined object in a sql database. I am not trying to replicate the properties with columns. I mean something along the lines of converting or encoding my object to a byte array and then storing that in a field in the db. Like when you sto...
Please respond with one by one. If you explain why it is not true then try to avoid general statements and provide particular examples.
Of course! Please provide a statement or claim you would like me to respond to, and I will address it one by one.
11,195
[ { "from": "human", "value": "Please respond with one by one.\nIf you explain why it is not true then try to avoid general statements and provide particular examples.\n" }, { "from": "gpt", "value": "Of course! Please provide a statement or claim you would like me to respond to, and I will addres...
Continuing my problem from yesterday, the Silverlight datagrid I have from this issue is now causing Stack Overflow errors when sorting a column with a large amount of data (Like the text column that contains a where clause for a SQL statment). When you sort, it'll fire the SelectedIndexChanged event for the datagrid ...
In Silverlight's DataGrid, you can disable sorting for a specific column by setting the `SortMemberPath` property of that column to `null`. This will prevent the DataGrid from attempting to sort the data for that column, which should help with the Stack Overflow issues you're encountering. Here's how you can do that i...
5,919
[ { "from": "human", "value": "Continuing my problem from yesterday, the Silverlight datagrid I have from this issue\nis now causing Stack Overflow errors when sorting a column with a large amount of data (Like the text column that contains a where clause for a SQL statment). When you sort, it'll fire the Se...
I'm sure there were several, but the one I was thinking of would display a nice text screen when you crashed the computer thoroughly. The Text was "Well smoke me a kipper."
The phrase "Well, smoke me a kipper!" is a quote from the classic British television series **Red Dwarf**. It's often associated with the character Arnold Rimmer, who uses it humorously in various contexts throughout the show. In terms of computer crashes, it's possible that you are referring to a type of computer er...
9,982
[ { "from": "human", "value": "I'm sure there were several, but the one I was thinking of would display a nice text screen when you crashed the computer thoroughly. \nThe Text was \"Well smoke me a kipper.\"\n" }, { "from": "gpt", "value": "The phrase \"Well, smoke me a kipper!\" is a quote from ...
When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background image should be both #001122, and the medium background and background image #004466. But IE7 ...
The issue you're experiencing with PNG images in Internet Explorer 7 is a common one. IE7 has known issues with how it handles alpha transparency and color profiles in PNG files. Here are some steps you can take to mitigate this issue: 1. **Save PNGs without Color Profiles**: Make sure to save your PNG images without ...
7,862
[ { "from": "human", "value": "When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background image should be both #001122, and the medium backgrou...
I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat. Basically I am getting a message of: Operation is not valid due to the current state of the object I've got it down to my proxy interferring, but I can't see ...
When you encounter the error message "Operation is not valid due to the current state of the object," it's typically indicative of a programming or configuration issue rather than solely a proxy issue. However, if you believe that the work proxy is interfering with your deployment, here are a few strategies you can use...
7,485
[ { "from": "human", "value": "I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat.\nBasically I am getting a message of:\n\nOperation is not valid due to the current state of the object\n\nI've got it d...
I am relatively new to Python, and I have always used the standard cpython (v2.5) implementation. I've been wondering about the other implementations though, particularly Jython and IronPython. What makes them better? What makes them worse? What other implementations are there? I guess what I'm looking for is a su...
Welcome to the world of Python! It’s great to explore the different implementations of Python. Below is a summary of some notable Python implementations, including their pros and cons. ### 1. CPython - **Description**: This is the standard and most widely used implementation of Python, written in C. When people refer ...
3,956
[ { "from": "human", "value": "I am relatively new to Python, and I have always used the standard cpython (v2.5) implementation. \nI've been wondering about the other implementations though, particularly Jython and IronPython. What makes them better? What makes them worse? What other implementations are t...
Suppose I have a class module clsMyClass with an object as a member variable. Listed below are two complete implementations of this very simple class. Implementation 1: Dim oObj As New clsObject Implementation 2: Dim oObj As clsObject Private Sub Class_Initialize() Set oObj = New clsObject End Sub Private Sub C...
Yes, there is a functional difference between the two implementations, particularly in how the lifetime of `oObj` is managed. ### Implementation 1 ```vba Dim oObj As New clsObject ``` In this implementation, `oObj` is instantiated as soon as an instance of `clsMyClass` is created. This means that the object `oObj` exi...
4,154
[ { "from": "human", "value": "Suppose I have a class module clsMyClass with an object as a member variable. Listed below are two complete implementations of this very simple class.\nImplementation 1:\nDim oObj As New clsObject\n\nImplementation 2:\nDim oObj As clsObject\n\nPrivate Sub Class_Initialize()\n ...
Jeff mentioned in one of the podcasts that one of the things he always does is put in instrumentation for database calls, so that he can tell what queries are causing slowness etc. This is something I've measured in the past using SQL Profiler, but I'm interested in what strategies other people have used to include th...
When it comes to instrumenting database calls to measure performance in your application, there are several strategies you can adopt, each with varying levels of complexity and integration. Below, I’ll outline some approaches you can consider: ### 1. Manual Timing with AOP (Aspect-Oriented Programming) You can manual...
4,211
[ { "from": "human", "value": "Jeff mentioned in one of the podcasts that one of the things he always does is put in instrumentation for database calls, so that he can tell what queries are causing slowness etc. This is something I've measured in the past using SQL Profiler, but I'm interested in what strate...
Video podcast ??? Audio only mp3 player I'm looking for somewhere which will extract audio from video, but instead of a single file, for an on going video podcast. I would most like a website which would suck in the RSS and spit out an RSS (I'm thinking of something like Feedburner), though would settle for something...
It sounds like you have a clear vision of what you want to achieve with your video podcast and audio extraction workflow. Since you're using Ubuntu and are comfortable with command-line tools like `ffmpeg`, you can indeed create a script that automates much of this process. Here's a structured approach you could consid...
4,248
[ { "from": "human", "value": "\nVideo podcast\n???\nAudio only mp3 player\n\nI'm looking for somewhere which will extract audio from video, but instead of a single file, for an on going video podcast.\nI would most like a website which would suck in the RSS and spit out an RSS (I'm thinking of something like...
This is slightly off topic of programming but still has to do with my programming project. I'm writing an app that uses a custom proxy server. I would like to write the server in C# since it would be easier to write and maintain, but I am concerned about the licensing cost of Windows Server + CALS vs a Linux server (...
When considering licensing for a Windows Server in a scenario like yours, it's important to understand the implications of Client Access Licenses (CALs). Here's a breakdown of your questions: ### Do You Need CALs? Yes, if you deploy a Windows Server that will have client devices (or users) connecting to it, you will t...
8,169
[ { "from": "human", "value": "This is slightly off topic of programming but still has to do with my programming project. I'm writing an app that uses a custom proxy server. I would like to write the server in C# since it would be easier to write and maintain, but I am concerned about the licensing cost of ...
I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. I've tried setting the focus in the Page_Load, Page_PreRender, and Page_Init events and the focus is set properly but the AutoCo...
The issue you're experiencing with the AutoComplete control from the ASP.NET AJAX Control Toolkit is likely related to the timing of when the focus is being set on the textbox. When you programmatically set the focus to the textbox during the page lifecycle, it can interfere with the AutoComplete behavior, particularly...
5,670
[ { "from": "human", "value": "I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. \nI've tried setting the focus in the Page_Load, Page_PreRender, and Page_Init events an...
All the recent VisualSVN Server posts made me want to check it out. I have SVN running right now through Apache, but I'd like to try out VisualSVN Server, mostly for the Active Directory integration. Their docs don't describe whether you can easily migrate an existing repository. Anyone done this before?
Yes, migrating an existing SVN repository to VisualSVN Server is quite straightforward. Here’s a step-by-step guide to help you through the process: ### Prerequisites 1. **Backup Your Existing Repositories:** Always start with a backup. Use `svnadmin dump` to create a dump file of your existing repositories. 2. **Ins...
4,108
[ { "from": "human", "value": "All the recent VisualSVN Server posts made me want to check it out. I have SVN running right now through Apache, but I'd like to try out VisualSVN Server, mostly for the Active Directory integration. Their docs don't describe whether you can easily migrate an existing repository...
I have a process in erlang that is supposed to do something immediately after spawn, then send the result back to the parent when it is finished. How do I figure out the PID of the process that spawned it?
In Erlang, when you spawn a process using the `spawn/1` or `spawn/3` function, the `spawn` function returns the PID (Process Identifier) of the newly created process. You can capture this PID in a variable and then use it to communicate back to the parent process. Here’s an example of how you can structure this: 1. I...
5,302
[ { "from": "human", "value": "I have a process in erlang that is supposed to do something immediately after spawn, then send the result back to the parent when it is finished. How do I figure out the PID of the process that spawned it?\n" }, { "from": "gpt", "value": "In Erlang, when you spawn a...
Is there an easy way to set the zoom level for a windows form in C#? In VBA there was a zoom property of the form.
In C#, Windows Forms does not have a built-in "zoom" property like VBA. However, you can implement a similar effect by scaling the form and its controls. Here’s how you can achieve zooming functionality: ### Method 1: Scaling the Form and Controls You can override the `OnResize` method in your Form and scale the cont...
5,557
[ { "from": "human", "value": "Is there an easy way to set the zoom level for a windows form in C#? In VBA there was a zoom property of the form.\n" }, { "from": "gpt", "value": "In C#, Windows Forms does not have a built-in \"zoom\" property like VBA. However, you can implement a similar effect ...
I am planning a simple, dual-language website and I'd like to use a .net based cms but I can't find anything suitable. I have experience with dotnetnuke and sharepoint but neither fits the bill - dotnetnuke does not do dynamic site elements multi-lingually & sharepoint is a monster PITA no matter what angle you look at...
If you're looking for a .NET-based CMS that supports a dual-language setup and allows for the development of custom plugins, you might consider the following options: 1. **Umbraco**: Umbraco is an open-source .NET CMS that is known for its flexibility and ease of use. It has built-in support for multi-language content...
1,631
[ { "from": "human", "value": "I am planning a simple, dual-language website and I'd like to use a .net based cms but I can't find anything suitable.\nI have experience with dotnetnuke and sharepoint but neither fits the bill - dotnetnuke does not do dynamic site elements multi-lingually & sharepoint is a mon...
We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons. Has anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so I'm keen to hear about experiences of per...
Moving from MySQL to PostgreSQL is a common transition, and many organizations have found success in making the switch. Here are some key considerations and experiences from others who have undertaken a similar migration: ### Performance Considerations 1. **Read vs. Write Performance**: PostgreSQL generally excels at ...
6,892
[ { "from": "human", "value": "We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons.\nHas anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so...
We are trying to lighten our page load as much as possible. Since ViewState can sometimes swell up to 100k of the page, I'd love to completely eliminate it. I'd love to hear some techniques other people have used to move ViewState to a custom provider. That said, a few caveats: We serve on average 2 Million unique vis...
Eliminating ViewState and managing state efficiently while accommodating a large number of unique visitors can be challenging. Here are some techniques to consider, focusing on a custom provider while addressing your caveats: ### 1. **Disable ViewState Where Possible** - Review your ASP.NET controls and disable Vie...
4,599
[ { "from": "human", "value": "We are trying to lighten our page load as much as possible. Since ViewState can sometimes swell up to 100k of the page, I'd love to completely eliminate it.\nI'd love to hear some techniques other people have used to move ViewState to a custom provider.\nThat said, a few caveats...
In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?
The `META-INF` folder in Java is a special directory that is primarily used in JAR (Java Archive) files and other Java-based packaged formats (like WAR files for web applications). It contains metadata about the contents of the archive, and is utilized by the Java Runtime Environment and various Java frameworks and too...
7,684
[ { "from": "human", "value": "In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?\n" }, { "from": "gpt", "value": "The `META-INF` folder in Java is a special directory that is primarily used in JAR (Java Archive) files ...
I'm wondering what the best practice is for handling the problem with having to "include" so many files in my PHP scripts in order to ensure that all the classes I need to use are accessible to my script. Currently, I'm just using include_once to include the classes I access directly. Each of those would include_once...
Handling the inclusion of multiple classes in a PHP application can indeed become cumbersome, especially as your project grows. Fortunately, modern PHP has introduced several features and best practices that can greatly simplify the process of managing class files, particularly for larger applications. ### Best Practi...
4,097
[ { "from": "human", "value": "I'm wondering what the best practice is for handling the problem with having to \"include\" so many files in my PHP scripts in order to ensure that all the classes I need to use are accessible to my script. \nCurrently, I'm just using include_once to include the classes I access...
Does Java impose any extra restrictions of its own. Windows (upto Vista) does not allow names to include \ / < > ? * : I know HOW to validate names (a regular expression). I need to validate filenames entered by users. My application does not need to run on any other platform, though, of course, I would prefer to be...
Java itself does not impose any additional restrictions on filenames beyond those defined by the underlying operating system. However, when developing a Java application that targets Windows (up to Vista) or any other platform, it's essential to consider the filesystem constraints specific to that operating system. Fo...
4,891
[ { "from": "human", "value": "Does Java impose any extra restrictions of its own. Windows (upto Vista) does not allow names to include\n\\ / < > ? * :\n\nI know HOW to validate names (a regular expression).\nI need to validate filenames entered by users. \nMy application does not need to run on any other pl...
Greetings, I'm trying to find a way to 'unbind' a socket from a particular IP/Port combination. My pseudocode looks like this: ClassA a = new ClassA(); //(class A instantiates socket and binds it to 127.0.0.1:4567) //do something //...much later, a has been garbage-collected away. ClassA aa = new ClassA(); //crash...
When dealing with sockets in .NET, particularly when you want to ensure that a socket is properly released so that it can be reused on the same IP/Port combination, it's important to correctly manage the lifecycle of the socket. The behavior you're experiencing is likely related to how the operating system manages sock...
5,947
[ { "from": "human", "value": "Greetings, I'm trying to find a way to 'unbind' a socket from a particular IP/Port combination. My pseudocode looks like this:\nClassA a = new ClassA(); //(class A instantiates socket and binds it to 127.0.0.1:4567) \n//do something \n//...much later, a has been garbage-colle...
I'm using the VBO extension for storing Vertex, normal and color buffers (glBindBufferARB) For some reason when changing buffers or doing some operation the application crashes with an access violation. When attaching The debugger I see that the crash is in some thread that is not my main thread which performs the open...
Debugging access violations in OpenGL applications can be challenging, especially when they originate from a different thread. Here are some steps and techniques you can use to diagnose and resolve the issue: ### 1. Check OpenGL Context Management Ensure that the OpenGL context is correctly managed across threads. Ope...
5,255
[ { "from": "human", "value": "I'm using the VBO extension for storing Vertex, normal and color buffers (glBindBufferARB)\nFor some reason when changing buffers or doing some operation the application crashes with an access violation. When attaching The debugger I see that the crash is in some thread that is ...
Most of our Eclipse projects have multiple source folders, for example: src/main/java src/test/java When you right-click on a class and choose New JUnit Test, the default source folder for the new test is "src/main/java" (presumably the first source folder listed in the project properties). Is there any way to change...
In Eclipse, the default source folder for new JUnit tests is indeed typically the first source folder listed in the project's build path. However, you can change the default behavior to create new test cases in a specific folder like `src/test/java` by adjusting the project settings and preferences. Here are a couple o...
5,965
[ { "from": "human", "value": "Most of our Eclipse projects have multiple source folders, for example:\n\nsrc/main/java\nsrc/test/java\n\nWhen you right-click on a class and choose New JUnit Test, the default source folder for the new test is \"src/main/java\" (presumably the first source folder listed in the...
I'm developing an MFC application and I've recently been searching for a good method to remove the icon from a Windows title bar, but retain the close button. The two obvious candidate solutions are turning off the system menu style or using the tool window style, but I would prefer not to disable the system menu or us...
To remove the icon from a Windows title bar while retaining the close button in an MFC application, you can achieve this by subclassing the window procedure and handling the `WM_NCPAINT` message. The idea is to paint the title bar without the icon and ensure that the rest of the window's functionality, including the cl...
4,468
[ { "from": "human", "value": "I'm developing an MFC application and I've recently been searching for a good method to remove the icon from a Windows title bar, but retain the close button. The two obvious candidate solutions are turning off the system menu style or using the tool window style, but I would pr...
While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object. My handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cache-control to public using the SetCacheabil...
The behavior you're experiencing with the `HttpCachePolicy` and the handling of the `Etag` header when setting cacheability to `HttpCacheability.Private` in ASP.NET is indeed an interesting aspect of the caching mechanism, and it stems from how private caching is interpreted according to the HTTP specifications. ### W...
5,336
[ { "from": "human", "value": "While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object.\nMy handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cach...
I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily be expanded to "How can we improve our support of technology X when we don't have techno...
Supporting technology that you don’t have direct access to can be a challenge, but there are several strategies you can employ to improve your support for Novell or similar technologies. Here are some suggestions that might help you bridge the gap: ### 1. **Research and Documentation:** - **Online Resources**: Leve...
5,192
[ { "from": "human", "value": "I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily be expanded to \"How can we improve our support...
I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test). Yes, I can test the underlying objects the web se...
Integration testing a web service using NUnit (or MBUnit) can indeed be accomplished, and it's great that you're considering the larger picture beyond just unit testing. Here's a guide to help you through the process: ### Steps for Integration Testing a Web Service 1. **Set Up the Testing Framework**: Make sure yo...
3,393
[ { "from": "human", "value": "I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the \"unit test\" to do this. (I know it's not really a unit test).\nYes, ...
We would like to be able to nightly make a copy/backup/snapshot of a production database so that we can import it in the dev environment. We don't want to log ship to the dev environment because it needs to be something we can reset whenever we like to the last taken copy of the production database. We need to be able...
To create a nightly copy of your production SQL Server database and import it into your development environment using the attach/detach method, while also ensuring that certain heavy tables are excluded or cleared, you can follow these steps: ### Step 1: Prepare for Backup 1. **Identify Tables to Exclude**: Determine...
5,815
[ { "from": "human", "value": "We would like to be able to nightly make a copy/backup/snapshot of a production database so that we can import it in the dev environment. \nWe don't want to log ship to the dev environment because it needs to be something we can reset whenever we like to the last taken copy of t...
One title per answer.
Sure! Please provide a topic or subject for the title you'd like.
11,526
[ { "from": "human", "value": "One title per answer.\n" }, { "from": "gpt", "value": "Sure! Please provide a topic or subject for the title you'd like." } ]
I am calling, through reflection, a method which may cause an exception. How can I pass the exception to my caller without the wrapper reflection puts around it? I am rethrowing the InnerException, but this destroys the stack trace. Example code: public void test1() { // Throw an exception for testing purposes ...
When you invoke a method via reflection, any exception that occurs is wrapped in a `TargetInvocationException`. This can indeed obscure the original stack trace, and when you throw `tiex.InnerException`, you lose the stack trace information related to the original call to `test1`. To preserve the stack trace while re...
7,313
[ { "from": "human", "value": "I am calling, through reflection, a method which may cause an exception. How can I pass the exception to my caller without the wrapper reflection puts around it?\nI am rethrowing the InnerException, but this destroys the stack trace.\nExample code:\npublic void test1()\n{\n /...
I've started using Vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with: vi main.pl maintenance.pl and then hop between them with: :n :prev and see which file are open with: :args And to add a file, I can say: :n test.pl which I e...
In Vim, when you use the `:n` command followed by a filename to open another file, it replaces your existing argument list with just that file. However, you can manage your argument list more effectively with a few commands. ### To add files to the argument list: 1. **Use the `:args` Command**: You can explicitly ...
7,349
[ { "from": "human", "value": "I've started using Vim to develop Perl scripts and am starting to find it very powerful. \nOne thing I like is to be able to open multiple files at once with:\nvi main.pl maintenance.pl\n\nand then hop between them with:\n:n\n:prev\n\nand see which file are open with:\n:args\n\n...
What does the following Guile scheme code do? (eq? y '.) (cons x '.) The code is not valid in MzScheme, is there a portable equivalent across scheme implementations? I am trying to port this code written by someone else. Guile seems to respond to '. with #{.}#, but I'm not sure what it means or how to do this in anoth...
In Guile Scheme, the expression `'.` represents a special syntax for the "quote" construct, which is a shorthand for quoting a single value. In this context, `'.` effectively quotes the symbol `.`. Let's break down the two lines of code you provided: 1. **`(eq? y '.)`**: This expression checks if the variable `y` is ...
7,531
[ { "from": "human", "value": "What does the following Guile scheme code do?\n(eq? y '.)\n(cons x '.)\n\nThe code is not valid in MzScheme, is there a portable equivalent across scheme implementations?\nI am trying to port this code written by someone else. Guile seems to respond to '. with #{.}#, but I'm not...
Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying. Steps to reproduce: Open Terminal.app, reverse-search to a longish command. Hit <ctrl>-E once you've...
The issue you're experiencing with Terminal.app on OS X 10.5 during reverse-search in Bash is likely related to the way terminal screen updates and cursor positioning work with the readline library. This can happen due to various reasons, such as terminal settings or environment variables. Here are a few suggestions t...
5,598
[ { "from": "human", "value": "Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying. \nSteps to reproduce: Open Terminal.app, reverse-search to a ...
On Windows I have a problem I never encountered on Unix. That is how to get a thread to sleep for less than one millisecond. On Unix you typically have a number of choices (sleep, usleep and nanosleep) to fit your needs. On Windows, however, there is only Sleep with millisecond granularity. On Unix, I can use the use ...
In Windows, the `Sleep` function indeed only provides millisecond granularity. However, to achieve finer granularity, you can use a combination of busy-waiting and `QueryPerformanceCounter` or `timeBeginPeriod` to adjust the system timer resolution. Here’s an example of how you can create a `usleep` function using bu...
4,673
[ { "from": "human", "value": "On Windows I have a problem I never encountered on Unix. That is how to get a thread to sleep for less than one millisecond. On Unix you typically have a number of choices (sleep, usleep and nanosleep) to fit your needs. On Windows, however, there is only Sleep with millisecond ...
I was surprised recently to find that it's possible to have a return statement in a finally block in Java. It seems like lots of people think it's a bad thing to do as described in 'Don't return in a finally clause'. Scratching a little deeper, I also found 'Java's return doesn't always' which shows some pretty horribl...
Using a `return` statement in a `finally` block is generally discouraged because it can lead to unexpected behavior and make the code harder to read and maintain. The `finally` block is typically used for cleanup purposes, such as closing resources, rather than for controlling the flow of the program. However, there ar...
4,619
[ { "from": "human", "value": "I was surprised recently to find that it's possible to have a return statement in a finally block in Java.\nIt seems like lots of people think it's a bad thing to do as described in 'Don't return in a finally clause'. Scratching a little deeper, I also found 'Java's return doesn...
What is the best way to create fluid width/height rounded corners with jQuery? That plugin doesn't keep the height the same. I have a 10px high div that I want to round the corners on, when I use that script it adds about 10px onto whats there.
To create fluid width/height rounded corners using jQuery, you may want to avoid manipulating the element's size directly. Instead, you can use CSS to achieve rounded corners without affecting the element's dimensions. ### Using CSS Only (Recommended) The best and simplest approach is to use CSS properties. Modern bro...
5,198
[ { "from": "human", "value": "What is the best way to create fluid width/height rounded corners with jQuery?\n\nThat plugin doesn't keep the height the same. I have a 10px high div that I want to round the corners on, when I use that script it adds about 10px onto whats there.\n" }, { "from": "gpt",...
I have a Visual Studio application with a splash screen image cut into "slices". The positions are specified in the Form Designer so they line up properly on the screen. However, the images are out of place when the application is run on the Chinese version of Windows XP. It looks as if the image slices were "exploded"...
The issue you're encountering with the positioning of the image slices on your splash screen in a Visual Studio application running on the Chinese version of Windows XP is likely related to differences in DPI settings or system scaling between versions of Windows or different language/localization settings. This can so...
6,101
[ { "from": "human", "value": "I have a Visual Studio application with a splash screen image cut into \"slices\". The positions are specified in the Form Designer so they line up properly on the screen. However, the images are out of place when the application is run on the Chinese version of Windows XP. It l...
I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one. The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.c...
When you're trying to update a DLL in the Global Assembly Cache (GAC) and you're facing issues with the web applications not picking up the updated version, there are several factors to consider: ### Possible Reasons and Solutions: 1. **Assembly Binding Caching**: - ASP.NET caches the assembly bindings. Even if yo...
5,731
[ { "from": "human", "value": "I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one.\nThe old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the versio...
I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it. I just want to know the proper way to add versioning to my Java app so that I can access the version information when I'm testing, e.g. debugging i...
It sounds like you're on the right track, but there are a few nuances in how Java loads resources and handles manifests that may be causing the issues you're facing. Let's break this down step by step. ### Accessing the Manifest Correctly 1. **Correct Path to the Manifest**: When you package your application into a J...
4,201
[ { "from": "human", "value": "I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it.\nI just want to know the proper way to add versioning to my Java app so that I can access the version info...
I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse. Please, list any features you think are brilliant or useful when sugge...
Certainly! While Eclipse with RDT is a solid option for Ruby development, there are several other IDEs and text editors you might consider, especially if you're looking for alternatives that support Ruby in a non-Rails-centric manner. Below is a list of several options along with their standout features: ### 1. **NetB...
2,825
[ { "from": "human", "value": "I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse.\nPlease, list any features yo...
Ulimately I just wanted to extract strings from the .rc file so I could translate them, but anything that goes with .rc files works for me.
To extract strings from a .rc (resource) file, you can use several methods depending on what you need. Here are a few approaches: ### 1. Manual Extraction If the .rc file is small, you can open it in any text editor (like Notepad, Notepad++, or Visual Studio Code) and manually copy the strings you need for translation...
7,081
[ { "from": "human", "value": "Ulimately I just wanted to extract strings from the .rc file so I could translate them, but anything that goes with .rc files works for me.\n" }, { "from": "gpt", "value": "To extract strings from a .rc (resource) file, you can use several methods depending on what y...