instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm sure there are different approaches to this problem, and I can think of some. But I'd like to hear other people's opinion on this. To be more specific I've built a widget that allows users to choose their location from a google maps map. This widget is displayed on demand and will probably be used every 1 out of 10...
To optimize the loading of the Google Maps JavaScript API for your widget, you can use a lazy-loading approach. This means loading the API only when the user interacts with the widget, rather than on every page load. Here are a few strategies you can consider: ### 1. Load the Script Dynamically Instead of including t...
37,058
[ { "from": "human", "value": "I'm sure there are different approaches to this problem, and I can think of some. But I'd like to hear other people's opinion on this. To be more specific I've built a widget that allows users to choose their location from a google maps map. This widget is displayed on demand an...
Background I am working on a legacy small-business automation system (inventory, sales, procurement, etc.) that has a single database hosted by SQL Server 2005 and a bunch of client applications. The main client (used by all users) is an MS Access 2003 application (ADP), and other clients include various VB/VBA applica...
Your proposal to use "wrapper" views for all tables in your legacy small-business automation system does indeed present several compelling benefits in terms of maintainability, abstraction, and flexibility. However, as you've identified, there are also several considerations and potential pitfalls to keep in mind. Belo...
36,285
[ { "from": "human", "value": "Background\nI am working on a legacy small-business automation system (inventory, sales, procurement, etc.) that has a single database hosted by SQL Server 2005 and a bunch of client applications. The main client (used by all users) is an MS Access 2003 application (ADP), and ot...
I have this PHP script that I wrote to automatically follow users that post messages with certain terms. It works 100% of the time on a bunch of test accounts but then does not work on the account I'd like to use it with. I've checked the account's API rate limit and it's well within the boundaries. I've also verifi...
It seems like you've already identified that the issue with your PHP script was due to tighter API limits imposed on the specific Twitter account you were trying to use. This can happen for various reasons, such as the account being flagged for suspicious activity, having a new account that hasn't built up its trustwor...
40,187
[ { "from": "human", "value": "I have this PHP script that I wrote to automatically follow users that post messages with certain terms. It works 100% of the time on a bunch of test accounts but then does not work on the account I'd like to use it with. \nI've checked the account's API rate limit and it's wel...
What is the best way to implement connection pooling in hsqldb, without compromising on the speed?
Implementing connection pooling in HSQLDB (HyperSQL DataBase) can help improve the performance of your application by managing database connections efficiently. Here’s a general approach to achieve connection pooling without compromising speed: ### 1. Use a Connection Pooling Library Using a well-established connectio...
34,386
[ { "from": "human", "value": "What is the best way to implement connection pooling in hsqldb, without compromising on the speed?\n" }, { "from": "gpt", "value": "Implementing connection pooling in HSQLDB (HyperSQL DataBase) can help improve the performance of your application by managing database...
How do I dynamically reload the app.config in a .net Windows application? I need to turn logging on and off dynamically and not just based upon the value at application start. ConfigurationManager.RefreshSection("appSettings") does not work and I've also tried explicitly opening the config file using OpenExeConfigurat...
Dynamically reloading the configuration settings in a .NET Windows application can be a bit tricky since the `app.config` file is usually read at application startup, and changes made to the `app.config` file won't affect the running application until it is restarted. However, you can create a custom configuration sec...
39,349
[ { "from": "human", "value": "How do I dynamically reload the app.config in a .net Windows application? I need to turn logging on and off dynamically and not just based upon the value at application start.\nConfigurationManager.RefreshSection(\"appSettings\") does not work and I've also tried explicitly ope...
What is the best IO strategy for a high traffic web app that logs user behaviour on a website and where ALL of the traffic will result in an IO write? Would it be to write to a file and overnight do batch inserts to the database? Or to simply do an INSERT (or INSERT DELAYED) per request? I understand that to consider t...
In a high-traffic web application that logs user behavior and where every request results in an IO write, the choice of I/O strategy is crucial for performance, scalability, and data integrity. Here are several approaches you can consider, along with their trade-offs: ### 1. **Batch Processing with Queues** - **Ove...
37,073
[ { "from": "human", "value": "What is the best IO strategy for a high traffic web app that logs user behaviour on a website and where ALL of the traffic will result in an IO write? Would it be to write to a file and overnight do batch inserts to the database? Or to simply do an INSERT (or INSERT DELAYED) per...
I came across a class instance function that needed to temporarily change a class instance variable, and then restore it when the function completed. The function had return statements all over the place, and before each return there was a restoring statement. That seemed messy to me, not to mention scary when a except...
Your approach to temporarily change a class instance variable and restore it afterward using a `restorer` inner class is quite neat. It takes advantage of the RAII (Resource Acquisition Is Initialization) principle in C++, which automatically manages resource cleanup in the destructor. This makes the code less error-pr...
37,974
[ { "from": "human", "value": "I came across a class instance function that needed to temporarily change a class instance variable, and then restore it when the function completed. The function had return statements all over the place, and before each return there was a restoring statement. That seemed messy ...
I have problem with return statment >.< I want to store all magazine names into ArrayList<String> ListNameMagazine = new ArrayList<String>(); I have a DB; in the DB there is a table name_magazine and the data in name_magazine is Magazine1 Magazine2 Magazine3 Magazine4 This my main: ShowData Show = new ShowData()...
The issue you're experiencing stems from how your `getResult` method is designed. Right now, your method is returning the value of only the first row of the result set because you use `return` inside the loop. Instead of returning the value immediately, you need to iterate through all the rows and store them in a colle...
40,774
[ { "from": "human", "value": "I have problem with return statment >.< I want to store all magazine names into\nArrayList<String> ListNameMagazine = new ArrayList<String>();\n\nI have a DB; in the DB there is a table name_magazine and the data in name_magazine is\n\nMagazine1\nMagazine2\nMagazine3\nMagazine4\...
I'm trying to create a custom transition, to serve as a replacement for a default transition you would get here, for example: [self.navigationController pushViewController:someController animated:YES]; I have prepared an OpenGL-based view that performs an effect on some static texture mapped to a plane (let's say it's...
Creating a custom transition using OpenGL to mimic a flip effect between view controllers can be a bit challenging but is definitely achievable. Here's a breakdown of how you can implement this transition and address your questions: ### 1. Capturing the Current View's Content You can capture the current view's conten...
36,288
[ { "from": "human", "value": "I'm trying to create a custom transition, to serve as a replacement for a default transition you would get here, for example:\n[self.navigationController pushViewController:someController animated:YES];\n\nI have prepared an OpenGL-based view that performs an effect on some stat...
I have an application with a main form. In this form I have placed three TActionMainMenuBars, because the application essentially runs in three different modes. The menu bars are all constructed from actions stored(proxied) in an TActionManager on the main form. The ActionManager actually references actionlists on var...
It sounds like you're encountering some nuances with the way that shortcuts are handled in C++Builder's TActionManager and TActionMainMenuBar. Here are a few considerations and potential solutions to troubleshoot the issues you are experiencing: ### Key Considerations: 1. **Shortcuts in Action Lists**: Ensure that the...
34,549
[ { "from": "human", "value": "I have an application with a main form. In this form I have placed three TActionMainMenuBars, because the application essentially runs in three different modes. \nThe menu bars are all constructed from actions stored(proxied) in an TActionManager on the main form. The ActionMana...
This is along similar lines as these recent questions: Best Java Obfuscation Application For Size Reduction Creating non-reverse-engineerable Java programs However, one ends up recommending yGuard and the other ProGuard but neither mention both. I wonder if we could get a comparison of each one and hear peoples experie...
Both yGuard and ProGuard are popular tools used for Java obfuscation, and they serve similar purposes, but they do have some differences in terms of features, output size, and use cases. Below is a comparison of both tools based on various factors, including their effectiveness in obfuscation, output size, compatibilit...
13,412
[ { "from": "human", "value": "This is along similar lines as these recent questions:\nBest Java Obfuscation Application For Size Reduction\nCreating non-reverse-engineerable Java programs\nHowever, one ends up recommending yGuard and the other ProGuard but neither mention both. I wonder if we could get a com...
I have a table in my MYSQL database which does not have a primary key, but has a unique key on two columns. When using MyEclipse's Hibernate reverse engineer tool to create a mapping for that table, it generates two classes, one for named after the table itself, and one with an "Id" suffix. It seems most of the usefu...
The approach you're observing in the Hibernate reverse engineering process—where it generates two classes (one for the main entity and one for the Id class)—is indeed a common design pattern in Hibernate, especially when dealing with composite keys or unique constraints that are not primary keys. ### Purpose of the Tw...
40,022
[ { "from": "human", "value": "I have a table in my MYSQL database which does not have a primary key, but has a unique key on two columns. When using MyEclipse's Hibernate reverse engineer tool to create a mapping for that table, it generates two classes, one for named after the table itself, and one with an...
Normally, the method of passing workflow parameters to the workflow happens in the call to RunWorkflow. However, with the WorkflowServiceHost, there is no such method call involved. You simply call the Open() method on the instance. Any ideas? Of course, the implication is that I add more parameters to the service c...
You're correct that when using `WorkflowServiceHost` in Windows Workflow Foundation (WF), you don't have the same direct way to pass parameters to the workflow as you would in other scenarios. However, there are several approaches you can take to pass configuration or workflow parameters while keeping your service cont...
39,456
[ { "from": "human", "value": "Normally, the method of passing workflow parameters to the workflow happens in the call to RunWorkflow. However, with the WorkflowServiceHost, there is no such method call involved. You simply call the Open() method on the instance. Any ideas?\nOf course, the implication is t...
I'm currently using Oracle 10g. I use DBMS_CRYPTO package to encrypt the passwords of users for login. In order to encrypt or decrypt the data, I must have a key. So where should I put the key in order to hide it from other developers, or is there another way to encrypt data without being able to decrypt back? In SQL...
Using the `DBMS_CRYPTO` package in Oracle 10g for password encryption requires careful management of encryption keys. Here are some strategies for securing your encryption keys, as well as alternative approaches to handle passwords securely: ### 1. **Secure Key Storage**: - **Database Table**: Store the encryption ...
40,044
[ { "from": "human", "value": "I'm currently using Oracle 10g. I use DBMS_CRYPTO package to encrypt the passwords of users for login. In order to encrypt or decrypt the data, I must have a key. So where should I put the key in order to hide it from other developers, or is there another way to encrypt data wi...
I'm trying to figure out how all these work together. I know that a DTO is basically just a container of data for the Domain Objects to pass back and forth to forms and such. Does the Domain object contain a DTO or do the DTO and the Domain Object happen to just have all of the same properties that will be mapped manua...
You've posed some great questions that touch on fundamental concepts in software architecture, particularly regarding Data Transfer Objects (DTOs), Domain Objects, and the Repository Pattern. Let's address your concerns step by step. ### DTO vs. Domain Objects 1. **Definition**: - A **DTO** is a simple object used...
31,499
[ { "from": "human", "value": "I'm trying to figure out how all these work together. I know that a DTO is basically just a container of data for the Domain Objects to pass back and forth to forms and such. Does the Domain object contain a DTO or do the DTO and the Domain Object happen to just have all of the ...
I'm running google earth in a web browser that is embedded in a c# app. I have captured an event through javascript that fires when the user right clicks on the globe. How can I bubble an event to go from the javascript to c# so that it can be handled there? Thanks
To pass events from JavaScript running in a web browser embedded in a C# application back to your C# code, you can use the WebBrowser control (if using Windows Forms) or WebView2 (if using WPF or WinForms with more modern capabilities). The concept involves calling a C# method from JavaScript. ### Using WebBrowser Con...
38,631
[ { "from": "human", "value": "I'm running google earth in a web browser that is embedded in a c# app. I have captured an event through javascript that fires when the user right clicks on the globe. How can I bubble an event to go from the javascript to c# so that it can be handled there?\nThanks\n" }, { ...
What is the best practices regarding storing files uploaded from users? Currently, I am during the following method for storing files: <web_app_root>/course_material/<term_id>/<course_id>/<file_id> As you can see, the files are stored according to the keys in the database. I thought this was safer, since I wouldn't ha...
When storing user-uploaded files, there are several best practices to consider, balancing safety, organization, and usability. Below are some key considerations and recommendations based on your scenario: ### 1. **Separation of Concerns** - **Database and Filesystem Decoupling**: Tying your filesystem structure too cl...
38,967
[ { "from": "human", "value": "What is the best practices regarding storing files uploaded from users?\nCurrently, I am during the following method for storing files:\n<web_app_root>/course_material/<term_id>/<course_id>/<file_id>\n\nAs you can see, the files are stored according to the keys in the database. ...
I really love WeakReference's. But I wish there was a way to tell the CLR how much (say, on a scale of 1 to 5) how weak you consider the reference to be. That would be brilliant. Java has SoftReference, WeakReference and I believe also a third type called a "phantom reference". That's 3 levels right there which the GC ...
You're right that .NET's garbage collection model primarily utilizes `WeakReference`, which allows for objects to be collected when there are no strong references to them. However, it does not provide built-in support for the granularity of reference types that Java does with `SoftReference` and `PhantomReference`. If ...
39,943
[ { "from": "human", "value": "I really love WeakReference's. But I wish there was a way to tell the CLR how much (say, on a scale of 1 to 5) how weak you consider the reference to be. That would be brilliant.\nJava has SoftReference, WeakReference and I believe also a third type called a \"phantom reference\...
I am just learning Visual C++ and I am used to Visual Basic where I just select the ActiveX component from a list of references. I can seem to add it anywhere. If I go to the Project | References, it is all blank. It only allows me to specify a path and when I specify the path of the AcitveX component, nothing new h...
Using ActiveX components in Visual C++ is a bit different than using them in Visual Basic. Here are the steps you can follow to properly use an ActiveX component in Visual C++ 2008 Express Edition: ### 1. Register the ActiveX Component Ensure that the ActiveX component (usually a DLL or OCX file) is registered on your...
37,450
[ { "from": "human", "value": "I am just learning Visual C++ and I am used to Visual Basic where I just select the ActiveX component from a list of references. I can seem to add it anywhere. If I go to the Project | References, it is all blank. It only allows me to specify a path and when I specify the pat...
I'm looking for a PHP extension that allows me to connect, bind/listen, send, and receive data on a TCP socket. There is a PEAR package Net_Socket: http://pear.php.net/package/Net_Socket But this would require PEAR to be installed which we wouldn't want to do as this increases memory consumption. Is there an available ...
As of my last knowledge update, there is no widely known standalone C extension specifically for TCP socket programming in PHP that offers an interface similar to the PEAR package you mentioned. However, PHP has built-in support for socket programming through its Socket extension, which is available by default in PHP v...
39,211
[ { "from": "human", "value": "I'm looking for a PHP extension that allows me to connect, bind/listen, send, and receive data on a TCP socket.\nThere is a PEAR package Net_Socket:\nhttp://pear.php.net/package/Net_Socket\nBut this would require PEAR to be installed which we wouldn't want to do as this increase...
Im trying to get Trac upp and running on my IIS/w2008 server using this FAQ: TracOnWindowsIisAjp Everything upp until "3. Install Tomcat AJP Connector for IIS" works ok. I then define my directories as : C:\wwwroot\trac.evju.biz\AJP\, in the bin catalog I place the dll file, and 3 config files with this content: isapi_...
To set up Trac on an IIS 7 server with the AJP Connector, it's important to correctly configure both the virtual directory and the ISAPI extension settings. Below are detailed steps to help you through the setup, particularly focusing on how to provide execute permissions for the ISAPI DLL. ### Step 1: Set Up the Virt...
35,747
[ { "from": "human", "value": "Im trying to get Trac upp and running on my IIS/w2008 server using this FAQ: TracOnWindowsIisAjp\nEverything upp until \"3. Install Tomcat AJP Connector for IIS\" works ok.\nI then define my directories as : C:\\wwwroot\\trac.evju.biz\\AJP\\, in the bin catalog I place the dll f...
I have a php web application that is occasionally hanging. When I navigate to the page it will just sit there trying to load for hours, even though max execution is 210. This is an application uses curl behind a proxy to download stuff. Error reporting is set to all, but that dosn't matter since the page is blank and...
Debugging a hung PHP process can be challenging, especially if error reporting isn't providing any insights. Here are several approaches you can take to troubleshoot the issue: ### 1. **Enable Detailed Error Reporting:** Ensure that your error reporting settings are correctly configured. In your `php.ini`, set the fol...
38,313
[ { "from": "human", "value": "I have a php web application that is occasionally hanging. When I navigate to the page it will just sit there trying to load for hours, even though max execution is 210. This is an application uses curl behind a proxy to download stuff. Error reporting is set to all, but that ...
We altready have a similar question here but the discussion do not cover all the aspect, so I'm asking again: What is the best way to distribute a .Net application considering build mode (release vs. debug) and distribution of PDB files? Having a good reference to an article covering these aspects would be great. Consi...
When it comes to distributing a .NET application, whether it is a web application or a Windows Forms application, there are several best practices to consider regarding build modes, PDB files, and overall distribution strategies. Here’s a comprehensive overview of these aspects. ### 1. Build Modes: Release vs. Debug ...
37,618
[ { "from": "human", "value": "We altready have a similar question here but the discussion do not cover all the aspect, so I'm asking again:\nWhat is the best way to distribute a .Net application considering build mode (release vs. debug) and distribution of PDB files? Having a good reference to an article co...
I have a series of Eclipse projects containing a number of plugins and features that are checked into CVS. I now need to run an automated build of these plugins. Ideally I'd like to do it without having to hardcode large numbers of Eclipse library locations by hand, which has been the problem with the automatically gen...
Automating the build of Eclipse projects that include plugins and features can indeed be challenging, especially when dealing with CVS and the necessary dependencies. Here’s a general approach that you can take to set up a headless build without hardcoding Eclipse library locations: ### Steps to Set Up Automated Headl...
38,276
[ { "from": "human", "value": "I have a series of Eclipse projects containing a number of plugins and features that are checked into CVS. I now need to run an automated build of these plugins. Ideally I'd like to do it without having to hardcode large numbers of Eclipse library locations by hand, which has be...
Im trying to generate views in unit tests but i can't get around the missing VirtualPathProvider. Most viewengines use the VirtualPathProviderViewEngine base class that gets the provider from the current HostingEnvironment. protected VirtualPathProvider VirtualPathProvider { get { if (_vpp == null) { ...
When writing unit tests for ASP.NET MVC views that rely on `VirtualPathProvider`, you are correct that the lack of an actual hosting environment can pose a problem. Here are a few approaches you can take to work around this issue: ### 1. **Mock the VirtualPathProvider** You can create a custom mock implementation of ...
39,634
[ { "from": "human", "value": "Im trying to generate views in unit tests but i can't get around the missing VirtualPathProvider. Most viewengines use the VirtualPathProviderViewEngine base class that gets the provider from the current HostingEnvironment.\nprotected VirtualPathProvider VirtualPathProvider {\n ...
My data is such that I want to display values for the Employee and the Supervisor for a particular record. Instead of describing it, I'll show you a rough example: <table><tr> <th colspan="3">Employee</th> <th colspan="3">Supervisor</th> </tr><tr> <th>Name</th> <th>Last Activity</th> <th>Count</th> <th>Name</th> <th>La...
To create a `GridView` that displays values for the Employee and the Supervisor with a specific structure like the one you described, you will need to customize the header by using `HeaderTemplate` in a `GridView`. This will allow you to have multiple header rows and merged cells. Here's an example in ASP.NET (assumin...
37,462
[ { "from": "human", "value": "My data is such that I want to display values for the Employee and the Supervisor for a particular record. Instead of describing it, I'll show you a rough example:\n<table><tr>\n<th colspan=\"3\">Employee</th>\n<th colspan=\"3\">Supervisor</th>\n</tr><tr>\n<th>Name</th>\n<th>Las...
I ask this question in anticipation as part of a project. I have experience of developing and consuming web services in the past and am au fait with those. However I have been told that as part of this next project I will need to use "secure" web services. Can you provide some insight into what additional development t...
Certainly! Developing "secure" web services typically involves implementing a variety of practices and technologies to ensure the confidentiality, integrity, and authenticity of the data being transmitted and processed. Here’s a breakdown of additional development tasks and considerations you may need to address compar...
37,917
[ { "from": "human", "value": "I ask this question in anticipation as part of a project. I have experience of developing and consuming web services in the past and am au fait with those. However I have been told that as part of this next project I will need to use \"secure\" web services. Can you provide some...
Has anybody had any success ever attaching a debugger to a tethered device? I am able to debug my j2me application in the emulator, but have a lot of trouble sorting out phone-specific problems when they come up. The phone I'm using is a Nokia N95, but ideally the debug process would work on any phone. Is this possib...
Debugging applications on a physical device can indeed be a challenge, especially for J2ME applications. However, it is possible to debug a tethered device like the Nokia N95 using a few different methods. Below are some steps and considerations that may help you get started with debugging your J2ME applications on a r...
38,794
[ { "from": "human", "value": "Has anybody had any success ever attaching a debugger to a tethered device? I am able to debug my j2me application in the emulator, but have a lot of trouble sorting out phone-specific problems when they come up. The phone I'm using is a Nokia N95, but ideally the debug proces...
I need to develop an application which stores data in a SQL Server 2005 database (the app itself will be either a WCF Service or an Asp.Net Web Service). Now, this data is supremely confidential, and I need to have it stored in an encrypted form in the database. So, I am wondering what the best practices are around thi...
Encrypting sensitive data before storing it in a SQL Server 2005 database is a good practice. Here are some best practices and considerations for managing encryption in your application: ### 1. SQL Server Built-in Encryption SQL Server 2005 has built-in encryption features, which include: - **Transparent Data Encrypt...
36,684
[ { "from": "human", "value": "I need to develop an application which stores data in a SQL Server 2005 database (the app itself will be either a WCF Service or an Asp.Net Web Service).\nNow, this data is supremely confidential, and I need to have it stored in an encrypted form in the database.\nSo, I am wonde...
I have a control, VideoControl, which displays video using DirectShow - it's set as the owner of an IVideoWindow. I have another control, AreaControl, which is supposed to show a dashed rectangle over the video control. AreaControl is set to be transparent using SetStyle(ControlStyles.SupportsTransparentBackColor, tr...
To achieve the effect you're looking for, where `AreaControl` can display a dashed rectangle over `VideoControl` (which is rendering video through DirectShow), you need to handle the transparency and rendering properly. The challenge arises because the `VideoControl` is likely rendering directly to the window's graphic...
38,504
[ { "from": "human", "value": "I have a control, VideoControl, which displays video using DirectShow - it's set as the owner of an IVideoWindow. I have another control, AreaControl, which is supposed to show a dashed rectangle over the video control. AreaControl is set to be transparent using SetStyle(Contr...
This is driving me nuts so any advice from fellow users would be welcome. I am using Subversion, with a copy of VisualSVN 1.6.1 installed on a Windows server. On my PC I am using a combination of TortoiseSVN and the wonderful AnkhSVN Visual Studio plugin. Everything works like a dream, but now I am trying use the sv...
It sounds like you've done a lot of troubleshooting already, but here are a few steps you can take to ensure that the auto-properties are set up correctly for new files in Subversion: 1. **Verify the Config File Path**: First, confirm that you are editing the correct configuration file. The Subversion config file shou...
38,163
[ { "from": "human", "value": "This is driving me nuts so any advice from fellow users would be welcome. I am using Subversion, with a copy of VisualSVN 1.6.1 installed on a Windows server. On my PC I am using a combination of TortoiseSVN and the wonderful AnkhSVN Visual Studio plugin. Everything works lik...
First is there any technique for using Action Script for recording sound from microphone? If yes. How? Then one he record I'll upload it to server.
Yes, in ActionScript (specifically ActionScript 3.0), you can record sound from the microphone using the `Microphone` class. Below is a basic outline of how you can achieve this. ### Step 1: Set Up Permissions First, you need to ensure that your Flash application has permission to access the microphone. This is typica...
37,660
[ { "from": "human", "value": "First is there any technique for using Action Script for recording sound from microphone? \nIf yes. How?\nThen one he record I'll upload it to server.\n" }, { "from": "gpt", "value": "Yes, in ActionScript (specifically ActionScript 3.0), you can record sound from the...
I am about to start a project, ongoing actually for the next 2 years where we as an organisation will be implementing TerminalFour Site Manager I am basically after any advice or support if anyone has used this piece of software, and what they think about it. So far, apart from it being clearly not the prettiest of int...
Implementing TerminalFour Site Manager can be a significant undertaking, especially over a two-year period. Here are some considerations, tips, and insights based on general experiences with the platform, as well as points that others have raised: ### 1. **User Interface and Usability** - **Learning Curve**: While it ...
37,396
[ { "from": "human", "value": "I am about to start a project, ongoing actually for the next 2 years where we as an organisation will be implementing TerminalFour Site Manager\nI am basically after any advice or support if anyone has used this piece of software, and what they think about it.\nSo far, apart fro...
I have a main window (#1) on my webpage from which I open a new browser window (#2) from which I open a new window (#3). Now if my user closes window#2 before window#3, I have the problem that window#3 no longer can call function in its window.opener since it has gone away. What I would like to do is to set window#3.op...
To ensure that the grandchild window (`window#3`) can still access the main window (`window#1`) after the parent window (`window#2`) is closed, you can use a different approach by setting the `opener` property of `window#3` directly to `window#1` when opening `window#3`. ### Strategy: 1. **Set a Reference in `window#...
27,492
[ { "from": "human", "value": "I have a main window (#1) on my webpage from which I open a new browser window (#2) from which I open a new window (#3).\nNow if my user closes window#2 before window#3, I have the problem that window#3 no longer can call function in its window.opener since it has gone away.\nWh...
Being a Windows developer I'm currently working on my own project using LAMP. I understand what I need to know of PHP and MySQL, but Linux looks huge and it's not clear where to start and what is enough given my goals. And my goals are to grasp general concepts, being able to deploy the project to a hosting provider an...
It's great that you're diving into the LAMP stack (Linux, Apache, MySQL, PHP) for your project! While Linux can seem overwhelming at first, you can break it down into manageable concepts and skills that will help you achieve your goals. Here's a step-by-step approach to get you started: ### 1. **Familiarize Yourself w...
39,617
[ { "from": "human", "value": "Being a Windows developer I'm currently working on my own project using LAMP. I understand what I need to know of PHP and MySQL, but Linux looks huge and it's not clear where to start and what is enough given my goals.\nAnd my goals are to grasp general concepts, being able to d...
This is more of an academic inquiry than a practical question. Are there any language or framework features that can, or will in future, allow a heterogeneous typed dcitionary, e.g. myDict.Add("Name", "Bill"); myDict.Add("Height", 1.2); where myDict now contains not two object types as values, but one string and o...
Your inquiry about heterogeneous typed dictionaries touches on a few important aspects of programming languages, type systems, and collections. Here's a discussion of existing and potential future features that could facilitate this: ### Existing Approaches 1. **Dynamic Typing**: Languages like Python or JavaScript a...
38,442
[ { "from": "human", "value": "This is more of an academic inquiry than a practical question. Are there any language or framework features that can, or will in future, allow a heterogeneous typed dcitionary, e.g. \nmyDict.Add(\"Name\", \"Bill\"); \nmyDict.Add(\"Height\", 1.2); \n\nwhere myDict now contains n...
I have a control which the user can resize with the mouse. When they move the right side, I just change the width, and everything works fine. However, when they move the left size, I have to change the Left and Width properties. The right hand side of the control visibly twitches, showing the old width in the new pos...
The issue you're experiencing when resizing your control from the left side, where the right edge appears to "twitch," is likely related to the order of operations in how the control is being rendered during the resizing process. Here are several strategies you can employ to help eliminate the visual twitching: ### 1....
38,765
[ { "from": "human", "value": "I have a control which the user can resize with the mouse. When they move the right side, I just change the width, and everything works fine.\nHowever, when they move the left size, I have to change the Left and Width properties. The right hand side of the control visibly twit...
I need help executing a bat file from asp.net 2.0 and c++. How to import runtime Sql Server2000 data into Oracle 9i? How to manage project?
To accomplish the tasks you have mentioned, let's break them down into three parts: executing a batch file from ASP.NET 2.0, importing SQL Server 2000 data into Oracle 9i, and managing your project. ### Part 1: Executing a Batch File from ASP.NET 2.0 In ASP.NET, you can execute a batch file by using the `Process` cl...
38,359
[ { "from": "human", "value": "I need help executing a bat file from asp.net 2.0 and c++.\nHow to import runtime Sql Server2000 data into Oracle 9i?\nHow to manage project?\n" }, { "from": "gpt", "value": "To accomplish the tasks you have mentioned, let's break them down into three parts: executin...
I'm loading data from my database, and exporting to an Excel file via a method I found on this site: http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8 It works, but what I want to do now is format the text before it exports - change the font and text size. Does anybody have any ideas on how to do t...
To format text in an Excel file exported from your database, you’ll typically use a library that allows for greater control over the Excel file's formatting. The most common libraries for handling Excel files in PHP include PHPExcel (deprecated) or its successor PhpSpreadsheet. Here's a basic outline of how you can us...
39,217
[ { "from": "human", "value": "I'm loading data from my database, and exporting to an Excel file via a method I found on this site: http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8\nIt works, but what I want to do now is format the text before it exports - change the font and text size. ...
I'm looking for a solution that would let me scan files on the fly. It would need to integrate nicely with either with IIS(6.0 or 7.0) or ASP.NET. I spent some time trying to find something on the Internet but unfortunately all I've found is a COM based solution that still forces me to save files on disk (http://www.op...
For scanning files on the fly while integrating with IIS or ASP.NET, consider the following approaches: ### 1. **ClamAV with ASP.NET Integration** ClamAV is a widely-used open-source antivirus engine that can be integrated into your web applications. You can run ClamAV as a service on your server and call it from your...
36,644
[ { "from": "human", "value": "I'm looking for a solution that would let me scan files on the fly. It would need to integrate nicely with either with IIS(6.0 or 7.0) or ASP.NET. I spent some time trying to find something on the Internet but unfortunately all I've found is a COM based solution that still force...
So I've got a case where I'd like to be able to apply attributes to a (virtual) method in a derived class, but I'd like to be able to give a default implementation that uses those attributes in my base class. My original plan for doing this was to override the method in the derived class and just call the base implemen...
The behavior you're seeing occurs because when you're calling `base.GetAttributes()`, you're only inspecting the attributes of the base class method, not the derived class method. To achieve the desired behavior of being able to use attributes defined in the derived class while also utilizing a base class implementati...
33,303
[ { "from": "human", "value": "So I've got a case where I'd like to be able to apply attributes to a (virtual) method in a derived class, but I'd like to be able to give a default implementation that uses those attributes in my base class.\nMy original plan for doing this was to override the method in the der...
The option to target another version of the .Net Framework is disabled on a particular test system we are using on a current project. I have tried the following without success: Killing all W3WP.EXE processesRestarting the IIS serviceRemote Debugging has been removed from the box. Just hoping for some pointers.
If the option to target another version of the .NET Framework is disabled on your test system, here are some troubleshooting steps and considerations that could help you resolve the issue: 1. **Check Installed .NET Framework Versions**: - Ensure that the .NET Framework version you want to target is actually install...
38,937
[ { "from": "human", "value": "The option to target another version of the .Net Framework is disabled on a particular test system we are using on a current project.\nI have tried the following without success:\nKilling all W3WP.EXE processesRestarting the IIS serviceRemote Debugging has been removed from the ...
Here's an open ended question. I work on a lot of mssql files, and I like to have a date stamp on each. This is so I can know just by looking at the source of a stored procedure whether it's up to date or not. I'd like to have a shortcut autocomplete key, that, if i type say, d-tab-tab, I get the current date printed t...
It sounds like you're looking for a way to efficiently insert a date stamp into your MSSQL files with a simple keystroke. While there may not be a built-in feature in your text editor that directly allows for a "d-tab-tab" shortcut, there are several methods and tools you can utilize to achieve this goal. Here are some...
37,423
[ { "from": "human", "value": "Here's an open ended question. I work on a lot of mssql files, and I like to have a date stamp on each. This is so I can know just by looking at the source of a stored procedure whether it's up to date or not.\nI'd like to have a shortcut autocomplete key, that, if i type say, d...
What's the easiest way to compute the amount of working days since a date? VB.NET preferred, but C# is okay. And by "working days", I mean all days excluding Saturday and Sunday. If the algorithm can also take into account a list of specific 'exclusion' dates that shouldn't count as working days, that would be gravy. ...
Sure! Below is a simple implementation in VB.NET that computes the number of working days (excluding Saturdays and Sundays) since a specified date, including the functionality to exclude specific dates if provided. ### VB.NET Implementation ```vb Imports System Public Class WorkingDaysCalculator Public Shared Fu...
23,273
[ { "from": "human", "value": "What's the easiest way to compute the amount of working days since a date? VB.NET preferred, but C# is okay.\nAnd by \"working days\", I mean all days excluding Saturday and Sunday. If the algorithm can also take into account a list of specific 'exclusion' dates that shouldn't c...
Let's say I have an existing System.Threading.Timer instance and I'd like to call Change on it to push it's firing time back: var timer = new Timer(DelayCallback, null, 10000, Timeout.Infinite); // ... (sometime later but before DelayCallback has executed) timer.Change(20000, Timeout.Infinite); I'm using this timer to...
Your situation is a classic problem when using timers for an idle callback mechanism. Let’s break down your questions and explore the options you have. ### 1. Can you determine if `Timer.Change` was called before the callback was queued? Unfortunately, the `System.Threading.Timer` class does not provide a built-in me...
39,733
[ { "from": "human", "value": "Let's say I have an existing System.Threading.Timer instance and I'd like to call Change on it to push it's firing time back:\nvar timer = new Timer(DelayCallback, null, 10000, Timeout.Infinite);\n// ... (sometime later but before DelayCallback has executed)\ntimer.Change(20000,...
How is it possible to call a client side javascript method after a specific update panel has been loaded? Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler) does not work for me because this will fire after ANY update panel finishes loading, and I can find no client side way to find which i...
To call a client-side JavaScript function after a specific UpdatePanel has been loaded in an ASP.NET WebForms application, you can use the `Sys.WebForms.PageRequestManager` class along with some custom logic to determine which UpdatePanel triggered the request. Here's a step-by-step approach to achieve this: 1. **Ide...
40,041
[ { "from": "human", "value": "How is it possible to call a client side javascript method after a specific update panel has been loaded?\nSys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler) does not work for me because this will fire after ANY update panel finishes loading, and I c...
I am in the process of designing a daily build routine for my project. We are using Flex 3 and SQL Server 2005. I am unsure to what degree I should be rebuilding the database on a daily build. Should I be dropping all tables and stored procedures and adding them back in? Then I would have to have a script that put ...
When designing a daily build routine, especially for a project involving Flex 3 and SQL Server 2005, it's important to strike the right balance between the integrity of your database and the speed and efficiency of your build process. Here are some considerations to help you decide on your approach: ### Option 1: Full...
37,717
[ { "from": "human", "value": "I am in the process of designing a daily build routine for my project. We are using Flex 3 and SQL Server 2005. I am unsure to what degree I should be rebuilding the database on a daily build. Should I be dropping all tables and stored procedures and adding them back in? The...
I come from a fairly strong OO background, the benefits of OOD & OOP are second nature to me, but recently I've found myself in a development shop tied to a procedural programming habits. The implementation language has some OOP features, they are not used in optimal ways. Update: everyone seems to have an opinion abo...
Your observation about the differing development paradigms and the challenges of quantifying their costs is a pertinent issue in software engineering. While comprehensive, widely-accepted comparative studies specifically contrasting the costs of software development using procedural programming languages versus object-...
39,877
[ { "from": "human", "value": "I come from a fairly strong OO background, the benefits of OOD & OOP are second nature to me, but recently I've found myself in a development shop tied to a procedural programming habits. The implementation language has some OOP features, they are not used in optimal ways. \nUpd...
Previously it was .net 2.0 which is the big change in .net developement. many developers are working mostly on this. Presently microsoft has introduced .net 3.0 and yet its next version .net 4.0. So the next version is going to be major change in .net development. I have listed some features of this... Workflow foundat...
The introduction of .NET 4.0 and subsequent frameworks brought a wealth of new features and enhancements that significantly changed the landscape of .NET development. Here are some of the features that stand out and why they are attractive: ### 1. **Improved Base Class Libraries (BCL)** - .NET 4.0 introduced numero...
34,582
[ { "from": "human", "value": "Previously it was .net 2.0 which is the big change in .net developement. many developers are working mostly on this. Presently microsoft has introduced .net 3.0 and yet its next version .net 4.0. So the next version is going to be major change in .net development.\nI have listed...
I'm trying to figure out a method of connecting from C# code to a digital scale. The particular scale is an Ohaus SP202 digital scale which comes with a USB connection. I would like to read the weight measured on the scale programmatically. I don't have the scale yet, I'm just doing the research before hand. Has anyon...
Connecting to a digital scale like the Ohaus SP202 via USB can typically be accomplished through a couple of approaches, depending on how the scale communicates over the USB connection. Here are steps and considerations for interfacing with the scale using C#: ### 1. **Check the Scale Documentation** - Before proce...
39,763
[ { "from": "human", "value": "I'm trying to figure out a method of connecting from C# code to a digital scale. The particular scale is an Ohaus SP202 digital scale which comes with a USB connection. I would like to read the weight measured on the scale programmatically. I don't have the scale yet, I'm just ...
I have a Makefile that starts by running a tool before applying the build rules (which this tool writes for me). If this tool, which is a python script, exits with a non-null status code, I want GNU Make to stop right there and not go on with building the program. Currently, I do something like this (top level, i.e. co...
To achieve the desired behavior where the Makefile stops execution if your Python script exits with a non-zero status, you need to use the `$(shell ...)` command carefully. The issue you're encountering is that `$(shell ...)` captures the output of the command and doesn't stop the execution of the Makefile on a non-zer...
37,955
[ { "from": "human", "value": "I have a Makefile that starts by running a tool before applying the build rules (which this tool writes for me). If this tool, which is a python script, exits with a non-null status code, I want GNU Make to stop right there and not go on with building the program.\nCurrently, I ...
I was running some dynamic programming code (trying to brute-force disprove the Collatz conjecture =P) and I was using a dict to store the lengths of the chains I had already computed. Obviously, it ran out of memory at some point. Is there any easy way to use some variant of a dict which will page parts of itself out ...
Using a dictionary-like structure that can handle larger-than-memory datasets is indeed a common requirement, especially in cases like the Collatz conjecture where the search space can become large. Since you've already explored SQLite and found it to be slow due to per-access overhead, here are a few strategies that m...
37,679
[ { "from": "human", "value": "I was running some dynamic programming code (trying to brute-force disprove the Collatz conjecture =P) and I was using a dict to store the lengths of the chains I had already computed. Obviously, it ran out of memory at some point. Is there any easy way to use some variant of a ...
How can I use reflection to create a generic List with a custom class (List<CustomClass>)? I need to be able to add values and use propertyInfo.SetValue(..., ..., ...) to store it. Would I be better off storing these List<>'s as some other data structure? Edit: I should have specified that the object is more like thi...
To create a generic `List<T>` with a custom class using reflection in C#, you can use the `Activator` class to dynamically create instances of your custom class and populate the `List<T>`. You can also utilize the `PropertyInfo` class to set values on properties of an object. Given your requirement, where you have a c...
37,722
[ { "from": "human", "value": "How can I use reflection to create a generic List with a custom class (List<CustomClass>)? I need to be able to add values and use\npropertyInfo.SetValue(..., ..., ...) to store it. Would I be better off storing these List<>'s as some other data structure?\nEdit:\nI should hav...
I'm having an issue dragging a file from Windows Explorer on to a Windows Forms application. It works fine when I drag text, but for some reason it is not recognizing the file. Here is my test code: namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { ...
It looks like you've implemented the basic structure for handling drag-and-drop functionality in your Windows Forms application, but you might be missing some important logic for handling files specifically. The code you provided does check for files correctly in the `DragEnter` event. However, in the `DragDrop` even...
39,987
[ { "from": "human", "value": "I'm having an issue dragging a file from Windows Explorer on to a Windows Forms application. \nIt works fine when I drag text, but for some reason it is not recognizing the file. Here is my test code:\nnamespace WindowsFormsApplication1\n{\n public partial class Form1 : Form...
In System.ComponentModel, there's a class called CancelEventArgs which contains a Cancel member that can be set in event listeners. The documentation on MSDN explains how to use that to cancel events from within a listener, but how do I use it to implement my own cancelable events? Is there a way to check the Cancel ...
To implement your own cancelable events in .NET using the `CancelEventArgs` class, you can follow these steps: 1. **Define your custom event arguments**: Create a class that derives from `CancelEventArgs`. This allows you to add any additional information you want to pass along with the event. 2. **Define the event**...
36,349
[ { "from": "human", "value": "In System.ComponentModel, there's a class called CancelEventArgs which contains a Cancel member that can be set in event listeners. The documentation on MSDN explains how to use that to cancel events from within a listener, but how do I use it to implement my own cancelable eve...
I am trying to RegisterClientScriptBlock in a method that is only called via an AJAX call. It doesn't appear to actually register the script on the page and I'm guessing this is because it's not actually reloading the entire page. Is there any way to register javascript on a page from within an ajax method call? ...
When you're making an AJAX call, the page is not fully reloaded, and therefore any server-side script registration (like `RegisterClientScriptBlock`) won't be executed as you might expect. This is because these methods are intended to register scripts that will be sent as part of the full page load. To send JavaScript...
39,677
[ { "from": "human", "value": "I am trying to RegisterClientScriptBlock in a method that is only called via an AJAX call. It doesn't appear to actually register the script on the page and I'm guessing this is because it's not actually reloading the entire page. Is there any way to register javascript on a p...
I have a Flash movie embedded in some DIV. The trouble is that when I change any property of the enclosing DIV dynamically, Firefox (not other browsers) restarts/reinitializes Flash movie effectively resetting the whole progress (eg: file selection for upload, etc.). Is there some sort of a workaround for this?
This is a common issue with Flash when used in conjunction with dynamically modified HTML elements, especially in Firefox. When properties of the enclosing `<div>` are changed, Firefox sometimes triggers a reflow or repaint of the Flash content, causing it to reload. Here are a few potential workarounds to help you mit...
39,750
[ { "from": "human", "value": "I have a Flash movie embedded in some DIV. The trouble is that when I change any property of the enclosing DIV dynamically, Firefox (not other browsers) restarts/reinitializes Flash movie effectively resetting the whole progress (eg: file selection for upload, etc.).\nIs there s...
I am using GWT for my client side application. I am not using GWT/Java for the server. However, I am not sure how I can handle session management. The GWT application resides on one page, all server calls are done via AJAX. If a session expires on the server... let's assume the user didn't close the browser, but le...
Session management in a GWT application that communicates with a non-GWT server requires a strategy to handle session expiration gracefully. Here are several approaches and techniques you can consider for notifying the client application about session expiration: ### 1. **Long Polling / Comet** While you mentioned not...
39,423
[ { "from": "human", "value": "I am using GWT for my client side application. I am not using GWT/Java for the server. However, I am not sure how I can handle session management. The GWT application resides on one page, all server calls are done via AJAX. If a session expires on the server... let's assume ...
I know in the MVC Framework, you have the Html Class to create URLs: Html.ActionLink("About us", "about", "home"); But what if you want to generate Urls in Webforms? I haven't found a really good resource on the details on generating URLs with Webforms. For example, if I'm generating routes like so: Route r = new Rout...
In ASP.NET Web Forms, generating URLs based on your routing setup can be accomplished by using the `RouteCollection` methods that are provided by the framework. Although ASP.NET Web Forms doesn't have a direct equivalent to `Html.ActionLink` in MVC, you can create a URL based on your routes using the `RouteTable` metho...
37,550
[ { "from": "human", "value": "I know in the MVC Framework, you have the Html Class to create URLs:\nHtml.ActionLink(\"About us\", \"about\", \"home\");\n\nBut what if you want to generate Urls in Webforms?\nI haven't found a really good resource on the details on generating URLs with Webforms.\nFor example, ...
Am new to Lucene.Net Which is the best Analyzer to use in Lucene.Net? Also,I want to know how to use Stop words and word stemming features ?
Welcome to Lucene.Net! Choosing the right analyzer for your use case is crucial for effectively indexing and searching text. Lucene.Net provides several built-in analyzers, each with different characteristics. Here are a few common analyzers: 1. **StandardAnalyzer**: This is a general-purpose analyzer that provides go...
39,044
[ { "from": "human", "value": "Am new to Lucene.Net\nWhich is the best Analyzer to use in Lucene.Net?\nAlso,I want to know how to use Stop words and word stemming features ?\n" }, { "from": "gpt", "value": "Welcome to Lucene.Net! Choosing the right analyzer for your use case is crucial for effecti...
while (xxx) { timeout.tv_sec=TIMEOUT; timeout.tv_usec=0; FD_ZERO(&set); FD_SET(sd,&set); switch (select(FD_SETSIZE,&set,NULL,NULL,&timeout)) xxxxx } works fine, however FD_ZERO(&set); FD_SET(sd,&set); while (xxx) { timeout.tv_sec=TIMEOUT; timeout.tv_usec=0; switch (select(FD_SE...
The issue you're encountering is related to how file descriptor sets are used with the `select()` function. Specifically, the `FD_SET()` and `FD_ZERO()` macros manage the state of the file descriptor set, and it's important to understand how they interact with the `select()` call. ### Explanation 1. **FD_SET and FD_Z...
39,259
[ { "from": "human", "value": "while (xxx) {\n timeout.tv_sec=TIMEOUT;\n timeout.tv_usec=0;\n FD_ZERO(&set); \n FD_SET(sd,&set);\n\n switch (select(FD_SETSIZE,&set,NULL,NULL,&timeout))\n xxxxx\n}\n\nworks fine, however\nFD_ZERO(&set); \nFD_SET(sd,&set);\n\nwhile (xxx) {\n timeout.tv_sec=T...
Where would i go to look for algorithms that take a 2d grid of values that are either 0 or 1 as input and then identifies all possible non-overlapping rectangles in it? In a more practical explanation: I am drawing a grid that is represented by a number of squares, and i wish to find a way to combine as many adjacent s...
To tackle the problem of identifying non-overlapping rectangles in a 2D grid of binary values (0s and 1s), especially when the distribution of the '1' squares is irregular and random, you can consider a combination of approaches. Here’s a general outline of how to proceed: ### 1. Basic Grid Traversal Approach A simpl...
39,620
[ { "from": "human", "value": "Where would i go to look for algorithms that take a 2d grid of values that are either 0 or 1 as input and then identifies all possible non-overlapping rectangles in it?\nIn a more practical explanation: I am drawing a grid that is represented by a number of squares, and i wish t...
I have written code that automatically creates CSS sprites based on the IMG tags in a page and replaces them with DIV's with (what I thought was) appropriate CSS to position the sprite image as a background letting the appropriate part show through -- the problem is that I cannot get DIVs to behave as drop in replaceme...
Creating a drop-in replacement for an `<img>` tag using a `<div>` element can be a bit tricky due to the differences in their default display behaviors. However, you can achieve this by leveraging CSS flexbox or by wrapping your `<div>` in an additional inline container. Below are a couple of approaches that can help y...
37,485
[ { "from": "human", "value": "I have written code that automatically creates CSS sprites based on the IMG tags in a page and replaces them with DIV's with (what I thought was) appropriate CSS to position the sprite image as a background letting the appropriate part show through -- the problem is that I canno...
I've got this ASP.NET drop down control that displays other textbox controls when the value is not UK (this is to help find UK addresses using postcodes). When UK is reselected I will like to hide the other controls. I've enabled view state and AutoPostBack to true. I have an onSelectedIndexChanged event that only gets...
It sounds like you are encountering an issue where the `OnSelectedIndexChanged` event for your DropDownList control is not firing as expected every time the value changes. This issue might arise from how the ViewState and the data binding is being handled. Here are a few suggestions to help troubleshoot and resolve yo...
38,261
[ { "from": "human", "value": "I've got this ASP.NET drop down control that displays other textbox controls when the value is not UK (this is to help find UK addresses using postcodes). When UK is reselected I will like to hide the other controls. I've enabled view state and AutoPostBack to true. I have an on...
I have a LinqDataSource that I use to calculate the number of rows in a table. I would like to update the value of literal with the number, with the following code, taken from MSDN (linqdatasourcestatuseventargs.totalrowcount.aspx): protected void linqDataSource1_Selected(object sender, LinqDataSourceStatusEventArgs e)...
To update your `Literal` with the total number of rows in a `LinqDataSource`, you need to initiate the data retrieval in your `Page_Load` method or an appropriate event handler, even if you don't have a `Select()` method like `SqlDataSource`. Here's how you can do it: 1. **Set the `DataSource` Property of a Control**...
38,815
[ { "from": "human", "value": "I have a LinqDataSource that I use to calculate the number of rows in a table. I would like to update the value of literal with the number, with the following code, taken from MSDN (linqdatasourcestatuseventargs.totalrowcount.aspx):\nprotected void linqDataSource1_Selected(objec...
I created a protected folder on my ASP.NET site with the "ASP.NET Configuration" tool. It made a database called App_Data/ASPNETDB.MDF where it stores one (1) user. While uploading I noticed now that the database has grown to 10 MB and the .ldf file is 5 MB. (!) I tried to look at it with SQL Server 2008 Management St...
Yes, it’s not uncommon for the ASP.NET membership database (`ASPNETDB.MDF`) to grow over time, especially if you are actively creating, updating, or deleting records in the membership tables. Here are some reasons this might happen and steps you can take to address the issue: ### Causes of Database Bloat 1. **Frequen...
38,612
[ { "from": "human", "value": "\nI created a protected folder on my ASP.NET site with the \"ASP.NET Configuration\" tool.\nIt made a database called App_Data/ASPNETDB.MDF where it stores one (1) user.\nWhile uploading I noticed now that the database has grown to 10 MB and the .ldf file is 5 MB. (!)\nI tried t...
I am using gravatar to load avatars for each user that posts a story on a page. I also am using jquery to round the corners of some span elements on the page. Unfortunately, it looks like grabbing the avatars from gravatar occurs before the jquery effects are applied (Without the gravatar code the elements are immediat...
Yes, there are several strategies you can use to ensure that the avatars loaded from Gravatar don't appear until after the jQuery effects have been applied to the page. Here are some possible solutions: ### 1. Hide the Avatar Placeholder One simple approach is to initially hide the avatar elements and only display the...
38,090
[ { "from": "human", "value": "I am using gravatar to load avatars for each user that posts a story on a page. I also am using jquery to round the corners of some span elements on the page. Unfortunately, it looks like grabbing the avatars from gravatar occurs before the jquery effects are applied (Without th...
I have an Air application with a main window. I would like to have a new window fly out from the side of the main window when the user clicks on a button in the main window. The window that appears needs to display information based on value passed from the main form. How can I achieve this with Flex Builder 3? Target ...
To achieve a fly-out window in an Adobe AIR application using Flex Builder 3, you can use the `NativeWindow` class to create a new window that will display information based on the value passed from the main window. Below are the steps to implement this functionality: ### Step 1: Setup your main application First, mak...
37,076
[ { "from": "human", "value": "I have an Air application with a main window. I would like to have a new window fly out from the side of the main window when the user clicks on a button in the main window. The window that appears needs to display information based on value passed from the main form. How can I ...
I've got two PostgreSQL databases that have been created using the same sql file. One of them is 2GB larger. Can someone help me figure out why? I'm sure the databases have the same row counts, tables, indexes, etc.. The databases are on different servers, there are small differences in the postgresql.conf and the Post...
There are several factors that could lead to a size difference between two PostgreSQL databases even when they have the same row counts, tables, and indexes. Here are some potential causes and areas to investigate: 1. **Fill Factor**: - The `fillfactor` setting influences how much space is left free in each page of...
33,637
[ { "from": "human", "value": "I've got two PostgreSQL databases that have been created using the same sql file. One of them is 2GB larger. Can someone help me figure out why? I'm sure the databases have the same row counts, tables, indexes, etc.. The databases are on different servers, there are small differ...
I wonder if with a simple Map<String,Object> implementation for plain records is enough. I want to do it similar to Ror. When you add a field to the table in the database automatically you have access to the field in the Dto. I don't want to add a field and then have to add the same field to the DTO declaration. It isn...
Using a `Map<String, Object>` to represent your Data Transfer Objects (DTOs) in a dynamic way can indeed allow you to add fields dynamically based on the database schema without explicitly defining them in your code. This is similar to how some ORMs like Ruby on Rails (RoR) handle dynamic attributes for models. However...
38,982
[ { "from": "human", "value": "I wonder if with a simple Map<String,Object> implementation for plain records is enough.\nI want to do it similar to Ror. When you add a field to the table in the database automatically you have access to the field in the Dto.\nI don't want to add a field and then have to add th...
We have 50+ Java batch processes that run at different times of the day. They run on a Solaris box, and are started via cron. Currently, the only way we only know if they succeed or fail is by an email generated at the end of each batch process. We have a support team that monitors these emails. Recently, we've had...
Yes, there are several open-source batch monitoring applications that can help improve your current setup and provide more robust monitoring of your Java batch processes. Here are a few options worth considering: ### Open Source Batch Monitoring Tools 1. **Spring Batch Admin**: This is a web-based application that pr...
40,132
[ { "from": "human", "value": "We have 50+ Java batch processes that run at different times of the day. They run on a Solaris box, and are started via cron. Currently, the only way we only know if they succeed or fail is by an email generated at the end of each batch process. We have a support team that mo...
In an effort to get rid of some fragmentation left from rebuilding and defraging we thought that we would drop and create indexes so I went to write a script. It identifies a clustered index that needs work and drops indexes and primary keys and rebuilds the indexes and primary keys for a table. Here is the problem I r...
When considering whether to drop and recreate indexes in SQL Server, it's essential to understand the implications of each option you mentioned, especially concerning SQL Server's automatically created indexes and statistics. Here’s a breakdown of your options and recommendations: 1. **Drop and Recreate Only the Index...
30,800
[ { "from": "human", "value": "In an effort to get rid of some fragmentation left from rebuilding and defraging\nwe thought that we would drop and create indexes so I went to write a script.\nIt identifies a clustered index that needs work and drops indexes and primary keys\nand rebuilds the indexes and prima...
I need to render quite alot (tens of thousands) images off-screen using OpenGL. I am running under Windows and using QT as a framework. the solution can be windows only, it doesn't really matter. From what I've found using Google there are a number of options for doing this This article which seems rather dated suggest...
When rendering a large number of images off-screen using OpenGL, especially with a constant scene and multiple viewpoints, you want to prioritize performance and resource management. Here’s a breakdown of the options you’ve mentioned, along with some recommendations: ### 1. **Using CreateDIBSection**: - **Pros**: -...
30,717
[ { "from": "human", "value": "I need to render quite alot (tens of thousands) images off-screen using OpenGL.\nI am running under Windows and using QT as a framework. the solution can be windows only, it doesn't really matter.\nFrom what I've found using Google there are a number of options for doing this\nT...
Why does nvarchar(256) seem to the be the standard for user names in SQL Server? Any system functions that return a user name return nvarchar(256), the ASP Membership provider uses nvarchar(256) 256 seems like an odd number (yes, I know its even...) - 255 I could understand (1 byte address) but 256 doesn't make sense ...
The choice of `nvarchar(256)` as a standard for user names in SQL Server and many other systems can be attributed to a few factors, even if it seems a bit arbitrary at first glance. Here are some reasons behind this choice: 1. **Character Count and Encoding**: - The `nvarchar` type supports Unicode, which means it...
40,164
[ { "from": "human", "value": "Why does nvarchar(256) seem to the be the standard for user names in SQL Server? \nAny system functions that return a user name return nvarchar(256), the ASP Membership provider uses nvarchar(256)\n256 seems like an odd number (yes, I know its even...) - 255 I could understand (...
Is this still the recommended library in use? ThickBox 3.1
ThickBox is a popular JavaScript library that was widely used for displaying images, videos, and other content in a modal or overlay format. However, it's important to note that ThickBox has not been actively maintained for many years. The last known stable version is 3.1, which was released quite some time ago. As of...
42,430
[ { "from": "human", "value": "Is this still the recommended library in use? ThickBox 3.1\n" }, { "from": "gpt", "value": "ThickBox is a popular JavaScript library that was widely used for displaying images, videos, and other content in a modal or overlay format. However, it's important to note th...
I was remote debugging a stack overflow from a recursive function. The Visual Studio IDE only showed the first 1,000 frames (all the same function), but I needed to go up further too see what the cause was. Does anybody know how to get VS to 'move up' in a stack listing? Thanks.
In Visual Studio, when you are debugging and encounter a stack overflow due to deep recursion, you might find that the Call Stack window only displays a limited number of frames. However, there are a few approaches to investigate further: ### 1. **Enable More Stack Frames in Debugging Options:** By default, Visual Stu...
39,285
[ { "from": "human", "value": "I was remote debugging a stack overflow from a recursive function. The Visual Studio IDE only showed the first 1,000 frames (all the same function), but I needed to go up further too see what the cause was.\nDoes anybody know how to get VS to 'move up' in a stack listing?\nThank...
On various pages throughout my PHP web site and in various nested directories I want to include a specific file at a path relative to the root. What single command can I put on both of these pages... http://www.example.com/pageone.php http://www.example.com/somedirectory/pagetwo.php ...to include this page: http://www....
To include a file that is located at a specific path relative to the root of your web server, you can use the `$_SERVER['DOCUMENT_ROOT']` variable in PHP. This variable contains the absolute path to the document root directory of your website, allowing you to build the path to your included file regardless of your curr...
41,699
[ { "from": "human", "value": "On various pages throughout my PHP web site and in various nested directories I want to include a specific file at a path relative to the root.\nWhat single command can I put on both of these pages...\nhttp://www.example.com/pageone.php\nhttp://www.example.com/somedirectory/page...
When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008? Update 1 I have looked for the 'Browse with' option and not found it. Visual Studio opens the default browser instead of Internet Explorer Update 2 If you are already debugging you dont have the 'Browse...
In Visual Studio 2008, you can set which browser is used for debugging (or when you hit F5) by following these steps: 1. **Stop Debugging**: If you are currently debugging, you need to stop the debugging session first (Debug > Stop Debugging or press Shift + F5). This will allow you to access the necessary options. 2...
41,569
[ { "from": "human", "value": "When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008?\nUpdate 1\nI have looked for the 'Browse with' option and not found it.\nVisual Studio opens the default browser instead of Internet Explorer \nUpdate 2\nIf you a...
The line-height property usually takes care of vertical alignment, but not with inputs. Is there a way to automatically center text without playing around with padding?
Yes, you can center the text vertically within input fields without using padding by utilizing the `line-height` property in conjunction with a specific height. This technique works best for single-line text inputs. Here’s how you can do it: 1. Set a fixed height for your input element. 2. Set the `line-height` to mat...
41,392
[ { "from": "human", "value": "The line-height property usually takes care of vertical alignment, but not with inputs. Is there a way to automatically center text without playing around with padding?\n" }, { "from": "gpt", "value": "Yes, you can center the text vertically within input fields witho...
Here's my code (note that this was given by a friend): Private Sub Browse_Click() Dim textfile As String textfile = Space(255) GetFileNameFromBrowseW Me.hWnd, StrPtr(sSave), 255, StrPtr("c:\"), StrPtr("txt"), StrPtr("Apps (*.txt)" + Chr$(0) + "*.txt" + Chr$(0) + "All files (*.*)" + Chr$(0) + "*.*"...
Based on the provided code snippet, it looks like you are trying to create a file browsing functionality in a VBA (Visual Basic for Applications) environment. However, there are a few issues that may cause the "path not found" error you are experiencing. Here’s a revised version of your code that should work correctly...
39,273
[ { "from": "human", "value": "Here's my code (note that this was given by a friend):\nPrivate Sub Browse_Click()\n Dim textfile As String\n textfile = Space(255)\n GetFileNameFromBrowseW Me.hWnd, StrPtr(sSave), 255, StrPtr(\"c:\\\"), \n StrPtr(\"txt\"), StrPtr(\"Apps (*.txt)\" + Chr$(0) + \"*.txt\...
Can I do it with reflection or something like that?
It sounds like you're asking about the concept of reflection, which is a feature in many programming languages that allows a program to inspect and manipulate its own structure and behavior at runtime. Reflection can be used for various purposes, such as accessing object properties, invoking methods, or dynamically loa...
43,639
[ { "from": "human", "value": "Can I do it with reflection or something like that?\n" }, { "from": "gpt", "value": "It sounds like you're asking about the concept of reflection, which is a feature in many programming languages that allows a program to inspect and manipulate its own structure and b...
I know how to disable WSDL-cache in PHP, but what about force a re-caching of the WSDL? This is what i tried: I run my code with caching set to disabled, and the new methods showed up as espected. Then I activated caching, but of some reason my old non-working wsdl showed up again. So: how can I force my new WSDL to o...
When using WSDL caching in PHP with the SOAP extension, it can sometimes be tricky to ensure that the updated WSDL is being used instead of a cached version. Here are steps you can take to force PHP to re-cache a new version of the WSDL: 1. **Clear the WSDL Cache:** Manually clear the WSDL cache by deleting the cac...
38,305
[ { "from": "human", "value": "I know how to disable WSDL-cache in PHP, but what about force a re-caching of the WSDL? \nThis is what i tried: I run my code with caching set to disabled, and the new methods showed up as espected. Then I activated caching, but of some reason my old non-working wsdl showed up a...
I want a single number that represents the current date and time, like a Unix timestamp.
A Unix timestamp represents the number of seconds that have elapsed since January 1, 1970 (known as the Unix Epoch). To get the current Unix timestamp, you can use various programming languages or tools. For example, in Python, you can obtain the current Unix timestamp with the following code: ```python import time ...
42,966
[ { "from": "human", "value": "I want a single number that represents the current date and time, like a Unix timestamp.\n" }, { "from": "gpt", "value": "A Unix timestamp represents the number of seconds that have elapsed since January 1, 1970 (known as the Unix Epoch). To get the current Unix time...
We have an home-brewed XMPP server and I was asked what is our server's MSL (Maximum Segment Lifetime). What does it mean and how can I obtain it? Is it something in the Linux /proc TCP settings?
The Maximum Segment Lifetime (MSL) is a concept from networking, specifically in the context of TCP (Transmission Control Protocol). It refers to the maximum amount of time that a TCP segment can exist in the network before being discarded. The MSL is crucial for ensuring that old, stale segments do not interfere with ...
39,192
[ { "from": "human", "value": "We have an home-brewed XMPP server and I was asked what is our server's MSL (Maximum Segment Lifetime).\nWhat does it mean and how can I obtain it? Is it something in the Linux /proc TCP settings?\n" }, { "from": "gpt", "value": "The Maximum Segment Lifetime (MSL) is...
List comprehensions can be useful in certain situations, but they can also be rather horrible to read.. As a slightly exaggerated example, how would you indent the following? allUuids = [x.id for x in self.db.query(schema.allPostsUuid).execute(timeout = 20) if x.type == "post" and x.deleted is not False]
When formatting a complex list comprehension for improved readability, it's important to indent it appropriately and break it into multiple lines. This helps clarify the different components of the comprehension. Here's one way to indent your example for better readability: ```python allUuids = [ x.id for x in...
43,313
[ { "from": "human", "value": "List comprehensions can be useful in certain situations, but they can also be rather horrible to read.. As a slightly exaggerated example, how would you indent the following?\nallUuids = [x.id for x in self.db.query(schema.allPostsUuid).execute(timeout = 20) if x.type == \"post\...
I have a list of error codes I need to reference, kinda like this: Code / Error Message A01 = whatever error U01 = another error U02 = yet another error type I get the Code returned to me via a web service call and I need to display or get the readable error. So I need a function when passed a Code that returns...
Using a select case is one way to handle mapping error codes to their descriptions, but there are more efficient and maintainable methods, especially if you have many error codes. Here are a couple of alternatives: ### 1. Dictionary/Map Approach Using a dictionary (or map) structure allows you to easily look up error ...
37,386
[ { "from": "human", "value": "I have a list of error codes I need to reference, kinda like this:\nCode / Error Message \nA01 = whatever error \nU01 = another error \nU02 = yet another error type\n\nI get the Code returned to me via a web service call and I need to display or get the readable error. So I ...
I am trying to have an element fade in, then in 5000 ms fade back out again. I know I can do something like: setTimeout(function () { $(".notice").fadeOut(); }, 5000); But that will only control the fade out, would I add the above on the callback?
Yes, you can definitely achieve the desired effect by using a callback function in the `fadeIn` method to start the `fadeOut` after the fade-in animation completes. Here’s how you can do it: ```javascript $(".notice").fadeIn(function() { // This will be called after the fadeIn completes setTimeout(function() {...
43,014
[ { "from": "human", "value": "I am trying to have an element fade in, then in 5000 ms fade back out again. I know I can do something like:\nsetTimeout(function () { $(\".notice\").fadeOut(); }, 5000);\n\nBut that will only control the fade out, would I add the above on the callback?\n" }, { "from": "...
I've been looking around for a good MVC framework for Python using PyGTK. I've looked at Kiwi but found it a bit lacking, especially with using the Gazpacho Glade-replacement. Are there any other nice desktop Python MVC frameworks? I'm one of the few (it seems) to not want a webapp.
If you’re looking for a desktop MVC framework for Python, there are several options besides Kivy and GTK. Here are a few alternatives you might consider: 1. **PyQt / PySide**: - Both PyQt and PySide provide powerful tools for creating desktop applications using the MVC design pattern. They offer robust support for ...
37,433
[ { "from": "human", "value": "I've been looking around for a good MVC framework for Python using PyGTK. I've looked at Kiwi but found it a bit lacking, especially with using the Gazpacho Glade-replacement.\nAre there any other nice desktop Python MVC frameworks? I'm one of the few (it seems) to not want a w...
Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing: $fileName= "../js/ajaxupload/tees/".$fileName; list($width, $height) = getimagesize($fileName); $newwidth = 257; $newheight = ...
It looks like you're on the right track, but there are a couple of adjustments that you can make to ensure that the transparency in your PNG images is preserved when creating a thumbnail. Here's an improved version of your code: ```php $fileName = "../js/ajaxupload/tees/".$fileName; list($width, $height) = getimage...
35,931
[ { "from": "human", "value": "Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:\n$fileName= \"../js/ajaxupload/tees/\".$fileName;\n\nlist($width, $height) = getimagesi...
I would like to find all the rows in a table and match on an exact case sensitive string. Unfortunately, my table has the case insensitive collation. What is the most efficient way to perform this. Eg. I would like the following to return no rows: select * from sysobject where name = 'Sysbinobjs' For the answer assu...
To perform a case-sensitive search in a table where the column has a case-insensitive collation, you can temporarily change the collation of the column in your query. This allows you to match the exact case of the string and account for trailing spaces. You can do this by using the `COLLATE` clause in your SQL query. ...
40,955
[ { "from": "human", "value": "I would like to find all the rows in a table and match on an exact case sensitive string. Unfortunately, my table has the case insensitive collation. \nWhat is the most efficient way to perform this.\nEg.\nI would like the following to return no rows:\nselect * from sysobject wh...
I'm trying to use the < C-a> (CTRL+A) shorcut under vim to increment a variable under the cursor. This works fine under vim running on Linux. However when I try to do this in gvim under windows it "selects all" (i.e. highlights or visually selects all text in the current window). How can I change this behaviour or alte...
The behavior you're experiencing with `Ctrl+A` in gVim on Windows is indeed different from how it functions in Vim on Linux. In gVim (and other Windows applications), `Ctrl+A` is commonly mapped to "select all," which overrides Vim's default increment functionality. To recover the increment variable functionality in g...
40,354
[ { "from": "human", "value": "I'm trying to use the < C-a> (CTRL+A) shorcut under vim to increment a variable under the cursor. This works fine under vim running on Linux. However when I try to do this in gvim under windows it \"selects all\" (i.e. highlights or visually selects all text in the current windo...
What replacements are available for pinging an ip address in Ruby? The stdlib "ping" library seems to be pretty limited in functionality. I'm not interested in rolling my own code here. Are there good gems available? Should I just suck it up and live with it? (I'm coding in Ruby 1.8.6 on Linux)
If you're looking for alternatives to the standard library `ping` in Ruby, especially considering you're using an older version like Ruby 1.8.6, there are a few gems you can explore that provide more robust functionality for pinging an IP address. 1. **`net-ping`**: This gem is a popular choice for network pinging fun...
39,804
[ { "from": "human", "value": "What replacements are available for pinging an ip address in Ruby? The stdlib \"ping\" library seems to be pretty limited in functionality. I'm not interested in rolling my own code here. Are there good gems available? Should I just suck it up and live with it?\n(I'm coding in R...
Is it possible to post a description/comment variable to the facebook sharer url? It's only possible for url and title as far as I can figure out. UPDATE: Quotes/Comments were decommissioned from Facebook Sharer URLs in mid 2022.
Yes, you are correct. As of mid-2022, Facebook has made changes to its sharing functionalities, and the ability to specify a description or comment directly in the Facebook sharer URL has been removed. Currently, the primary parameters you can pass to the Facebook sharer URL are the `u` (URL) and `title`. If you're lo...
42,331
[ { "from": "human", "value": "Is it possible to post a description/comment variable to the facebook sharer url? It's only possible for url and title as far as I can figure out.\nUPDATE:\nQuotes/Comments were decommissioned from Facebook Sharer URLs in mid 2022.\n" }, { "from": "gpt", "value": "Ye...
I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. } Do I need to put this line of code, just BEFORE I leave that dispose scope .. or does the dispose 'call' that already. sha2.Clear();
In C#, when you use a `using` statement with an object that implements `IDisposable`, the object's `Dispose` method is automatically called at the end of the `using` block. This ensures that any unmanaged resources are cleaned up properly. The `Dispose` method is intended for resource cleanup, and in the case of `SHA25...
40,773
[ { "from": "human", "value": "I have this code :-\nusing (System.Security.Cryptography.SHA256 sha2 = \n new System.Security.Cryptography.SHA256Managed())\n{ .. }\n\nDo I need to put this line of code, just BEFORE I leave that dispose scope .. or does the dispose 'call' that already.\nsha2.Clear();\n\n" ...
I am using the following jquery code: $("#top ul li.corner").mouseover(function(){ $("span.left-corner").addClass("left-corner-hover"); $("span.right-corner").addClass("right-corner-hover"); $("span.content").addClass("content-hover"); }).mouseout(function(){ $("span.left-corner").removeClass("left-corn...
To apply the hover effects only to the specific `li.corner` that the mouse is currently over, you can use the `$(this)` keyword, which refers to the current element in the context of the event handler. Additionally, you would need to target the appropriate `span` elements that are children or related to the hovered `li...
41,276
[ { "from": "human", "value": "I am using the following jquery code:\n$(\"#top ul li.corner\").mouseover(function(){\n $(\"span.left-corner\").addClass(\"left-corner-hover\");\n $(\"span.right-corner\").addClass(\"right-corner-hover\");\n $(\"span.content\").addClass(\"content-hover\");\n}).mouseout(...
I have a couple of questions about generic wildcards in Java: What is the difference between List<? extends T> and List<? super T>? What is a bounded wildcard and what is an unbounded wildcard?
In Java, generics allow you to define classes, interfaces, and methods with type parameters, which can be specified with wildcards for greater flexibility. Understanding the difference between `List<? extends T>` and `List<? super T>` is key to effectively using wildcards in generics. ### Difference between `List<? ex...
37,735
[ { "from": "human", "value": "I have a couple of questions about generic wildcards in Java:\n\nWhat is the difference between List<? extends T> and List<? super T>?\nWhat is a bounded wildcard and what is an unbounded wildcard?\n\n" }, { "from": "gpt", "value": "In Java, generics allow you to def...
Is there a built in function equivalent to .NET's Guid.NewGuid(); in Cocoa? My desire is to produce a string along the lines of 550e8400-e29b-41d4-a716-446655440000 which represents a unique identifier.
In Cocoa (Objective-C or Swift), there isn't a built-in equivalent function that directly mimics .NET's `Guid.NewGuid()` for generating a UUID, but you can use the `NSUUID` class in Objective-C or the `UUID` class in Swift to achieve the same result. ### Objective-C Example You can use `NSUUID` to generate a UUID lik...
42,761
[ { "from": "human", "value": "Is there a built in function equivalent to .NET's\nGuid.NewGuid();\n\nin Cocoa?\nMy desire is to produce a string along the lines of 550e8400-e29b-41d4-a716-446655440000 which represents a unique identifier.\n" }, { "from": "gpt", "value": "In Cocoa (Objective-C or S...
I'm running OSX(10.4.11) & I'm trying to get a decent C(preferably C++) binding for MySQL figured out. I have some data in an offsite database I want to analyze. I'm trying to get MySQL++ working, but it's being funky. I'm looking for other bindings, preferably ones with a no-headache install. edit: MySQL has C bindin...
If you're using macOS 10.4.11, finding a modern C or C++ binding for MySQL can be a bit challenging due to the age of the operating system, but here are some options you might consider: 1. **MySQL C API**: Since you've already mentioned that you've used the MySQL C bindings, this is always an option. While it's low-le...
38,328
[ { "from": "human", "value": "I'm running OSX(10.4.11) & I'm trying to get a decent C(preferably C++) binding for MySQL figured out. I have some data in an offsite database I want to analyze.\nI'm trying to get MySQL++ working, but it's being funky. \nI'm looking for other bindings, preferably ones with a no...
I can't figure this one out. I can download a win32 binary of flex 2.5.4a from gnuwin32, but I'd like to build the latest version (2.5.35) using Visual Studio 2005. I suppose I could build in in cygwin, but where is the fun in that?
Building Flex (the Fast Lexical Analyzer) from source on Windows using Visual Studio can be a bit tricky, but it is definitely doable. Below are the steps you can follow to build Flex 2.5.35 using Visual Studio 2005: ### Prerequisites 1. **Visual Studio 2005**: Ensure you have Visual Studio 2005 installed with C/C++ d...
39,038
[ { "from": "human", "value": "I can't figure this one out. I can download a win32 binary of flex 2.5.4a from gnuwin32, but I'd like to build the latest version (2.5.35) using Visual Studio 2005. I suppose I could build in in cygwin, but where is the fun in that?\n" }, { "from": "gpt", "value": ...
I know the rule-of-thumb to read declarations right-to-left and I was fairly sure I knew what was going on until a colleague told me that: const MyStructure** ppMyStruct; means "ppMyStruct is a pointer to a const pointer to a (mutable) MyStructure" (in C++). I would have thought it meant "ppMyStruct is a pointer to a ...
In both C and C++, the declaration `const MyStructure** ppMyStruct;` means that `ppMyStruct` is a pointer to a pointer to a `const MyStructure`. The `const` qualifier applies to `MyStructure`, meaning that `MyStructure` objects cannot be modified through the pointers that point to them. Here's a breakdown of the decla...
41,665
[ { "from": "human", "value": "I know the rule-of-thumb to read declarations right-to-left and I was fairly sure I knew what was going on until a colleague told me that:\nconst MyStructure** ppMyStruct;\n\nmeans \"ppMyStruct is a pointer to a const pointer to a (mutable) MyStructure\" (in C++).\nI would have ...