instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm trying to reproduce a Visual Studio style toolbar with the two gradient backgrounds in C# code. I can see how to do it in XAML, but how do I drill into the object to change the backgound of its 'MainPanelBorder' border in my C# code ? Thanks
To reproduce a Visual Studio style toolbar with gradient backgrounds in C#, you typically need to create a custom control or modify existing controls to achieve the desired appearance. Assuming you're working with a `ToolBar` or a `ToolStrip` and want to set the background of its `MainPanelBorder`, you may not have di...
49,664
[ { "from": "human", "value": "I'm trying to reproduce a Visual Studio style toolbar with the two gradient backgrounds in C# code. I can see how to do it in XAML, but how do I drill into the object to change the backgound of its 'MainPanelBorder' border in my C# code ?\nThanks\n" }, { "from": "gpt", ...
How do I get a patch from a commit in order to send it to another developer? And how do I best avoid a merge conflict with this patch when merging our trees at a later date? If you know how please explain how to do this in your VCS of choice such as subversion, git, Mercurial, bzr or etc.
Certainly! I'll provide instructions for creating a patch from a commit and how to avoid merge conflicts, specifically using **Git**, which is the most widely used version control system. The principles can be applied similarly in other systems, but the commands may differ. ### Creating a Patch in Git 1. **Identify t...
49,569
[ { "from": "human", "value": "How do I get a patch from a commit in order to send it to another developer? And how do I best avoid a merge conflict with this patch when merging our trees at a later date?\nIf you know how please explain how to do this in your VCS of choice such as subversion, git, Mercurial, ...
I'd love to use PHP variables in my CSS files but I don't want to load up the whole Symfony stack for each file load. Any one have any best practices and/or plugins to manage their CSS files in Symfony?
Using PHP variables in CSS files can be a bit tricky since CSS is typically static and loaded directly by the browser. However, there are several ways to manage CSS in a Symfony application without having to load the entire Symfony stack for every request. ### Best Practices: 1. **Use SCSS or LESS**: - Preprocessi...
48,747
[ { "from": "human", "value": "I'd love to use PHP variables in my CSS files but I don't want to load up the whole Symfony stack for each file load. Any one have any best practices and/or plugins to manage their CSS files in Symfony?\n" }, { "from": "gpt", "value": "Using PHP variables in CSS file...
I should clarify that I am looking for a client-side solution. Alternatively, is there a C# compiler written in managed code?
If you're looking for a client-side solution to compile C# code, there are a few options you can consider, though most traditional compilers like Roslyn operate on the server-side. However, you can still execute C# code on the client-side using the following approaches: ### 1. **Use Roslyn in a Client Application** Yo...
48,365
[ { "from": "human", "value": "I should clarify that I am looking for a client-side solution.\nAlternatively, is there a C# compiler written in managed code?\n" }, { "from": "gpt", "value": "If you're looking for a client-side solution to compile C# code, there are a few options you can consider, ...
Here you can find the WSDL for my Jobs.asmx webService. http://recpushdata.cyndigo.com/jobs.asmx The Thing is I have created a HTML page at http://bugmusic.cyndigo.com/CallWebService.html and its returning an Error Server did not recognize the value of HTTP Header SOAP. I am not able to find the bug.
The error "Server did not recognize the value of HTTP Header SOAP" typically indicates that there is an issue with the SOAP request format being sent to the web service. Here are some common causes and potential solutions for this problem: ### 1. Check SOAP Version Ensure you are using the correct version of SOAP. The...
46,374
[ { "from": "human", "value": "Here you can find the WSDL for my Jobs.asmx webService. http://recpushdata.cyndigo.com/jobs.asmx\nThe Thing is I have created a HTML page at http://bugmusic.cyndigo.com/CallWebService.html\nand its returning an Error Server did not recognize the value of HTTP Header SOAP.\nI am ...
Do you know what basic information MUST include a paragraph (<w:p/>) in document.xml inside a *.docx document, that specifies an image? I do know there must be: <a:blip r:embed="rId4" /> specifing the relationship id, but what else? It's very hard to find it in Google and experimenting with cutting out tags from a ...
Certainly! When embedding an image in a Word document (specifically in the `document.xml` of a `.docx` file), you'll need to include several XML elements within the paragraph `<w:p>` that will effectively reference and display the image. Here’s an example of a complete XML snippet that demonstrates how to include an i...
47,613
[ { "from": "human", "value": "Do you know what basic information MUST include a paragraph (<w:p/>) in document.xml inside a *.docx document, that specifies an image? I do know there must be: \n<a:blip r:embed=\"rId4\" /> \n\nspecifing the relationship id, but what else?\nIt's very hard to find it in Google ...
Working to get DateTimes for any time zone. I'm using DateTimeOffset, and a string, and an XmlElement attribute. When I do, I get the following error: [InvalidOperationException: 'dateTime' is an invalid value for the XmlElementAttribute.DataType property. dateTime cannot be converted to System.String.] Sys...
The error you're encountering is related to the fact that the `XmlElement` attribute is expecting a property of a certain data type, specifically a `dateTime` type, but you're using a `string` instead. This is causing the XML serialization process to fail because it cannot convert the `string` representation of a date-...
47,820
[ { "from": "human", "value": "Working to get DateTimes for any time zone. \nI'm using DateTimeOffset, and a string, and an XmlElement attribute. When I do, I get the following error:\n\n[InvalidOperationException: 'dateTime'\n is an invalid value for the\n XmlElementAttribute.DataType property.\n dateTime...
I need a 'good' way to initialize the pseudo-random number generator in C++. I've found an article that states: In order to generate random-like numbers, srand is usually initialized to some distinctive value, like those related with the execution time. For example, the value returned by the function time (d...
If you require a more distinctive way to initialize your pseudo-random number generator (PRNG) in C++—especially since you may start your application multiple times within the same second—using `srand(time(NULL))` or a simple timestamp will indeed lead to collisions. Below are a few alternative methods that can provide...
49,599
[ { "from": "human", "value": "I need a 'good' way to initialize the pseudo-random number generator in C++. I've found an article that states:\n\nIn order to generate random-like\n numbers, srand is usually initialized\n to some distinctive value, like those\n related with the execution time. For\n exampl...
Is it possible to using "paging" functionality in Linq queries? Let's say I have some XML like this: <Root> <BetaSection> <Choices> <SetA> <Choice id="choice1">Choice One</Choice> <Choice id="choice2">Choice Two</Choice> <Choice id="choice3">Choi...
Yes, you can implement paging functionality in LINQ queries, and you can certainly use it with both XML and collections of objects. You can achieve paging in LINQ by using the `Skip` and `Take` methods. ### Paging with XML For the provided XML structure, you can load the XML into an `XDocument` and then query the `C...
43,475
[ { "from": "human", "value": "Is it possible to using \"paging\" functionality in Linq queries? Let's say I have some XML like this:\n<Root>\n <BetaSection>\n <Choices>\n <SetA>\n <Choice id=\"choice1\">Choice One</Choice> \n <Choice id=\"choice2\">Choice T...
Can I use TDD for gui application? How to do it.
Yes, you can use Test-Driven Development (TDD) for GUI applications, although it can be more challenging than for non-GUI applications due to the complexities involved in user interactions and visual elements. However, TDD principles can still be applied effectively. Here’s a guide on how to do it: ### Step 1: Underst...
49,686
[ { "from": "human", "value": "Can I use TDD for gui application?\nHow to do it.\n" }, { "from": "gpt", "value": "Yes, you can use Test-Driven Development (TDD) for GUI applications, although it can be more challenging than for non-GUI applications due to the complexities involved in user interact...
I am looking for ways to keep track of simultaneous users within an application. I cannot use IIS logs due to a load balancer that abstracts the users IP address. I am looking for a .NET code based solution or a configuration item, possibly with health monitoring to be able to track the "true" simultaneous user count...
Tracking the number of simultaneous users in a web application can be challenging, especially when the infrastructure abstracts user IP addresses. Below are a few approaches you can consider implementing in your .NET application to track "true" simultaneous users effectively: ### 1. **Use of SignalR** If your applica...
46,053
[ { "from": "human", "value": "I am looking for ways to keep track of simultaneous users within an application. I cannot use IIS logs due to a load balancer that abstracts the users IP address. I am looking for a .NET code based solution or a configuration item, possibly with health monitoring to be able to...
My goal is to launch an installation with admin credentials(user with install rights), In order to do this I need to pass these user credentials from a webservice. So the question is What is the most secure way I could pass this data. Keeping in mind the user of the end client is not logged in as an administrator but...
When dealing with sensitive information such as admin credentials, especially in a client-server architecture, it's crucial to ensure that these credentials are handled securely to mitigate the risks associated with unauthorized access. Here are steps you can take to enhance the security of passing admin credentials th...
45,227
[ { "from": "human", "value": "My goal is to launch an installation with admin credentials(user with install rights), In order to do this I need to pass these user credentials from a webservice. So the question is What is the most secure way I could pass this data. Keeping in mind the user of the end client...
I am working through some of the exercises in The C++ Programming Language by Bjarne Stroustrup. I am confused by problem 11 at the end of Chapter 12: (*5) Design and implement a library for writing event-driven simulations. Hint: <task.h>. ... An object of class task should be able to save its state and to have tha...
You're right to consider the distinction between threads and coroutines when approaching this problem. In the context of the exercise you're working on from "The C++ Programming Language" by Bjarne Stroustrup, the focus is indeed on implementing a coroutine system rather than using multiple threads. ### Key Concepts t...
48,187
[ { "from": "human", "value": "I am working through some of the exercises in The C++ Programming Language by Bjarne Stroustrup. I am confused by problem 11 at the end of Chapter 12:\n(*5) Design and implement a library for writing event-driven simulations. Hint: <task.h>. ... An object of class task should...
I am restricted to C (cannot use C++). I wish C had stricter type checking. Is there a way to get compile errors on the commented lines? If it helps, the enum values cannot overlap. enum hundred { VALUE_HUNDRED_A = 100, VALUE_HUNDRED_B }; enum thousand { VALUE_THOUSAND_A = 1000, VALUE_THOUSAND_B }; v...
In C, enum types are not strictly enforced, and the type system does not prevent you from passing an enum of one type to a function expecting an enum of a different type. However, you can leverage typedefs and structs to create a more stringent type-checking mechanism, effectively avoiding unwanted function calls and c...
45,081
[ { "from": "human", "value": "I am restricted to C (cannot use C++). I wish C had stricter type checking.\nIs there a way to get compile errors on the commented lines? If it helps, the enum values cannot overlap.\n\nenum hundred {\n VALUE_HUNDRED_A = 100,\n VALUE_HUNDRED_B\n};\n\nenum thousand {\n V...
I am very interested in streaming data for web-applications. I have tried out some javascript libraries, but the hacks and browser-incompatibilities drive me crazy ! HTML5 will hopefully standardize streaming data, but until then, hopefully I can resort to Flash to make this work in all browsers. Unfortunately, I'm not...
Streaming data in Flash, especially with the use of `loadVariables`, can indeed be limiting since it typically waits until all data is received before triggering any actions. However, you can achieve a similar effect by using the `XMLSocket` class, which allows for real-time communication over a network socket. This wa...
48,287
[ { "from": "human", "value": "I am very interested in streaming data for web-applications. I have tried out some javascript libraries, but the hacks and browser-incompatibilities drive me crazy ! HTML5 will hopefully standardize streaming data, but until then, hopefully I can resort to Flash to make this wor...
I have got these two classes interacting and I am trying to call four different classes from class one for use in class two. The methods are public and they do return values but for some reason there is not a connection being made. The error I get when I try is: "An object reference is required for the nonstatic field,...
It sounds like you are encountering a couple of common issues related to object-oriented programming in C#. Let's break down the key points from your description to help clarify how to resolve these problems: 1. **Object Reference Required**: The error message "An object reference is required for the nonstatic fie...
49,936
[ { "from": "human", "value": "I have got these two classes interacting and I am trying to call four different classes from class one for use in class two.\nThe methods are public and they do return values but for some reason there is not a connection being made.\nThe error I get when I try is: \"An object re...
I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action Can i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?
Yes, you can implement a filter method to sanitize input from both GET and POST requests in an ASP.NET application. While you can use various approaches to do this, one way is to hook into the ASP.NET pipeline in the `Global.asax.cs` file by overriding the `Application_BeginRequest` method. Here’s a step-by-step guid...
47,584
[ { "from": "human", "value": "I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action\nCan i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?\n" }, { "from": "gpt", "value": "Yes, yo...
Do you localize your javascript to the page, or have a master "application.js" or similar? If it's the latter, what is the best practice to make sure your .js isn't executing on the wrong pages? EDIT: by javascript I mean custom javascript you write as a developer, not js libraries. I can't imagine anyone would copy/pa...
When it comes to organizing and managing custom JavaScript in web applications, there are different strategies that developers can adopt. Let's break down the options and best practices. ### Localized vs. Master JavaScript Files 1. **Localized JavaScript**: - **Pros**: - Targeted functionality for specific p...
49,764
[ { "from": "human", "value": "Do you localize your javascript to the page, or have a master \"application.js\" or similar?\nIf it's the latter, what is the best practice to make sure your .js isn't executing on the wrong pages?\nEDIT: by javascript I mean custom javascript you write as a developer, not js li...
I've got two ASP.Net applications residing in two different folders on my server: /Foo <-- this is the standard unsecure application /Secure <-- this is a separate application that requires SSL by IIS The problem is that by default, the ASP.NET_SessionId cookie is specified on the domain and is shared between the two...
To handle the session management in your ASP.NET applications and ensure that the session cookies for the two applications do not overlap, you can use a couple of techniques to configure them independently. Here’s how you can do it: ### 1. **Set a Custom Session Cookie Name** The easiest way to avoid cookie name conf...
48,617
[ { "from": "human", "value": "I've got two ASP.Net applications residing in two different folders on my server:\n\n/Foo <-- this is the standard unsecure application\n/Secure <-- this is a separate application that requires SSL by IIS\n\nThe problem is that by default, the ASP.NET_SessionId cookie is specifi...
How Can I put information in a outputstream from tapestry5 ? I need a page when a user enters it open a dialog for save or open the file with the outputstream information. I write the next code: public class Index { @Inject private RequestGlobals requestGlobals; @OnEvent("activate") public void onActivate() { try ...
The issue you're encountering is due to how Tapestry processes requests and responses. When you return a response from a Tapestry event handler method (like `onActivate`), it doesn’t automatically stop the rendering of the entire page. Thus, you end up with both the output from your `PrintWriter` and the default HTML c...
47,023
[ { "from": "human", "value": "How Can I put information in a outputstream from tapestry5 ?\nI need a page when a user enters it open a dialog for save or open the file with the outputstream information.\nI write the next code:\npublic class Index {\n@Inject\nprivate RequestGlobals requestGlobals;\n\n@OnEvent...
I have two tables in a DataSet in .NET. I want to join them on an ID column. Then I want a DataGridView to display two columns from the first table and one column from the second table. If it makes it easier, the relation between the two tables is one-to-one. Can it be done?
Yes, you can join two tables in a `DataSet` in .NET and display the result in a `DataGridView`. Given that the relationship is one-to-one, you can achieve this using LINQ to DataSet or by creating a new `DataTable` that represents the joined data. Below, I’ll outline both methods: ### Method 1: Using LINQ to DataSet ...
47,992
[ { "from": "human", "value": "I have two tables in a DataSet in .NET. I want to join them on an ID column. Then I want a DataGridView to display two columns from the first table and one column from the second table.\nIf it makes it easier, the relation between the two tables is one-to-one.\nCan it be done?\n...
I am trying to set up a simple transaction for my Linq-to-Sql actions against my Sql 2000 database. Using TransactionScope it looks like this: using (TransactionScope transaction = new TransactionScope()) { try { Store.DBDataContext dc = new Store.DBDataContext(); Store.Product product = Ge...
The error you're encountering, "The partner transaction manager has disabled its support for remote/network transactions," typically indicates that there is an issue with distributed transactions. Here are a few points to clarify what's happening and offer some guidance. ### Understanding `TransactionScope`: 1. **Dis...
49,393
[ { "from": "human", "value": "I am trying to set up a simple transaction for my Linq-to-Sql actions against my Sql 2000 database. Using TransactionScope it looks like this:\nusing (TransactionScope transaction = new TransactionScope())\n{\n try\n {\n Store.DBDataContext dc = new Store.DBDat...
I'm currently busy implementing a filter of sorts for which I need to generate an INNER JOIN clausse for every "tag" to filter on. The problem is that after a whole bunch of SQL, I have a table that contains all the information I need to make my selection, but I need it again for every generated INNER JOIN This basical...
Hi Kris, It sounds like you have run into a common limitation of MySQL when using temporary tables in subqueries or multiple JOINs. If you can't use a temporary table directly for your inner joins, here are some alternative approaches you might consider to work around the issue: 1. **Common Table Expressions (CTEs)**...
48,498
[ { "from": "human", "value": "I'm currently busy implementing a filter of sorts for which I need to generate an INNER JOIN clausse for every \"tag\" to filter on.\nThe problem is that after a whole bunch of SQL, I have a table that contains all the information I need to make my selection, but I need it again...
This is a bit of a long question, but here we go. There is a version of FormatDateTime that is said to be thread safe in that you use GetLocaleFormatSettings(3081, FormatSettings); to get a value and then you can use it like so; FormatDateTime('yyyy', 0, FormatSettings); Now imagine two timers, one using TTimer (...
It looks like you are facing a difficult concurrency issue in your Delphi application, particularly when using `CreateTimerQueueTimer` and `TTimer` together. Let's break down your problem and explore some potential causes and solutions. ### Problem Analysis 1. **Concurrent Access**: The fact that you have two timers ...
44,759
[ { "from": "human", "value": "This is a bit of a long question, but here we go. There is a version of FormatDateTime that is said to be thread safe in that you use \nGetLocaleFormatSettings(3081, FormatSettings); \n\nto get a value and then you can use it like so; \nFormatDateTime('yyyy', 0, FormatSettings);...
Alternatively is it possible to manually update the built in progress bar? Basically I have 2 MSIs included and using Inno Setup as a bootstrapper, and depending on user input one or both of the MSIs are to be installed. I have something working using Exec statements in CurStepChanged but it doesn't update the progres...
In Inno Setup, the built-in progress bar is updated based on the execution state of the installer. When you run an external process (like `msiexec`) using `Exec`, the progress bar does not update while that process is running, as it essentially blocks the main thread. To provide a better user experience and update the ...
44,587
[ { "from": "human", "value": "Alternatively is it possible to manually update the built in progress bar?\nBasically I have 2 MSIs included and using Inno Setup as a bootstrapper, and depending on user input one or both of the MSIs are to be installed. I have something working using Exec statements in CurSte...
I have a Customer class. public class Customer { private string _id; private string _name; // some more properties follow I am inheriting the EqualityComparer form MyEqualityComparer(of Customer). This I am intending to use in LINQ queries. MyEqualityComparer is intended for partial check between two obje...
Your approach to implementing a custom `EqualityComparer` for the `Customer` class is fundamentally sound, but there are a few improvements you can make to ensure better performance and correctness, especially regarding the `GetHashCode` method. ### Concatenating Strings for Hash Code Using `string.Concat` to create ...
46,710
[ { "from": "human", "value": "I have a Customer class.\npublic class Customer\n{\n private string _id;\n private string _name;\n // some more properties follow \n\nI am inheriting the EqualityComparer form MyEqualityComparer(of Customer).\nThis I am intending to use in LINQ queries.\nMyEqualityCompa...
I have a strongly typed user control ("partial") and I'd like to be able to pass it some additional information from its containing view. For example, I have view that's bound to a product class and i have a partial that also is strongly typed to that same model, but I also need to pass an additional parameter for ima...
You're correct that the `Html.RenderPartial` method does not natively support passing a custom anonymous object as additional parameters directly to a strongly-typed partial view. However, you can achieve this by using the `ViewData` dictionary to pass additional data to the partial view. Here’s how you can do it: 1. ...
47,263
[ { "from": "human", "value": "I have a strongly typed user control (\"partial\") and I'd like to be able to pass it some additional information from its containing view. For example, I have view that's bound to a product class and i have a partial that also is strongly typed to that same model, but I also n...
I'm using Django and Python 2.6, and I want to grow my application using a MySQL backend. Problem is that there isn't a win32 package for MySQLdb on Python 2.6. Now I'm no hacker, but I thought I might compile it myself using MSVC++9 Express. But I run into a problem that the compiler quickly can't find config_win.h,...
Yes, you are correct that `config_win.h` is a header file that is typically part of the MySQL client library and is used by the MySQLdb package to interface with the MySQL database. This header file contains configuration definitions that the MySQLdb C extensions need to compile correctly against the MySQL client libra...
43,916
[ { "from": "human", "value": "I'm using Django and Python 2.6, and I want to grow my application using a MySQL backend. Problem is that there isn't a win32 package for MySQLdb on Python 2.6.\nNow I'm no hacker, but I thought I might compile it myself using MSVC++9 Express. But I run into a problem that the...
PHP provides a mechanism to register a shutdown function: register_shutdown_function('shutdown_func'); The problem is that in the recent versions of PHP, this function is still executed DURING the request. I have a platform (in Zend Framework if that matters) where any piece of code throughout the request can regist...
PHP does not provide a built-in method to execute a function completely after the HTTP response has been sent to the client. The `register_shutdown_function()` method allows you to register a function that will be executed at the end of script execution, but that occurs while the request is still being processed. Thus,...
46,447
[ { "from": "human", "value": "PHP provides a mechanism to register a shutdown function:\nregister_shutdown_function('shutdown_func');\n\nThe problem is that in the recent versions of PHP, this function is still executed DURING the request. \nI have a platform (in Zend Framework if that matters) where any pi...
There are too many method for embedding flash in html, which way is the best? Requirements are: Cross-browser support Support for alternative content (if flash is not supported by the browser) Possibility to require a specific version of the flash player I have been reading about SWFobject, has anyone used it/tested?...
When it comes to embedding Flash content in HTML, especially given your requirements, SWFObject was a popular choice before Flash's deprecation. Although Flash is no longer officially supported and has been removed from most browsers since the end of 2020, I can provide some insight into how SWFObject worked and altern...
49,426
[ { "from": "human", "value": "There are too many method for embedding flash in html, which way is the best?\nRequirements are:\n\nCross-browser support\nSupport for alternative content (if flash is not supported by the browser)\nPossibility to require a specific version of the flash player\n\nI have been rea...
I am using Django as web framework and then Apache and Lighttpd as web server and static media server respectively. Lighty serves all my static content well and good, but I need to configure it to serve the new files uploaded by the user. Lighttpd is running on a different machine from the Apache(Django) one. My djang...
To achieve the desired outcome of uploading files directly to your static media server (Lighttpd) from your Django application running on Apache, you have a couple of approaches you can consider. Here are some options: ### Option 1: Direct Upload from Client to Media Server 1. **Change Upload Logic**: Instead of havi...
47,026
[ { "from": "human", "value": "I am using Django as web framework and then Apache and Lighttpd as web server and static media server respectively. Lighty serves all my static content well and good, but I need to configure it to serve the new files uploaded by the user. Lighttpd is running on a different mach...
I have list store in mysql table file1=(1,2,3,4,6,7) and other list file2 = (3,2,4,8,9,10,12) is not stored in table, i want compare both and result should be like result=(6,7,8,9,10,12) then calculate the percentage. like 100*(result/file1+file2) in mysql data structure. i do not know how i will do it. please know bo...
To achieve the result you want, you can follow these steps in MySQL: 1. **Identify the unique elements in both lists** that are not common to both (the result list). 2. **Calculate the percentage** of the unique elements relative to the total unique elements from both lists. Let's go through the SQL queries step-by-s...
46,120
[ { "from": "human", "value": "I have list store in mysql table file1=(1,2,3,4,6,7) and other list file2 = (3,2,4,8,9,10,12) is not stored in table, i want compare both and result should be like \nresult=(6,7,8,9,10,12) then calculate the percentage. like 100*(result/file1+file2) in mysql data structure. i do...
I have a table style page with rows. Each row has a checkbox. I can select all/many checkboxes and click "submit" and what is does is a Jquery ajax call for each row. Basically I have a form for each row and I iterate over all the checked rows and submit that form which does the jquery ajax call. So I have a button th...
To track the completion of multiple AJAX calls and enable/disable the submit button accordingly, you can use a counter to keep track of the number of pending requests. Here’s how you can modify your code to accomplish this: ### Step-by-Step Solution 1. **Initialize a counter**: Before starting the AJAX calls, initial...
48,268
[ { "from": "human", "value": "I have a table style page with rows. Each row has a checkbox. I can select all/many checkboxes and click \"submit\" and what is does is a Jquery ajax call for each row. \nBasically I have a form for each row and I iterate over all the checked rows and submit that form which does...
I need to access a mysql database from c# code but I would prefer not to use ODBC for the reasons below. I have to create a demo and I am using xampp on a USB drive. My code (database Read/Write code) is written in C#. So to keep the USB drive isolated from the computer that the demo runs on I am moving away from ODBC...
If you want to access a MySQL database from C# without using ODBC, you can use the MySQL Connector/NET, which is a fully-managed ADO.NET driver for MySQL. It allows you to connect to MySQL databases directly from your C# code without needing to set up ODBC drivers. Here’s how you can use MySQL Connector/NET to connect...
48,306
[ { "from": "human", "value": "I need to access a mysql database from c# code but I would prefer not to use ODBC for the reasons below.\nI have to create a demo and I am using xampp on a USB drive. My code (database Read/Write code) is written in C#. So to keep the USB drive isolated from the computer that t...
I've just added one of the new (MFC Feature Pack) CVSListBox controls to a project. The list of items in the control is tracked by some other objects in my application, so I need to take lots of notifications from the list-box when anything changes so that I can update other stuff. For those that don't know the contr...
It sounds like you’re working with the CVSListBox control in an MFC (Microsoft Foundation Classes) context and need a way to receive notifications after an item has been removed from the list. While you are right that the control only provides an `OnBeforeRemoveItem` method for pre-removal handling, there are a few app...
47,595
[ { "from": "human", "value": "I've just added one of the new (MFC Feature Pack) CVSListBox controls to a project. The list of items in the control is tracked by some other objects in my application, so I need to take lots of notifications from the list-box when anything changes so that I can update other st...
In an Xcode project, if I use std::cout to write to the console the output is fine. However, if I use std::wcout I get no output. I know that this is a thorny issue in C++, and I've been googling around to try and find a specific solution in the Xcode case. A couple of things I found that it was suggested should work w...
It sounds like you've pinpointed the issue with using `std::wcout` in your Xcode project. Indeed, mixing encodings can lead to the problems you experienced, especially when dealing with wide-character strings and different string encodings such as UTF-32. Here are a few additional points to consider and some best prac...
43,919
[ { "from": "human", "value": "In an Xcode project, if I use std::cout to write to the console the output is fine.\nHowever, if I use std::wcout I get no output.\nI know that this is a thorny issue in C++, and I've been googling around to try and find a specific solution in the Xcode case. A couple of things ...
I'm trying to get udp multicast data using sockets and c++ (c). I have a server with 2 network cards so I need to bind socket to specific interface. Currently I'm testing on another server that has only one network card. When I use INADDR_ANY I can see the udp data, when I bind to specific interface I don't see any dat...
The issue you're encountering is likely due to how multicast traffic is handled when binding to a specific interface. When you bind your socket to a specific interface (in your case, the IP address `10.81.128.44`), you need to ensure that the multicast group (`225.0.0.37` in your case) is also reachable via that interf...
48,184
[ { "from": "human", "value": "I'm trying to get udp multicast data using sockets and c++ (c). I have a server with 2 network cards so I need to bind socket to specific interface. Currently I'm testing on another server that has only one network card.\nWhen I use INADDR_ANY I can see the udp data, when I bind...
In MFC, a CListBox has a "disable no scroll" property. When you set it to true, the vertical scrollbar is always there, no matter how many items you have. How can I do the same thing with CListCtrl?
In MFC, the `CListCtrl` control does not have a built-in "disable no scroll" property like the `CListBox`. However, you can achieve a similar effect by manipulating the visibility of the scroll bar. The goal is to make the vertical scrollbar always visible, regardless of the number of items in the `CListCtrl`. Here's ...
38,629
[ { "from": "human", "value": "In MFC, a CListBox has a \"disable no scroll\" property. When you set it to true, the vertical scrollbar is always there, no matter how many items you have. How can I do the same thing with CListCtrl?\n" }, { "from": "gpt", "value": "In MFC, the `CListCtrl` control...
This question has been asked in regards to 2005, but did not see anything with 2000. We have a new application that needs to run on 2005 or better but everything else we have is geared towards 2000. We could upgrade, but that is not within budget at this time. We were thinking we could run SQL Server 2008 Express o...
Running SQL Server 2008 Express alongside SQL Server 2000 on the same server is possible, and many have successfully done so. SQL Server 2000 and SQL Server 2008 can coexist because they can operate on separate instances. Here are some key points to consider when proceeding with this setup: 1. **Separate Instances**: ...
46,631
[ { "from": "human", "value": "This question has been asked in regards to 2005, but did not see anything with 2000. We have a new application that needs to run on 2005 or better but everything else we have is geared towards 2000. We could upgrade, but that is not within budget at this time. \nWe were think...
I have my main GUI thread, and a second thread running inside it's own ApplicationContext (to keep it alive, even when there is no work to be done). I want to call a method on my 2nd thread from my GUI thread, but if I just call thread.Method(); it seems to be running on my main GUI thread and causes my GUI to become u...
In multithreaded applications, particularly when using GUI frameworks like WinForms or WPF, it's important to understand how to properly communicate between threads. The issues you're encountering stem from trying to execute work on a worker thread from the main GUI thread in a way that does not switch the execution co...
47,356
[ { "from": "human", "value": "I have my main GUI thread, and a second thread running inside it's own ApplicationContext (to keep it alive, even when there is no work to be done). I want to call a method on my 2nd thread from my GUI thread, but if I just call thread.Method(); it seems to be running on my main...
I am Need of Formula to Accurately Calculate Bandwith for 1 Gig Nic Card. What i am doing is send Layer 2 Packets @ 1Gbps but my software is showing 6oo Mbps. The whole experiment is Back to Back. No switch No Router. Here is what i did. // LinkSpeed = 1Gb UINT nBandwidth = LinkSpeed/100;//Mbps nBandwidth = nBandw...
To accurately calculate the bandwidth for a 1 Gbps NIC card and diagnose the discrepancy you're seeing in your software output (600 Mbps instead of the expected 1 Gbps), it's essential to consider several factors that may impact the effective throughput. Your current code for calculating the bandwidth and buffer sizes ...
45,600
[ { "from": "human", "value": "I am Need of Formula to Accurately Calculate Bandwith for 1 Gig Nic Card. What i am doing is send Layer 2 Packets @ 1Gbps but my software is showing 6oo Mbps.\nThe whole experiment is Back to Back. No switch No Router.\nHere is what i did.\n// LinkSpeed = 1Gb\n\nUINT nBandwidth ...
In netbeans I created an html page in which I am using Yahoo utils. If I type "yahoo." then namespace, render, hide are not visible in the interactive documentation. Please tell me how to configure Netbeans to handle this.
To configure NetBeans to handle Yahoo Utilities or any other external JavaScript libraries effectively, you can follow these steps: ### Step 1: Add the Yahoo Utilities Library to Your Project 1. **Download Yahoo Utilities**: Ensure you have the Yahoo Utilities library files (JavaScript files) available. You might get...
49,640
[ { "from": "human", "value": "In netbeans I created an html page in which I am using Yahoo utils. If I type \"yahoo.\" then namespace, render, hide are not visible in the interactive documentation. Please tell me how to configure Netbeans to handle this.\n" }, { "from": "gpt", "value": "To conf...
There is one aspect of TDD which I never fully understood. Suppose somebody asked you to implement a simple Stack object. If you've done your design properly, you will come to a very minimal and clean API. Suppose: push(), pop() and isEmpty(). Anything more than that is over-killing the demand, and allowing the user to...
The dilemma you're facing is a common concern when balancing a clean API and the ability to adequately test your code. Here are a few strategies and considerations to help you navigate this issue: ### 1. **Test Public Behavior, Not Private Implementation** One of the core principles of Test-Driven Development (TDD) is...
48,697
[ { "from": "human", "value": "There is one aspect of TDD which I never fully understood.\nSuppose somebody asked you to implement a simple Stack object. If you've done your design properly, you will come to a very minimal and clean API. Suppose: push(), pop() and isEmpty(). Anything more than that is over-ki...
I have a problem related to graph. I am not a computer science grad hence needed a some quick intro on what is graph and were can i read about graph and how to solve graph related problem in c++ or in general.
Certainly! Let's start with a brief introduction to graphs. ### What is a Graph? A **graph** is a data structure that consists of a set of **vertices** (or nodes) connected by **edges**. Graphs can be used to represent many real-world systems, such as social networks (people as vertices, friendships as edges), transp...
48,530
[ { "from": "human", "value": "I have a problem related to graph.\nI am not a computer science grad hence needed a some quick intro on what is graph and were can i read about graph and how to solve graph related problem in c++ or in general.\n" }, { "from": "gpt", "value": "Certainly! Let's start...
I need to do a multi-field level search on Books database using Lucene. for example:my search criteria is something like: (Author:a1 and title:t1) OR (Author:a2 and title:t2) OR (Author:a3 and title:t3) where a1, t1 etc are author names and book titles respectively. How do I get my Lucene Query object built for this...
To build a Lucene `Query` object for a multi-field search with a specified criteria like the one you described, you would typically use the `BooleanQuery` class, which allows you to combine multiple queries using logical operators such as AND, OR, and NOT. Here's how you can construct your query based on the provided ...
49,494
[ { "from": "human", "value": "I need to do a multi-field level search on Books database using Lucene.\nfor example:my search criteria is something like:\n(Author:a1 and title:t1) OR (Author:a2 and title:t2) OR (Author:a3 and title:t3) \n\nwhere a1, t1 etc are author names and book titles respectively. How d...
I am having a frame-based webpage with 3 frames. A topliner, a navigation on the left side and a content frame on the bottom right side. Now, I want to show up a popup-menu when the user right-clicks on the content-frame. Because a div-container can not go out of the frame, my idea was, placing the whole frame-page int...
To achieve the desired effect of displaying a popup menu relative to the main page when the user right-clicks on the content frame, you'll need to calculate the mouse coordinates in relation to the main page. The key is to get the mouse position correctly relative to the top document and adjust for the iframe offsets. ...
49,920
[ { "from": "human", "value": "I am having a frame-based webpage with 3 frames. A topliner, a navigation on the left side and a content frame on the bottom right side.\nNow, I want to show up a popup-menu when the user right-clicks on the content-frame. Because a div-container can not go out of the frame, my ...
While testing a console app, I set the properties of the console window to be only 3 lines high. This change has somehow stuck, meaning that new console windows default to 3 lines high. If I create a new shortcut on the desktop, and point it to cmd.exe, the window that opens is 3 lines high. Of course, I can alter th...
It sounds like you're experiencing an issue with the default console window settings in Windows. By default, when you create a new console application or a new shortcut to `cmd.exe`, it should take the default settings defined in the console properties, but it appears that some of those settings have been altered. Here...
45,193
[ { "from": "human", "value": "While testing a console app, I set the properties of the console window to be only 3 lines high. \nThis change has somehow stuck, meaning that new console windows default to 3 lines high. If I create a new shortcut on the desktop, and point it to cmd.exe, the window that opens i...
This code: db = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\baywotch.db5" TextExportFile = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\Exp.txt" Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") cn.Open _ "Provider = Micr...
It seems you're encountering several issues with exporting data from an Access database to a text file using VBScript. Here's how you can address these issues: ### Issues Identified: 1. **Line Ending Differences**: Windows uses `CRLF` (Carriage Return + Line Feed) for line endings, while Linux uses just `LF` (Line Fe...
46,704
[ { "from": "human", "value": "This code:\ndb = \"C:\\Dokumente und Einstellungen\\hom\\Anwendungsdaten\\BayWotch4\\Neuer Ordner\\baywotch.db5\"\nTextExportFile = \"C:\\Dokumente und Einstellungen\\hom\\Anwendungsdaten\\BayWotch4\\Neuer Ordner\\Exp.txt\"\n\nSet cn = CreateObject(\"ADODB.Connection\")\nSet rs ...
I would like to discover the type of the NAT (FullCone, Restricted Cone, Port Restricted cone, Symmetric) a given network interface is behind. I've tested different tools (http://freshmeat.net/projects/jstun/, http://code.google.com/p/boogu/) but they report different results for the same interface. I'm looking for...
Determining the type of Network Address Translation (NAT) you are behind can be challenging, as different tools may use different methods for detecting NAT behavior. However, you can create a custom solution in Python to identify your NAT type. Here's a sample implementation in Python that uses the `socket` and `struc...
47,373
[ { "from": "human", "value": "I would like to discover the type of the NAT (FullCone, Restricted Cone, Port Restricted cone, Symmetric) a given network interface is behind. \nI've tested different tools (http://freshmeat.net/projects/jstun/, http://code.google.com/p/boogu/) but they report different results...
I create an NSURLRequest to post my data in the iPhone application to a server to proceed the PHP script. My PHP script is look like this. <?php $name = $_POST['name']; $email = $_POST['email']; $link = mysql_connect("localhost", "fffasfdas","Nfdsafafs") or die ("Unable to connect to database."); mysql...
It looks like there are a couple of issues in your code. Let's address them one by one: ### 1. **Incorrect URL in NSURLRequest** You're currently using the URL `http://www.google.com/` for your request. You should use the URL of your PHP script instead. Ensure that the URL points to the script that handles your POST ...
47,573
[ { "from": "human", "value": "I create an NSURLRequest to post my data in the iPhone application to a server to proceed the PHP script. My PHP script is look like this.\n<?php\n $name = $_POST['name'];\n $email = $_POST['email'];\n\n $link = mysql_connect(\"localhost\", \"fffasfdas\",\"Nfdsafafs\") ...
A friend accidentally deleted his forum database. Which wouldn't normally be a huge issue, except for the fact that he neglected to perform backups. 2 years of content is just plain gone. Obviously, he's learned his lesson. The good news, however, is that Google keeps backups, even if individual site owners are idiots....
While Google doesn't provide a straightforward way to directly extract data from its cache, there are a few methods you can explore to recover content from the Google Cache and other cached versions of the site. Below are some approaches you can consider, including both existing tools and ways to create your own soluti...
45,867
[ { "from": "human", "value": "A friend accidentally deleted his forum database. Which wouldn't normally be a huge issue, except for the fact that he neglected to perform backups. 2 years of content is just plain gone. Obviously, he's learned his lesson.\nThe good news, however, is that Google keeps backups, ...
I need to display 2d images in opengl using textures. The image dimensions are not necessarily powers of 2. I thought of creating a larger texture and restricting the display to the part I was using but the image data will be shared with openCV so I don't want to copy data a pixel at a time into a larger texture. EDIT ...
To display 2D images using OpenGL textures, especially when dealing with non-power-of-2 (NPOT) textures, follow these steps: ### Step 1: Load the Image You can use OpenCV to load your image. OpenCV can handle various image formats and provides convenient functions to read images. ```cpp #include <opencv2/opencv.hpp>...
46,159
[ { "from": "human", "value": "I need to display 2d images in opengl using textures.\nThe image dimensions are not necessarily powers of 2.\nI thought of creating a larger texture and restricting the display to the part I was using but the image data will be shared with openCV so I don't want to copy data a p...
I write or modify programs which perform name resolution and need a good control of the process. So I do not use getaddrinfo(), I go deeper and use res_query() / res_send() / etc in resolv.h, documented in resolver(3). Although not documented, the common way to set the resolver used is to update _res.nsaddr_list. But ...
When dealing with name resolution in a program that requires both IPv4 and IPv6 support, using the low-level resolver API can be a bit tricky. The `_res` structure you mentioned is indeed a common way to configure the resolver in C programs. To enable support for both IPv4 and IPv6, it is true that you would typically ...
49,501
[ { "from": "human", "value": "I write or modify programs which perform name resolution and need a\ngood control of the process. So I do not use getaddrinfo(), I go\ndeeper and use res_query() / res_send() / etc in resolv.h, documented\nin resolver(3). \nAlthough not documented, the common way to set the reso...
I've got a C++ service which provides a named pipe to clients with a NULL SECURITY_ATTRIBUTES as follows: hPipe = CreateNamedPipe( lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, BUFS...
The issue you're encountering with your C++ named pipe service and the .NET website could be related to user permissions. The fact that the C# GUI can access the named pipe, but the web application cannot, suggests that the web application's process might not have the same security context or permissions as the GUI app...
46,590
[ { "from": "human", "value": "I've got a C++ service which provides a named pipe to clients with a NULL SECURITY_ATTRIBUTES as follows:\n\n hPipe = CreateNamedPipe( lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, \n ...
Im trying to add a connection to a database in SQL Server 2008 using Visual Studio 2008. When testing the connection, it says that it is successful. However, once I said okay, it complains and say: "Cannot add data connection. Object reference not set to an instance of an object." How do I go about adding a data connec...
The error message "Cannot add data connection. Object reference not set to an instance of an object." typically indicates that there might be an issue with Visual Studio not properly handling the connection process due to configuration problems, or possibly due to issues with the installation itself. Here are several s...
49,848
[ { "from": "human", "value": "Im trying to add a connection to a database in SQL Server 2008 using Visual Studio 2008. When testing the connection, it says that it is successful. However, once I said okay, it complains and say: \"Cannot add data connection. Object reference not set to an instance of an objec...
I'm not sure if memory is the culprit here. I am trying to instantiate a GD image from data in memory (it previously came from a database). I try a call like this: my $image = GD::Image->new($image_data); $image comes back as undef. The POD for GD says that the constructor will return undef for cases of insufficien...
It sounds like you're encountering a memory issue when attempting to create a GD::Image object from PNG data in a Perl CGI script. Here are some potential areas to investigate and steps you can take to troubleshoot and resolve the issue: 1. **Memory Limits in Apache**: Apache does impose memory limits, particularly wh...
49,001
[ { "from": "human", "value": "I'm not sure if memory is the culprit here. I am trying to instantiate a GD image from data in memory (it previously came from a database). I try a call like this:\nmy $image = GD::Image->new($image_data);\n\n$image comes back as undef. The POD for GD says that the constructo...
This is a really basic question but... I have some code like this var arr = Array('blah.jpg','ha.jpg'); for (var i=0; i<array.length; i++) { $('div#blah' + i).click(function() { $('img').attr('src', arr[i]); }); } This should bind the div with id="blah0" to change all images to 'blah.jpg' when clicked. ...
The issue you are encountering is due to the way JavaScript handles closures in loops. When the anonymous function is created inside the loop, it captures the variable `i`, but `i` continues to change until the loop completes. By the time you click the divs, `i` has already reached its final value, which is 10 in your ...
49,960
[ { "from": "human", "value": "This is a really basic question but...\nI have some code like this\nvar arr = Array('blah.jpg','ha.jpg');\nfor (var i=0; i<array.length; i++)\n{\n $('div#blah' + i).click(function() {\n $('img').attr('src', arr[i]); });\n}\n\nThis should bind the div with id=\"blah0...
How can i make the inner table to overlap the parent div with 5 px while resizing? my current solution: <div id="crop"> <table style="width:105%; height:105%;"> //table cells </table> </div> problem is that it gets smaller when resizing... how can I make it constantly overlap with 5px;
To create an inner table that overlaps its parent `div` by 5 pixels on all sides while resizing, you can use a combination of CSS properties. The key here is to set the parent `div` to `position: relative` and the inner table to `position: absolute`. This way, you can position the table relative to the parent `div` whi...
49,028
[ { "from": "human", "value": "How can i make the inner table to overlap the parent div with 5 px while resizing?\nmy current solution:\n<div id=\"crop\">\n <table style=\"width:105%; height:105%;\">\n //table cells\n </table>\n</div>\n\nproblem is that it gets smaller when resizing... \nhow can I mak...
For fun, I'm trying to write one of my son's favorite board games as a piece of software. Eventually I expect to build a WPF UI on top of it, but right now I'm building the machine that models the games and its rules. As I do this, I keep seeing problems that I think are common to many board games, and perhaps others ...
It's great that you're undertaking the challenge of modeling board games as software! You're right that there are common patterns and practices in game design and software development that can help streamline your process, particularly for multiplayer turn-based games. Here are several design patterns and principles yo...
48,533
[ { "from": "human", "value": "For fun, I'm trying to write one of my son's favorite board games as a piece of software. Eventually I expect to build a WPF UI on top of it, but right now I'm building the machine that models the games and its rules.\nAs I do this, I keep seeing problems that I think are commo...
My app needs to play some audio files and I want to fade-out the iPod sound, play my file, and then as soon as my audio stops playing fade-in iPod again (just like iPhone handles iPod music when an incoming call comes in) I'm setting up my app's Audio Session to be kAudioSessionCategory_MediaPlayback and then just befo...
It sounds like you're on the right track with your implementation, but there are a few important aspects to consider when dealing with audio sessions in iOS. 1. **Audio Session Category**: While you mentioned you're using `kAudioSessionCategory_MediaPlayback`, it's worth noting that this category does not automaticall...
48,489
[ { "from": "human", "value": "My app needs to play some audio files and I want to fade-out the iPod sound, play my file, and then as soon as my audio stops playing fade-in iPod again (just like iPhone handles iPod music when an incoming call comes in)\nI'm setting up my app's Audio Session to be kAudioSessio...
I'm trying to convert a Web Site to the Web Application project model and I'm running into compile errors that do not seem to be covered by the guidance I found at Converting a Web Site Project to a Web Application Project. The issue is that standard ASP.NET controls that are embedded as child controls within the Conte...
When converting from a Web Site project to a Web Application project, one of the significant changes you will notice is how the control tree is treated, especially in templated controls such as the ones provided by the AJAX Control Toolkit. In a Web Site project, the ASP.NET compiler allows for more lenient referencin...
49,953
[ { "from": "human", "value": "I'm trying to convert a Web Site to the Web Application project model and I'm running into compile errors that do not seem to be covered by the guidance I found at Converting a Web Site Project to a Web Application Project.\nThe issue is that standard ASP.NET controls that are e...
i would to know how to write a profiler? What books and / or articles recommended? Can anyone help me please? Someone has already done something like this?
Writing a profiler involves creating a tool that analyzes the performance of a program by measuring various metrics, such as execution time, memory usage, and function call counts. Depending on the programming language you are targeting, the approach may vary. Below are some general steps and resources to help you get ...
45,668
[ { "from": "human", "value": "i would to know how to write a profiler? What books and / or articles recommended? Can anyone help me please?\nSomeone has already done something like this?\n" }, { "from": "gpt", "value": "Writing a profiler involves creating a tool that analyzes the performance of ...
I have an object I can serialize to XML without a problem. However when I implement IEquatable and override the functions, I get an error about the XML not being generated correctly. Anyone come across this before?
It sounds like you're encountering an issue where implementing the `IEquatable<T>` interface and overriding equality methods in your class is causing problems with XML serialization. Here are some possible reasons for this issue and suggestions on how to resolve it: ### Potential Causes and Solutions: 1. **Modificati...
48,654
[ { "from": "human", "value": "I have an object I can serialize to XML without a problem. However when I implement IEquatable and override the functions, I get an error about the XML not being generated correctly. Anyone come across this before?\n" }, { "from": "gpt", "value": "It sounds like you'...
I've a process name and I've to send a kill() signal to that process but I need its PID to call kill(). I would only like to use: popen("pidof process_name"); as the last thing. Is there any other way to find out the process' PID? One way I could think of is to send a socket request to that process and ask to its PID....
There are several ways to find a process's PID in Linux, and the methods you mentioned are valid. To address your specific questions: 1. **Using `popen` with `pidof`:** This is a straightforward approach and works well if you only need to retrieve the PID of a specific process. However, it involves invoking an externa...
48,074
[ { "from": "human", "value": "I've a process name and I've to send a kill() signal to that process but I need its PID to call kill(). I would only like to use:\npopen(\"pidof process_name\");\n\nas the last thing. Is there any other way to find out the process' PID? One way I could think of is to send a sock...
When someone uses the term XXX architecture I tend to cringe. It often indicates that there's another architectural discipline or perspective that I'm probably not considering. What perspectives of architecture are you considering and do you have any good resources for information on them? I hope this helps others wh...
It's understandable to feel apprehensive about the use of specialized terms like "XXX architecture," as they can often signify an oversimplification or a narrowed focus that may overlook broader architectural considerations. Architecture in the context of information systems, software design, and enterprise frameworks ...
46,692
[ { "from": "human", "value": "When someone uses the term XXX architecture I tend to cringe. It often indicates that there's another architectural discipline or perspective that I'm probably not considering. What perspectives of architecture are you considering and do you have any good resources for informa...
My (.NET) app allows users to tweak database values. They will then need to generate reports based on their edits, either Crystal or Reporting Services, but that's not important - what is important is that the generation won't definitely be able occur on their local box, e.g. they might not have Crystal Reports (or wha...
To address the issue of running your console app with the necessary permissions for integrated authentication when triggered by Message Queuing, you can use a couple of different approaches. Since the goal is to allow your console application to run under a different user's context while processing messages from the qu...
49,813
[ { "from": "human", "value": "My (.NET) app allows users to tweak database values. They will then need to generate reports based on their edits, either Crystal or Reporting Services, but that's not important - what is important is that the generation won't definitely be able occur on their local box, e.g. th...
First off, let me preface this question by stating that I'm really a pretty terrible data modeler. I know only enough to be dangerous. The table I'm building has four foreign keys, two of which reference the same table. Here's the create statement for that table. CREATE TABLE IF NOT EXISTS `abnr`.`reputation_event_l...
It's great that you're seeking to understand and improve your data modeling skills! Let's address your concerns regarding foreign keys, nullable fields, and handling potential duplicates in your `reputation_event_log` table. ### 1. Nullable Foreign Keys You are correct that foreign keys in your table can be nullable. ...
47,007
[ { "from": "human", "value": "First off, let me preface this question by stating that I'm really a pretty terrible data modeler. I know only enough to be dangerous.\nThe table I'm building has four foreign keys, two of which reference the same table. Here's the create statement for that table.\nCREATE TAB...
How would you define your parser and lexer rules to parse a language that uses indentation for defining scope. I have already googled and found a clever approach for parsing it by generating INDENT and DEDENT tokens in the lexer. I will go deeper on this problem and post an answer if I come to something interesting, bu...
Parsing a language that uses indentation to define scope, like Python, can indeed be challenging, but there are a few different approaches that can be considered. The method you mentioned, which involves generating `INDENT` and `DEDENT` tokens in the lexer, is a widely adopted and effective strategy. Here are some alte...
48,878
[ { "from": "human", "value": "How would you define your parser and lexer rules to parse a language that uses indentation for defining scope.\nI have already googled and found a clever approach for parsing it by generating INDENT and DEDENT tokens in the lexer.\nI will go deeper on this problem and post an an...
Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A. Typically this Javascript looks something like this: <script type="text/javascript"> if (top.location.href != self.location.href) ...
The behavior you're describing is indeed related to how browsers handle iframe content and cross-origin policies. By default, JavaScript running in an iframe (the inner page A) can access its own window and can modify the location of the top window (the parent page P) if it’s served from the same origin. However, if pa...
47,066
[ { "from": "human", "value": "Some websites have code to \"break out\" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.\nTypically this Javascript looks something like this:\n<script type=\"text/javascript\">\n...
I have a c# .NET DLL compiled against the .NET 2.0 framework. A customer uses classic ASP but needs the functionality of the .NET DLL. Is there a way for them to use the DLL?
Yes, there is a way for your customer to use a .NET DLL (compiled against .NET 2.0) in a classic ASP environment. However, it requires creating a COM (Component Object Model) wrapper around the .NET DLL. This involves a few steps: ### Steps to Create a COM Wrapper for the .NET DLL 1. **Make the Assembly COM-Visible**...
49,394
[ { "from": "human", "value": "I have a c# .NET DLL compiled against the .NET 2.0 framework.\nA customer uses classic ASP but needs the functionality of the .NET DLL. Is there a way for them to use the DLL?\n" }, { "from": "gpt", "value": "Yes, there is a way for your customer to use a .NET DLL (c...
is it possible to use the ajaxComplete or ajaxStop features of jQuery to decide whether or not the callback gets called? Essentially I want to be able to take basic error checking code that is currently in most of my callbacks, and add it to a sort of global callback.
Yes, it is possible to use the `ajaxComplete` or `ajaxStop` features of jQuery to centralize your error checking and control whether specific callbacks should execute. However, there are some considerations to keep in mind, as these events trigger after each AJAX request completes, and you'll need a way to conditionall...
49,032
[ { "from": "human", "value": "is it possible to use the ajaxComplete or ajaxStop features of jQuery to decide whether or not the callback gets called?\nEssentially I want to be able to take basic error checking code that is currently in most of my callbacks, and add it to a sort of global callback.\n" }, ...
Hopefully a nice simple one. I've got a php3 website that I want to run on php 5.2 To start with I'd just like to have every reference to the current "index.php3" _within_each_file_ (recursively) changed to "index.php" and then move on to worrying about globals etc. K. Go! :) Update: Thanks a lot! I realise that my qu...
To change all occurrences of `index.php3` to `index.php` within every file of your PHP website recursively, you can use a simple command-line approach with the `find` and `sed` commands (for Unix/Linux/macOS systems). If you are on Windows, there are other methods to achieve the same. ### For Unix/Linux/macOS: Open y...
49,970
[ { "from": "human", "value": "Hopefully a nice simple one.\nI've got a php3 website that I want to run on php 5.2\nTo start with I'd just like to have every reference to the current \"index.php3\" _within_each_file_ (recursively) changed to \"index.php\" and then move on to worrying about globals etc.\nK. Go...
I am getting a runtime error 13 at the end of the following code: Sub plausibilitaet_check() Dim rs As DAO.Recordset Dim rs2 As ADODB.Recordset Dim db As database Dim strsql As String Dim strsql2 As String Dim tdf As TableDef Set db = opendatabase("C:\Codebook.mdb") Set rs = db.OpenRecordset("plausen1") Set rs2 =...
The error you are encountering is a "Run-time error '13': Type mismatch". This is commonly caused by a variable type not being compatible with the expected type in the statement that raises the error. In your case, there are a couple of potential issues: 1. **The SQL Statement**: The SQL statement `"select * from tabl...
42,731
[ { "from": "human", "value": "I am getting a runtime error 13 at the end of the following code:\nSub plausibilitaet_check()\n\nDim rs As DAO.Recordset\nDim rs2 As ADODB.Recordset\nDim db As database\nDim strsql As String\nDim strsql2 As String\nDim tdf As TableDef\n\n\n\n\nSet db = opendatabase(\"C:\\Codeboo...
Problem: Customer X has requested that pages using XML DataBinding and Databound tables in MSIE be re-factored to work cross-browser. Question: What is the best-practice way to mimic the MSIE DataBinding feature of MSIE cross-browser (i.e., in both MSIE and Firefox). Features: Customer X already gets the following usin...
To achieve a solution that mimics MSIE DataBinding while being cross-browser compatible, you'll want to combine the use of native JavaScript capabilities with modern web techniques to minimize latency and memory usage. Here's a suggested approach: ### 1. Use Fetch API for Data Loading Instead of relying on older metho...
45,808
[ { "from": "human", "value": "Problem: Customer X has requested that pages using XML DataBinding and Databound tables in MSIE be re-factored to work cross-browser.\nQuestion: What is the best-practice way to mimic the MSIE DataBinding feature of MSIE cross-browser (i.e., in both MSIE and Firefox).\nFeatures:...
The code below pretty much sums up what I want to achieve. We have a solution which comprises many different projects however we have a need to be able to call methods in projects from projects which are not referenced (would cause circular reference). I have posted previous questions and the code below is pretty much...
In your scenario, you want to implement a system where two different projects can communicate without causing circular references and without using reflection. One way to achieve this is by utilizing a combination of event delegation and a factory pattern or service locator pattern. This allows you to create instances ...
49,118
[ { "from": "human", "value": "The code below pretty much sums up what I want to achieve. \nWe have a solution which comprises many different projects however we have a need to be able to call methods in projects from projects which are not referenced (would cause circular reference).\nI have posted previous ...
We have some software we use internally which is released via ClickOnce from VS 2008. The app needs to run on everyones computer all the time so the obvious solution is to have it in the Start Up folder of their start menu. This works fine on XP machines. But, as was inevitable, people are moving to Vista. Now we're hi...
Yes, you are correct that Windows Vista introduced stricter security measures compared to Windows XP, which can affect how applications, particularly those that are not digitally signed, run on startup. Unsigned applications may face restrictions or may not run at all in some cases, especially under User Account Contro...
49,230
[ { "from": "human", "value": "We have some software we use internally which is released via ClickOnce from VS 2008.\nThe app needs to run on everyones computer all the time so the obvious solution is to have it in the Start Up folder of their start menu. This works fine on XP machines. But, as was inevitable...
I've modified the Agile task template in TFS to include a new 'In Progress' state. When work is started on an item the 'assigned user' will set the task from 'Active' to 'In Progress'. This helps me to know which tasks have been started. I was, however, thinking that I might be able to use this new state to figure ou...
To track the duration of tasks between the 'In Progress' and 'Closed' states in TFS (Team Foundation Server), you can approach this by utilizing the TFS API or creating a custom report. Here's a general overview of the steps you might take: ### Option 1: Using TFS API If you're comfortable with coding, you can use th...
47,697
[ { "from": "human", "value": "I've modified the Agile task template in TFS to include a new 'In Progress' state. When work is started on an item the 'assigned user' will set the task from 'Active' to 'In Progress'. This helps me to know which tasks have been started.\nI was, however, thinking that I might ...
In my case I want to implement a multi-select auto-complete combobox using HTML, JavaScript, and JSP. Is there anybody who knows how to implement this? This will be similar to the text field shown in StackOverflow while adding multiple tags to any question.
Implementing a multi-select auto-complete combo box (similar to the tagging feature on StackOverflow) using HTML, JavaScript, and JSP involves several steps. Below, I'll provide you with an example that covers the front-end (HTML and JavaScript) part, along with a simple JSP backend for handling the data. ### Step 1: ...
43,987
[ { "from": "human", "value": "In my case I want to implement a multi-select auto-complete combobox using HTML, JavaScript, and JSP.\nIs there anybody who knows how to implement this?\nThis will be similar to the text field shown in StackOverflow while adding multiple tags to any question.\n" }, { "fr...
I'm having trouble setting up a scheduled task (now called Task Scheduler) under the actions tab to run on windows 2007 server. It also has exchange server 2007. I've tried setting Program/script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Add arguments (optional): -psconsolefile exshell.psc1 -command...
Setting up a scheduled task in Windows Server 2007 to run a PowerShell script, especially in the context of Exchange Server, can be tricky due to permissions and environment settings. Here are some steps and suggestions to troubleshoot your issue: ### Step-by-Step Setup for Scheduled Task 1. **Verify Script Execution...
49,588
[ { "from": "human", "value": "I'm having trouble setting up a scheduled task (now called Task Scheduler) under the actions tab to run on windows 2007 server. It also has exchange server 2007. \nI've tried setting \nProgram/script : C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\nAdd arguments...
How do I properly set the default character encoding used by the JVM (1.5.x) programmatically? I have read that -Dfile.encoding=whatever used to be the way to go for older JVMs. I don't have that luxury for reasons I wont get into. I have tried: System.setProperty("file.encoding", "UTF-8"); And the property gets set, ...
In Java, setting the default character encoding programmatically is not straightforward due to the way the Java Virtual Machine (JVM) handles encoding. Once the JVM has started, changing the `file.encoding` property using `System.setProperty` does not affect existing or future byte-to-string conversions or character en...
49,018
[ { "from": "human", "value": "How do I properly set the default character encoding used by the JVM (1.5.x) programmatically?\nI have read that -Dfile.encoding=whatever used to be the way to go for older JVMs. I don't have that luxury for reasons I wont get into.\nI have tried:\nSystem.setProperty(\"file.enco...
Anyone know of a Javascript Calendar that supports drag selection for multiple days? Need to be able to do it over months as well, not just restricted to one month. Thanks a lot in advance, the ones here are no good for my problem: http://www.javascript-examples.com/javascript-calendars/
If you’re looking for a JavaScript calendar that supports drag selection for multiple days across different months, there are a few libraries that you might find helpful. Here are some options to consider: ### 1. **FullCalendar** [FullCalendar](https://fullcalendar.io/) is a powerful JavaScript calendar library that s...
49,079
[ { "from": "human", "value": "Anyone know of a Javascript Calendar that supports drag selection for multiple days? Need to be able to do it over months as well, not just restricted to one month.\nThanks a lot in advance, the ones here are no good for my problem: \nhttp://www.javascript-examples.com/javascrip...
Basically what I need is an automated way to update the product version number in WiX (3.0 with Votive etc), and then get that version number into an Inno Setup "bootstrapper" I pretty much have the process mostly automated, however version numbers still need to be updated manually which obviously isn't ideal, but I co...
To automate the version number updates between WiX and Inno Setup, you can follow these steps: ### Step 1: Update the Version Number in WiX For the WiX project, you can automate the version number update using MSBuild targets. Here’s how you can do that: 1. **Define a Property in the WiX Project:** In your WiX `....
45,337
[ { "from": "human", "value": "Basically what I need is an automated way to update the product version number in WiX (3.0 with Votive etc), and then get that version number into an Inno Setup \"bootstrapper\"\nI pretty much have the process mostly automated, however version numbers still need to be updated ma...
I'm writing what will be an intranet application, and one of its features is roughly analogous to content voting - not unlike what SO, Amazon, and many other sites do. Assuming each votable piece of content has a unique ID, and each user (they're authenticated) has a unique ID, the easiest way would seem to be to have ...
You're correct that the straightforward approach of creating a "votes" table with rows for each vote can lead to a significant amount of data, particularly for applications with high levels of interaction and content. While a relational database can handle this volume, there are several strategies you can consider to o...
49,246
[ { "from": "human", "value": "I'm writing what will be an intranet application, and one of its features is roughly analogous to content voting - not unlike what SO, Amazon, and many other sites do.\nAssuming each votable piece of content has a unique ID, and each user (they're authenticated) has a unique ID,...
I've worked with a few of these in the past, but I'm looking for a good, reliable and extensible data class for ASP.NET 3.5, that I can adopt and extend for future projects. I'm not looking for LinQ, and I don't want anything which won't be a source-code level solution. Ideally, it also won't be heavy. Simple.Best Prac...
For ASP.NET 3.5, a simple, reliable, and extensible data class can be implemented by using a straightforward approach based on the Data Transfer Object (DTO) pattern. You can create a base class that incorporates essential functionality while allowing for easy extension in future projects. Here’s a guide on how to crea...
45,498
[ { "from": "human", "value": "I've worked with a few of these in the past, but I'm looking for a good, reliable and extensible data class for ASP.NET 3.5, that I can adopt and extend for future projects.\nI'm not looking for LinQ, and I don't want anything which won't be a source-code level solution.\nIdeall...
It is to my understanding that one should use a forward-class declaration in the event ClassA needs to include a ClassB header, and ClassB needs to include a ClassA header to avoid any circular inclusions. I also understand that an #import is a simple ifndef so that an include only happens once. My inquiry is this: Whe...
It's great that you're delving into forward declarations and import statements, as understanding the nuances of these can greatly enhance your code's structure and compilation performance in Objective-C. Here's a concise breakdown of the differences and use cases for `#import` and `@class`: ### `#import` - **Purpose...
48,852
[ { "from": "human", "value": "It is to my understanding that one should use a forward-class declaration in the event ClassA needs to include a ClassB header, and ClassB needs to include a ClassA header to avoid any circular inclusions. I also understand that an #import is a simple ifndef so that an include o...
I'm using ASP.NET to build an application and the latest version of NUNIT framework to test it. I'm constructing a User Control to build a custom menu. That control at some point checks whehter a specific object exists in the Session Collection or not to add some elements to the menu. The exact functionality it provide...
To test your User Control that relies on the Session object using NUnit, you will need to simulate or mock the ASP.NET Session state, as unit tests should generally avoid depending on the actual HTTP context. ### Here are several approaches to accomplish this: #### 1. **Using Moq Library:** One popular way to create ...
45,464
[ { "from": "human", "value": "I'm using ASP.NET to build an application and the latest version of NUNIT framework to test it. I'm constructing a User Control to build a custom menu. That control at some point checks whehter a specific object exists in the Session Collection or not to add some elements to the...
Often times a developer on my team will create a new Visual Studio project and reference a DLL somewhere on their local machine (e.g., C:\mydlls\homersimpson\test.dll). Then, when I get the project from the source control repository, I cannot build the project because I do not have the referenced dll in the exact same...
When dealing with shared libraries and DLLs in a team development environment, it's essential to adopt best practices to ensure that all team members can build and run the project without issues. Here are some best practices for storing and referencing shared libraries: 1. **Use Version Control**: Store the DLLs in th...
48,085
[ { "from": "human", "value": "Often times a developer on my team will create a new Visual Studio project and reference a DLL somewhere on their local machine (e.g., C:\\mydlls\\homersimpson\\test.dll). Then, when I get the project from the source control repository, I cannot build the project because I do n...
I have a Button style and can't seem to property databind the border's CornerRadius property to the template. This is a dependency property, so it should be data bindable. I wonder if I'm missing the right XAML syntax to use? <Style TargetType="{x:Type Button}" BasedOn="{x:Null}"> <Setter Property="Foc...
The issue you're encountering with binding the `CornerRadius` property in your Button style is related to the fact that the `Button` class does not have a `CornerRadius` property, but instead has properties like `BorderBrush`, `BorderThickness`, etc. The `CornerRadius` property is specific to the `Border` control, whic...
48,231
[ { "from": "human", "value": "I have a Button style and can't seem to property databind the border's CornerRadius property to the template. This is a dependency property, so it should be data bindable. I wonder if I'm missing the right XAML syntax to use?\n<Style TargetType=\"{x:Type Button}\" BasedOn=\"{x...
Postgres 8.3 is installed on a windows 2008 server. Ruby 1.8-6 installed. gem install ruby-postgres. When trying a simple connect I get ruby.exe - Ordinal Not Found The ordinal 284 could not be located in the dynamic link library SSLEAY32.dll. OK There seems to be some conflict betweeen the ssleay32 shipped with postg...
The issue you're encountering seems to be related to a conflict between the SSL libraries (`ssleay32.dll` and possibly `libeay32.dll`) that are being used by Ruby and PostgreSQL. The `ordinal not found` error usually indicates that the DLL being loaded does not contain the function that the application is trying to cal...
49,057
[ { "from": "human", "value": "Postgres 8.3 is installed on a windows 2008 server.\nRuby 1.8-6 installed.\ngem install ruby-postgres.\nWhen trying a simple connect I get \nruby.exe - Ordinal Not Found\nThe ordinal 284 could not be located in the dynamic link library SSLEAY32.dll.\nOK\nThere seems to be some c...
I need some resources for implementing a simple virtual machine and interpreted language. Something that is pratical is most useful. I have read the Virtual Machine Implementation book and found that it is quite old and doesn't represent the vms I see today. Also if someone know of a fairly simplistic language that ...
Creating a simple virtual machine (VM) and interpreted language can be an exciting project! Here are some resources, examples, and ideas to help you get started with both concepts. ### Books and Articles 1. **"Crafting Interpreters" by Robert Nystrom**: - This is an excellent online book that takes you through crea...
48,182
[ { "from": "human", "value": "I need some resources for implementing a simple virtual machine and interpreted language. Something that is pratical is most useful. I have read the Virtual Machine Implementation book and found that it is quite old and doesn't represent the vms I see today. Also if someone k...
I have a ListBox where the number of items is added based on and integer property set by a user. The items are created from a ControlTemplate resource that which is comprised of a Label and a TextBox inside of a DockPanel. The label is not data bound but I would like for it to have somewhat dynamic content based on the...
To achieve dynamic content in the `Label` within your `ControlTemplate` for the `ListBoxItem`, you can use a combination of data binding and a value converter or you can simply handle it in the code-behind. Below, I'll outline two approaches: one using a value converter with binding, and the other by manipulating the `...
44,916
[ { "from": "human", "value": "I have a ListBox where the number of items is added based on and integer property set by a user. The items are created from a ControlTemplate resource that which is comprised of a Label and a TextBox inside of a DockPanel. The label is not data bound but I would like for it to h...
Any good converter for GB, Big5, Unicode? Convert GB to Unicode, Unicode to GB, Big5 to Unicode, Unicode to Big5, GB to Big5.
There are several tools and libraries available for converting between GB, Big5, and Unicode. Here are some popular ones: ### Online Converters 1. **Online-Convert.com**: This site provides various conversion tools and can handle different encodings including GB, Big5, and Unicode. 2. **ConvertCodes.com**: Offers a si...
48,854
[ { "from": "human", "value": "Any good converter for GB, Big5, Unicode?\nConvert GB to Unicode, Unicode to GB, Big5 to Unicode, Unicode to Big5, GB to Big5.\n" }, { "from": "gpt", "value": "There are several tools and libraries available for converting between GB, Big5, and Unicode. Here are some...
I would like to know the best way to replace a standard textarea field with a rich text editor in Django Admin?
Replacing a standard textarea field with a rich text editor in Django Admin can enhance the user experience when editing text content. One common way to implement a rich text editor in Django Admin is to use the `django-ckeditor` package, which integrates the CKEditor into Django forms. Here's how you can achieve this...
46,722
[ { "from": "human", "value": "I would like to know the best way to replace a standard textarea field with a rich text editor in Django Admin?\n" }, { "from": "gpt", "value": "Replacing a standard textarea field with a rich text editor in Django Admin can enhance the user experience when editing t...
I have a Java Applet (JApplet). This Applet uses a JComponent(PanelAux) to show values and images that change periodically. But the applet doesn't refresh itself. What can I do to refresh my applet? //--------------------------------------------RUN public void run() while (true) { try { myThre...
To ensure that your Java applet properly refreshes itself when values and images change, there are a few modifications and best practices you can apply to your existing code. Let's go through the main points: ### Issues in Your Code 1. **Creating a new PanelAux each time**: In your `paint` method, you're creating a n...
48,769
[ { "from": "human", "value": "I have a Java Applet (JApplet). This Applet uses a JComponent(PanelAux) to show values and images that change periodically. But the applet doesn't refresh itself. What can I do to refresh my applet? \n//--------------------------------------------RUN\n\npublic void run()\n wh...
I have a question about implementing caching (memoization) using arrays in Haskell. The following pattern works: f = (fA !) where fA = listArray... But this does not (the speed of the program suggests that the array is getting recreated each call or something): f n = (fA ! n) where fA = listArray... Defining fA ...
The difference in behavior that you're observing between the two patterns you provided in Haskell has to do with how local bindings (using `where` clauses) work compared to top-level bindings (global scope), and how the array is constructed in relation to the function `f`. ### Analyzing the Two Patterns 1. **Working ...
46,081
[ { "from": "human", "value": "I have a question about implementing caching (memoization) using arrays in Haskell. The following pattern works:\nf = (fA !)\n where fA = listArray...\n\nBut this does not (the speed of the program suggests that the array is getting recreated each call or something):\nf n = (f...
I've got a request to implement a visualization service for geographical related data. I have a list of Italian ZIP Codes (they are called CAP in Italian). I've already found a table which maps these ZIP codes to geographical coordinates (lat/long). So, the data I have to visualize as map is structured the following wa...
Creating a visualization of geographical data using ZIP codes (CAP in Italy) is indeed possible, and there are several options you can consider, both using web services and by implementing a solution in .NET. ### Options for Visualization 1. **Using JavaScript Libraries**: - **Leaflet.js**: A popular library for i...
44,550
[ { "from": "human", "value": "I've got a request to implement a visualization service for geographical related data.\nI have a list of Italian ZIP Codes (they are called CAP in Italian). I've already found a table which maps these ZIP codes to geographical coordinates (lat/long).\nSo, the data I have to visu...
I think im asking for the right type of report from Quickreport. What we have is a simple table, gauge,site,value Gauge and site are the keyfields, (there could be anynumber of Gauge-Site Pairs) normally there is only at most, about 10 sites. and we are looking to get a reports that looks like this site1 si...
The type of report you are looking to create is commonly referred to as a **cross-tab report** or **pivot table report**. This format allows you to display values in a matrix format, with one set of categories along the rows and another set along the columns, which is exactly what you've described with gauges as rows a...
46,538
[ { "from": "human", "value": "I think im asking for the right type of report from Quickreport.\nWhat we have is a simple table, \ngauge,site,value\n\nGauge and site are the keyfields, (there could be anynumber of Gauge-Site Pairs)\nnormally there is only at most, about 10 sites.\nand we are looking to get a...
We have recently been faced with the problem of porting our C++ framework to an ARM platform running uClinux where the only vendor supported compiler is GCC 2.95.3. The problem we have run into is that exceptions are extremely unreliable causing everything from not being caught at all to being caught by an unrelated th...
Eliminating exceptions from C++ code on a platform with unreliable support for them can certainly be challenging. However, there are several design patterns and strategies you can use to handle construction errors without relying on exceptions. Here are a few approaches you can consider: 1. **Factory Method Pattern**:...
42,941
[ { "from": "human", "value": "We have recently been faced with the problem of porting our C++ framework to an ARM platform running uClinux where the only vendor supported compiler is GCC 2.95.3. The problem we have run into is that exceptions are extremely unreliable causing everything from not being caught ...
I have a program that needs to run as a separate NT user to connect to a SQL Server databases. For running a program itself, this isn't a big deal as I can just right click on it in windows explorer and select run as. Is there any way to run my tests as a different user as well? (it would be nice if I could do so in...
To run your unit tests as a different user in Visual Studio, especially in Visual Studio 2008 Pro, you can use the following methods. However, note that running tests under a different user account isn't natively supported in the Visual Studio UI. Here are a couple of workarounds: ### Option 1: Use a Custom Test Runne...
47,948
[ { "from": "human", "value": "I have a program that needs to run as a separate NT user to connect to a SQL Server databases. For running a program itself, this isn't a big deal as I can just right click on it in windows explorer and select run as. Is there any way to run my tests as a different user as wel...
I have a PHP-generated page which is displaying some data about a set of films. The page is updated using POST. The form only shows films starting with a particular letter. I want to present a set of clickable options at the top of the screen, each of which is a letter. So if you click on "B" it submits the form and re...
You're right in identifying a couple of common approaches to achieve this functionality with POST requests in PHP. While using JavaScript is a common solution, there is a simple and elegant way to achieve your goal using HTML forms without excessive JavaScript. One approach is to use a series of buttons within a sing...
48,784
[ { "from": "human", "value": "I have a PHP-generated page which is displaying some data about a set of films. The page is updated using POST. The form only shows films starting with a particular letter. I want to present a set of clickable options at the top of the screen, each of which is a letter. So if yo...