instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm using a PropertyGrid in a tool app to show a window to monitor an object in a remote app. Every second or so I get an update from the app with the state of any members that have changed, and I update the grid. I call Refresh() to make the changes take. This all works pretty well except one thing. Say the object is ...
This is a common issue when dealing with controls like `PropertyGrid` where a refresh or update operation triggers an automatic scroll to ensure the selected item is visible. Since you've already explored manipulating the `VScrollBar`, I'll suggest a few alternative approaches you might consider. ### Approach 1: Save ...
37,005
[ { "from": "human", "value": "I'm using a PropertyGrid in a tool app to show a window to monitor an object in a remote app. Every second or so I get an update from the app with the state of any members that have changed, and I update the grid. I call Refresh() to make the changes take. This all works pretty ...
I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer): I've done it the easy way, by using the built-in Math.sqrt() function, but I'm wondering if there is a way to do it faster by restricting yourself to integer-only domain. Maintaining a lookup ta...
Finding an efficient way to determine if a long value is a perfect square can indeed have performance implications, especially in scenarios like Project Euler where you may encounter a large number of calls. Your current approach using `Math.sqrt()` is a solid and straightforward method, but since you're interested in ...
38,817
[ { "from": "human", "value": "I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer): \n\nI've done it the easy way, by using the built-in Math.sqrt()\nfunction, but I'm wondering if there is a way to do it faster by\nrestricting yourself to...
Jython's PyObject provides a method to cast a python object to java. There are some old articles on Jython Monthly describing the use of __tojava__ to create a jython object factory Besides the need for an interface, are there any other limitations to using Jython to create "java" objects.
Using Jython to create Java objects through the `__tojava__` method provides a way to bridge Python and Java, but there are indeed some limitations and considerations you should be aware of when working with Jython. Here are some key points to consider: 1. **Type Compatibility**: While Jython provides the ability to c...
42,845
[ { "from": "human", "value": "Jython's PyObject provides a method to cast a python object to java. There are some old articles on Jython Monthly describing the use of __tojava__ to create a jython object factory\nBesides the need for an interface, are there any other limitations to using Jython to create \"j...
I'm thinking of using PDO in all of my future webapp. Currently (using what I've learned from SO so far), what I have in my site to handle database connection is a Singleton class like this : class DB { private static $instance = NULL; private static $dsn = "mysql:host=localhost;dbname=mydatabase;"; p...
Your approach to using a Singleton pattern for database connection with PDO is a good start, especially for beginners. However, you can enhance your code to avoid repetitive `try...catch` blocks, improve error handling, and make your code more maintainable. Below are some suggestions to achieve this. ### 1. Use a Cent...
40,258
[ { "from": "human", "value": "I'm thinking of using PDO in all of my future webapp. Currently (using what I've learned from SO so far), what I have in my site to handle database connection is a Singleton class like this :\nclass DB {\n\n private static $instance = NULL;\n private static $dsn = \"m...
What is your preferred method of traversing a tree data structure, since recursive method calls can be pretty inefficient in some circumstances. I am simply using a generator like the one above. Do you have any hints to make it faster? def children(self): stack = [self.entities] while stack: for e in s...
To make your tree traversal method using a generator faster, there are a few optimizations you can apply to your `children` method. Here’s a revised version that improves performance while maintaining a depth-first traversal approach. ### Optimized `children` Method The main change involves using a simple stack data ...
38,166
[ { "from": "human", "value": "What is your preferred method of traversing a tree data structure, since recursive method calls can be pretty inefficient in some circumstances. I am simply using a generator like the one above. Do you have any hints to make it faster?\ndef children(self):\n stack = [self.ent...
I have a two way foreign relation similar to the following class Parent(models.Model): name = models.CharField(max_length=255) favoritechild = models.ForeignKey("Child", blank=True, null=True) class Child(models.Model): name = models.CharField(max_length=255) myparent = models.ForeignKey(Parent) How do I rest...
To restrict the choices for `Parent.favoritechild` to only those `Child` instances whose `myparent` is the current `Parent` instance, you need to use a dynamic query filter that references the parent instance. However, using `limit_choices_to` with a string reference like `"self"` won't work as expected since it doesn'...
43,457
[ { "from": "human", "value": "I have a two way foreign relation similar to the following\nclass Parent(models.Model):\n name = models.CharField(max_length=255)\n favoritechild = models.ForeignKey(\"Child\", blank=True, null=True)\n\nclass Child(models.Model):\n name = models.CharField(max_length=255)\n m...
abstract class Foo { private List<Object> container; private bool update; Foo Foo() { container = new List<object>(); update = false; } public abstract Bar CreateBar(); public void BeginUpdate() { if (!update) { Thread update_thread = new Th...
In the provided code, both the `Update` method and the property getter for `Objects` are using a lock on the `container` object. Here’s how the locking works: 1. When `foo_instance.Objects` is accessed, it enters the getter for the `Objects` property and attempts to lock the `container` list. This means that the `Get`...
40,420
[ { "from": "human", "value": "abstract class Foo\n{\n private List<Object> container;\n private bool update;\n\n Foo Foo()\n {\n container = new List<object>();\n update = false;\n }\n\n public abstract Bar CreateBar();\n\n public void BeginUpdate()\n {\n if (!upd...
I have a loop on page to update an access database that takes 15-20 seconds to complete. I only run it once a month at most but I noticed that every time I run it the web site (IIS 6) simply stops serving pages. After the loop ends, pages begin opening again. Here's my code: For each Email in Emails if Trim(Email) ...
The problem you're experiencing with your web application becoming unresponsive while updating the Access database is likely due to a combination of long-running requests and blocking behavior in IIS. Here are several suggestions to improve the performance and user experience of your script: ### 1. Optimize Database U...
38,613
[ { "from": "human", "value": "I have a loop on page to update an access database that takes 15-20 seconds to complete. I only run it once a month at most but I noticed that every time I run it the web site (IIS 6) simply stops serving pages.\nAfter the loop ends, pages begin opening again.\nHere's my code:\n...
I'm using jython 2.2.1, and jdbc 1.2 and connecting to a mssql 2000 database, writing the contents of an email to it. When I get to the body of the email which can be quite large sometimes I need to truncate the data at 5000 chars. Except mssql & jdbc gang up on me like school yard bullies, when i check the database lo...
It looks like you're encountering issues with truncating and inserting large strings into a SQL Server database using JDBC in Jython. Specifically, you are attempting to insert email body content into a column defined with a maximum length of 5000 characters, but you are only able to insert a maximum of 256 characters....
41,042
[ { "from": "human", "value": "I'm using jython 2.2.1, and jdbc 1.2 and connecting to a mssql 2000 database, writing the contents of an email to it. When I get to the body of the email which can be quite large sometimes I need to truncate the data at 5000 chars. Except mssql & jdbc gang up on me like school y...
Anyone out there using Fogbugz and Scrum together? We use Fogbugz extensively, and I'm looking for ideas from anyone who may be using it as part of Scrum. I found these two items, but they are archived and unvailable for further discussion. I'm specifically interested in ideas for mapping Scrum concepts into Fogbugz. S...
Using FogBugz in conjunction with Scrum can definitely work, especially with the features available in FogBugz v7 and its plugins. Here are some suggestions on how to map Scrum concepts to FogBugz: ### 1. **Prioritizing the Backlog** - **Priority Levels**: Since FogBugz has only 7 priority levels, consider using custo...
40,053
[ { "from": "human", "value": "Anyone out there using Fogbugz and Scrum together?\nWe use Fogbugz extensively, and I'm looking for ideas from anyone who may be using it as part of Scrum. I found these two items, but they are archived and unvailable for further discussion. I'm specifically interested in ideas ...
I'm opening an xml file in Microsoft Word 2007 using C#. I'm using an xsl file to define the layout which worked up to the point that I needed to include an image. I used the typical src html tag and the image displays when the xml is viewed in ie but not when it's opened in Word. I get the image place holder so I can ...
It sounds like you were facing a common issue when trying to display images in Microsoft Word via an XSL transformation of an XML file. Since you mentioned that you resolved the issue but did not provide the solution, I'll share some general approaches that often help in such situations. ### Common Solutions for Disp...
42,958
[ { "from": "human", "value": "I'm opening an xml file in Microsoft Word 2007 using C#. I'm using an xsl file to define the layout which worked up to the point that I needed to include an image. I used the typical src html tag and the image displays when the xml is viewed in ie but not when it's opened in Wor...
I'm looking for a simple, idiomatic method of replicating Excel's visual cue that a number is too large to be displayed in a column. I've got the following xaml: <ListView.View> <GridView> <GridViewColumn ... /> </GridView> <ListView.View> and what I'd like is if the text in the column is too small to ...
To achieve the effect of displaying `#` characters when the text in a `ListView` column is too wide to be displayed, you can create a custom `ValueConverter` in WPF that checks whether the text fits within the column width and updates the display accordingly. Here's how you can implement this functionality step by ste...
40,284
[ { "from": "human", "value": "I'm looking for a simple, idiomatic method of replicating Excel's visual cue that a number is too large to be displayed in a column. I've got the following xaml:\n<ListView.View>\n <GridView>\n <GridViewColumn ... />\n </GridView>\n<ListView.View>\n\nand what I'd li...
I find this incredibly annoying with Dreamweaver, everytime I go to save my document I have to tab into each css file and save them individually. Not a problem with one css file, but when you have 3 or 4 it is a pain in the ass. Is there anyway to save your dreamweaver document and all related css files in one hot key?...
Yes, you can save your main HTML document and all associated CSS files in Adobe Dreamweaver more efficiently without having to click through each file individually. Here are a couple of methods you can use: ### Method 1: Save All 1. **Keyboard Shortcut**: The default shortcut to save all documents in Dreamweaver is ...
43,855
[ { "from": "human", "value": "I find this incredibly annoying with Dreamweaver, everytime I go to save my document I have to tab into each css file and save them individually. Not a problem with one css file, but when you have 3 or 4 it is a pain in the ass. Is there anyway to save your dreamweaver document ...
I'm getting increasingly frustrated with the limitations and verbosity required to actually commit some business logic to stored procedures, using languages such as Transact-SQL or PL/SQL. I would love to convert some current databases to Oracle and take advantage of its support for Java stored procedures, but that op...
If you're looking for databases that allow for stored procedures in languages other than traditional SQL dialects like Transact-SQL or PL/SQL, there are several modern database options you can consider. Here are a few databases that support stored procedures in alternative languages: 1. **PostgreSQL**: - **Language...
41,021
[ { "from": "human", "value": "I'm getting increasingly frustrated with the limitations and verbosity required to actually commit some business logic to stored procedures, using languages such as Transact-SQL or PL/SQL. I would love to convert some current databases to Oracle and take advantage of its suppor...
I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history. I've been able to use svnadmin dump to dump the entire repository and svnadmin load it into another repository, but I can't find a ...
Yes, it is possible to dump only a specific project (or directory) from an SVN repository while preserving its history, and you can do this using the `svnadmin dump` command with the `--incremental` flag. However, the process is a bit involved because you will need to specify the path of the project you want to dump, a...
42,685
[ { "from": "human", "value": "I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history.\nI've been able to use svnadmin dump to dump the entire repository and svnadmin load it in...
I'm a self-taught developer and my experience is all in small applications that I've developed. I'm currently working on an application that I've made public, and I've realized that I need to start doing good unit testing to catch regressions and generally make sure everything works. I've read up on a previous question...
It's great to hear that you're diving into unit testing for your C# applications! Although Visual Studio 2008 is quite old, there are still many resources you can use to get started with unit testing in that environment. Here are some resources and concepts that will help you with C# unit testing in Visual Studio 2008...
38,554
[ { "from": "human", "value": "I'm a self-taught developer and my experience is all in small applications that I've developed.\nI'm currently working on an application that I've made public, and I've realized that I need to start doing good unit testing to catch regressions and generally make sure everything ...
I've been asked to build 'widgets' that let users of a web application install a desktop, or web-based widget which will provide: Notifications of new content. Personalized access to key performance indicators I'm looking for some information to inform our requirements and design discussions. On the desktop you can t...
When considering the development of widgets or applications for notifications and key performance indicators (KPIs) across desktop and web environments, there are several factors to take into account regarding user bases, technologies, and frameworks. ### 1. **User Base & Market Research** - **Desktop Widget Framework...
41,270
[ { "from": "human", "value": "I've been asked to build 'widgets' that let users of a web application install a desktop, or web-based widget which will provide:\n\nNotifications of new content.\nPersonalized access to key performance indicators\n\nI'm looking for some information to inform our requirements an...
I need to make my dropdown menu apprear over the top of a flash movie, how is this done cross browser? It can be done, IBM do it: http://www.ibm.com/us/ so do GE: http://www.ge.com/ Setting the the WMODE to transparent doesn't work for Firefox Putting it into an Iframe doesnt work below IE7 Any one know the best way to...
To make a dropdown menu appear over a Flash movie in a cross-browser manner, you need to ensure that the Flash content is rendered with the right settings so that it does not interfere with the layering of your HTML elements (like dropdown menus). Here are some techniques you can use: ### 1. Set `wmode` Parameter The ...
41,222
[ { "from": "human", "value": "I need to make my dropdown menu apprear over the top of a flash movie, how is this done cross browser?\nIt can be done, IBM do it: http://www.ibm.com/us/ so do GE: http://www.ge.com/\nSetting the the WMODE to transparent doesn't work for Firefox\nPutting it into an Iframe doesnt...
I am trying to work out the best database model for the current setup: An administrator can create "customer products". This means services/products which customer can attach/subscribe to. The simple cases where the product simply costs a price, or the product subscription should send an e-mail is easy to model in the ...
Your intuition about using a string column for handling specific behaviors in a product is a common approach, but as you mentioned, it can feel somewhat disconnected. There are several approaches to modeling this relationship more effectively, and the best choice will depend on the specific needs and complexity of your...
39,493
[ { "from": "human", "value": "I am trying to work out the best database model for the current setup:\nAn administrator can create \"customer products\". This means services/products which customer can attach/subscribe to. The simple cases where the product simply costs a price, or the product subscription sh...
Assuming the following directory structure, htdocs/ images/ css/ .htaccess system/ index.php ... I would like to route all incoming requests through that php script. I have been trying some rewrite rules within the htaccess, but I can't seem to be able to route to files that are outside the document root. I ...
In Apache, when you want to route all incoming requests through a PHP script (or any script), you typically use mod_rewrite in your `.htaccess` file. However, you have encountered a limitation: you cannot directly rewrite requests to files or directories that are outside the document root (`htdocs` in your case) due to...
41,203
[ { "from": "human", "value": "Assuming the following directory structure,\nhtdocs/\n images/\n css/\n .htaccess\nsystem/\n index.php\n ...\n\nI would like to route all incoming requests through that php script. I have been trying some rewrite rules within the htaccess, but I can't seem to be able to rou...
Our SEO team would like to open up our main dynamic search results page to spiders and remove the 'nofollow' from the meta tags. It is currently accessible to spiders via allowing the path in robots.txt, but with a 'nofollow' clause in the meta tag which prevents spiders from going beyond the first page. <meta name="r...
Your concerns about opening up your dynamic search results page to search engine spiders are valid, and it's important to approach this carefully to avoid potential negative impacts on your SEO. Here are responses to each of your questions: ### 1. Remove `nofollow` but Control Certain Links Removing the `nofollow` fr...
41,540
[ { "from": "human", "value": "Our SEO team would like to open up our main dynamic search results page to spiders and remove the 'nofollow' from the meta tags. It is currently accessible to spiders via allowing the path in robots.txt, but with a 'nofollow' clause in the meta tag which prevents spiders from g...
when i create an aspx page, the header includes something like this:- <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Create.aspx.cs" Inherits="My.Mvc.Views.Blah" %> With ASP.NET MVC apps, do we: need to include this AutoEventWireUp attribu...
In ASP.NET Web Forms, the `AutoEventWireup` attribute is used to specify whether the page's event handlers should be automatically connected to their respective events. Here are the details regarding its use in the context of ASP.NET MVC: ### 1. Do we need to include this `AutoEventWireup` attribute in ASP.NET MVC? N...
43,303
[ { "from": "human", "value": "when i create an aspx page, the header includes something like this:-\n<%@ Page\n Language=\"C#\" \n MasterPageFile=\"~/Views/Shared/Site.Master\" \n AutoEventWireup=\"true\" \n CodeBehind=\"Create.aspx.cs\" \n Inherits=\"My.Mvc.Views.Blah\" %>\n\nWith ASP.NET MVC...
A problem that we need to solve regularly at my workplace is how to build sql statements based on user supplied table/column names. The issue I am trying to address is the commas between column names. One technique looks something like this. selectSql = "SELECT "; for (z = 0; z < columns.size(); z++) { selectS...
There are several ways to build SQL statements in a more readable and maintainable manner when handling dynamic column lists. Here are a few techniques that might suit your needs: ### 1. Using String Join Instead of manually adding commas and tracking the index, you can use a string join function. This approach makes...
42,222
[ { "from": "human", "value": "A problem that we need to solve regularly at my workplace is how to build sql statements based on user supplied table/column names. The issue I am trying to address is the commas between column names. \nOne technique looks something like this.\nselectSql = \"SELECT \";\n\nfor...
I'm a relatively new convert to Python. I've written some code to grab/graph data from various sources to automate some weekly reports and forecasts. I've been intrigued by the Jython concept, and would like to port some Python code that I've written to Jython. In order to do this quickly, I need a NumPy clone for J...
Jython is an implementation of Python that runs on the Java platform. However, one of the challenges you might face is that Jython does not support the C extensions that many popular Python libraries, such as NumPy, rely on. This means that using standard NumPy in Jython is not feasible. Fortunately, there are some al...
43,687
[ { "from": "human", "value": "I'm a relatively new convert to Python. I've written some code to grab/graph data from various sources to automate some weekly reports and forecasts. I've been intrigued by the Jython concept, and would like to port some Python code that I've written to Jython. In order to do...
I'd love to create a "back" left-arrow-bezel button in a UIToolbar. As far as I can tell, the only way to get one of these is to leave UINavigationController at default settings and it uses one for the left bar item. But there's no way I can find to create one as a UIBarButtonItem, so I can't make one in a standard UIT...
Creating a back button with a left-arrow bezel appearance in a UIToolbar is not straightforward, as you pointed out. However, here are some approaches you can consider: ### 1. Custom UIButton with Arrow Image Since there are no standard images provided by iOS for a back button outside of a UINavigationBar, you can cre...
41,324
[ { "from": "human", "value": "I'd love to create a \"back\" left-arrow-bezel button in a UIToolbar.\nAs far as I can tell, the only way to get one of these is to leave UINavigationController at default settings and it uses one for the left bar item. But there's no way I can find to create one as a UIBarButto...
I've seen lots of ways to backup a single repository in subversion. Is there any way to backup all the repositories in one go. I have lots of repositories for different projects and don't want to have to create a script every time.
Yes, you can back up all Subversion (SVN) repositories in one go by using a script that iterates over all repositories in a given directory and creates a dump file for each one. Here’s a general approach you can take to accomplish this, assuming your repositories are stored in a single parent directory. ### Using a Sh...
42,003
[ { "from": "human", "value": "I've seen lots of ways to backup a single repository in subversion. Is there any way to backup all the repositories in one go. I have lots of repositories for different projects and don't want to have to create a script every time.\n" }, { "from": "gpt", "value": "Ye...
I am trying to use google search for my site: http://www.houseofhawkins.com/search.php It is not playing nice with some screen resolutions. Here is the code given from google: <div id="cse-search-results"></div> <script type="text/javascript"> var googleSearchIframeName = "cse-search-results"; var googleSearchForm...
It sounds like you're trying to embed a Google Custom Search Engine (CSE) widget on your site, but you're encountering issues with responsiveness on smaller screen resolutions. Changing the `googleSearchFrameWidth` to a smaller value (like 250) is a step in the right direction, but it may not be enough to ensure that i...
41,670
[ { "from": "human", "value": "I am trying to use google search for my site:\nhttp://www.houseofhawkins.com/search.php\nIt is not playing nice with some screen resolutions. Here is the code given from google:\n<div id=\"cse-search-results\"></div>\n<script type=\"text/javascript\">\n var googleSearchIframeN...
I'm experimenting with the Tiny MCE editor. We also use jQuery, and I noticed that the standard Tiny MCE install includes a file called tiny_mce_jquery.js. Can anyone enlighten me as to what that's for? Oddly, I can't find anything about it online. Should I reference it in addition to the standard Tiny MCE script, or i...
The `tiny_mce_jquery.js` file is a bridge that allows TinyMCE to be integrated with jQuery more seamlessly. This file essentially provides a jQuery wrapper around the TinyMCE functions and helps to manage the lifecycle of TinyMCE editors when using jQuery for element selection and manipulation. ### Here's what you nee...
41,374
[ { "from": "human", "value": "I'm experimenting with the Tiny MCE editor. We also use jQuery, and I noticed that the standard Tiny MCE install includes a file called tiny_mce_jquery.js. Can anyone enlighten me as to what that's for? Oddly, I can't find anything about it online. Should I reference it in addit...
Ok, so we have a bunch of tables that are named like this: training_data_001 training_data_002 training_data_003 training_data_004 training_data_005 And then to find those we look at a field in another table, let's just call it master.training_type. Anyway, I was wondering if anyone knew of a way to do a weird table n...
In SQL Server, you can't directly use dynamic table names in a standard SQL `JOIN` statement as you attempted in your example. However, you can achieve a similar result using dynamic SQL. Here’s how you could structure your query using dynamic SQL: 1. Use a variable to construct your SQL query as a string. 2. Use the ...
42,787
[ { "from": "human", "value": "Ok, so we have a bunch of tables that are named like this:\ntraining_data_001\ntraining_data_002\ntraining_data_003\ntraining_data_004\ntraining_data_005\n\nAnd then to find those we look at a field in another table, let's just call it master.training_type.\nAnyway, I was wonder...
Hi would like to send an email alert after checking the result of a query which will return the numbers of rows in a table. Does anyone have any ideas how I could do this in SQL Server 2000 in 2005 I would use a maintenence plan but not sure how in 2000?
In SQL Server 2000, you won't have the built-in Maintenance Plans that were introduced in SQL Server 2005. However, you can accomplish your goal by using a combination of SQL Server Agent jobs and T-SQL scripts. Here’s a step-by-step approach to send an email alert based on the number of rows in a table: ### Step 1: S...
36,112
[ { "from": "human", "value": "Hi would like to send an email alert after checking the result of a query which will return the numbers of rows in a table. Does anyone have any ideas how I could do this in SQL Server 2000 in 2005 I would use a maintenence plan but not sure how in 2000?\n" }, { "from": ...
I saw a link to find out if AD was running, but am not too sure if the same applies to AD/AM. One caveat is that I should be able to check about any AD/AM instance (any domain) assuming I have permissions.
Active Directory (AD) and Active Directory Application Mode (AD/AM, now known as Active Directory Lightweight Directory Services or AD LDS) serve different purposes in a Windows environment. However, checking whether an AD or AD/AM (AD LDS) instance is running can generally be accomplished using similar methods, provid...
42,867
[ { "from": "human", "value": "I saw a link to find out if AD was running, but am not too sure if the same applies to AD/AM. \nOne caveat is that I should be able to check about any AD/AM instance (any domain) assuming I have permissions.\n" }, { "from": "gpt", "value": "Active Directory (AD) and ...
Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be. If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it all goes bang. So setting the maximum he...
In .NET, the memory management model is different from Java in several ways, including how it handles heap sizes. Here are the key points that contrast .NET's memory management with Java's: 1. **Heap Size Management**: - In .NET, the Common Language Runtime (CLR) does not allow you to directly set the maximum heap ...
40,656
[ { "from": "human", "value": "Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be. If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it ...
I am building an ObjectQuery like this: string query = "select value obj from Entities.Class as obj " + "where obj.Property = @Value"; ObjectQuery<Class> oQuery = new ObjectQuery<Class>(query, EntityContext.Instance); oQuery.Parameters.Add(new ObjectParameter("Value", som...
To count the number of objects returned by an `ObjectQuery` without forcing a materialization, you can indeed create a companion query that uses `Count()`. However, if you're looking for a more straightforward way, you can utilize the `Count` method on the `ObjectQuery` itself. Here's how you can do it: ### Using a ...
43,995
[ { "from": "human", "value": "I am building an ObjectQuery like this:\n string query = \"select value obj from Entities.Class as obj \" +\n \"where obj.Property = @Value\";\n\n ObjectQuery<Class> oQuery = new ObjectQuery<Class>(query, EntityContext.Instance);\n oQue...
I've got some data files that are stored compressed on our company's server with a .Z extension (UNIX compress utility used to zip them down). Can SQL Server's BULK IMPORT operation read these files in that format? Or must I uncompress them before getting at the data?
SQL Server's BULK INSERT operation does not natively support reading compressed files with a .Z extension or any other compressed format directly. The BULK INSERT command requires uncompressed data files to properly load the data into SQL Server. Therefore, you will need to uncompress the files before you can use the ...
45,203
[ { "from": "human", "value": "I've got some data files that are stored compressed on our company's server with a .Z extension (UNIX compress utility used to zip them down).\nCan SQL Server's BULK IMPORT operation read these files in that format? Or must I uncompress them before getting at the data?\n" }, ...
Are there any replacements for NUnitAsp that anyone knows of for testing ASP.NET pages?
Yes, there are several modern frameworks and tools that can be used as replacements for NUnitAsp for testing ASP.NET pages. While NUnitAsp was specifically designed for ASP.NET Web Forms, here are some alternatives that support various ASP.NET technologies: 1. **xUnit**: A popular and widely used testing framework for...
42,853
[ { "from": "human", "value": "Are there any replacements for NUnitAsp that anyone knows of for testing ASP.NET pages?\n" }, { "from": "gpt", "value": "Yes, there are several modern frameworks and tools that can be used as replacements for NUnitAsp for testing ASP.NET pages. While NUnitAsp was spe...
I'm having some trouble with a generic method I'm writing. It has the following signature; public static ThingCollection<T> GetThings<T>(...) where T : Thing There are several classes; ThingA, ThingB and ThingC that inherit from Thing; and I want to be able to have code something like this in the method. var things =...
The issue you're encountering arises from the fact that the type `T` could be any subclass of `Thing`, not necessarily `ThingA`, `ThingB`, or `ThingC`. While `ThingA`, `ThingB`, and `ThingC` inherit from `Thing`, C#'s type system requires that you cast these types directly to `T`, which it does not allow if `T` is not ...
40,409
[ { "from": "human", "value": "I'm having some trouble with a generic method I'm writing. It has the following signature;\npublic static ThingCollection<T> GetThings<T>(...) where T : Thing\n\nThere are several classes; ThingA, ThingB and ThingC that inherit from Thing; and I want to be able to have code som...
I have all my entities in a seperate project in my edmx file and I expose them to my client application using a WCF service. That means I don't have to give my client app a direct link to the project that contains the edmx file. That would be bad because it contines the object to query the database with. But only the e...
When designing a WCF service that exposes entities to a client application, you want to ensure that the client only has access to the necessary data without exposing the entire Entity Framework (EF) model or the underlying database structure. Here are some common strategies for handling this situation: ### 1. Data Tra...
41,062
[ { "from": "human", "value": "I have all my entities in a seperate project in my edmx file and I expose them to my client application using a WCF service.\nThat means I don't have to give my client app a direct link to the project that contains the edmx file. That would be bad because it contines the object ...
How do I clear the cin buffer in C++?
In C++, you can clear the `cin` buffer in a few different ways, depending on the situation. The `cin` buffer can become problematic especially when dealing with invalid input or when you want to ignore leftover characters in the input stream. Here are some common methods to clear the `cin` buffer: ### Method 1: Using ...
40,425
[ { "from": "human", "value": "How do I clear the cin buffer in C++?\n" }, { "from": "gpt", "value": "In C++, you can clear the `cin` buffer in a few different ways, depending on the situation. The `cin` buffer can become problematic especially when dealing with invalid input or when you want to i...
The main jQuery method takes a second optional argument to provide context for the search. eg $(".setA", ancestorOfSetsA); However, the jQuery add() method does not accept this context argument. What I am trying to accomplish is: $(".setA", ancestorOfSetsA).add(".setB", ancestorOfSetsB); I am attempting this through...
To achieve a scoped `add()` functionality in jQuery by combining two jQuery objects while maintaining their respective contexts, you can create a custom function or plugin. Since the `add()` method doesn't accept a context argument, you'll have to merge the two jQuery objects manually. Here's how you can combine two j...
42,751
[ { "from": "human", "value": "The main jQuery method takes a second optional argument to provide context for the search.\neg \n$(\".setA\", ancestorOfSetsA);\n\nHowever, the jQuery add() method does not accept this context argument. What I am trying to accomplish is:\n$(\".setA\", ancestorOfSetsA).add(\".set...
protected override void OnPaint(PaintEventArgs e) { e.Graphics.DrawImage(render, 400, 400); } This is the OnPaint of the Form1 class. The form has a listbox. The problem is with the render only showing partially when doing a resize on the form. Is the listbox somehow clipping it out? The listbox and the bitmap don...
When dealing with rendering issues in Windows Forms, particularly with custom drawings like your `DrawImage` implementation in the `OnPaint` method, there are a few things to consider that could help resolve the issue of the image being partially clipped or not appearing correctly during resizing. 1. **Double Bufferin...
42,507
[ { "from": "human", "value": "protected override void OnPaint(PaintEventArgs e)\n{\n e.Graphics.DrawImage(render, 400, 400);\n}\n\nThis is the OnPaint of the Form1 class. The form has a listbox. The problem is with the render only showing partially when doing a resize on the form. Is the listbox somehow c...
A common technique for storing a lot of files/blobs in a filesystem is to use a hash function to determine the filepath; eg hash(identifier) -> "o238455789" -> o23/8455/789 (there is often a hash-collision strategy too) Does this technique have a name (is it a 'pattern'?) so that I may find it with a search of ACM Digi...
The technique you are describing is commonly referred to as **"hashed file storage"** or **"content-addressable storage (CAS)."** This approach leverages hash functions to determine the file path or location of files based on their content, enabling efficient storage, retrieval, and deduplication of files. Here are so...
43,565
[ { "from": "human", "value": "A common technique for storing a lot of files/blobs in a filesystem is to use a hash function to determine the filepath; eg hash(identifier) -> \"o238455789\" -> o23/8455/789\n(there is often a hash-collision strategy too)\nDoes this technique have a name (is it a 'pattern'?) so...
Is it safe to use MS SQL's WITH (NOLOCK) option for select statements and insert statements if you never modify a row, but only insert or delete rows? I..e you never do an UPDATE to any of the rows.
Using the `WITH (NOLOCK)` table hint in SQL Server can be appealing because it allows you to perform a read operation without acquiring locks, which can lead to increased concurrency and performance in certain scenarios. However, it also comes with potential risks that you should consider, especially when it comes to d...
41,084
[ { "from": "human", "value": "Is it safe to use MS SQL's WITH (NOLOCK) option for select statements and insert statements if you never modify a row, but only insert or delete rows?\nI..e you never do an UPDATE to any of the rows.\n" }, { "from": "gpt", "value": "Using the `WITH (NOLOCK)` table hi...
Using Windows key as Meta is very useful in Emacs, is there the way to do it in Vim?
Yes, you can use the Windows key as a Meta key in Vim, but the approach may depend on your operating system and terminal emulator. Here are a few general steps to achieve this: ### On Windows (using a terminal) If you're using a terminal on Windows (like Windows Terminal or ConEmu), you can set up the Windows key as ...
42,903
[ { "from": "human", "value": "Using Windows key as Meta is very useful in Emacs, is there the way to do it in Vim?\n" }, { "from": "gpt", "value": "Yes, you can use the Windows key as a Meta key in Vim, but the approach may depend on your operating system and terminal emulator. Here are a few gen...
Good day, We just converted our web application .NET 1.1 to .NET 2.0. We have a major problem sending emails. We are using distribution group (eg: WebDeveloppersGroup) to send emails to all the developpers in the company. These groups don't end with '@ something.com'. These groups are created in Lotus Notes, and we c...
In .NET 2.0, the `MailMessage` class expects email addresses to be in a valid format, and it seems that the issue arises because the distribution groups you are using do not conform to a standard email format (i.e., they don't have a domain part). Here's a workaround that you can use to send emails to Lotus Notes grou...
42,927
[ { "from": "human", "value": "Good day, \nWe just converted our web application .NET 1.1 to .NET 2.0. We have a major problem sending emails.\nWe are using distribution group (eg: WebDeveloppersGroup) to send emails to all the developpers in the company. These groups don't end with '@ something.com'. These ...
Please consider the following example. Note that in the real-word, the binding source will likely be a data object. I'm using a TextBlock for simplicity. <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="...
In WPF, the behavior you're encountering is due to the way the binding works with `UpdateSourceTrigger` set to `LostFocus`. When you use an access key, such as Alt-S, the `TextBox` does not lose focus, and thus the binding does not update. To handle this situation and ensure that the latest value from the `TextBox` is...
41,250
[ { "from": "human", "value": "Please consider the following example. Note that in the real-word, the binding source will likely be a data object. I'm using a TextBlock for simplicity.\n<Window x:Class=\"Window1\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://s...
I have a JQueryDialog with a text field, an OK button and a cancel button. I want to be able to hit the enter key after filling in the text fields and have it do the same action as when I click the OK button.
To achieve the functionality where pressing the Enter key in a text field triggers the same action as clicking the OK button in a jQuery dialog, you can attach an event handler for the `keypress` event on the text field. When the Enter key (key code 13) is pressed, you can programmatically trigger the click event on th...
41,837
[ { "from": "human", "value": "I have a JQueryDialog with a text field, an OK button and a cancel button.\nI want to be able to hit the enter key after filling in the text fields and have it do the same action as when I click the OK button.\n" }, { "from": "gpt", "value": "To achieve the functiona...
I have currently more than 100 connections in Sleep state. Some connection must stay in Sleep state (and don't close) because it's permanent connection but some others (with a different user name) are from some php script and I want them to timeout very fast. Is it possible to setup a wait_timeout per user? and if yes,...
In MySQL, the `wait_timeout` and `interactive_timeout` settings control how long a connection can remain idle before being closed. However, these settings apply globally or per session, and there is no built-in feature that allows you to set `wait_timeout` specifically per user. That said, you can achieve similar beha...
42,898
[ { "from": "human", "value": "I have currently more than 100 connections in Sleep state.\nSome connection must stay in Sleep state (and don't close) because it's permanent connection but some others (with a different user name) are from some php script and I want them to timeout very fast.\nIs it possible to...
I really want to use SimpleDB, but I worry that without real locking and transactions the entire system is fatally flawed. I understand that for high-read/low-write apps it makes sense, since eventually the system becomes consistent, but what about that time in between? Seems like the right query in an inconsistent db ...
It's completely understandable to have concerns about using a database that doesn't offer traditional locking and transactions, especially if you're considering it for a write-heavy application or one that requires strict consistency. Here are some points to consider regarding SimpleDB (and similar eventually consisten...
42,648
[ { "from": "human", "value": "I really want to use SimpleDB, but I worry that without real locking and transactions the entire system is fatally flawed. I understand that for high-read/low-write apps it makes sense, since eventually the system becomes consistent, but what about that time in between? Seems li...
In Java, given a timestamp, how to reset the time part alone to 00:00:00 so that the timestamp represents the midnight of that particular day ? In T-SQL, this query will do to achieve the same, but I don't know how to do this in Java. SELECT CAST( FLOOR( CAST(GETDATE() AS FLOAT ) ) AS DATETIME) AS 'DateTimeAtMidnight';...
In Java, you can reset the time part of a `Timestamp` or `LocalDateTime` object to represent midnight of that particular day using the `LocalDate` and `LocalDateTime` classes from the `java.time` package. Here’s how you can do it: ### Using `LocalDateTime` If you're working with `LocalDateTime`, you can do the followi...
40,596
[ { "from": "human", "value": "In Java, given a timestamp, how to reset the time part alone to 00:00:00 so that the timestamp represents the midnight of that particular day ?\nIn T-SQL, this query will do to achieve the same, but I don't know how to do this in Java.\nSELECT CAST( FLOOR( CAST(GETDATE() AS FLOA...
I need to make subgroups in the top navigation menu, like: Home -Group --Subgroup alt text http://img300.imageshack.us/my.php?image=topnavigationmenudr4.png Is it possible? I can not make more than two levels!
Creating a multi-level dropdown navigation menu is definitely possible, but the exact implementation can depend on the framework or platform you’re using (e.g., HTML/CSS, JavaScript, a specific CMS like WordPress, etc.). Here's a basic example of how you can achieve a three-level navigation menu using HTML and CSS: ##...
39,919
[ { "from": "human", "value": "I need to make subgroups in the top navigation menu, like: \nHome\n-Group\n--Subgroup\nalt text http://img300.imageshack.us/my.php?image=topnavigationmenudr4.png\nIs it possible? I can not make more than two levels!\n" }, { "from": "gpt", "value": "Creating a multi-l...
Is there a way to turn off the automatic selection of the first row in the built-in DataGrid in Silverlight? We build a lot of functionality based off the user selecting a row in a data grid. The automatic firing of SelectionChanged when databinding or sorting is really causing us issues. We have tried to put some gu...
In Silverlight's DataGrid, it can be challenging to control the default behavior of row selection during data binding and sorting, especially in scenarios where the grid is not visible at the time of binding. By default, when the `ItemsSource` of the DataGrid is set or changed, the first row is automatically selected, ...
38,564
[ { "from": "human", "value": "Is there a way to turn off the automatic selection of the first row in the built-in DataGrid in Silverlight?\nWe build a lot of functionality based off the user selecting a row in a data grid. The automatic firing of SelectionChanged when databinding or sorting is really causin...
I am a newcomer to ASP, and would like to experiment with it by writing a website for a club at my school using .net 2008 and the mySql database available from the school's apache server. What is the best way to set this up, since I see a lot of options to connect the web app to SQL Server or Oracle databases, but I'm...
Welcome to ASP.NET and web development! It's great to hear that you're interested in building a website for your school club. Connecting to MySQL from an ASP.NET application is definitely possible, and there are some steps you can take to set everything up. ### Setting Up ASP.NET with MySQL 1. **Install MySQL Connect...
42,143
[ { "from": "human", "value": "I am a newcomer to ASP, and would like to experiment with it by writing a website for a club at my school using .net 2008 and the mySql database available from the school's apache server. What is the best way to set this up, since I see a lot of options to connect the web app t...
If you're running Apache Geronimo in production why did you choose it over other application servers and what are your experiences with running Geronimo in production? Can you also please share what servlet engine you decided to use (Tomcat/Jetty) and why you made this decision? UPDATE: So far this question got two up-...
Choosing an application server like Apache Geronimo for production use can depend on a variety of factors, including specific project requirements, team expertise, and the overall ecosystem of tools and libraries that complement the server. ### Reasons for Choosing Apache Geronimo: 1. **Java EE Compliance**: Apache G...
42,717
[ { "from": "human", "value": "If you're running Apache Geronimo in production why did you choose it over other application servers and what are your experiences with running Geronimo in production?\nCan you also please share what servlet engine you decided to use (Tomcat/Jetty) and why you made this decision...
All, So I've got all my select queries in LINQ-to-SQL converted to using CompiledQueries to speed things up. Works great so far for select statements, but I haven't been able to figure out how to pre-compile insert, update, or delete statements. Granted, when you're inserting, deleting or updating in LINQ-to-SQL, you ...
In LINQ to SQL, the performance benefits of using CompiledQueries are primarily noticeable for select queries, as they generate a SQL query that can be reused without the overhead of building the query tree each time. However, for insert, update, and delete operations, LINQ to SQL operates a bit differently because it ...
43,123
[ { "from": "human", "value": "All,\nSo I've got all my select queries in LINQ-to-SQL converted to using CompiledQueries to speed things up. Works great so far for select statements, but I haven't been able to figure out how to pre-compile insert, update, or delete statements.\nGranted, when you're inserting...
A while back I asked about instantiating a HttpContext object. Now that I have learnt what I didn't know, what confuses me is that you cannot say HttpContext ctx = new HttpContext(); because the object does not have a constructor. But doesn't every class need a constructor? In C#, if you don't provide one, the compiler...
You're right in your observations, and you have raised some good questions about how constructors, classes, and type conversions work in C#. Let's break down your points one by one. ### 1. HttpContext and Constructors In C#, every class does indeed have a constructor, even if you don't explicitly define one. If you d...
41,394
[ { "from": "human", "value": "A while back I asked about instantiating a HttpContext object. Now that I have learnt what I didn't know, what confuses me is that you cannot say HttpContext ctx = new HttpContext(); because the object does not have a constructor.\nBut doesn't every class need a constructor? In ...
I am trying to see what are the gotchas in using XmlHttpWebRequest such that it works for Safari, Firefox and IE?
When using `XmlHttpRequest` (often referred to as XHR) for making HTTP requests in web applications, there are several "gotchas" or potential pitfalls you should be aware of, especially considering cross-browser compatibility with browsers like Safari, Firefox, and Internet Explorer (IE). Here are some common issues an...
39,573
[ { "from": "human", "value": "I am trying to see what are the gotchas in using XmlHttpWebRequest such that it works for Safari, Firefox and IE?\n" }, { "from": "gpt", "value": "When using `XmlHttpRequest` (often referred to as XHR) for making HTTP requests in web applications, there are several \...
So from what little I understand about packaging for Macs, I see that the actual program that launches is the one defined under the CFBundleExecutable key in Info.plist. <key>CFBundleExecutable</key> <string>JavaApplicationStub</string> Now, my app doesnt work if /APP/Content/MacOS/JavaApplicationStub is not chmodded ...
You're correct that the executable permissions are essential for a macOS application to run properly. The issue you are facing, where the `JavaApplicationStub` needs to be executable, is a common one when distributing applications in formats that do not preserve Unix-style file permissions, such as ZIP files, FAT32 USB...
41,231
[ { "from": "human", "value": "So from what little I understand about packaging for Macs, I see that the actual program that launches is the one defined under the CFBundleExecutable key in Info.plist.\n<key>CFBundleExecutable</key>\n<string>JavaApplicationStub</string>\n\nNow, my app doesnt work if /APP/Conte...
I need to use different database connection strings and SMTP server addresses in my ASP.NET application, depending on where it is run, in development or production environment. The application reads settings from Web.config file via WebConfigurationManager.AppSettings property. I use Build/Publish command to deploy the...
Yes, you can definitely simplify your deployment process in ASP.NET when dealing with different configurations for development and production environments. Here are a few approaches you can use to manage different settings more efficiently without needing to manually replace the `Web.config` file each time you deploy: ...
37,323
[ { "from": "human", "value": "I need to use different database connection strings and SMTP server addresses in my ASP.NET application, depending on where it is run, in development or production environment.\nThe application reads settings from Web.config file via WebConfigurationManager.AppSettings property....
Can breakpoints be used in interrupt service routines (ISRs)?
Yes, breakpoints can be used in Interrupt Service Routines (ISRs) while debugging, but there are some considerations and potential caveats to keep in mind: 1. **Context Switching**: When a breakpoint is hit in an ISR, it can disrupt the normal flow of the program. This can potentially lead to issues, especially if the...
44,352
[ { "from": "human", "value": "Can breakpoints be used in interrupt service routines (ISRs)?\n" }, { "from": "gpt", "value": "Yes, breakpoints can be used in Interrupt Service Routines (ISRs) while debugging, but there are some considerations and potential caveats to keep in mind:\n\n1. **Context ...
Specifically, once I get the WCAG Anaylsis warnings for a website into my warnings window I can't get rid of them, until I close down studio. When building another project in the same solution they stay there. Anyone got any ideas?
It sounds like you're experiencing an issue with the WCAG (Web Content Accessibility Guidelines) Analysis warnings in your development environment, possibly in Visual Studio or another IDE. Here are some steps you can take to troubleshoot and potentially resolve the issue: 1. **Refresh the Warnings Window**: Sometimes...
42,345
[ { "from": "human", "value": "Specifically, once I get the WCAG Anaylsis warnings for a website into my warnings window I can't get rid of them, until I close down studio. When building another project in the same solution they stay there.\nAnyone got any ideas?\n" }, { "from": "gpt", "value": "I...
I am pretty new to the Unity Application Block and am a little stuck trying to implement the following. I have a parent and child container. When i resolve a new instance of the child container i want to inject a new UnityContainer into the constructor using the CreateChildContainer method. public class RootContainer...
To achieve the desired functionality of injecting a new child container into the constructor of your `ChildContainer` class using Unity, you can modify your implementation a bit. Here’s a step-by-step guide on how to properly set this up: 1. **Create a Child Container in the Parent**: When you resolve the `ChildContai...
43,551
[ { "from": "human", "value": "I am pretty new to the Unity Application Block and am a little stuck trying to implement the following. I have a parent and child container. When i resolve a new instance of the child container i want to inject a new UnityContainer into the constructor using the CreateChildCon...
DataGridView, for example, lets you do this: DataGridView dgv = ...; DataGridViewCell cell = dgv[1,5]; but for the life of me I can't find the documentation on the index/square-bracket operator. What do they call it? Where is it implemented? Can it throw? How can I do the same thing in my own classes? ETA: Thanks ...
In C#, the square-bracket operator you are referring to is called an **indexer**. Indexers allow instances of a class or struct to be indexed just like arrays. The implementation of an indexer involves defining a property with the `this` keyword. ### How to Implement an Indexer To create an indexer in your own class,...
43,066
[ { "from": "human", "value": "DataGridView, for example, lets you do this:\nDataGridView dgv = ...;\nDataGridViewCell cell = dgv[1,5];\n\nbut for the life of me I can't find the documentation on the index/square-bracket operator. What do they call it? Where is it implemented? Can it throw? How can I do t...
I need help finding resources that would help me or at least point me in the right direction in building a Flash media server/PHP application. I basically want to improve my current application by instead of progressive download using flash media server so that the videos will not only stream well but they can't be dow...
Building an application that utilizes Flash Media Server (FMS) in conjunction with PHP for streaming videos can be a bit of a challenge, especially considering the decline in the use of Flash technology. However, if you're looking for guidance on how to integrate PHP with FMS for video streaming, here are some resource...
37,259
[ { "from": "human", "value": "I need help finding resources that would help me or at least point me in the right direction in building a Flash media server/PHP application. I basically want to improve my current application by instead of progressive download using flash media server so that the videos will n...
In a webservice I see this code: <WebMethod()> _ Public Function dosomething() As Boolean Try If successful Then Return True Else Return False End If Catch ex As Exception Throw ex End Try End Function What's the point of catching the exception and ju...
You're correct in observing that catching an exception and then immediately rethrowing it without any additional handling doesn't provide any benefit. In this specific code snippet, if an exception occurs, it will be caught and thrown again without modification, which doesn't change the exception in any way. The purp...
42,364
[ { "from": "human", "value": "In a webservice I see this code:\n<WebMethod()> _\nPublic Function dosomething() As Boolean\n Try\n If successful Then\n Return True\n Else\n Return False\n End If\n Catch ex As Exception\n Throw ex\n End Try\nEnd Functi...
I am currently migrating one of my clients sites to a windows server 2008 and SQL 2008 setup, but I am having massive problems with connecting to the database from the site. I have restored the database from a SQL 2k backup into the SQL 2008 server, I have setup the user correctly and can login as that user in manageme...
It sounds like you are experiencing a frustrating issue with connecting your ASP application to SQL Server 2008. Here are some potential solutions and troubleshooting steps you can consider: ### 1. **Authentication Mode** Ensure that SQL Server is set to allow both SQL Server and Windows Authentication (Mixed Mode)...
41,121
[ { "from": "human", "value": "I am currently migrating one of my clients sites to a windows server 2008 and SQL 2008 setup, but I am having massive problems with connecting to the database from the site.\nI have restored the database from a SQL 2k backup into the SQL 2008 server, I have setup the user correc...
I am getting the following error while installing the IBMWebsphere Studio Application Developer 5.1.2 in WinXP Pro. " The installation of WebSphere Studio cannot continue because the following required parts are missing from the electronic images. Download the required parts and run the installation program again. C571...
The error message you're encountering indicates that the installation program is unable to find a required file named `C571ILML.bin`, which is likely part of the IBM WebSphere Studio Application Developer package. Here are some steps to help troubleshoot and resolve this issue: 1. **Check Image Files**: Ensure that al...
40,937
[ { "from": "human", "value": "I am getting the following error while installing the IBMWebsphere Studio Application Developer 5.1.2 in WinXP Pro.\n\" The installation of WebSphere Studio cannot continue because the following required parts are missing from the electronic images. Download the required parts a...
I am working on a big C++ project. It is building using single Ant script which makes possible to compile the same source targeting more than one platform and compiler. But, I have to work only for Windows platform and Visual Studio 2005 C++ compiler. It would be really nice if I could write code and compile in Visual ...
Converting an Ant script to Nant can be quite challenging because, although both are build tools, they have different syntax and functionality. Here are some suggestions to transition your C++ project to use Visual Studio while minimizing disruption: ### 1. Understanding the Structure of Your Ant Build Script Before ...
41,752
[ { "from": "human", "value": "I am working on a big C++ project. It is building using single Ant script which makes possible to compile the same source targeting more than one platform and compiler.\nBut, I have to work only for Windows platform and Visual Studio 2005 C++ compiler. It would be really nice if...
I have an element with an onclick method. I would like to activate that method (or: fake a click on this element) within another function. Is this possible?
Yes, it is possible to programmatically trigger a click event on an element in JavaScript. You can do this using the `click()` method on the DOM element. Here’s a simple example to demonstrate how to activate the `onclick` method of an element from another function: ### HTML ```html <button id="myButton" onclick="butt...
44,356
[ { "from": "human", "value": "I have an element with an onclick method.\nI would like to activate that method (or: fake a click on this element) within another function.\nIs this possible?\n" }, { "from": "gpt", "value": "Yes, it is possible to programmatically trigger a click event on an element...
Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring MVC for the web tier, Spring for the "Service"/business-logic-layer and an ORM mapper such as Hibernate for persistence. What is the equivalent in .NET? I guess ASP.NET is used for the web tier and ADO.NET for persistence but wh...
In the .NET ecosystem, the equivalent components and frameworks that align with what you're describing for a Java web project with an MVC framework, service layer, and ORM would be as follows: 1. **Web Tier**: - **ASP.NET Core MVC**: This is the most commonly used framework for building web applications in .NET. I...
41,459
[ { "from": "human", "value": "Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring MVC for the web tier, Spring for the \"Service\"/business-logic-layer and an ORM mapper such as Hibernate for persistence. What is the equivalent in .NET? \nI guess ASP.NET is used for the...
I have a handle that fires when the ItemAdd event is triggered on the Sent Items folder in outlook. This handle prompts the user and depending on their selection then opens a custom windows form to save the sent email. Now ... heres what happens ... The prompt shows fine when an item is placed into the Sent Items fold...
Hi Stuv, What you are experiencing seems to be related to the interaction between the ItemAdd event and the way the Windows Forms are being displayed in your add-in. The issue may stem from the fact that showing a modal form (which it sounds like you are doing) can inadvertently affect the event handling in Outlook, e...
40,908
[ { "from": "human", "value": "I have a handle that fires when the ItemAdd event is triggered on the Sent Items folder in outlook. This handle prompts the user and depending on their selection then opens a custom windows form to save the sent email.\nNow ... heres what happens ...\n\nThe prompt shows fine whe...
I'm currently creating a WinForm in VB.NET bound to an access database. Basically what i have are two forms: one is a search form used to search the database, and the other is a details form. You run a search on the searchForm and it returns a list of Primary Keys and a few other identifying values. You then double cli...
To update the changes made to the controls on your details form back to the Access database, you need to ensure a couple of steps are followed properly. Since you're already using data binding, the process should be straightforward, but there are some details to clarify. 1. **Ensure You Modify the Data Source Directly...
41,793
[ { "from": "human", "value": "I'm currently creating a WinForm in VB.NET bound to an access database.\nBasically what i have are two forms: one is a search form used to search the database, and the other is a details form. You run a search on the searchForm and it returns a list of Primary Keys and a few oth...
I'm trying to find out how much memory my objects take to see how many of them are ending up on the Large Object Heap (which is anything over 85,000 bytes). Is it as simple as adding 4 for an int, 8 for a long, 4 (or 8 if you're on 64 bit) for any reference types etc for each object, or are there overheads for methods,...
When trying to determine the memory footprint of objects in .NET, there are several factors to consider. The size of an object in memory isn't just a matter of adding up the sizes of its fields; there is also overhead associated with object headers and potentially alignment. ### 1. **Object Overhead**: In .NET, every ...
38,934
[ { "from": "human", "value": "I'm trying to find out how much memory my objects take to see how many of them are ending up on the Large Object Heap (which is anything over 85,000 bytes).\nIs it as simple as adding 4 for an int, 8 for a long, 4 (or 8 if you're on 64 bit) for any reference types etc for each o...
I am working on a project where I need to create a boundary around a group of rectangles. Let's use this picture as an example of what I want to accomplish. EDIT: Couldn't get the image tag to work properly, so here is the full link: http://www.flickr.com/photos/21093416@N04/3029621742/ We have rectangles A and C who ...
Creating a boundary around a collection of rectangles (nodes) linked by edges can be conceptualized similarly to finding the convex hull of a set of points in computational geometry. Here are some steps and tips to help you calculate the boundary around your rectangles: ### Step-by-Step Approach 1. **Extract Vertices...
40,416
[ { "from": "human", "value": "I am working on a project where I need to create a boundary around a group of rectangles.\nLet's use this picture as an example of what I want to accomplish.\nEDIT: Couldn't get the image tag to work properly, so here is the full link:\nhttp://www.flickr.com/photos/21093416@N04/...
I wrote a DLL in .NET and I want to access it in VBScript. I don't want to add it to the assembly directory. Is there a way to point too the DLL and create an instance of it?
Yes, you can access a .NET DLL from VBScript without needing to place it in the Global Assembly Cache (GAC) or the assembly directory, by registering the DLL as a COM object. To do this, you'll typically need to ensure your .NET assembly is COM-visible and then use regasm to register it. Here's how you can do it step-b...
42,009
[ { "from": "human", "value": "I wrote a DLL in .NET and I want to access it in VBScript. I don't want to add it to the assembly directory. \nIs there a way to point too the DLL and create an instance of it?\n" }, { "from": "gpt", "value": "Yes, you can access a .NET DLL from VBScript without need...
As Scott Myers wrote, you can take advantage of a relaxation in C++'s type-system to declare clone() to return a pointer to the actual type being declared: class Base { virtual Base* clone() const = 0; }; class Derived : public Base { virtual Derived* clone() const }; The compiler detects that clone() returns...
You're correct that C++'s type system and the behavior of smart pointers can lead to issues when trying to implement polymorphic clone functionality while retaining strong type safety and ownership semantics. Let's discuss your options and provide some potential solutions. ### Option 1: Dumb Pointer Returning a raw p...
40,618
[ { "from": "human", "value": "As Scott Myers wrote, you can take advantage of a relaxation in C++'s type-system to declare clone() to return a pointer to the actual type being declared:\nclass Base\n{\n virtual Base* clone() const = 0;\n};\n\nclass Derived : public Base\n{\n virtual Derived* clone() co...
The grid display all information correctly, In the event dataGridView1cellFormatting I change the backcolor depending of the object under the line value. This works too. The last event that I have on my grid is the dataGridView1_CellPainting that check if it's the header to add an icon. Everything is fine until I try t...
To remove the highlighting effect of the selected row in a `DataGridView`, you can customize the behavior by overriding the default selection colors and ensuring that the default selection properties of the `DataGridView` do not apply. Here’s a general approach to achieve this in your WinForms application: 1. **Set D...
41,360
[ { "from": "human", "value": "The grid display all information correctly, In the event dataGridView1cellFormatting I change the backcolor depending of the object under the line value. This works too. The last event that I have on my grid is the dataGridView1_CellPainting that check if it's the header to add ...
Is there a neat archiving library that automatically handles archiving a folder or directories for you out there? I am using Jython, so Java libs are also open for use. -UPDATE- Also Im looking for timestamp archiving. ie archive-dir/2008/11/16/zipfilebypreference.zip then the next day call it again and it creates ano...
For your requirement of archiving folders with timestamps in Jython, you can leverage Java libraries that deal with file archiving and also incorporate the timestamp functionality. Here are a few suggestions: ### 1. **Apache Commons Compress** Apache Commons Compress is a Java library that supports various archive for...
38,643
[ { "from": "human", "value": "Is there a neat archiving library that automatically handles archiving a folder or directories for you out there?\nI am using Jython, so Java libs are also open for use.\n-UPDATE-\nAlso Im looking for timestamp archiving. ie \narchive-dir/2008/11/16/zipfilebypreference.zip\nthen...
I've just started building a prototype application in Django. I started out by working through the Django app tutorial on the Django site which was pretty helpful, and gave me what I needed to get started. Now I have a couple of what I hope are very simple questions: I want to put a loop into views.py, looping over a s...
You’re on the right track with your Django application! Let’s address your two main questions: looping over form data in `views.py` and generating your `<select>` options dynamically in the template. ### 1. Looping over POST data in `views.py` When you submit your form, Django will populate `request.POST` with all th...
39,809
[ { "from": "human", "value": "I've just started building a prototype application in Django. I started out by working through the Django app tutorial on the Django site which was pretty helpful, and gave me what I needed to get started. Now I have a couple of what I hope are very simple questions:\nI want to ...
I am trying to do a file upload from gwt-ext without bringing up the dialog box. To do this, I created a FormPanel and added the appropriate fields to it. Then did a form.submit(). This doesn't seem to work. Any idea why? The code is shown below. final FormPanel uploadForm = new FormPanel(); uploadForm.setVisible(false...
It looks like you're trying to perform a file upload using GWT-EXT's `FormPanel`, but you're facing issues with submitting the form programmatically without showing the file dialog. Unfortunately, due to browser security policies, modern browsers do not allow programmatic file uploads without user interaction through a...
41,442
[ { "from": "human", "value": "I am trying to do a file upload from gwt-ext without bringing up the dialog box. To do this, I created a FormPanel and added the appropriate fields to it. Then did a form.submit(). This doesn't seem to work. Any idea why? The code is shown below.\nfinal FormPanel uploadForm = ne...
I've seen (and used) code to have a link spawn a javascript action many times in my life, but I've never come to a firm conclusion on if the href attribute should be blank or #. Do you have any preference one way or the other, and if so, why? <a href="" onclick="javascript: DoSomething();">linky</a> or <a href="#" on...
When deciding between using an empty `href` attribute (`href=""`) and using `href="#"` in an anchor (`<a>`) tag for JavaScript actions, both approaches have their pros and cons. However, best practices and accessibility considerations generally favor one over the other. ### `href=""` **Pros:** - It doesn’t create a s...
42,644
[ { "from": "human", "value": "I've seen (and used) code to have a link spawn a javascript action many times in my life, but I've never come to a firm conclusion on if the href attribute should be blank or #. Do you have any preference one way or the other, and if so, why?\n<a href=\"\" onclick=\"javascript:...
I've created a windows form control which works successfully hosted in Internet Explorer. I'd like to give it an event and be able to respond to the event through javascript. I found a link that talks about it here. It shows me how to create the interfaces but I'm not sure how to fire the event from my control? He...
To fire events from your Windows Forms control and ensure they are properly handled in JavaScript, you need to raise the events in your control. Here's how you can do it. 1. **Declare the events in your control.** 2. **Implement a mechanism to raise those events when appropriate.** 3. **Ensure the control is registere...
42,303
[ { "from": "human", "value": "I've created a windows form control which works successfully hosted in Internet Explorer. I'd like to give it an event and be able to respond to the event through javascript. I found a link that talks about it here. It shows me how to create the interfaces but I'm not sure ho...
Very odd problem as this is working perfectly on our old Classic ASP site. We are basically querying the database and exporting around 2200 lines of text to a Text File through Response.Write to be output to a dialog box and allows the user to save the file. Response.Clear() Response.ClearContent() Resp...
The issue you're facing, where exporting to a text file hangs on your development site but works fine on your local machine, can be attributed to several factors. Here are some common issues to check and potential solutions to improve performance: 1. **Network Latency**: If your development environment is running on a...
41,446
[ { "from": "human", "value": "Very odd problem as this is working perfectly on our old Classic ASP site. We are basically querying the database and exporting around 2200 lines of text to a Text File through Response.Write to be output to a dialog box and allows the user to save the file.\nResponse.Clear()\n ...
I am working on turbo C on windows where char takes one byte.Now my problem is with the below union. union a { unsigned char c:2; }b; void main() { printf("%d",sizeof(b)); \\or even sizeof(union a) } This program is printing output as 2 where as union should be taking only 1 byte. Why is it so? for struct it is fine...
In your code, you're using a union with a bit field, and you expect the size of the union to be 1 byte. However, you're observing that the size is 2 bytes. Here’s a detailed explanation of what's happening: ### Explanation of Union Size 1. **Union Basics**: A union in C is a data structure that can hold different typ...
40,466
[ { "from": "human", "value": "I am working on turbo C on windows where char takes one byte.Now my problem is with the below union.\nunion a\n{\n unsigned char c:2;\n}b;\nvoid main()\n{\nprintf(\"%d\",sizeof(b)); \\\\or even sizeof(union a)\n}\n\nThis program is printing output as 2 where as union should be ...
Published Date returned from Twitter Search API Atom Feed as 2008-11-03T21:30:06Z which needs to be converted to "X seconds/minutes/hours/days ago" for showing how long ago twitter messages were posted. Think this can be done with php date() function using DATE_ATOM value?
Yes, you can convert the published date returned from the Twitter Search API Atom Feed (in the format `2008-11-03T21:30:06Z`) to a relative time format like "X seconds/minutes/hours/days ago" using PHP. The `date()` function is not directly used for this purpose, but you can utilize PHP's `DateTime` and `DateInterval` ...
42,237
[ { "from": "human", "value": "Published Date returned from Twitter Search API Atom Feed as 2008-11-03T21:30:06Z which needs to be converted to \"X seconds/minutes/hours/days ago\" for showing how long ago twitter messages were posted.\nThink this can be done with php date() function using DATE_ATOM value?\n"...
I'm looking for a open source .Net HTTP proxy library. Basically I want to develop something like Fiddler (so much lighter with less features).
If you're looking for an open-source .NET HTTP proxy library to create something similar to Fiddler but with a lighter footprint, there are a few options available. Here are some libraries that you can consider: 1. **Titanium Web Proxy**: - **GitHub**: [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-...
37,694
[ { "from": "human", "value": "I'm looking for a open source .Net HTTP proxy library. Basically I want to develop something like Fiddler (so much lighter with less features).\n" }, { "from": "gpt", "value": "If you're looking for an open-source .NET HTTP proxy library to create something similar t...
I have this function in my head: <head> window.onload = function(){ var x = new Array(0,2,3,4,5,6,7,8); var y = new Array(20,10,40,30,60,50,70,10); drawGraph(y,x); } </head> Can I declare the function drawGraph() somewhere in the body? Do I need to declare it before it is calle...
In JavaScript, you can define functions in different ways, and how you declare them can affect when they are available for use. Here's a breakdown of your options and how it applies to your situation: ### Function Declaration If you declare the function using a function declaration (using the `function` keyword), you ...
42,558
[ { "from": "human", "value": "I have this function in my head:\n<head>\n window.onload = function(){\n var x = new Array(0,2,3,4,5,6,7,8);\n var y = new Array(20,10,40,30,60,50,70,10); \n drawGraph(y,x);\n }\n</head>\n\nCan I declare the function drawGraph() somewhere in th...
I need to access the bluetooth network interface from Java. All local network interfaces can be reached via: Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); This enumeration will contain ethernet cards, usb networking devices etc and I need to retrieve the bluetooth network interfac...
Accessing the Bluetooth network interface in Java can indeed be challenging, as the standard Java Networking API does not provide a dedicated way to interact specifically with Bluetooth devices. However, you can still identify Bluetooth interfaces by examining their properties more reliably than just using the display ...
41,497
[ { "from": "human", "value": "I need to access the bluetooth network interface from Java. All local network interfaces can be reached via:\nEnumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();\n\nThis enumeration will contain ethernet cards, usb networking devices etc and I nee...
I have a code igniter project, and I wanted to try debugging it using Zend Studio. WHen I start debugging, I immediately run ino "The URI you submitted has disallowed characters." Does anyone have any idea?
The error message "The URI you submitted has disallowed characters" in CodeIgniter indicates that the framework is rejecting the request because it contains characters that are not allowed as per the configuration settings. This typically relates to the `config.php` settings regarding the URI protocol and allowed chara...
42,807
[ { "from": "human", "value": "I have a code igniter project, and I wanted to try debugging it using Zend Studio. WHen I start debugging, I immediately run ino\n\"The URI you submitted has disallowed characters.\"\nDoes anyone have any idea?\n" }, { "from": "gpt", "value": "The error message \"The...
I have a couple of tables in my database, one called Task, and another called User. The Task table has two columns CreatedBy and ModifiedBy that map to the UserId column in the User table. I want to add the User table to the dbml file and add the associations. I notice now that when I look at class I have two propert...
In your scenario, you have a `Task` table with `CreatedBy` and `ModifiedBy` columns that reference the `User` table. When you map these relationships in the DBML (LINQ to SQL), the generated classes will automatically include two navigation properties, which are usually named based on the table name (e.g., `User` and `...
43,173
[ { "from": "human", "value": "I have a couple of tables in my database, one called Task, and another called User. The Task table has two columns CreatedBy and ModifiedBy that map to the UserId column in the User table.\nI want to add the User table to the dbml file and add the associations. I notice now th...
What internal web service did your company implement first? What did you learn?
As an AI language model, I don't have personal experiences or a company. However, I can provide a general example based on common industry practices. Many companies start their internal web service implementation with a simple internal documentation platform or a project management tool. ### Example: Implementation ...
42,798
[ { "from": "human", "value": "What internal web service did your company implement first? What did you learn?\n" }, { "from": "gpt", "value": "As an AI language model, I don't have personal experiences or a company. However, I can provide a general example based on common industry practices.\n\nM...
Are the formulas represented in a syntax tree then recalculated using a design pattern like the Visitor pattern? How would you go about reproducing the recalculation process in code?
Yes, representing formulas in a syntax tree and using a design pattern like the Visitor pattern is a common approach in many programming scenarios, especially in expression evaluation and interpretation contexts. This allows you to represent mathematical expressions in a structured way and facilitates operations on the...
37,553
[ { "from": "human", "value": "Are the formulas represented in a syntax tree then recalculated using a design pattern like the Visitor pattern? How would you go about reproducing the recalculation process in code?\n" }, { "from": "gpt", "value": "Yes, representing formulas in a syntax tree and usi...
Can any body tell me the differences between them?
Of course! However, I'll need a bit more information about what specific topics or subjects you would like me to compare. Are you asking about differences between two concepts, items, individuals, or something else? Please provide more details so I can assist you effectively.
45,590
[ { "from": "human", "value": "Can any body tell me the differences between them?\n" }, { "from": "gpt", "value": "Of course! However, I'll need a bit more information about what specific topics or subjects you would like me to compare. Are you asking about differences between two concepts, items,...
Is it architecturally sound to use Rails and Oracle? My concern is that Oracle would be too "heavy and hi-end" for Rails. Any thoughts? Thanks.
Using Ruby on Rails with Oracle is technically feasible, and many organizations do it successfully. However, there are several considerations to keep in mind when evaluating if this combination is architecturally sound for your specific project: ### Advantages of Using Rails with Oracle: 1. **Database Compatibility**...
42,624
[ { "from": "human", "value": "Is it architecturally sound to use Rails and Oracle?\nMy concern is that Oracle would be too \"heavy and hi-end\" for Rails.\nAny thoughts?\nThanks.\n" }, { "from": "gpt", "value": "Using Ruby on Rails with Oracle is technically feasible, and many organizations do it...
I've got a couple django models that look like this: from django.contrib.sites.models import Site class Photo(models.Model): title = models.CharField(max_length=100) site = models.ForeignKey(Site) file = models.ImageField(upload_to=get_site_profile_path) def __unicode__(self): return self.tit...
To achieve the desired functionality of filtering `Photo` objects in the Django admin based on the site associated with a `Gallery`, you'll need to utilize a custom `ModelAdmin` for the `Gallery` model. The `limit_choices_to` you have specified in the `ManyToManyField` is evaluated at the model level and does not have ...
42,270
[ { "from": "human", "value": "I've got a couple django models that look like this:\nfrom django.contrib.sites.models import Site\n\nclass Photo(models.Model):\n title = models.CharField(max_length=100)\n site = models.ForeignKey(Site)\n file = models.ImageField(upload_to=get_site_profile_path) \n\n ...
I'm trying to use some extension methods that I use to apply consistent formatting to DateTime and Int32 - which works absolutely fine in code behind, but I'm having issues with databinding. I get: 'System.DateTime' does not contain a definition for 'ToCustomShortDate' for <%# ((ProductionDetails)Container.DataItem).S...
The issue you are encountering stems from the fact that extension methods must be explicitly referenced in a certain way when you're using them in data-binding expressions within ASP.NET Web Forms. Specifically, the ASP.NET page runtime does not automatically recognize extension methods in data-binding expressions, eve...
40,888
[ { "from": "human", "value": "I'm trying to use some extension methods that I use to apply consistent formatting to DateTime and Int32 - which works absolutely fine in code behind, but I'm having issues with databinding.\nI get:\n'System.DateTime' does not contain a definition for 'ToCustomShortDate'\n\nfor\...
Am looking for checkpointing library for C#. Any ideas ? see http://en.wikipedia.org/wiki/Application_checkpointing
Checkpointing is a process of saving the state of an application so that it can be resumed later, typically in case of failure or crash. In the context of C#, there are several libraries and techniques you can consider for implementing checkpointing in your applications: 1. **Serialization**: - You can use .NET's b...
41,169
[ { "from": "human", "value": "Am looking for checkpointing library for C#. Any ideas ?\nsee http://en.wikipedia.org/wiki/Application_checkpointing\n" }, { "from": "gpt", "value": "Checkpointing is a process of saving the state of an application so that it can be resumed later, typically in case ...
I am trying to do some prime factorisation with my VBA excel and I am hitting the limit of the long data type - Runtime Error 6 Overflow Is there any way to get around this and still stay within VBA? I am aware that the obvious one would be to use another more appropriate programming language. Lance's solution wor...
In VBA, the `Long` data type is limited to a maximum value of 2,147,483,647. If you're working with numbers larger than this, you'll need to use the `Currency` data type, which can handle values up to 922 trillion, or the `Decimal` type. However, VBA doesn't have built-in support for arbitrarily large integers like som...
41,317
[ { "from": "human", "value": "I am trying to do some prime factorisation with my VBA excel and I am hitting the limit of the long data type - \n\nRuntime Error 6 Overflow \n\nIs there any way to get around this and still stay within VBA? I am aware that the obvious one would be to use another more appropriat...
I've got text in a form of [1/12/2008 2:32:11 p.m. - name] line 1 [1/12/2008 2:36:00 p.m. - name] - PRIVATE line 2 [some text] sd [1/12/2008 2:36:00 p.m. - name] line 3 which i want to split into items so i have access to time, name and text of each item, e.g.: (item 1) 1: 1/12/2008 2:32:11 p.m. 2: name 3: line...
To achieve the desired splitting of your text into items with regex, you can use a slightly different approach. The goal is to capture the date, name, and text accurately. Here's a regex pattern that should help you achieve your desired result: ```regex \[(\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2} [ap]{1}\.m\.?) - ([\...
40,242
[ { "from": "human", "value": "I've got text in a form of\n[1/12/2008 2:32:11 p.m. - name]\nline 1\n[1/12/2008 2:36:00 p.m. - name] - PRIVATE\nline 2 [some text] sd\n[1/12/2008 2:36:00 p.m. - name]\nline 3\n\nwhich i want to split into items so i have access to time, name and text of each item, \ne.g.:\n(item...
I've got a 1-based array of four items which I need to traverse. For a given index in the array, I need to work out the index of the next item, and the index of the previous item. This sounds simple but the array needs to wrap around. So when you are at the beginning of the array, the previous item is considered to be ...
Yes, you can calculate the index of the previous item in a 1-based array with wrap-around behavior using a mathematical expression similar to the one you provided for the next item. For the previous item, you can use the following formula: ```plaintext PreviousItem = (CurrentItem - 2 + 4) Mod 4 + 1 ``` Here's how it...
36,566
[ { "from": "human", "value": "I've got a 1-based array of four items which I need to traverse. For a given index in the array, I need to work out the index of the next item, and the index of the previous item. This sounds simple but the array needs to wrap around. So when you are at the beginning of the arra...
We have cases wherein we write a lot of log files to the host increasing the i/o on a host. Are there any good open source logging over the wire solutions. The application language is C++ on Red Hat Linux 3.
When dealing with high I/O logging in an application, it's often beneficial to offload logging from the host to a dedicated logging service or server. This can help reduce I/O contention on the host and centralize log management. Here are several open-source solutions that can help with logging over the wire, particula...
39,451
[ { "from": "human", "value": "We have cases wherein we write a lot of log files to the host increasing the i/o on a host. Are there any good open source logging over the wire solutions.\nThe application language is C++ on Red Hat Linux 3.\n" }, { "from": "gpt", "value": "When dealing with high I/...