instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
When debugging my VS2005 project, I get the following error when I attempt to step into the function that returns the vScenarioDescriptions local variable it's struggling with... image no longer available http://people.ict.usc.edu/~crotchett/images/symbolnotdefined.JPG As I continue to walk through the code and step in...
It looks like you're encountering a "symbol not defined" error while debugging in Visual Studio 2005. This issue can be caused by a variety of factors. Here are some potential solutions to help you troubleshoot and resolve the problem: 1. **Ensure Debug Information is Generated**: Make sure that your project is set up...
40,215
[ { "from": "human", "value": "When debugging my VS2005 project, I get the following error when I attempt to step into the function that returns the vScenarioDescriptions local variable it's struggling with...\nimage no longer available http://people.ict.usc.edu/~crotchett/images/symbolnotdefined.JPG\nAs I co...
Is it possible to migrate a VB.NET Winform solution to a 3.5 WPF solution. If so, any suggestions how to do it? Thanks in advance! JFV
Yes, it is possible to migrate a VB.NET WinForms application to a WPF application, but it requires a significant amount of work due to the differences in the two technologies. Here are some suggestions to help you with the migration process: ### 1. **Understand the Differences**: - **UI Paradigms**: WinForms uses a...
36,037
[ { "from": "human", "value": "Is it possible to migrate a VB.NET Winform solution to a 3.5 WPF solution. If so, any suggestions how to do it?\nThanks in advance!\nJFV\n" }, { "from": "gpt", "value": "Yes, it is possible to migrate a VB.NET WinForms application to a WPF application, but it requir...
WPF stores all its data in double precision. I just want to confirm that all transforms, etc., run in double precision. I'm working on a WPF canvas, which is very large (40,000,000 x 40,000,000), translating and scaling to zoom into it - placing tiles on to it that contain satellite imagery. To scale and translate I'...
In WPF, the rendering and transformations do indeed rely on double precision for most of their calculations. This means that properties like `ScaleTransform` and `TranslateTransform` work with double-precision floating-point numbers. Consequently, the transformations you apply to your UI elements, including those for a...
37,484
[ { "from": "human", "value": "WPF stores all its data in double precision. I just want to confirm that all transforms, etc., run in double precision. \nI'm working on a WPF canvas, which is very large (40,000,000 x 40,000,000), translating and scaling to zoom into it - placing tiles on to it that contain sat...
I am using NHibernate as my ORM solution and have a need for a highly specialized object (for performance reasons) to be returned that is unlike my original object. Is it valid to actually set up a second object with its own mapping file so I can set special join fetching and set batch sizes and so forth? Can 2 classe...
Yes, it is valid to set up a second object with its own mapping file in NHibernate, allowing you to create a specialized object that fits your performance needs. This approach is often used in scenarios where different projections or optimized fetch strategies are required without altering the primary entity's behavior...
40,206
[ { "from": "human", "value": "I am using NHibernate as my ORM solution and have a need for a highly specialized object (for performance reasons) to be returned that is unlike my original object. \nIs it valid to actually set up a second object with its own mapping file so I can set special join fetching and ...
I have a web-app-database 3 tier server setup. Web requests data from app, and app gets its data from the db then processes and returns it to web for display. Standard. Currently all the data I serialize from app to web gets put into custom defined data structs that the web side then parses for display. In other words...
Your situation is a common challenge in designing systems with clear separation of concerns, especially when it comes to serializing and sharing data across different tiers of an architecture. Here are some recommended approaches that might help you achieve your goals effectively: ### 1. Data Transfer Objects (DTOs) ...
36,889
[ { "from": "human", "value": "I have a web-app-database 3 tier server setup. Web requests data from app, and app gets its data from the db then processes and returns it to web for display. Standard. \nCurrently all the data I serialize from app to web gets put into custom defined data structs that the web si...
I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing some files that have been downloaded. Initially, I wanted to sent this status...
Hi Greg, You've brought up some important considerations regarding sending email notifications for your application. Let's explore your options: ### Email Options 1. **Using a Third-Party SMTP Service**: - Instead of using Gmail directly, you could use third-party email services like SendGrid, Mailgun, or Amazon ...
38,772
[ { "from": "human", "value": "I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing some files that have been downloaded...
Does anyone have a known, solid solution for the scheduling of events (i.e. appointments, meetings, etc) within a system. I'm speaking here of "events" as tasks that need to be done on a one-time or recurring basis and executed based on a schedule. I've found a schedule UI component by DevExpress and it has some refere...
Hello Byron, Scheduling events, such as appointments and meetings, is a common challenge in software development, and there are indeed well-established patterns and libraries to handle these tasks efficiently. Here’s a general overview of how you might approach scheduling, along with some recommendations: ### 1. **Un...
38,515
[ { "from": "human", "value": "Does anyone have a known, solid solution for the scheduling of events (i.e. appointments, meetings, etc) within a system. I'm speaking here of \"events\" as tasks that need to be done on a one-time or recurring basis and executed based on a schedule. I've found a schedule UI com...
Some of the work we do at my company is slowly edging towards a product family with different products in the same family and different flavours (or feature sets) in each product. I am looking for some product line engineering techniques that might help us. Web search leads to a lot of resources and a lot of different ...
Transitioning to a product line approach is a strategic move that can yield significant benefits, but it also comes with its own set of challenges. Here are some practical techniques and approaches for configuration and build management, ease of development cycles, and testing in a product line environment: ### 1. Con...
37,182
[ { "from": "human", "value": "Some of the work we do at my company is slowly edging towards a product family with different products in the same family and different flavours (or feature sets) in each product. I am looking for some product line engineering techniques that might help us. Web search leads to a...
We are moving our database server to a bigger box. I have several databases with full text indexes. What is the best way to move the full text indexes?
When moving a database server, particularly with databases that utilize full-text indexes, there are several steps you should follow to ensure a smooth transition. The exact process can vary depending on the database management system (DBMS) you are using (e.g., SQL Server, MySQL, PostgreSQL), but here are general guid...
30,030
[ { "from": "human", "value": "We are moving our database server to a bigger box. I have several databases with full text indexes. What is the best way to move the full text indexes?\n" }, { "from": "gpt", "value": "When moving a database server, particularly with databases that utilize full-text ...
I'm using the QMdiArea in Qt 4.4. If a new project is created, I add a number of sub windows to a QMdiArea. I'd like to disallow the user to close a sub window during runtime. The sub windows should only be closed if the whole application is closed or if a new project is created. How can I do this?
To prevent the user from closing subwindows in a `QMdiArea` in Qt, you can subclass `QMdiSubWindow` and override the `closeEvent()` method to ignore close requests. Additionally, you can control the behavior of the `QMdiArea` by connecting to its signals. Here's how you can do it: 1. **Subclass QMdiSubWindow** to ove...
38,082
[ { "from": "human", "value": "I'm using the QMdiArea in Qt 4.4.\nIf a new project is created, I add a number of sub windows to a QMdiArea. I'd like to disallow the user to close a sub window during runtime. The sub windows should only be closed if the whole application is closed or if a new project is create...
I have some shapefile (demographic/heat map data in the USA, such as crime in New York) data imported into a sql server 2008 database, field data type: Geography. How can i get this data, from a select query, in a format which i can then display on google maps or microsoft virtual earth? thanks! Edit 1: So far, the bes...
To display your geography data from SQL Server 2008 on Google Maps or Microsoft Virtual Earth, you'll need to convert your geography data into a format that these mapping services can understand, such as GeoJSON or WKT (Well-Known Text). Below are some suggestions and SQL tricks to help you achieve this directly from S...
38,409
[ { "from": "human", "value": "I have some shapefile (demographic/heat map data in the USA, such as crime in New York) data imported into a sql server 2008 database, field data type: Geography.\nHow can i get this data, from a select query, in a format which i can then display on google maps or microsoft virt...
I have been wondering what are best practices when it comes to referencing 3rd party assemblies. A while ago I asked a question "Dependencies and references: what exactly should I reference" and received something to think about but I am not completely convinced. I have a 3rd party assembly needed for building my proje...
When working with third-party assemblies, particularly when they have their own dependencies, it can indeed become complicated to manage references in your project. Here are some best practices that can help you manage third-party assemblies and their dependencies effectively: ### 1. **Understand the Dependencies** ...
36,271
[ { "from": "human", "value": "I have been wondering what are best practices when it comes to referencing 3rd party assemblies. A while ago I asked a question \"Dependencies and references: what exactly should I reference\" and received something to think about but I am not completely convinced. I have a 3rd ...
I have a directory to which a process uploads some .pdf files. This process is out of my control. I need to make those files available through the website using Tomcat. I have a directory /var/lib/tomcat5/webapps/test1 available to the web and I can see the files in it with a browser. So, I created a symbolic link poin...
To enable symlinks specifically for a single directory in a Tomcat web application, you can use the `context.xml` file for your application to set specific configurations that allow the symlink to work correctly. ### Steps to Enable Symlinks for a Specific Directory 1. **Create the Symlink**: Make sure you have cr...
37,646
[ { "from": "human", "value": "I have a directory to which a process uploads some .pdf files. This process is out of my control.\nI need to make those files available through the website using Tomcat.\nI have a directory /var/lib/tomcat5/webapps/test1 available to the web and I can see the files in it with a ...
Is there any Java library that supports hierarchical column? For example (the first three row are columns) : ------------------------------------------------ 2008 | ------------------------------------------------ January | February | ---------------...
Yes, there are several Java libraries that can support hierarchical data structures, including hierarchical columns in tables. Here are a few libraries that you might find useful for this purpose: 1. **Apache POI**: This library is used for reading and writing Microsoft Excel files. It can handle complex structures, i...
36,259
[ { "from": "human", "value": "Is there any Java library that supports hierarchical column?\nFor example (the first three row are columns) :\n------------------------------------------------\n2008 |\n------------------------------------------------\nJanuary ...
An example scenario: User performs an update, for example a drag & drop. This is an ajax request. Server-side code cannot validate the update or the operation just fails. An exception is thrown. A reasonable error message should be shown to the user. How should I communicate the exception to the client side and show ...
When working with AJAX requests, handling exceptions and communicating error messages back to the client can be done effectively using a few techniques. Given that you are using Telerik RadControls for ASP.NET AJAX, you can leverage the built-in features to manage error handling. Here’s how you can accomplish this: ##...
39,080
[ { "from": "human", "value": "An example scenario:\n\nUser performs an update, for example a drag & drop. This is an ajax request.\nServer-side code cannot validate the update or the operation just fails. An exception is thrown.\nA reasonable error message should be shown to the user.\n\nHow should I communi...
I need to be able to embed and control the playback of an AVI file in a WinForms app, using C#. The video needs to be embedded in the form, not launched in a separate media player window. What's the best approach to do this? I found the System.Media namespace, which sounded promising, but it appears that is only usef...
Embedding and controlling the playback of an AVI file in a WinForms application can be achieved using the Windows Media Player control or the MCI (Media Control Interface) API. Since you're developing a WinForms application, using the Windows Media Player ActiveX control is often the easiest way to achieve video playba...
39,194
[ { "from": "human", "value": "I need to be able to embed and control the playback of an AVI file in a WinForms app, using C#. The video needs to be embedded in the form, not launched in a separate media player window.\nWhat's the best approach to do this? I found the System.Media namespace, which sounded p...
Here's what I am trying to do: Select text from a webpage I pulled up using my web browser control.After clicking a button while this text is still selected I would like a message box to pop-up displaying the text that was highlighted by the user. How do I get this functionality to work in my wpf application? I think I...
To achieve the functionality of selecting text on a webpage using a WPF application and displaying the selected text in a message box upon clicking a button, you need to ensure you're properly accessing the DOM of the web content. Using `mshtml` is the correct approach, but you also need to handle interactions carefull...
36,397
[ { "from": "human", "value": "Here's what I am trying to do:\nSelect text from a webpage I pulled up using my web browser control.After clicking a button while this text is still selected I would like a message box to pop-up displaying the text that was highlighted by the user. How do I get this functionalit...
I need help with realizing quite complex business logic which operates on many tables and executes quite a few SQL commands. However I want to be sure that the data will not be left in incosistent state and to this moment I don't see the solution which would not require nested transactions. I wrote a simple pseudo-code...
To achieve the scenario you’ve described while ensuring that your operations maintain data consistency and can be rolled back appropriately, you can use a database transaction with a combination of local transactions for your individual operations and a parent transaction for the final operation. Here’s a structured ap...
32,575
[ { "from": "human", "value": "I need help with realizing quite complex business logic which operates on many tables and executes quite a few SQL commands. However I want to be sure that the data will not be left in incosistent state and to this moment I don't see the solution which would not require nested t...
I'm working on an app which scrapes data from a website and I was wondering how I should go about getting the data. Specifically I need data contained in a number of div tags which use a specific CSS class - Currently (for testing purposes) I'm just checking for div class = "classname" in each line of HTML - This wo...
Scraping data from websites can indeed be done more efficiently and robustly than simply checking for substrings in HTML lines. One of the best approaches is to use an HTML parser library that can help you navigate and extract data from the HTML DOM structure more effectively. Here are a few popular libraries you can u...
37,429
[ { "from": "human", "value": "I'm working on an app which scrapes data from a website and I was wondering how I should go about getting the data. Specifically I need data contained in a number of div tags which use a specific CSS class - Currently (for testing purposes) I'm just checking for \ndiv class = \...
I'm looking for effective way to sort albums with songs. I have around 10000 and growing albums with approx 10 songs in every album. So that means 100000 files. Now I do not want to store all folders (albums) in one main folder, but I'm looking for a better way to store it. All folders are hierarchy equal, so I was th...
When managing a large collection of albums and songs, organizing your files in a way that facilitates easy access and reduces clutter is crucial. Here are some strategies you can consider for effective organization: ### 1. **Hierarchical Organization by Initials** - **Initials-Based Structure**: Create top-level fo...
35,365
[ { "from": "human", "value": "I'm looking for effective way to sort albums with songs. I have around 10000 and growing albums with approx 10 songs in every album. So that means 100000 files. \nNow I do not want to store all folders (albums) in one main folder, but I'm looking for a better way to store it. Al...
I just ran into this building a Textbox control for my MVC framework, where just before finalizing the whole document I call PreRender on everything that inherits from ServerTag (which in turn inherits from DOMElement). The only way i have found to change a DOMElement derived object's tagName is to replace it with a ne...
In the scenario you're describing, it seems like you are trying to change a control's tag name dynamically based on certain conditions (specifically, if the control should render as a `<textarea>` instead of an `<input>`). Indeed, your current approach involves creating a new DOM element and replacing the old one, whi...
36,672
[ { "from": "human", "value": "I just ran into this building a Textbox control for my MVC framework, where just before finalizing the whole document I call PreRender on everything that inherits from ServerTag (which in turn inherits from DOMElement).\nThe only way i have found to change a DOMElement derived o...
I have a self-developed program which I want to use as the default opening tool for .jpg and .bmp files. How can I achieve the goal progrmmatically? Some said that I have to add some registry entries. But I don't konw exactly what I should do. Can anyone tell me the method? Thank you!
To set your self-developed program as the default application for opening `.jpg` and `.bmp` files on a Windows operating system, you will need to modify the Windows Registry. Below are the steps to achieve this programmatically using a language like Python. However, please note that modifying the Windows Registry can a...
36,343
[ { "from": "human", "value": "I have a self-developed program which I want to use as the default opening tool for .jpg and .bmp files. How can I achieve the goal progrmmatically? \nSome said that I have to add some registry entries. But I don't konw exactly what I should do. Can anyone tell me the method?\nT...
I have library code that overrides Ar's find method. I also include the module for all Association classes so both MyModel.find and @parent.my_models.find work and apply the correct scope. I based my code off of will_paginate's: a = ActiveRecord::Associations returning([ a::AssociationCollection ]) { |classes| # dete...
To achieve the functionality you're looking for—overriding the find method for specific models and their associations without affecting the entire application—you can implement a more selective approach to extending the `ActiveRecord::Associations` classes. Instead of applying your modifications globally to all associa...
37,347
[ { "from": "human", "value": "I have library code that overrides Ar's find method. I also include the module for all Association classes so both MyModel.find and @parent.my_models.find work and apply the correct scope.\nI based my code off of will_paginate's:\na = ActiveRecord::Associations\nreturning([ a::A...
I encountered a problem when running some old code that was handed down to me. It works 99% of the time, but once in a while, I notice it throwing a "Violation reading location" exception. I have a variable number of threads potentially executing this code throughout the lifetime of the process. The low occurrence freq...
The issue you're encountering is indeed indicative of a race condition, which can lead to the kind of sporadic access violations you're seeing. The `std::map` being a shared resource among multiple threads means that if one thread is reading from or writing to the map while another thread is trying to initialize it (sp...
40,063
[ { "from": "human", "value": "I encountered a problem when running some old code that was handed down to me. It works 99% of the time, but once in a while, I notice it throwing a \"Violation reading location\" exception. I have a variable number of threads potentially executing this code throughout the lifet...
WPF GridSplitter makes my Grid wider than my Window! I've got a WPF Grid with a GridSplitter. If I resize my columns, then I can make my grid wider than my window and non-viewable. It starts like this: WPF Grid http://img201.imageshack.us/img201/9505/onehg6.jpg But after widening the left column, I can no longer see...
The issue you're experiencing with your WPF GridSplitter and Grid can indeed be affected by the layout and sizing of child elements, particularly the WebBrowser control, which can behave differently than standard WPF controls regarding resizing and layout. Here are some steps and suggestions to help you resolve the pr...
35,401
[ { "from": "human", "value": "WPF GridSplitter makes my Grid wider than my Window!\nI've got a WPF Grid with a GridSplitter. If I resize my columns, then I can make my grid wider than my window and non-viewable.\nIt starts like this: \nWPF Grid http://img201.imageshack.us/img201/9505/onehg6.jpg\nBut after ...
I can't get the ASP.NET Rating control's selected value(CurrentValue) in javascript. I am using Rating control in datagrid and do anyone know how can I get the CurrentValue of ASP.NET Rating in javascript?
To access the selected value (CurrentValue) of an ASP.NET Rating control from JavaScript, especially when it's used inside a DataGrid, you'll need to ensure that you're correctly referencing the control. ASP.NET dynamically generates IDs for controls, which can make them tricky to access directly with JavaScript. Here...
35,801
[ { "from": "human", "value": "I can't get the ASP.NET Rating control's selected value(CurrentValue) in javascript. I am using Rating control in datagrid and do anyone know how can I get the CurrentValue of ASP.NET Rating in javascript?\n" }, { "from": "gpt", "value": "To access the selected value...
i give users special URL with access key in it. users accessing the public page via this special url should be able to see some additional data as compared to simple anonymous user. i want to give some additional role to anonymous user based on parameters provided in request so i can do something like this in my templ...
To achieve the goal of adding additional roles to an authenticated or potentially anonymous user based on the presence of an access key in the request, you can implement a custom `OncePerRequestFilter` and modify the security context accordingly. Here’s a step-by-step approach to do this: 1. **Extract the Access Key a...
35,080
[ { "from": "human", "value": "i give users special URL with access key in it. users accessing the public page via this special url should be able to see some additional data as compared to simple anonymous user. \ni want to give some additional role to anonymous user based on parameters provided in request s...
Given the following, how could I insert rows in my db? (Or what should I correct in my schema?) Models: class Item < ActiveRecord::Base has_many :tran_items has_many :transactions, :through => :tran_items end class TranItem < ActiveRecord::Base belongs_to :item belongs_to :tra...
Based on your models and schema, there are a few corrections you should make to ensure that the relationships are properly set up, and that you can insert rows in your database correctly. Here are the suggested changes: ### Suggested Schema Changes 1. **Remove Unnecessary References:** You do not need to reference...
36,965
[ { "from": "human", "value": "Given the following, how could I insert rows in my db? (Or what should I correct in my schema?)\nModels:\nclass Item < ActiveRecord::Base\n has_many :tran_items\n has_many :transactions, :through => :tran_items\nend\nclass TranItem < ActiveRecord...
I am having trouble creating a mapping when the List type is an interface. It looks like I need to create an abstract class and use the discriminator column is this the case? I would rather not have to as the abstract class will just contain an abstract method and I would rather just keep the interface. I have an inter...
In JPA (Java Persistence API), you can't directly use interfaces as entities or utilize discriminator columns on interfaces. JPA needs to understand the concrete implementation of an entity for mapping, and it relies on inheritance strategies that usually involve abstract classes. You are correct that the discriminator...
38,722
[ { "from": "human", "value": "I am having trouble creating a mapping when the List type is an interface. It looks like I need to create an abstract class and use the discriminator column is this the case? I would rather not have to as the abstract class will just contain an abstract method and I would rather...
I need a dropdown list on my page that will allow a user to select their state. Since this is probably a control that will be used elsewhere, I thought it would be a good idea to create an MVC View User Control that could be reused. I was thinking the control would look something like this: <select name="" id=""> <...
To create a reusable MVC View User Control (Razor Partial View) for a dropdown list of states, you can pass in the name, id, and the selected state as parameters to your partial view. Using ViewData is one way to achieve this, but a more robust and cleaner approach would be to use a model or parameters to achieve your ...
39,164
[ { "from": "human", "value": "I need a dropdown list on my page that will allow a user to select their state. Since this is probably a control that will be used elsewhere, I thought it would be a good idea to create an MVC View User Control that could be reused.\nI was thinking the control would look someth...
I have a form containing a web browser control. This browser control will load some HTML from disk and display it. I want to be able to have a button in the HTML access C# code in my form. For example, a button in the HTML might call the Close() method on the form. Target platform: C# and Windows Forms (any version)
To enable communication between HTML content loaded in a WebBrowser control and your C# Windows Forms application, you can utilize the `ObjectForScripting` property of the WebBrowser control. This property allows you to expose a C# object to the HTML DOM, enabling you to call methods on that object from JavaScript. He...
38,477
[ { "from": "human", "value": "I have a form containing a web browser control. This browser control will load some HTML from disk and display it. I want to be able to have a button in the HTML access C# code in my form. \nFor example, a button in the HTML might call the Close() method on the form.\nTarget pla...
I'm sure some of you noticed that if you have Acrobat Reader ( or any other pdf viewer ) , and open a pdf in Firefox , you will see it embedded inside your tab . Is there any way to embed an application in a JFrame ?
Yes, you can embed an application in a JFrame using Java's `ProcessBuilder` and `JPanel` for the interface. However, it's important to clarify that you cannot directly embed an external application like a PDF viewer (or any application) in a Java JFrame as you would embed a web page or an image. Instead, you can achi...
35,907
[ { "from": "human", "value": "I'm sure some of you noticed that if you have Acrobat Reader ( or any other pdf viewer ) , and open a pdf in Firefox , you will see it embedded inside your tab . Is there any way to embed an application in a JFrame ?\n" }, { "from": "gpt", "value": "Yes, you can embe...
QA tester was reading HTML/JS code to write a functional test of a web form, and saw: if (form_field == empty) { ...do stuff for empty field } else if (form_field != empty) { ...do stuff for non-empty field } else { ...do stuff that will never be done } After a couple embarrassing attempts, tester realized that they c...
The code you provided has an inherent logical flaw that makes the third block unreachable, meaning it will never execute. This issue stems from the conditions and the way they are structured. Here are some points to consider regarding your questions: ### Language Specificity - **Language Specificity**: While the examp...
37,786
[ { "from": "human", "value": "QA tester was reading HTML/JS code to write a functional test of a web form, and saw:\nif (form_field == empty)\n{\n...do stuff for empty field\n}\nelse if (form_field != empty)\n{\n...do stuff for non-empty field\n}\nelse\n{\n...do stuff that will never be done\n}\n\nAfter a co...
I've written a WPF UserControl, and want to add one or more of it to my Window at runtime when I click a button. How can I do that? Edit: Further specification I want to add the usercontrols to a Canvas, and put in a absolute position. The canvas is a drawing of the floors in my house, and each usercontrol has properti...
To dynamically add instances of a UserControl to a `Canvas` in WPF, you need to set the position of the control using the `Canvas.Left` and `Canvas.Top` attached properties. Below are the steps to achieve this. ### Step 1: Create Your UserControl Make sure you have your `LightUserControl` defined, for example: ```xm...
37,629
[ { "from": "human", "value": "I've written a WPF UserControl, and want to add one or more of it to my Window at runtime when I click a button. How can I do that?\nEdit: Further specification\nI want to add the usercontrols to a Canvas, and put in a absolute position. The canvas is a drawing of the floors in ...
I just ran into the "user-defined conversions to or from an interface are not allowed" problem in C#. What I was attempting to do was create a generic Graph class that could be iterated over in a couple different ways, depending on the supported interface. So: public class Graph<T> : IBreadthFirstSearchTree<T>, IDept...
In C#, user-defined conversions to or from interfaces are not allowed, as you've encountered. However, you can achieve similar behavior using explicit interface implementations, which allow you to specify how a class implements an interface. You can create your `Graph` class to implement the interfaces directly withou...
35,764
[ { "from": "human", "value": "I just ran into the \"user-defined conversions to or from an interface are not allowed\" problem in C#. What I was attempting to do was create a generic Graph class that could be iterated over in a couple different ways, depending on the supported interface. So:\npublic class ...
When an iPhone application manages its own preferences, rather than using a bundle, it seems to be common practice to style that view to mimic the System Preferences app: fields are grouped by light rectangles with rounded edges; titles and explanatory text are added to the space between. What is best used to achieve...
Using a background image is not the best approach for mimicking the styling of the System Preferences app on iOS. Instead, you can achieve this look using a combination of standard UIKit components and styling techniques. Here are some recommended ways to create a view that mimics the System Preferences app: 1. **UIT...
38,553
[ { "from": "human", "value": "When an iPhone application manages its own preferences, rather than using a bundle, it seems to be common practice to style that view to mimic the System Preferences app: fields are grouped by light rectangles with rounded edges; titles and explanatory text are added to the spac...
I'm fooling around with WCF, and would like to see how many messages I send/receive, and how large these messages are. I tried activated WCF tracing, and ended up with a real huge trace file, but I found no way to extract the simple message size from this. There sure must be some way to get this? Maybe I missed some pa...
To monitor and extract message sizes and counts in WCF (Windows Communication Foundation), enabling WCF tracing is indeed a good first step, but extracting meaningful statistics such as message sizes from the trace files can be a bit tricky because the trace files can become quite verbose and large. ### Steps to Enabl...
38,746
[ { "from": "human", "value": "I'm fooling around with WCF, and would like to see how many messages I send/receive, and how large these messages are.\nI tried activated WCF tracing, and ended up with a real huge trace file, but I found no way to extract the simple message size from this.\nThere sure must be s...
I have this code while($row = mysql_fetch_row($result)) { echo '<tr>'; $pk = $row[0]['ARTICLE_NO']; foreach($row as $key => $value) { echo '<td><a href="#" onclick="GetAuctionData(\''.$pk.'\')">' . $value . '</a></td>'; } which gets pk. pk is then passed on to the axjax part with this: function GetAuctionData(pk) { ....
The issue you're experiencing with `$pk` being incremented by 2 (e.g., resulting in values like 4, 6, 8, etc.) likely stems from the way you are retrieving and using values from the `$row` array in your loop. The line `$pk = $row[0]['ARTICLE_NO'];` is problematic. When you use `mysql_fetch_row`, it returns an indexed ...
38,480
[ { "from": "human", "value": "I have this code\nwhile($row = mysql_fetch_row($result))\n{\necho '<tr>';\n$pk = $row[0]['ARTICLE_NO'];\n\nforeach($row as $key => $value)\n{\necho '<td><a href=\"#\" onclick=\"GetAuctionData(\\''.$pk.'\\')\">' . $value . '</a></td>';\n}\n\nwhich gets pk. pk is then passed on to...
I have been working my way through Scott Guthrie's excellent post on ASP.NET MVC Beta 1. In it he shows the improvements made to the UpdateModel method and how they improve unit testing. I have recreated a similar project however anytime I run a UnitTest that contains a call to UpdateModel I receive an ArgumentNullEx...
You're correct in your analysis that the `UpdateModel` method in ASP.NET MVC requires the `ControllerContext`, which is not being set in your unit test. When you create an instance of `CountryController` without initializing the `ControllerContext`, it results in the `ArgumentNullException` when `UpdateModel` is called...
39,138
[ { "from": "human", "value": "I have been working my way through Scott Guthrie's excellent post on ASP.NET MVC Beta 1. In it he shows the improvements made to the UpdateModel method and how they improve unit testing. I have recreated a similar project however anytime I run a UnitTest that contains a call t...
I have a problem, and was hoping I could rely on some of the experience here for advice and a push in the right direction. I have an MS Access file made by propietary software. I only want to take half the columns from this table, and import into new(not yet setup)mysql database. I have no idea how to do this or what t...
Certainly! You can automate the process of extracting data from the MS Access file, downloading the JPEG files, and importing them into a MySQL database. Here’s a high-level overview of the steps you would need to take, along with some example code snippets and recommendations. ### Overview of Steps 1. **Read data fro...
37,891
[ { "from": "human", "value": "I have a problem, and was hoping I could rely on some of the experience here for advice and a push in the right direction. I have an MS Access file made by propietary software. I only want to take half the columns from this table, and import into new(not yet setup)mysql database...
I know this is probably on the Internet somewhere but I can't find the answer here on Stackoverflow so I thought I may boost up the knowledge base here a little. I'm a newbie to Ruby and Rails but my company is getting pretty invested in it so I'm trying to get to know it in a little more detail. It's been difficult fo...
In Rails, you can handle cascading deletes at the application level using Active Record callbacks, but it is generally recommended to use database-level constraints for cascading deletes when possible. This is because handling it in the database can lead to better performance and maintainability, as the database enforc...
38,696
[ { "from": "human", "value": "I know this is probably on the Internet somewhere but I can't find the answer here on Stackoverflow so I thought I may boost up the knowledge base here a little.\nI'm a newbie to Ruby and Rails but my company is getting pretty invested in it so I'm trying to get to know it in a ...
I'm writing C# code that needs to connect to COM events. I implemented the use of IConnectionPointContainer and IConnectionPoint thus: IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer; if (connectionPointContainer == null) { Debug.Fail("The s...
To address the issue of handling COM events with a .NET COM server that does not implement the `IConnectionPointContainer` interface, you'll need to adapt your approach to ensure that you can still connect to the COM events without requiring that the .NET object directly implement the interface. Here are a few potenti...
38,933
[ { "from": "human", "value": "I'm writing C# code that needs to connect to COM events. I implemented the use of \nIConnectionPointContainer and IConnectionPoint thus:\n IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer;\n if (connectionPointContaine...
When I make a query, I often wonder about this: Is it better to add extra field(s) to the table, or just get the values and calculate in your server side language? For example, table Student contains Student.score field. I want to get the grades. Do I get the score and make a bunch of if/else/switch for the grades? ...
The decision of whether to store derived values (like grades based on a score) in your database or calculate them on the server side is a common design dilemma. Here are some key considerations for each approach: ### Storing Derived Values in the Database **Pros:** 1. **Performance**: For large datasets or complex ca...
34,561
[ { "from": "human", "value": "When I make a query, I often wonder about this:\n\nIs it better to add extra field(s) to\nthe table, or just get the values and\ncalculate in your server side\nlanguage?\n\nFor example, table Student contains Student.score field. I want to get the grades.\n\nDo I get the score a...
I'm working on a school project and I'm getting some weird errors from Xcode. I'm using TextMate's Command+R function to compile the project. Compilation seems to work okay but linking fails with an error message I don't understand. ld output: ld: duplicate symbol text_field(std::basic_istream >&)in /path/final/build...
The error you're encountering indicates that the linker has found two definitions of the `text_field` function, which leads to a "duplicate symbol" error. This typically occurs when a function is defined in a header file that is included in multiple source files without the proper use of include guards or `inline` keyw...
38,568
[ { "from": "human", "value": "I'm working on a school project and I'm getting some weird errors from Xcode. I'm using TextMate's Command+R function to compile the project. Compilation seems to work okay but linking fails with an error message I don't understand. \nld output:\n\nld: duplicate symbol text_fiel...
I'm having problems setting the SelectedIndex on a bound ComboBox (on a windows form) that I'm adding to a form at runtime and I suspect there's something odd going on. When I try this, I get the error "InvalidArgument=Value of '1' is not valid for 'SelectedIndex'." private void Form1_Load(object sender, EventArgs e) ...
The behavior you are encountering is due to the way data binding works in WinForms and how the ComboBox control processes its data source when it is created and added to a form. When you set the `DataSource` of a `ComboBox`, the control goes through a series of processes to populate its items based on the provided dat...
39,309
[ { "from": "human", "value": "I'm having problems setting the SelectedIndex on a bound ComboBox (on a windows form) that I'm adding to a form at runtime and I suspect there's something odd going on.\nWhen I try this, I get the error \"InvalidArgument=Value of '1' is not valid for 'SelectedIndex'.\"\nprivate ...
There was a recent question about, effectively, replacing a local source code control system with a "keep all versions" file system or tool. Many of the answers said in essence that source code control systems are for more than just keeping past versions, even for an individual developer - something I think is correct....
You're on the right track with your starter list, and you've captured many of the key reasons for using a source code control system (often referred to as version control). Here are some additional reasons, along with some clarifications on the points you've made: 1. **Keeping all versions**: As you noted, this provid...
35,536
[ { "from": "human", "value": "There was a recent question about, effectively, replacing a local source code control system with a \"keep all versions\" file system or tool.\nMany of the answers said in essence that source code control systems are for more than just keeping past versions, even for an individu...
I have several deployment projects. In order to deploy an application, I need to do several tasks, one of them is to change each deployment project's product version and product code. I can't find a way to programmatically change them. Since it's a Deployment project (which finally produces an executable installer), I'...
To programmatically change the product version and product code in a Visual Studio Deployment project (which is typically a Visual Studio Setup Project), you can leverage a few different approaches since you can't directly manipulate the project file using MSBuild. ### Using Automation with DTE You can automate the c...
37,674
[ { "from": "human", "value": "I have several deployment projects. In order to deploy an application, I need to do several tasks, one of them is to change each deployment project's product version and product code.\nI can't find a way to programmatically change them.\nSince it's a Deployment project (which fi...
I'm subscribed in a mailing list that I use only as reference for developing and I'm trying to read it with my RSS client but the mailing list doesn't provide the RSS. So I thought it should be a way to convert the mailing list to a RSS I was trying to find some php class to install it in my server but cant find anyone...
Creating an RSS feed from a mailing list that doesn't provide one can be accomplished by setting up a script that scrapes the email content and converts it into RSS format. While there may not be an out-of-the-box PHP class available specifically for this purpose, you can create a simple solution using PHP and a few li...
34,825
[ { "from": "human", "value": "I'm subscribed in a mailing list that I use only as reference for developing and I'm trying to read it with my RSS client but the mailing list doesn't provide the RSS.\nSo I thought it should be a way to convert the mailing list to a RSS I was trying to find some php class to in...
I am having some Internet Explorer 7 (and 8 beta) browser-specific problems with a link to an MP3. When I click the link in IE7, a new browser window opens and the quicktime plugin tries to play the file. Instead ofthe player, I see a faded Quicktime icon with a question mark in the center. alt text http://img87.image...
It sounds like you're facing some compatibility issues with Internet Explorer 7 (and the beta version of 8) when attempting to play MP3 files via a link on your website. The problem seems to stem from how Internet Explorer handles certain media types and how it interacts with plugins like QuickTime. Here are a few sug...
38,912
[ { "from": "human", "value": "I am having some Internet Explorer 7 (and 8 beta) browser-specific problems with a link to an MP3.\nWhen I click the link in IE7, a new browser window opens and the quicktime plugin tries to play the file. Instead ofthe player, I see a faded Quicktime icon with a question mark ...
I have been recently (and repeatedly) asked by customers about MIPS needed to run our software. Usually we was able to get rid of this questions by explaining the customer that this is really depend on the cpu/os/hw (our software is highly portable) and/or use case (i.e. how our software is used). But I have a last ...
Estimating the MIPS (Million Instructions Per Second) required to run your software can indeed be challenging, especially when dealing with highly portable software that behaves differently depending on the underlying hardware and system configuration. Here are a few approaches and tools you can consider for obtaining ...
37,533
[ { "from": "human", "value": "I have been recently (and repeatedly) asked by customers about MIPS needed to run our software. Usually we was able to get rid of this questions by explaining the customer that this is really depend on the cpu/os/hw (our software is highly portable) and/or use case (i.e. how our...
I've found a few pages (some that even link to a number of other pages) on the Microsoft website that I bookmarked last night for reading today, but I'm curious as to other good non-Microsoft resources for discussing ASP.NET web applications, both Forms and MVC (including comparisons/contrasts between the two).
There are plenty of great non-Microsoft resources for learning about and discussing ASP.NET web applications, including both Web Forms and MVC. Here’s a list of some useful sites, communities, and resources that can enhance your understanding of ASP.NET: ### Blogs and Articles 1. **ASP.NET Community Blogs** - Many dev...
38,841
[ { "from": "human", "value": "I've found a few pages (some that even link to a number of other pages) on the Microsoft website that I bookmarked last night for reading today, but I'm curious as to other good non-Microsoft resources for discussing ASP.NET web applications, both Forms and MVC (including compar...
I believe there is a way to do this, but I'm not familiar with ORACLE 10g as many other people are. Here's the scenario: I'm currently converting Classic ASP pages to ASP.net 2.0. I have a query that is creating a report. It's reporting Sales vs. Previous Sales. What is happening currently is one query is going out to ...
You can consolidate your queries by using a `LEFT JOIN` to include the summation of sales quantities directly in your main query for locations. Instead of looping through each location and querying the sum separately, you can incorporate the aggregation logic into the primary query itself. This is typically done using ...
36,121
[ { "from": "human", "value": "I believe there is a way to do this, but I'm not familiar with ORACLE 10g as many other people are. Here's the scenario:\nI'm currently converting Classic ASP pages to ASP.net 2.0. I have a query that is creating a report. It's reporting Sales vs. Previous Sales. What is happeni...
What is the best way to include data in an HTML page? The data is not human-readable and will be processed by a script once the page has loaded. The options I can think of are: Using class and title attributes on hidden/empty <div> or <span> elements within the page JSON in a <script> element at the bottom of the page...
Each method you've mentioned for including non-human-readable data in an HTML page has its own advantages and disadvantages. Here's a breakdown of each option, along with considerations to help you determine the best approach: 1. **Using Class and Title Attributes on Hidden/Empty `<div>` or `<span>` Elements**: - *...
39,941
[ { "from": "human", "value": "What is the best way to include data in an HTML page? The data is not human-readable and will be processed by a script once the page has loaded. The options I can think of are:\n\nUsing class and title attributes on hidden/empty <div> or <span> elements within the page\nJSON in ...
I have a shop system that integrates PayPal in the usual way, i.e. the user is redirected to paypal.com to log in and confirm the payment after which the user is directed back at a confirmation page in my shop system. Now my customer is asking if the entire process can be run inside the shop itself. I have two or three...
Integrating PayPal in a way that allows the payment process to occur within your shop itself can be accomplished using one of several approaches. However, each has its pros and cons, and it's essential to consider the user experience, security, and compliance with PayPal's policies. Let's explore the options you mentio...
37,261
[ { "from": "human", "value": "I have a shop system that integrates PayPal in the usual way, i.e. the user is redirected to paypal.com to log in and confirm the payment after which the user is directed back at a confirmation page in my shop system.\nNow my customer is asking if the entire process can be run i...
How can you get castle Windsor to choose the right implantation of a interface at run time when you have multiple implementations in the container. For example lets say i have a simple interface called IExamCalc that does calculations to work out how someone did in that exam. No we have several implementation of this l...
To resolve the right implementation of an interface at runtime using Castle Windsor, you can utilize a few strategies based on the context or conditions under which you need to resolve the implementations. This might involve using a factory pattern, or a custom resolver, depending on how you want to determine which imp...
36,476
[ { "from": "human", "value": "How can you get castle Windsor to choose the right implantation of a interface at run time when you have multiple implementations in the container.\nFor example lets say i have a simple interface called IExamCalc that does calculations to work out how someone did in that exam.\n...
I need to deploy a web application on several laptops (although it is a web application, it is intended to run via localhost only - thus the need to deploy on several different machines). Normally I would go to IIS and right click a directory to create a web application, but I would very much like to automate this leg ...
Yes, you can automate the deployment of a web application to IIS without using the Microsoft Management Console (MMC) by utilizing PowerShell or using command-line tools like `appcmd`. Below are methods to achieve this. ### Method 1: Using PowerShell You can use PowerShell scripts to create the necessary IIS configur...
36,537
[ { "from": "human", "value": "I need to deploy a web application on several laptops (although it is a web application, it is intended to run via localhost only - thus the need to deploy on several different machines).\nNormally I would go to IIS and right click a directory to create a web application, but I ...
I think many developers know that uncomfortable feeling when users tell them that "The application is slow (again)." In a complex web application there can be many possible reasons for a degradation in (perceived) performance: slow database response, bandwidth issues, bad caching etc. There certainly are issues which w...
Absolutely! When dealing with performance issues in production systems, having the right set of monitoring tools and methods in place is crucial for diagnosing and resolving issues effectively. Here’s a comprehensive approach that leverages several tools and methodologies to give you a visual and actionable overview of...
33,397
[ { "from": "human", "value": "I think many developers know that uncomfortable feeling when users tell them that \"The application is slow (again).\"\nIn a complex web application there can be many possible reasons for a degradation in (perceived) performance: slow database response, bandwidth issues, bad cac...
I am trying to modify the output stream to search/replace some XHTML tags returned from a View. I could use an traditional ASP.NET response filter, but thought to try the ASP.NET MVC action filter first. public class MyResultFilter : ActionFilterAttribute { public override void OnResultExecuting(ResultExecutingCon...
In ASP.NET MVC, the `ActionFilterAttribute` allows you to tap into the lifecycle of a controller action, but it doesn't provide direct access to the raw output of a `ViewResult` in a way that allows for easy modification. However, you can achieve this by overriding the way the view result is executed, specifically by c...
36,495
[ { "from": "human", "value": "I am trying to modify the output stream to search/replace some XHTML tags returned from a View. I could use an traditional ASP.NET response filter, but thought to try the ASP.NET MVC action filter first.\npublic class MyResultFilter : ActionFilterAttribute\n{\n public overri...
I want to debug an application in Linux. The application is created in C++. The GUI is created using QT. The GUI is linked with a static library that can be treated as the back end of the application. I want to debug the static library but am not sure how to do that. I tried using gdb gdb GUI But how can I attach the ...
Debugging a static library in Linux, especially in a C++ application using Qt, can be accomplished effectively with `gdb`. Here’s how you can approach debugging the static library: ### Steps to Debug a Static Library in a Qt Application 1. **Build the Application with Debug Symbols:** Ensure that both the main app...
38,267
[ { "from": "human", "value": "I want to debug an application in Linux.\nThe application is created in C++. The GUI is created using QT.\nThe GUI is linked with a static library that can be treated as the back end of the application.\nI want to debug the static library but am not sure how to do that.\nI tried...
I'm looking to be able to reference certain state/objects through anywhere in my application. For instance, a user logs in to their application, I need to call a web service and retrieve the users information. Then I want to be able to access this information from anywhere in the application with something like the fol...
Using the AppDelegate as a centralized location to store global state or shared resources can be a straightforward approach in small applications. However, it’s generally not considered the best practice for larger or more complex applications. Here are some reasons why and alternatives you might consider: ### Why Usi...
40,100
[ { "from": "human", "value": "I'm looking to be able to reference certain state/objects through anywhere in my application. For instance, a user logs in to their application, I need to call a web service and retrieve the users information. Then I want to be able to access this information from anywhere in th...
I'm trying to figure out how to deal with installation and deployment of our project which is a framework. Typically developers would install the framework and then have their .Net applications reference our dlls. The framework has 2 levels: A number of native C++ dlls Some C++\CLI and C# assemblies (all are dlls) th...
Installing native assemblies in the WinSxS (Side-by-Side) folder and .NET assemblies in the Global Assembly Cache (GAC) using an installer like WiX can be a bit complex, but it can definitely be done. Below are steps and examples to guide you through this process using WiX. ### Step 1: Setting Up Your WiX Project Fir...
35,934
[ { "from": "human", "value": "I'm trying to figure out how to deal with installation and deployment of our project which is a framework. Typically developers would install the framework and then have their .Net applications reference our dlls.\nThe framework has 2 levels:\n\nA number of native C++ dlls \nSom...
I've seen How to: Host Controls in Windows Forms DataGridView Cells which explains how to host a control for editing a cell in a DataGridView. But how can I host a control for displaying a cell? I need to display a file name and a button in the same cell. Our UI designer is a graphic designer not a programmer, so I h...
Creating a custom `DataGridViewCell` to host controls for displaying in a DataGridView is indeed possible. This involves extending the `DataGridViewCell` class and also the `DataGridViewColumn` class to support your custom cell type. Below, I’ll guide you through the steps needed to create a custom DataGridView cell th...
31,934
[ { "from": "human", "value": "I've seen How to: Host Controls in Windows Forms DataGridView Cells which explains how to host a control for editing a cell in a DataGridView. But how can I host a control for displaying a cell?\nI need to display a file name and a button in the same cell. Our UI designer is a...
I have a website built in C#.NET that tends to produce a fairly steady stream of SQL timeouts from various user controls and I want to easily pop some code in to catch all unhandled exceptions and send them to something that can log them and display a friendly message to the user. How do I, through minimal effort, catc...
Catching all unhandled exceptions in a C#.NET web application can be effectively managed using the built-in ASP.NET features. The most common approach is to utilize the `Application_Error` event in the Global.asax file. This method allows you to log unhandled exceptions and display a user-friendly message. ### Steps t...
39,522
[ { "from": "human", "value": "I have a website built in C#.NET that tends to produce a fairly steady stream of SQL timeouts from various user controls and I want to easily pop some code in to catch all unhandled exceptions and send them to something that can log them and display a friendly message to the use...
Alright, so I have a query that looks like this: SELECT `orders`.*, GROUP_CONCAT( CONCAT( `menu_items`.`name`, ' ($', FORMAT(`menu_items`.`price`,2), ')' ) SEPARATOR '<br>' ) as `items`, SUM(`menu_items`.`price`) as `additional`, `chi...
You can achieve your goal by using a `CASE` statement inside the `GROUP_CONCAT` function to conditionally include the price based on whether it is greater than zero. Here's how you can modify your query: ```sql SELECT `orders`.*, GROUP_CONCAT( CASE WHEN `menu_items`.`price` > 0 THEN ...
39,737
[ { "from": "human", "value": "Alright, so I have a query that looks like this:\nSELECT \n `orders`.*,\n GROUP_CONCAT(\n CONCAT(\n `menu_items`.`name`, \n ' ($',\n FORMAT(`menu_items`.`price`,2),\n ')'\n ) SEPARATOR '<br>'\n ) as `items`,\n ...
I'm optimizing a directx graphics application to take advantage of nVidia's SLI technology. I'm currently investigating some of the techniques mentioned in their 'Best Practices' web page, but wanted to know what advice/experience any of you have had with this? Thanks!
Optimizing a DirectX graphics application for NVIDIA's SLI (Scalable Link Interface) technology can significantly enhance your rendering performance and overall visual fidelity. Here are some key practices and considerations based on NVIDIA's guidelines and general experience with SLI optimization: ### 1. **Use Multi-...
35,876
[ { "from": "human", "value": "I'm optimizing a directx graphics application to take advantage of nVidia's SLI technology. I'm currently investigating some of the techniques mentioned in their 'Best Practices' web page, but wanted to know what advice/experience any of you have had with this? \nThanks!\n" ...
Most of my PHP apps have an ob_start at the beginning, runs through all the code, and then outputs the content, sometimes with some modifications, after everything is done. ob_start() //Business Logic, etc header->output(); echo apply_post_filter(ob_get_clean()); footer->output(); This ensures that PHP errors get disp...
Each of the approaches you mentioned for handling large output buffers in PHP has its own set of advantages and drawbacks. Let’s break them down: ### 1. Write Buffered Content to a Temporary File **Advantages:** - **Memory Efficient:** By writing to a temporary file, you significantly reduce memory usage since you're...
38,895
[ { "from": "human", "value": "Most of my PHP apps have an ob_start at the beginning, runs through all the code, and then outputs the content, sometimes with some modifications, after everything is done.\nob_start()\n//Business Logic, etc\nheader->output();\necho apply_post_filter(ob_get_clean());\nfooter->ou...
I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linux. The file is read and written by all applications. During the write process no application is allowed to read this file. ...
To achieve proper synchronization across multiple applications, virtual machines, and servers while avoiding the race condition that your current semaphore implementation is facing, you can use a more robust approach by leveraging file locking mechanisms provided by the operating system. Here are a couple of strategies...
38,291
[ { "from": "human", "value": "I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linux. The file is read and written by all applications. During the write process no a...
Using Flex 3, I have a Button which is skinned using PNGs specified in a CSS style sheet. Button.addextra { downSkin : Embed( source="img/add-extra-icon.png" ); overSkin : Embed( source="img/add-extra-icon.png" ); upSkin : Embed( source="img/add-extra-icon.png" ); disabledSkin : Embed( source="img/...
In Flex 3, while you can't directly create a hairline border around an image just using CSS styles alone (especially for a Button), you can achieve a similar effect by creating a custom skin for the Button. You would need to override the default skin and create your own skin class for the Button. Here’s how you can do...
37,771
[ { "from": "human", "value": "Using Flex 3, I have a Button which is skinned using PNGs specified in a CSS style sheet.\nButton.addextra { \n downSkin : Embed( source=\"img/add-extra-icon.png\" ); \n overSkin : Embed( source=\"img/add-extra-icon.png\" ); \n upSkin : Embed( source=\"img/add-extra-ic...
I have a file test.txt that is inside a zip archive test.zip. The permissions on test.txt are out of my control when it's compressed, but now I want them to be group-writeable. I am extracting the file with Python, and don't want to escape out to the shell. EDIT: Here's what I've got so far: import zipfile z = zipfi...
When you're working with ZIP archives, it's important to understand that the ZIP format does not store POSIX file permissions directly in a way that is respected across all platforms. As you've found, the behavior can vary based on the platform and the tools used to extract the files. In general, when you extract files...
39,222
[ { "from": "human", "value": "I have a file test.txt that is inside a zip archive test.zip. The permissions on test.txt are out of my control when it's compressed, but now I want them to be group-writeable. I am extracting the file with Python, and don't want to escape out to the shell.\nEDIT:\nHere's what...
I've got a section of code on a b2evo PHP site that does the following: $content = preg_replace_callback( '/[\x80-\xff]/', create_function( '$j', 'return "&#".ord($j[0]).";";' ), $content); What does this section of code do? My guess is that it strips out ascii characters between 128 and 256, but I can't ...
Let's break down the provided code: ```php $content = preg_replace_callback( '/[\x80-\xff]/', create_function( '$j', 'return "&#".ord($j[0]).";";' ), $content ); ``` ### What the Code Does: 1. **Regular Expression**: The regex `'/[\x80-\xff]/'` matches any character in the byte range from `\x80` (128 in ...
39,483
[ { "from": "human", "value": "I've got a section of code on a b2evo PHP site that does the following: \n$content = preg_replace_callback(\n '/[\\x80-\\xff]/',\n create_function( '$j', 'return \"&#\".ord($j[0]).\";\";' ),\n $content);\n\nWhat does this section of code do? My guess is that it strips o...
I am currently coding a program with a WPF UI and I have a button which is either close or cancel, depending on if there were any changes made on the page. To achieve this I want to use a trigger (wrapped in a style) on the button so that when the dependency property HasChanges is true the button will change from "Clo...
To make your WPF button change its content from "Close" to "Cancel" based on a dependency property (in this case, `HasChanges`), you need to ensure that a couple of things are set up correctly. 1. **Dependency Property Implementation**: Ensure that your `HasChanges` dependency property is properly defined and that it ...
39,241
[ { "from": "human", "value": "I am currently coding a program with a WPF UI and I have a button which is either close or cancel, depending on if there were any changes made on the page. To achieve this I want to use a trigger (wrapped in a style) on the button so that when the dependency property HasChanges...
I would like to know the best approach to create a Common Information Model. Just to be clear, I've also heard it referred to as a canonical information model, semantic information model, and master data model - As far as I can tell, they are all referring to the same concept. I've heard in the past that a combined "to...
Creating a Common Information Model (CIM) is indeed a complex undertaking that involves bringing together various perspectives, domains, and stakeholders. The goal is to create a unified representation of data that serves multiple systems and applications, often in the context of Service-Oriented Architecture (SOA). Be...
39,800
[ { "from": "human", "value": "I would like to know the best approach to create a Common Information Model. Just to be clear, I've also heard it referred to as a canonical information model, semantic information model, and master data model - As far as I can tell, they are all referring to the same concept.\n...
This may seem like a somewhat contrived example, but I'm left scratching my head. Ok, I have a console app that instantiates a WindowsForm and calls a method called DoSomeWork() on the form. class Program { static void Main(string[] args) { Form1 form = new Form1(); form.DoSomeWork(); ...
The behavior you are experiencing stems from the way Windows Forms (WinForms) operates with its message loop and threading model. When you instantiate a `Form` and call `DoSomeWork()`, the application runs on the UI thread, and the `BackgroundWorker` is expected to run asynchronously. However, there is no message loop ...
40,064
[ { "from": "human", "value": "This may seem like a somewhat contrived example, but I'm left scratching my head.\nOk, I have a console app that instantiates a WindowsForm and calls a method called DoSomeWork() on the form.\nclass Program\n { \n static void Main(string[] args)\n {\n Form1 form = ne...
It was a long holiday weekend, so I got the coding bug again and started playing around: Mario http://gfilter.net/junk/tileengine.jpg I wrote a basic tile engine, but having never attempted this before, I am really struggling with handling sprite collision detection and implementing realistic physics for gravity. For a...
It's great to hear that you're making progress on your tile engine and game! Collision detection and physics can be tricky, but with the right resources and some tweaks, you'll be able to refine your game mechanics. ### Resources for Collision Detection and Physics 1. **Game Physics for Beginners**: - **Physics fo...
39,662
[ { "from": "human", "value": "It was a long holiday weekend, so I got the coding bug again and started playing around:\nMario http://gfilter.net/junk/tileengine.jpg\nI wrote a basic tile engine, but having never attempted this before, I am really struggling with handling sprite collision detection and implem...
I would like to have the authentication and registration parts of my website encrypted (for obvious reason). This site is currently and older site which some friends and I started in middle school and still use today. I may or may not register it to be a Non-Profit Organization in the near future, but either way, a C...
Choosing the right SSL certificate for your website is an important decision, especially when handling authentication and registration parts. Here’s a breakdown of your options and considerations: ### 1. Types of SSL Certificates #### a. Domain Validation (DV) Certificates - **Overview**: These are the most basic typ...
38,510
[ { "from": "human", "value": "I would like to have the authentication and registration parts of my website encrypted (for obvious reason). This site is currently and older site which some friends and I started in middle school and still use today. I may or may not register it to be a Non-Profit Organizatio...
I am working on an object factory to keep track of a small collection of objects. The objects can be of different types, but they will all respond to createInstance and reset. The objects can not be derived from a common base class because some of them will have to derive from built-in cocoa classes like NSView and NSW...
In Objective-C, you can pass a class name to a method as a parameter using the `Class` type. This allows you to specify a class without needing a specific type or base class. In your case, you can change the method signature to accept a `Class` type, which will enable you to pass any class that has the required methods...
40,098
[ { "from": "human", "value": "I am working on an object factory to keep track of a small collection of objects. The objects can be of different types, but they will all respond to createInstance and reset. The objects can not be derived from a common base class because some of them will have to derive from b...
There is a similar question going around, but it just got the same old answers that people always give about Regex syntax, but that's not the point here, so please try to not knee jerk the same old answers about regex syntax. Try to be a little more original and personal about it this time. Regex syntax is very VERY co...
You've raised some excellent points about regex, and I appreciate your desire for a deeper, more nuanced conversation about its pros and cons. Let’s explore some fresh perspectives on regex in today’s development landscape. ### The Compact Nature of Regex **Pro:** The conciseness of regex is often touted as a strengt...
30,348
[ { "from": "human", "value": "There is a similar question going around, but it just got the same old answers that people always give about Regex syntax, but that's not the point here, so please try to not knee jerk the same old answers about regex syntax. Try to be a little more original and personal about i...
Let's say that I want to merge from a release branch to the master branch and there are some commits in the release branch that I don't want to include in the master branch. Is there a way to do the merge so that one or more of those commits will not be merged? My strategy so far is to do the following (in master): gi...
Yes, your strategy will work, but there are alternative methods to achieve the same outcome that may be simpler or more efficient. Here are a few options you can consider for merging a branch while excluding specific commits: ### Option 1: Cherry-Picking Instead of merging the entire release branch, you can cherry-pic...
39,611
[ { "from": "human", "value": "Let's say that I want to merge from a release branch to the master branch and there are some commits in the release branch that I don't want to include in the master branch. Is there a way to do the merge so that one or more of those commits will not be merged?\nMy strategy so ...
I'm an end-user of one of my company's products. It is not very suitable for integration into Spring, however I am able to get a handle on the context and retrieve the required bean by name. However, I would still like to know if it was possible to inject a bean into this class, even though the class is not managed by...
In Spring, while you generally work with Spring-managed beans, there are ways to inject Spring beans into instances of classes that are not directly managed by the Spring container. Since you mentioned that you can obtain a handle on the Spring application context, you can manually set the dependencies for your class i...
36,694
[ { "from": "human", "value": "I'm an end-user of one of my company's products. It is not very suitable for integration into Spring, however I am able to get a handle on the context and retrieve the required bean by name. However, I would still like to know if it was possible to inject a bean into this class...
I need to store a tree data structure in my database, for which I plan on using django-treebeard or possibly django-mptt. My source of confusion is that each node could be one of three different possible types: root nodes will always be a type A entity, leaf nodes a type C entity, and anything in between will be a typ...
When working with a tree data structure where nodes can have different types (A, B, C) as you described, using Django's model inheritance might not be the best approach if you're planning to use libraries like `django-treebeard` or `django-mptt`, especially since their public APIs are not designed to handle inherited m...
35,476
[ { "from": "human", "value": "I need to store a tree data structure in my database, for which I plan on using django-treebeard or possibly django-mptt. My source of confusion is that each node could be one of three different possible types: root nodes will always be a type A entity, leaf nodes a type C enti...
I've got a C++ Win32 application that has a number of threads that might be busy doing IO (HTTP calls, etc) when the user wants to shutdown the application. Currently, I play nicely and wait for all the threads to end before returning from main. Sometimes, this takes longer than I would like and indeed, it seems kind...
In scenarios like this, where you want to balance a fast exit with safety and reliability, there are a few strategies you could consider. Here are some of them, along with implementation considerations: ### 1. **Use Cancellation Tokens** You can implement a cancellation mechanism that your threads can periodically che...
35,677
[ { "from": "human", "value": "I've got a C++ Win32 application that has a number of threads that might be busy doing IO (HTTP calls, etc) when the user wants to shutdown the application. Currently, I play nicely and wait for all the threads to end before returning from main. Sometimes, this takes longer th...
It's hard to put this into the title, so let me explain. I have an application that uses Direct3D to display some mesh and directshow(vmr9 + allocator) to play some video, and then send the video frame as texture to the Direct3D portion to be applied onto the mesh. The application needs to run 24/7. At least it's allow...
Your idea of splitting the application into two separate processes (one for Direct3D rendering and the other for video playback) to increase stability and allow for easy recovery from video playback issues is a reasonable approach. However, you are correct in your assumption that directly sharing pointers or memory add...
38,720
[ { "from": "human", "value": "It's hard to put this into the title, so let me explain.\nI have an application that uses Direct3D to display some mesh and directshow(vmr9 + allocator) to play some video, and then send the video frame as texture to the Direct3D portion to be applied onto the mesh. The applicat...
I have a site made with php which uses server side sessions throughout the site. In fact, it's a site with a user login which depends on session variables and if there were a problem with all session variables, no pages would load at all. On the site, there's an iframe that holds a feed of little messages from other ...
This issue you're facing with Internet Explorer (IE) and session variables can be quite frustrating. Let's break down the problem and some potential solutions. ### Potential Issues: 1. **Session Management in IE**: Older versions of Internet Explorer, especially IE6 and IE7, have been known to have quirks with handli...
36,905
[ { "from": "human", "value": "I have a site made with php which uses server side sessions throughout the site.\nIn fact, it's a site with a user login which depends on session variables and if there were a problem with all session variables, no pages would load at all. \nOn the site, there's an iframe that ...
Does any one know of some kind of Comparator factory in Java, with a public Comparator getComparatorForClass(Class clazz) {} It would return Comparators for stuff like String, Double, Integer but would have a public void addComparatorForClass(Class clazz, Comparator comparator) {} For arbitrary types.
Yes, you can create a `ComparatorFactory` in Java that holds a registry of `Comparators` for various classes. This factory will allow you to retrieve comparators for built-in types like `String`, `Integer`, and `Double`, as well as add custom comparators for arbitrary classes. Here's an example implementation: ```jav...
36,559
[ { "from": "human", "value": "Does any one know of some kind of Comparator factory in Java, with a \npublic Comparator getComparatorForClass(Class clazz) {}\n\nIt would return Comparators for stuff like String, Double, Integer but would have a\npublic void addComparatorForClass(Class clazz, Comparator compar...
I can´t find a way to restyle the IsChecked indicator of a checkbox. As I can see from the checkbox template there´s no possibilities to restyle the indicator, just the "box" of the checkbox. Does anyone knows if it´s possibly to restyle the IsChecked indicator?
In WPF (Windows Presentation Foundation), the default checkbox style does not provide direct access to the "IsChecked" indicator (the check mark) through the standard Checkbox template. However, you can create a custom style to achieve the desired look for the checkbox indicator by creating a new ControlTemplate for th...
36,893
[ { "from": "human", "value": "I can´t find a way to restyle the IsChecked indicator of a checkbox. As I can see from the checkbox template there´s no possibilities to restyle the indicator, just the \"box\" of the checkbox. Does anyone knows if it´s possibly to restyle the IsChecked indicator?\n" }, { ...
I can't seem to find any GUI framework's for as3 that are as good as any the applications I already see out on the web; Is this something most people code themselves or am I missing something in flash itself? I'm looking for dialogs/windows, buttons, text boxes, combos, drop downs, menus, etc etc and the ability to ext...
Creating custom GUIs in ActionScript 3 (AS3) for Flash can indeed be challenging, especially since there are not as many pre-built GUI frameworks available compared to more modern web development environments. However, there are a few libraries and frameworks that you can use or draw inspiration from to create your own...
38,672
[ { "from": "human", "value": "I can't seem to find any GUI framework's for as3 that are as good as any the applications I already see out on the web; Is this something most people code themselves or am I missing something in flash itself?\nI'm looking for dialogs/windows, buttons, text boxes, combos, drop do...
How to get the last selected item in a .Net Forms multiselect ListBox? Apparently if I select an item in the listbox and then select another 10 the selected item is the first one. I would like to obtain the last element that I selected/deselected.
In a .NET WinForms application, a `ListBox` allows you to select multiple items if its `SelectionMode` property is set to `SelectionMode.MultiSimple` or `SelectionMode.MultiExtended`. However, the `ListBox.SelectedItem` property will always return the first selected item, which can be confusing when you're trying to tr...
37,500
[ { "from": "human", "value": "How to get the last selected item in a .Net Forms multiselect ListBox? Apparently if I select an item in the listbox and then select another 10 the selected item is the first one.\nI would like to obtain the last element that I selected/deselected.\n" }, { "from": "gpt",...
I work on an application that requires some fancy custom controls. Inheriting from the .net Control class has caused various problems and is making things harder as time goes on. I won't get into the specifics here, but I am creating my own light weight control architecture to avoid some of these problems. Things ar...
Implementing drag-and-drop functionality in a custom control architecture without inheriting from the `System.Windows.Forms.Control` class can be a bit challenging, but it's definitely doable. Here’s a structured approach to implement drag-and-drop events in your lightweight control architecture. ### Step-by-Step Impl...
37,427
[ { "from": "human", "value": "I work on an application that requires some fancy custom controls. Inheriting from the .net Control class has caused various problems and is making things harder as time goes on. I won't get into the specifics here, but I am creating my own light weight control architecture to...
Ok, heres my issue: I have a JSF application and some JSP files. Let's say i have main.jsp which has a view and includes sub.jsp. This works fine. sub.jsp contains a subview. As a result all the ID's of the form elements in sub.jsp follow the form of 'subview:component'. Now suppose I'm using some ajax and want to fetc...
When working with JSF and including JSP files (which is not a common practice, as JSF provides its own templating system), you can encounter ID discrepancies due to the JSF component ID naming strategy. This can indeed complicate your JavaScript if you have to deal with different ID formats. ### Possible Solutions to ...
39,747
[ { "from": "human", "value": "Ok, heres my issue: I have a JSF application and some JSP files. Let's say i have main.jsp which has a view and includes sub.jsp. This works fine. sub.jsp contains a subview. As a result all the ID's of the form elements in sub.jsp follow the form of 'subview:component'. Now sup...
In my master pages I have <form ... action="" ...>, in pre SP1, if I viewed the source the action attribute would be an empty string. In SP1 the action attribute is overridden "MyPage.aspx?MyParams", unfortunately, this causes my postbacks to fail as I have additional pathinfo in the URL (ie. MyPage.aspx\CustomerData?...
It sounds like you're encountering an issue with the `action` attribute of a `<form>` in your ASP.NET application after updating to Service Pack 1 (SP1). The change in behavior where the `action` attribute gets overridden with query parameters can cause problems, especially when you have additional path information in ...
38,897
[ { "from": "human", "value": "In my master pages I have <form ... action=\"\" ...>, in pre SP1, if I viewed the source the action attribute would be an empty string. In SP1 the action attribute is overridden \"MyPage.aspx?MyParams\", unfortunately, this causes my postbacks to fail as I have additional pathi...
I have an Excel macro that deletes a sheet, copies another sheet and renames it to the same name of the deleted sheet. This works fine when run from Excel, but when I run it by calling the macro from Python I get the following error message: Run-time error '1004' - Cannot rename a sheet to the same name as another s...
The error you're encountering typically occurs because Excel still considers the deleted sheet to exist in some form until the macro has fully completed its execution. This is likely more pronounced when you're calling the macro from Python, where there may be differences in how the Excel Application context is managed...
38,997
[ { "from": "human", "value": "I have an Excel macro that deletes a sheet, copies another sheet and renames it to the same name of the deleted sheet. This works fine when run from Excel, but when I run it by calling the macro from Python I get the following error message:\n\nRun-time error '1004' - Cannot ren...
We have a 32-bit application that launches other 32-bit applications during its process. The application is working fine on other 64-bit platforms but on Windows Server 2003 64-bit, we get an error trying to launch the apps: error 193 (not a valid 32 bit application) We can manually launch these applications on that s...
The error code 193 ("not a valid 32-bit application") generally indicates that the system is trying to load a 32-bit application in a context where it cannot do so, which typically occurs on a 64-bit operating system when there are problems with application execution. Here are some troubleshooting steps and considerat...
38,959
[ { "from": "human", "value": "We have a 32-bit application that launches other 32-bit applications during its process. The application is working fine on other 64-bit platforms but on Windows Server 2003 64-bit, we get an error trying to launch the apps:\nerror 193 (not a valid 32 bit application)\n\nWe can ...
I'm hand-coding Linq to SQL Entities and have a large XML column that I don't want loaded each time this entity is loaded, as it's infrequently used. Everywhere I search, I see that the Linq to SQL designer provides a "Delay Loaded" property, but the ColumnAttribute class doesn't have any hints as to how this is implem...
In LINQ to SQL, lazy loading is a feature that allows certain properties of an entity to be loaded on demand, rather than at the time the entity itself is loaded. When you're hand-coding your LINQ to SQL entities, you can implement lazy loading for properties, including a large XML column, by utilizing the `Lazy<T>` cl...
38,467
[ { "from": "human", "value": "I'm hand-coding Linq to SQL Entities and have a large XML column that I don't want loaded each time this entity is loaded, as it's infrequently used. Everywhere I search, I see that the Linq to SQL designer provides a \"Delay Loaded\" property, but the ColumnAttribute class does...
One of the appropriate uses for sqlite3 is "in-memory databases". This sounds like a really useful tool for my C++ applications. Does anyone have an example of how this is done in C or C++? I'm specifically looking for a canonical way to slurp several flat-files into an in-memory database, then do some joins.
Using SQLite as an in-memory database in C or C++ is indeed a great way to handle temporary data that doesn't need to be persisted to disk. Below is an example demonstrating how to create an in-memory database, read data from flat files, insert that data into the database, and perform joins. ### Example Here's a simp...
34,848
[ { "from": "human", "value": "One of the appropriate uses for sqlite3 is \"in-memory databases\". This sounds like a really useful tool for my C++ applications. Does anyone have an example of how this is done in C or C++? I'm specifically looking for a canonical way to slurp several flat-files into an in-...
In my application, a user has_many tickets. Unfortunately, the tickets table does not have a user_id: it has a user_login (it is a legacy database). I am going to change that someday, but for now this change would have too many implications. So how can I build a "user has_many :tickets" association through the login ...
You can certainly achieve the desired behavior with ActiveRecord's `has_many` association by utilizing the `:primary_key` and `:foreign_key` options correctly. You've already discovered that you can define the association to look up tickets based on the user login. For your specific requirement of creating a `has_many...
40,212
[ { "from": "human", "value": "In my application, a user has_many tickets. Unfortunately, the tickets table does not have a user_id: it has a user_login (it is a legacy database). I am going to change that someday, but for now this change would have too many implications.\nSo how can I build a \"user has_ma...
Is there any performance advantage to using lists over dictionaries over tuples in Python? If I'm optimising for speed, is there any reason to prefer one over another?
In Python, lists, dictionaries, and tuples serve different purposes and have different performance characteristics, and the choice between them should be based on the specific use case rather than just raw speed. Here's a breakdown of their performance attributes and use cases: ### Lists - **Structure**: Ordered, muta...
35,722
[ { "from": "human", "value": "Is there any performance advantage to using lists over dictionaries over tuples in Python?\nIf I'm optimising for speed, is there any reason to prefer one over another?\n" }, { "from": "gpt", "value": "In Python, lists, dictionaries, and tuples serve different purpos...
I have data in excel sheet that has two columns and 10 rows. Some of the rows for First column has blank value. Excel shows it as (blank) on putting aut filter on colunm I am querying the excel sheet from C# 2.0 to find out if first column contains a blank. select * from [Sheet1$] where [Myname] = \"\""; The above qu...
When querying Excel using an SQL-like syntax, handling blank fields can sometimes be tricky because of how Excel treats empty cells. Here are a few things you can try to query blank cells effectively: ### Option 1: Use `IS NULL` In Excel, you can use the `IS NULL` condition to filter out empty cells. Try the followin...
39,526
[ { "from": "human", "value": "I have data in excel sheet that has two columns and 10 rows. Some of the rows for First column has blank value. Excel shows it as (blank) on putting aut filter on colunm\nI am querying the excel sheet from C# 2.0 to find out if first column contains a blank. \nselect * from [She...
I'm not sure what the best api for simple 2d graphics with Java is. I know java.awt.Graphics2D was the standard but has it been replaced? Swing is the new API for Java GUI apps but it seems a bit heavy for what I want. What I really want is something like the C SDL library.
If you're looking for a simple 2D graphics API in Java, there are several options available to you. While `java.awt.Graphics2D` is indeed the standard for 2D graphics in Java and is still widely used, there are other libraries and frameworks that you can consider depending on your needs. 1. **Java AWT and Swing**: As ...
37,672
[ { "from": "human", "value": "I'm not sure what the best api for simple 2d graphics with Java is. I know java.awt.Graphics2D was the standard but has it been replaced? Swing is the new API for Java GUI apps but it seems a bit heavy for what I want. What I really want is something like the C SDL library.\n" ...
How do I create a directory at a given path, and also create any missing parent directories along that path? For example, the Bash command mkdir -p /path/to/nested/directory does this.
In most programming languages, you can create directories and their parent directories in a similar way to the `mkdir -p` command in Bash. Below are examples in several popular programming languages: ### Python You can use the `os` module to create directories, specifically the `os.makedirs()` function: ```python im...
37,285
[ { "from": "human", "value": "How do I create a directory at a given path, and also create any missing parent directories along that path? For example, the Bash command mkdir -p /path/to/nested/directory does this.\n" }, { "from": "gpt", "value": "In most programming languages, you can create dir...
Is the Visual Studio 2008 Object Test Bench useful for anything? Maybe I'm missing something but aside from a flashy version of the immediate window, it doesn't seem like a developer would actually use it for anything. (And how many people knew it existed in the first place?!) In case you're wondering, the 'Object T...
The Visual Studio 2008 Object Test Bench (OTB) indeed has a somewhat niche audience and may not be well-known among developers, especially given its introduction during a time when other testing methodologies and tools were becoming more popular. However, it does serve a few purposes that can be useful in specific scen...
39,968
[ { "from": "human", "value": "Is the Visual Studio 2008 Object Test Bench useful for anything? Maybe I'm missing something but aside from a flashy version of the immediate window, it doesn't seem like a developer would actually use it for anything. \n(And how many people knew it existed in the first place?...