instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am having problem creating log entry to a text file. Here is my logging configuration in my ASP.net app. and here is my vb.net code Try db.ExecuteNonQuery(cmd, tr) tr.Commit() result = True Catch ex As Exception ...
It looks like you're using Enterprise Library 4 for logging in your ASP.NET application, but you're having trouble getting your logging configuration and code to work as expected. Here's a step-by-step approach to ensure your logging setup is configured correctly and also to diagnose common issues. ### Step 1: Verify ...
47,300
[ { "from": "human", "value": "I am having problem creating log entry to a text file. Here is my logging configuration in my ASP.net app.\n\n\nand here is my vb.net code\nTry\n db.ExecuteNonQuery(cmd, tr)\n tr.Commit()\n result = True\n ...
This is a program I'm writing (myself as opposed to copying someone else's and thus not learning) as part of the ObjectiveC and Cocoa learning curve. I want to draw simple shapes on a NSView (limiting it to ovals and rectangles for now). The idea is that I record each NSBezierPath to an NSMutableArray so I can also inv...
It seems you are facing a crash when you try to set the `aPath` of your `DrawnObject` instance, which may be related to how you're managing memory and object references in Objective-C. Let's go through a few common pitfalls and improvements you can implement in your code. ### Common Issues to Check 1. **Memory Manage...
41,535
[ { "from": "human", "value": "This is a program I'm writing (myself as opposed to copying someone else's and thus not learning) as part of the ObjectiveC and Cocoa learning curve. I want to draw simple shapes on a NSView (limiting it to ovals and rectangles for now). The idea is that I record each NSBezierPa...
I know that keyframed transitions are possible in Core Animation via setting the path property on the CAAnimation instance. However, CATransition does not seem to have this functionality. Does anyone know any other ways to control the transition apart from setting the timing function?
You're correct that `CATransition` in Core Animation does not support keyframed transitions directly. The `CATransition` class provides a way to animate between states of a layer using predefined transitions, but it lacks the capability to customize the transition path or control it through keyframes. If you're lookin...
48,467
[ { "from": "human", "value": "I know that keyframed transitions are possible in Core Animation via setting the path property on the CAAnimation instance. However, CATransition does not seem to have this functionality. Does anyone know any other ways to control the transition apart from setting the timing fun...
Having friendly URLs is generally a good thing. However, there are sometimes when it seems like a bad idea. What is your rule of thumb? For instance, consider a situation where I want to show a Registration Success page. I want all of the underlying logic to be the same. However, depending on how they registered, I...
You're correct that having friendly URLs is usually beneficial for user experience and SEO, but in scenarios where you want to protect certain data or avoid exposing parameters, it's important to strike a balance between usability and security. Here are some strategies to handle the situation of displaying different ...
45,207
[ { "from": "human", "value": "Having friendly URLs is generally a good thing. However, there are sometimes when it seems like a bad idea. What is your rule of thumb?\nFor instance, consider a situation where I want to show a Registration Success page. I want all of the underlying logic to be the same. Ho...
I have a very simple problem and a solution that will work, but I'm looking for a simpler one. I'd like to prevent rows from being added to a database when multiple values equal existing values. For example, if a2=a1 AND b2=b1 then the data gets rejected. If only a2=a1 or only b2=b1 it is allowed. Basically I want i...
To achieve the requirement you specified—ensuring that a combination of two columns in your MySQL table is treated uniquely, you can use a **composite unique index**. This allows you to enforce the uniqueness of a combination of two or more columns, which acts similar to a primary key but does not have to be a primary ...
49,129
[ { "from": "human", "value": "I have a very simple problem and a solution that will work, but I'm looking for a simpler one.\nI'd like to prevent rows from being added to a database when multiple values equal existing values. For example, if a2=a1 AND b2=b1 then the data gets rejected. If only a2=a1 or onl...
I have my models and I would like to make use of the Django change_form template to edit my data. Currently I have created my own template that works fine but lacks some of the basic stuff that change_form template might have, like fields validation. Please give examples showing how should I call the template from my v...
To utilize the Django `change_form` template for editing your model instances, you can use Django's built-in `admin` views, which already incorporate the necessary validation and rendering logic. Below are the steps to properly render the `change_form` template for your custom views. ### Steps to Use the `change_form`...
43,155
[ { "from": "human", "value": "I have my models and I would like to make use of the Django change_form template to edit my data.\nCurrently I have created my own template that works fine but lacks some of the basic stuff that change_form template might have, like fields validation.\nPlease give examples showi...
How do you estimate the time needed to implement a user story? If it's something you had done before you know how long it'll take. But what about if it's completely new to you? How much time do you reserve for "surprises"?
Estimating the time needed to implement a user story, especially when it’s something new, can be challenging. Here are some strategies and considerations to help make a more accurate estimation: ### 1. **Break Down the User Story:** - **Decompose the Story:** Break the user story down into smaller, manageable tasks...
46,911
[ { "from": "human", "value": "How do you estimate the time needed to implement a user story? If it's something you had done before you know how long it'll take. But what about if it's completely new to you? How much time do you reserve for \"surprises\"?\n" }, { "from": "gpt", "value": "Estimatin...
I'm looking for a Windows tool that is able to log every action (read & write) that were made to a specific path inside the local Filesystem in order to debug a program (find out why it is sometimes slow and sometimes not). In theory it could work like a virus scanner that is recognizing every file that any of the runn...
To monitor file system activity on Windows, you have several options that can help you log every read and write operation to a specific path. Here are some tools you can use: ### 1. **Process Monitor (ProcMon)** - **Overview**: Process Monitor is part of the Sysinternals Suite from Microsoft. It provides real-time fil...
47,768
[ { "from": "human", "value": "I'm looking for a Windows tool that is able to log every action (read & write) that were made to a specific path inside the local Filesystem in order to debug a program (find out why it is sometimes slow and sometimes not).\nIn theory it could work like a virus scanner that is r...
Duplicate of: When Should I Use The Visitor Design Pattern Why would someone want to use the visitor pattern? I've read a couple of articles, but I'm not getting something. If I need a function to bill a custom, I could use Custom.Accept(BillVisitor) or something like Bill(Customer) The second is less complex, and th...
The Visitor Design Pattern can seem complex and unnecessary for simpler scenarios, but it provides several advantages in certain contexts. Here's a breakdown of why you might choose to use the Visitor Pattern: ### 1. **Separation of Concerns:** - The Visitor Pattern helps separate the algorithm from the object stru...
45,754
[ { "from": "human", "value": "Duplicate of: When Should I Use The Visitor Design Pattern\nWhy would someone want to use the visitor pattern? I've read a couple of articles, but I'm not getting something.\nIf I need a function to bill a custom, I could use\nCustom.Accept(BillVisitor)\n\nor something like\nBil...
I'm looking to perform a perspective transform on a UIView (such as seen in coverflow) Does anyonew know if this is possible? I've investigated using CALayer and have run through all the pragmatic programmer Core Animation podcasts, but I'm still no clearer on how to create this kind of transform on an iPhone. Any hel...
Yes, it is possible to perform a perspective transform on a UIView in iOS using Core Animation. The key to achieving a perspective effect (like the one seen in a CoverFlow style interface) is to modify the `transform` property of the `CALayer` that the `UIView` uses. Here's a basic example of how to achieve a perspect...
44,641
[ { "from": "human", "value": "I'm looking to perform a perspective transform on a UIView (such as seen in coverflow)\nDoes anyonew know if this is possible? \nI've investigated using CALayer and have run through all the pragmatic programmer Core Animation podcasts, but I'm still no clearer on how to create t...
I want to get from any Unix-like system (if this is possible) a unique id that will be persistent every time my application runs in the same machine. If it is possible, I want to get the same id from Linux or FreeBSD or Solaris, etc... I don't want to generate a new id for each machine, but get an already existent id, ...
To generate a unique and persistent ID for a machine across various Unix-like operating systems such as Linux, FreeBSD, and Solaris, you'll need to rely on identifiers that are relatively stable and exist across those environments. Here are some options that you can consider: ### 1. Use the `os-release` File or Equiva...
41,092
[ { "from": "human", "value": "I want to get from any Unix-like system (if this is possible) a unique id that will be persistent every time my application runs in the same machine. If it is possible, I want to get the same id from Linux or FreeBSD or Solaris, etc... I don't want to generate a new id for each ...
I have some old apps written in PHP that I'm thinking of converting to Python - both are websites that started as simple static html, then progressed to PHP and now include blogs with admin areas, rss etc. I'm thinking of rewriting them in Python to improve maintainability as well as to take advantage of my increase in...
Converting your old PHP apps to Python can be a worthwhile endeavor, especially if you're looking to improve maintainability and leverage your increased experience. Here are some factors to consider that can help you determine if the effort is justified: ### Pros of Rewriting in Python 1. **Maintainability**: Python'...
46,583
[ { "from": "human", "value": "I have some old apps written in PHP that I'm thinking of converting to Python - both are websites that started as simple static html, then progressed to PHP and now include blogs with admin areas, rss etc. I'm thinking of rewriting them in Python to improve maintainability as we...
We are porting an app which formerly used Openbase 7 to now use MySQL 5.0. OB 7 did have quite badly defined (i.e. undocumented) behavior regarding case-sensitivity. We only found this out now when trying the same queries with MySQL. It appears that OB 7 treats lookups using "=" differently from those using "LIKE": If ...
To simulate OpenBase 7's behavior in MySQL, where `=` is case-sensitive and `LIKE` is case-insensitive, you can leverage MySQL's collations and create a new collation that fits your needs. The goal is to make `=` case-sensitive while allowing `LIKE` to behave case-insensitively. Here are a few potential solutions that...
48,986
[ { "from": "human", "value": "We are porting an app which formerly used Openbase 7 to now use MySQL 5.0.\nOB 7 did have quite badly defined (i.e. undocumented) behavior regarding case-sensitivity. We only found this out now when trying the same queries with MySQL.\nIt appears that OB 7 treats lookups using \...
How do you rotate an image using jQuery-rotate plugin? I have tried the following and it doesn't seem to work: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>View Photo</title> <script type="text/javascript" src="scripts/jquery.js"></script> <script type="text/javascript...
To rotate an image using the jQuery Rotate plugin, your implementation seems mostly correct, but there are a few things to check and enhance for better compatibility and functionality. Here’s how you can properly set it up, along with additional methods that you might consider for rotation: ### 1. Using jQuery Rotate ...
45,810
[ { "from": "human", "value": "How do you rotate an image using jQuery-rotate plugin?\nI have tried the following and it doesn't seem to work:\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">\n<title>View Photo</title>\n<script type=\"text/javascript\" src=\"scri...
I have an image gallery that is swapping images and I want to link the swapped image to come up even larger in a shadowbox/lightbox. I am close, I am having a brainfreeze on how to add the link. It would go where I have the alert box popping right now. Here is the page if you want to see it so far: http://site.jpda....
It looks like you are on the right track with the changes you've made. Wrapping the image in a link using the `wrap` function is a great approach! Based on your updated code, I will provide a full context with improvements and further explanation to help you implement a shadowbox/lightbox feature more effectively. Her...
48,807
[ { "from": "human", "value": "I have an image gallery that is swapping images and I want to link the swapped image to come up even larger in a shadowbox/lightbox. I am close, I am having a brainfreeze on how to add the link. It would go where I have the alert box popping right now. Here is the page if you...
I'm writing an applicationt hat was prototyped on MySQL and is now connecting to an Oracle database. All I had to do to connect to the oracle database (having built up the table structure) was change the connection string. What is the format to connect to a SQL Server DB on another machine? I've read some tutorials whi...
To connect to a SQL Server database from a Java application in a database-agnostic way, you'll likely want to use the JDBC (Java Database Connectivity) driver for SQL Server. Unlike ODBC, JDBC does not require you to install a data source; instead, you can specify the connection details directly in your connection stri...
39,249
[ { "from": "human", "value": "I'm writing an applicationt hat was prototyped on MySQL and is now connecting to an Oracle database.\nAll I had to do to connect to the oracle database (having built up the table structure) was change the connection string.\nWhat is the format to connect to a SQL Server DB on an...
I wish to send a header to my Apache server on a Linux box. How can I achieve this via a cURL call?
To send a custom header to your Apache server using a cURL call, you can use the `-H` option followed by the header you want to include. Here’s a general syntax for the cURL command: ```bash curl -H "Header-Name: Header-Value" http://your-apache-server.com/path ``` Replace `Header-Name` with the name of the header yo...
49,704
[ { "from": "human", "value": "I wish to send a header to my Apache server on a Linux box. How can I achieve this via a cURL call?\n" }, { "from": "gpt", "value": "To send a custom header to your Apache server using a cURL call, you can use the `-H` option followed by the header you want to inclu...
I am opening a MS Access DB which is Password protected in vb.net using the folloing code: Try oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, _ ReadOnly:=False, Connect:="") Catch ex As Exception strError = "File is password protected." Exit Function End T...
The issue you're encountering, where the MS Access application (`msaccess.exe`) opens up automatically when you try to release the COM object, is likely related to how you're managing the lifecycle of the Access database object in your VB.NET code. When you open a database using the DAO (Data Access Objects) in a COM ...
47,299
[ { "from": "human", "value": "I am opening a MS Access DB which is Password protected in vb.net using the folloing code:\nTry\n oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, _\n ReadOnly:=False, Connect:=\"\")\n\nCatch ex As Exception\n\n strError = \"F...
Currently I`m using Visual Studio for writing code in C++. But it seems so weighty that I decided to switch for another one, preferably free, not so strict to system resources (I mean memory, of course) as VS to learn libraries, such as Boost and Qt. What compiler do you suggest?
If you're looking for a lightweight and free alternative to Visual Studio for C++ development, there are several options you can consider: 1. **Code::Blocks**: - An open-source IDE that is lightweight and highly customizable. It supports various compilers, including GCC (MinGW) and others. It’s a good option for d...
48,705
[ { "from": "human", "value": "Currently I`m using Visual Studio for writing code in C++. But it seems so weighty that I decided to switch for another one, preferably free, not so strict to system resources (I mean memory, of course) as VS to learn libraries, such as Boost and Qt. What compiler do you suggest...
I'm trying to connect to a remote database (hosted on Netfirms www.netfirms.ca if anyone is curious) using hibernate. My mapping file is as follows: <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hiberna...
The `NoRouteToHostException` indicates that your application cannot establish a connection to the database host at the specified address. Here are several potential causes and troubleshooting steps you can consider: 1. **Network Issues**: - **Firewall/Network Configuration**: Check if there are any firewalls (eithe...
45,947
[ { "from": "human", "value": "I'm trying to connect to a remote database (hosted on Netfirms www.netfirms.ca if anyone is curious) using hibernate. My mapping file is as follows:\n<hibernate-configuration>\n <session-factory>\n <property name=\"hibernate.connection.driver_class\">com.mysql.jdbc.Dri...
I have a string that represents a non indented XML that I would like to pretty-print. For example: <root><node/></root> should become: <root> <node/> </root> Syntax highlighting is not a requirement. To tackle the problem I first transform the XML to add carriage returns and white spaces and then use a pre tag to o...
Your approach to pretty-printing XML using a custom function is a common method, and it works well for many use cases. However, if you're looking for a more straightforward solution or a library that can handle this task for you, consider the following options: ### Option 1: Using DOMParser and XMLSerializer You can ...
47,344
[ { "from": "human", "value": "I have a string that represents a non indented XML that I would like to pretty-print. For example:\n<root><node/></root>\n\nshould become:\n<root>\n <node/>\n</root>\n\nSyntax highlighting is not a requirement. To tackle the problem I first transform the XML to add carriage ret...
All objects in my program inherit from a Container class. The Container class has a virtual BaseNode* getParent() const; method and a virtual void setParent(BaseNode *p); method. I have a Set class (Set in a tennis match, not a data structure) which has the Match class as it's parent (via setParent()) but since Set in...
You're on the right track with your understanding of how type conversion and dynamic casting work in C++. Let's clarify a few points related to the error you're encountering and how to resolve it. ### The Error Explained The original error message you received: ``` C++: invalid conversion from 'BaseNode*' to 'Match*...
43,333
[ { "from": "human", "value": "All objects in my program inherit from a Container class. The Container class has a virtual BaseNode* getParent() const; method and a virtual void setParent(BaseNode *p); method. \nI have a Set class (Set in a tennis match, not a data structure) which has the Match class as it's...
Is there a reasonable way to access FoxPro databases using LINQ?
Accessing FoxPro databases using LINQ can be a bit challenging due to the proprietary nature of FoxPro's file formats and the lack of built-in support for them in most LINQ providers. However, there are approaches you can take to work with FoxPro databases using LINQ. ### 1. OLE DB Provider You can use an OLE DB prov...
47,659
[ { "from": "human", "value": "Is there a reasonable way to access FoxPro databases using LINQ?\n" }, { "from": "gpt", "value": "Accessing FoxPro databases using LINQ can be a bit challenging due to the proprietary nature of FoxPro's file formats and the lack of built-in support for them in most L...
Is it possible to pump monochrome (graphical data with 1 bit image depth) texture into OpenGL? I'm currently using this: glTexImage2D( GL_TEXTURE_2D, 0, 1, game->width, game->height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, game->culture[game->phase] ); I'm pumping it with square array of 8 bit unsigned integers in GL_LUMIN...
Yes, you can indeed use monochrome (1-bit per pixel) textures in OpenGL, but there are a few things you need to take into consideration. OpenGL does not have a dedicated format for 1-bit textures, so you will need to use a workaround to represent this data. ### 1. Texture Formats You can use either an 8-bit texture fo...
46,404
[ { "from": "human", "value": "Is it possible to pump monochrome (graphical data with 1 bit image depth) texture into OpenGL?\nI'm currently using this:\nglTexImage2D( GL_TEXTURE_2D, 0, 1, game->width, game->height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, game->culture[game->phase] );\n\nI'm pumping it with square...
Is it best practice to wrap a web service method/call into a try/catch block? I don't web service requests tend to be the reason why the .NET desktop applications crash? So I was thinking all calls should be wrapped in try/catch to prevent this. Good idea? Also, should it throw an exception or just have an empty catch?...
Yes, wrapping web service method calls in a try/catch block is generally considered best practice in .NET applications, including desktop applications. This is especially important for web service calls because they can fail for various reasons, such as network issues, server downtime, or invalid responses. Handling ex...
44,255
[ { "from": "human", "value": "Is it best practice to wrap a web service method/call into a try/catch block?\nI don't web service requests tend to be the reason why the .NET desktop applications crash? So I was thinking all calls should be wrapped in try/catch to prevent this.\nGood idea?\nAlso, should it thr...
I have a nightly batch job that can tell if it has failed. I want it to send me an email, possibly with an attachment when it does. How can I send an email from a Windows Batch (.bat) file?
To send an email from a Windows Batch (.bat) file, you'll need a tool or a script that can handle SMTP (Simple Mail Transfer Protocol) to send the email, as Windows Batch files do not have built-in capabilities for sending emails directly. One common approach is to use a command-line utility like `blat` or PowerShell....
47,813
[ { "from": "human", "value": "I have a nightly batch job that can tell if it has failed. I want it to send me an email, possibly with an attachment when it does. \nHow can I send an email from a Windows Batch (.bat) file?\n" }, { "from": "gpt", "value": "To send an email from a Windows Batch (.ba...
Is it possible to have a C static library API, which uses C++ internally and hide this from users of the library? I have writen a portable C++ library I wish to statically link to an iPhone application. I have created an Xcode project using the Max OS X 'static library' template, and copied the source across, as well a...
Yes, it is indeed possible to create a C API for a static library that uses C++ internally, effectively hiding the C++ details from the users of your library. You've taken some of the right steps already by creating a C wrapper for your C++ functionality and using `extern "C"` to prevent name mangling. However, there ...
48,251
[ { "from": "human", "value": "Is it possible to have a C static library API, which uses C++ internally and hide this from users of the library?\nI have writen a portable C++ library I wish to statically link to an iPhone application.\nI have created an Xcode project using the Max OS X 'static library' templa...
Extended Backus–Naur Form: EBNF I'm very new to parsing concepts. Where can I get sufficiently easy to read and follow material for writing a grammar for the boost::spirit library, which uses a grammar similar to EBNF? Currently I am looking into EBNF from Wikipedia.
Welcome to the world of parsing! Extended Backus–Naur Form (EBNF) is a notation used to express context-free grammars, and it's great that you're looking into it, especially for use with the Boost.Spirit library. Here are some resources that can help you get started with EBNF and Boost.Spirit: ### Understanding EBNF ...
45,220
[ { "from": "human", "value": "Extended Backus–Naur Form: EBNF \nI'm very new to parsing concepts. Where can I get sufficiently easy to read and follow material for writing a grammar for the boost::spirit library, which uses a grammar similar to EBNF?\nCurrently I am looking into EBNF from Wikipedia. \n" },...
I am trying to specify an alternative jre (my default is 1.6 and i need to run with jdk 1.4.2) in Eclipse, for an application that i shall launch from eclipse. I am not sure if I am doing the right thing in the following code: Path jreContainerPath = new Path("/usr/lib/jvm/j2sdk1.4.2_18/"); IVMInstall jre = JavaRuntime...
In Eclipse, to specify an alternative JRE for launching applications programmatically, you need to ensure that you are correctly identifying the JRE installation path. The issue you are facing is likely due to not using the correct format or not obtaining the JRE install correctly from the Eclipse JRE container. Here ...
46,507
[ { "from": "human", "value": "I am trying to specify an alternative jre (my default is 1.6 and i need to run with jdk 1.4.2) in Eclipse, for an application that i shall launch from eclipse. I am not sure if I am doing the right thing in the following code:\nPath jreContainerPath = new Path(\"/usr/lib/jvm/j2s...
I'm just starting out writing trying to write a simple program in C and I am using Visual Studios to do so. I heard that it does compile C as well as C++. And I know that it does because it says it compiles. The only problem is that when I go to the output directory, there isn't a .exe file in the directory! It has the...
It sounds like you're having a couple of issues with your C project in Visual Studio. Let's address them one by one. ### 1. Missing `.exe` File The absence of an executable file in the output directory could be due to a few reasons: - **Build Configuration**: Ensure that your project is set to compile as a "Release"...
46,340
[ { "from": "human", "value": "I'm just starting out writing trying to write a simple program in C and I am using Visual Studios to do so. I heard that it does compile C as well as C++. And I know that it does because it says it compiles. The only problem is that when I go to the output directory, there isn't...
I'm using MBUnit Framework for unit testing and looking for a good test runner. MbUnit's runner is fast however lacking lots of stuff such as You can't set execution path It's collapsing all trees in every run which drives me crazy And almost all other test runner provides so many extra quite and lovely features I u...
If you are looking for a good test runner for MBUnit, here are some alternatives to consider that could help you achieve better performance and user experience while running your unit tests: 1. **TestDriven.NET**: While you've mentioned it is not ideal for running all your tests together, you may want to reconsider it...
46,699
[ { "from": "human", "value": "I'm using MBUnit Framework for unit testing and looking for a good test runner.\nMbUnit's runner is fast however lacking lots of stuff such as \n\nYou can't set execution path\nIt's collapsing all trees in every run which drives me crazy\nAnd almost all other test runner provide...
I would like to know if there is any easy way to print multiple emails(about 200) so that they continue on as opposed to printing one per page. I have tried with thunderbird and evolution and this does not seem possible. Would concatenating the individual mail files work or are there other unix utilities that could do ...
Printing multiple emails as a single document can indeed be challenging, especially if the email client you're using does not support batch printing directly. Here are a few potential approaches you might consider: ### 1. **Concatenating Email Files:** If the emails are saved as individual files (like `.eml` files), y...
44,690
[ { "from": "human", "value": "I would like to know if there is any easy way to print multiple emails(about 200) so that they continue on as opposed to printing one per page. I have tried with thunderbird and evolution and this does not seem possible. Would concatenating the individual mail files work or are ...
I have a backup script that runs in the background daily on my linux (Fedora 9) computer. If the computer is shut down while the backup is in progress the backup may be damaged so I would like to write a small script that temporarily disables the ability of the user to reboot or shut the computer down. It is not neces...
To achieve your goal of preventing users from shutting down the computer while a backup is running, you can create a simple script that checks if the backup process is active and displays a warning message when a shutdown is attempted. Below is a basic approach using a Bash script. This script utilizes a custom shutdo...
45,783
[ { "from": "human", "value": "I have a backup script that runs in the background daily on my linux (Fedora 9) computer. If the computer is shut down while the backup is in progress the backup may be damaged so I would like to write a small script that temporarily disables the ability of the user to reboot or...
That is, all text and subtags, without the tag of an element itself? Having <p>blah <b>bleh</b> blih</p> I want blah <b>bleh</b> blih element.text returns "blah " and etree.tostring(element) returns: <p>blah <b>bleh</b> blih</p>
If you want to extract the inner HTML of an element (i.e., the text and all nested tags) but omit the tag of the element itself, you can use libraries like `lxml` or `BeautifulSoup` in Python. Below are examples using both libraries. ### Using `lxml` ```python from lxml import etree # Create an element element = etr...
47,188
[ { "from": "human", "value": "That is, all text and subtags, without the tag of an element itself?\nHaving\n<p>blah <b>bleh</b> blih</p>\n\nI want \nblah <b>bleh</b> blih\n\nelement.text returns \"blah \" and etree.tostring(element) returns:\n<p>blah <b>bleh</b> blih</p>\n\n" }, { "from": "gpt", ...
Is there anyway to get the THotkey component in delphi to support the windows key? Or does anyone know of a component that can do this? Thanks heaps!
In Delphi, the standard `THotkey` component does not support the Windows key (the key with the Windows logo) as it is reserved by the operating system for certain functionalities. However, you can use other methods to achieve similar functionality. ### Alternative Approach: 1. **Low-Level Keyboard Hooks**: You can im...
48,454
[ { "from": "human", "value": "Is there anyway to get the THotkey component in delphi to support the windows key?\nOr does anyone know of a component that can do this?\nThanks heaps!\n" }, { "from": "gpt", "value": "In Delphi, the standard `THotkey` component does not support the Windows key (the ...
I have a ComboBox that I set up like this: this.cmbCustomerJob.DisplayMember = "display"; this.cmbCustomerJob.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.cmbCustomerJob.AutoCompleteSource = AutoCompleteSource.ListItems; this.cmbCustomerJob.DropDownStyle = ComboBoxStyle.DropDown; However I'm messing with th...
To get only the portion of the text that the user has typed in a ComboBox when using `AutoCompleteMode.SuggestAppend`, you need to handle the `KeyPress` event carefully. The `Text` property of the ComboBox reflects the complete text, including any suggestions that may have been appended by the AutoComplete feature. To...
44,703
[ { "from": "human", "value": "I have a ComboBox that I set up like this:\nthis.cmbCustomerJob.DisplayMember = \"display\";\nthis.cmbCustomerJob.AutoCompleteMode = AutoCompleteMode.SuggestAppend;\nthis.cmbCustomerJob.AutoCompleteSource = AutoCompleteSource.ListItems;\nthis.cmbCustomerJob.DropDownStyle = Combo...
I was reading a book on templates and found the following piece of code: template <template <class> class CreationPolicy> class WidgetManager : public CreationPolicy<Widget> { ... void DoSomething() { Gadget* pW = CreationPolicy<Gadget>().Create(); ... } }; I didn't get the nested templates specified for the CreationP...
The syntax you see in the code involves a combination of templates and template parameters, which can indeed be a bit confusing at first glance. Let’s break it down: 1. **Template Parameter Declaration**: - `template <template <class> class CreationPolicy>` means that `CreationPolicy` is itself a template that take...
45,229
[ { "from": "human", "value": "I was reading a book on templates and found the following piece of code:\ntemplate <template <class> class CreationPolicy>\nclass WidgetManager : public CreationPolicy<Widget>\n{\n...\nvoid DoSomething()\n{\nGadget* pW = CreationPolicy<Gadget>().Create();\n...\n}\n};\n\nI didn't...
Existing code is using an asp:repeater to build an HTML table. (emphasis on the existing design). This is some partial pseudo-code to generate the table: <asp:repeater OnItemDataBound="ItemDataBound" ... > <headertemplate> <table> <thead> <tr> <td>Date</td> <...
You can achieve the desired functionality in your ASP.NET Repeater by using `PlaceHolder` controls to conditionally display different rows based on the data bound to the repeater. Here’s how you can implement it step by step, including the necessary adjustments in the ASPX markup and the code-behind. ### ASPX Markup ...
47,086
[ { "from": "human", "value": "Existing code is using an asp:repeater to build an HTML table. (emphasis on the existing design). This is some partial pseudo-code to generate the table:\n<asp:repeater OnItemDataBound=\"ItemDataBound\" ... >\n\n <headertemplate>\n <table>\n <thead>\n <...
In our C++ course they suggest not to use C++ arrays on new projects anymore. As far as I know Stroustrup himself suggests not to use arrays. But are there significant performance differences?
In modern C++, the recommendation to avoid C-style arrays often stems from concerns about safety, usability, and maintainability rather than performance. Here are some key points to consider when discussing the differences between C-style arrays and modern alternatives (like `std::vector` or other STL containers): ###...
47,942
[ { "from": "human", "value": "In our C++ course they suggest not to use C++ arrays on new projects anymore. As far as I know Stroustrup himself suggests not to use arrays. But are there significant performance differences?\n" }, { "from": "gpt", "value": "In modern C++, the recommendation to avoi...
for m := 0 to 300 do if Pos(certain_String, string(arrayitem(m)) <> 0 then begin randomize; x := random(100); begin case x of 0..69 : function(m); // 70 percent 70..79 : function(m+1); // 10 percent 80..84 : function(m+2); //...
You are right; the assignment `m := 300;` in the middle of a `for` loop is problematic because it alters the loop counter, which can lead to unexpected behavior or termination of the loop before its normal completion. In Pascal, you typically don't modify the loop variable within the loop itself. To achieve what you w...
46,196
[ { "from": "human", "value": " for m := 0 to 300 do\n if Pos(certain_String, string(arrayitem(m)) <> 0 then\n begin\n randomize;\n x := random(100);\n begin\n case x of\n 0..69 : function(m); // 70 percent\n 70..79 : function(m+1); // ...
I'd like to use WMI on some windows systems to poll the network usage of each process. From what I can tell, there are many IO instances in the Win32_PerfRawData_PerfProc_Process but they are for the combined IO of network,disk,and device. Is there a way to break that up so I can get network and disk IO separate?
When using WMI (Windows Management Instrumentation) to monitor performance data, particularly for processes on Windows systems, you might indeed encounter some limitations regarding how performance counters are aggregated. The `Win32_PerfRawData_PerfProc_Process` class provides data related to various performance metri...
47,633
[ { "from": "human", "value": "I'd like to use WMI on some windows systems to poll the network usage of each process. From what I can tell, there are many IO instances in the Win32_PerfRawData_PerfProc_Process but they are for the combined IO of network,disk,and device. Is there a way to break that up so I ca...
I don't want customers to be able to make backups of my sql server database and access the tables data etc. I know there are some products that will encrypt the data in the tables, and their product will decrypt it when displaying in my application. What products do you guys know of? What options do I have? (This is a...
To protect your SQL Server 2008 Express database and prevent customers from easily backing up the database or accessing the data directly, you have a few options to consider, including encryption solutions and database security practices. Here are some products and strategies you might find helpful: ### 1. **Transpare...
48,009
[ { "from": "human", "value": "I don't want customers to be able to make backups of my sql server database and access the tables data etc.\nI know there are some products that will encrypt the data in the tables, and their product will decrypt it when displaying in my application.\nWhat products do you guys k...
I just installed SQL Server 2008 Express on my Vista SP1 machine. I previously had 2005 on here and used it just fine with the old SQL Server Management Studio Express. I was able to connect with no problems to my PC-NAME\SQLEXPRESS instance (no, PC-NAME is not my computer name ;-). I uninstalled 2005 and SQL Server Ma...
It sounds like you're experiencing a frustrating situation after upgrading to SQL Server 2008 Express. Here are several steps you can take to troubleshoot and resolve the connection issue: ### 1. Verify SQL Server Services Ensure that the SQL Server (SQLEXPRESS) service is running: - Open SQL Server Configuration Mana...
44,635
[ { "from": "human", "value": "I just installed SQL Server 2008 Express on my Vista SP1 machine. I previously had 2005 on here and used it just fine with the old SQL Server Management Studio Express. I was able to connect with no problems to my PC-NAME\\SQLEXPRESS instance (no, PC-NAME is not my computer name...
We have many projects that use a common base of shared components (dlls). Currently the development build for each project links against dlls built from the trunk of the components. (ie trunk builds use the dlls from other trunk builds) When we do a release build, we have a script that goes through the project files a...
Your situation is a common challenge in software development, particularly when multiple products share components that evolve over time. Balancing the need for stability during development with the necessity to keep components up to date can be tricky. Here are some practices and strategies that might help you navigat...
45,308
[ { "from": "human", "value": "We have many projects that use a common base of shared components (dlls). \nCurrently the development build for each project links against dlls built from the trunk of the components. (ie trunk builds use the dlls from other trunk builds)\nWhen we do a release build, we have a s...
I'm looking for a plugin-based application framework that is comparable to the Eclipse Plugin Framework, which to my simple mind consists of: a core plugin management framework (Equinox / OSGI), which provides the ability to declare extension endpoints and then discover and load plugins that service those endpoints. ...
You've done an impressive amount of research on various plugin-based frameworks in the .NET ecosystem. Given the complexity of building an extensible application similar to Eclipse RCP, it's important to consider not only the core features and capabilities of these frameworks but also their compatibility with your desi...
43,372
[ { "from": "human", "value": "I'm looking for a plugin-based application framework that is comparable to the Eclipse Plugin Framework, which to my simple mind consists of:\n\na core plugin management framework (Equinox / OSGI), which provides the ability to declare extension endpoints and then discover and l...
Obviously I can do and DateTime.Now.After - DateTime.Now.Before but there must be something more sophisticated. Any tips appreciated.
It seems like you are looking for a more sophisticated way to handle date and time comparisons in .NET or C#. Depending on your specific needs, there are a few different approaches and best practices you can consider. Here are some tips: ### 1. Use DateTime Properties Instead of using `DateTime.Now`, you can use prop...
47,382
[ { "from": "human", "value": "Obviously I can do and DateTime.Now.After - DateTime.Now.Before but there must be something more sophisticated.\nAny tips appreciated.\n" }, { "from": "gpt", "value": "It seems like you are looking for a more sophisticated way to handle date and time comparisons in ...
I have problems with Boost.Spirit parsing a string. The string looks like name1 has this and that.\n name 2 has this and that.\n na me has this and that.\n and I have to extract the names. The text "has this and that" is always the same but the name can consist of spaces therefore I can't use graph_p. 1) How do...
To parse the given input using Boost.Spirit, you can create a grammar that captures the names and the fixed phrase that follows them. Since the names can contain spaces, you will want to use a rule that allows for whitespace characters to be included in the names. Here’s how you can achieve this: 1. **Parse the names...
45,491
[ { "from": "human", "value": "I have problems with Boost.Spirit parsing a string. \nThe string looks like \nname1 has this and that.\\n \nname 2 has this and that.\\n \nna me has this and that.\\n \n\nand I have to extract the names. The text \"has this and that\" is always the same but the name can consist ...
Whenever I list the contents of a directory with a function like readdir, the returned file names also include "." and "..". I have the suspicion that these are just normal links in the file system and therefore indistinguishable from actual files, but I always have to filter them out because they are not actual object...
The entries `.` and `..` in a directory are indeed integral parts of most file systems and are not merely conventions. Here's a detailed breakdown of why they exist and the considerations around them: ### Purpose of `.` and `..` 1. **Current Directory (`.`)**: Represents the current directory. It allows programs and ...
49,150
[ { "from": "human", "value": "Whenever I list the contents of a directory with a function like readdir, the returned file names also include \".\" and \"..\". I have the suspicion that these are just normal links in the file system and therefore indistinguishable from actual files, but I always have to filte...
I am working with a wrapper class for CFHTTPMessage, which contains a CFHTTPMessageRef object to which is added the method (GET), the URL of the web application server, and a few custom headers containing the date and an authentication nonce. I'm having some problems getting the method and URL to return certain data. I...
To log the raw HTTP request from a `CFHTTPMessageRef` object in your wrapper class, you can take the following steps. First, make sure you have constructed the `CFHTTPMessageRef` properly. You can use `CFHTTPMessageCopyRequest()` to extract the complete HTTP request, and then convert it to a `CFDataRef` to retrieve the...
43,595
[ { "from": "human", "value": "I am working with a wrapper class for CFHTTPMessage, which contains a CFHTTPMessageRef object to which is added the method (GET), the URL of the web application server, and a few custom headers containing the date and an authentication nonce.\nI'm having some problems getting th...
I have an internal enterprise application I've developed for my company built on .Net 3.5 / SQL 2008. I have two types of databases. The main system database which contains all of our global data, such as user names, and customers, etc. And project databases, which contain the actual data pertaining to our clients p...
Provisioning a new SQL database programmatically can indeed be approached in several ways. Your current approach of reading a SQL script from the file system and performing string replacements is a common starting point, but there are more structured and maintainable methods that you might consider. Here are some optio...
43,030
[ { "from": "human", "value": "I have an internal enterprise application I've developed for my company built on .Net 3.5 / SQL 2008. \nI have two types of databases. The main system database which contains all of our global data, such as user names, and customers, etc. And project databases, which contain t...
Why don't we get compile errors on inline code errors in asp.net mvc views f.eks <h1><%= ViewData.Model.Title.Tostrig() %></h1> The code above will build just fine. Wrong spelling in webform controls will give you an error so I can't see why this isn't supported in asp.net mvc EDIT: Luckily there seem to be a fix incl...
The behavior you're observing in ASP.NET MVC views regarding compile-time errors is due to how the Razor view engine (introduced in later versions of ASP.NET MVC) and the earlier Web Forms view engine handle code within views. In ASP.NET MVC, especially in the early versions (such as the one you're referring to before...
44,652
[ { "from": "human", "value": "Why don't we get compile errors on inline code errors in asp.net mvc views f.eks\n<h1><%= ViewData.Model.Title.Tostrig() %></h1>\n\nThe code above will build just fine. Wrong spelling in webform controls will give you an error so I can't see why this isn't supported in asp.net m...
I always tell in c# a variable of type double is not suitable for money. All weird things could happen. But I can't seem to create an example to demonstrate some of these issues. Can anyone provide such an example? (edit; this post was originally tagged C#; some replies refer to specific details of decimal, which there...
You're absolutely right in stating that using `double` for monetary values can lead to precision issues, primarily because of how floating-point numbers are represented in binary. This can cause unexpected results during arithmetic operations. Instead, C# provides the `decimal` type specifically designed for financial ...
48,529
[ { "from": "human", "value": "I always tell in c# a variable of type double is not suitable for money. All weird things could happen. But I can't seem to create an example to demonstrate some of these issues. Can anyone provide such an example?\n(edit; this post was originally tagged C#; some replies refer t...
Starting with a already existing installscript 11.5 installer, we created a update installer (differential installer). Given: V1 (first version of the software) V2 (second version of the software) V2P (differential installer between V1 and V2 If I install V1 and deinstall it, no reboot is required If I install V2 and...
Hi Nic, It sounds like you're encountering issues with pending file rename operations (PFRO) when using a differential installer created with InstallShield. This is not uncommon when dealing with installations and updates, especially if files are being replaced or modified. ### Understanding the Cause 1. **File Repl...
47,731
[ { "from": "human", "value": "Starting with a already existing installscript 11.5 installer, we created a update installer (differential installer).\nGiven:\n\nV1 (first version of the software)\nV2 (second version of the software)\nV2P (differential installer between V1 and V2\n\nIf I install V1 and deinsta...
The terms are used all over the place, and I don't know of crisp definitions. I'm pretty sure I know what a data mart is. And I've created reporting cubes with tools like Business Objects and Cognos. I've also had folks tell me that a datamart is more than just a collection of cubes. I've also had people tell me that...
The terms "data mart," "reporting cube," and "OLAP cube" can indeed lead to confusion due to their overlapping nature in the realm of business intelligence and data warehousing. Here’s a breakdown of these concepts to clarify the distinctions: ### Data Mart - **Definition**: A data mart is a subset of a data warehous...
47,688
[ { "from": "human", "value": "The terms are used all over the place, and I don't know of crisp definitions. I'm pretty sure I know what a data mart is. And I've created reporting cubes with tools like Business Objects and Cognos.\nI've also had folks tell me that a datamart is more than just a collection o...
Anyone knows a good way to resize any window to for example 640x480? Reason is, of course, screencasting. Under windows I've used ZoneSize from donationcoder. (Btw: For Firefox it's easy, just use the web developer toolbar.)
If you're looking to resize any window to a specific resolution, such as 640x480, there are a few methods and tools you can use on Windows: ### 1. **AutoHotkey** You can use AutoHotkey, a powerful scripting language for Windows, to create a script that resizes windows to your desired dimensions. Here's a simple script...
47,321
[ { "from": "human", "value": "Anyone knows a good way to resize any window to for example 640x480?\nReason is, of course, screencasting.\nUnder windows I've used ZoneSize from donationcoder. (Btw: For Firefox it's easy, just use the web developer toolbar.)\n" }, { "from": "gpt", "value": "If you'...
I like to have a popup modal dialog that need to show the list of options (like a radio button select event). But I don't know what I am missing! It works fine when no HTML tag is embedded in Impromtu. Do I include it in CSS? <html> <head> <LINK REL=StyleSheet HREF="examples.css" TITLE="Contemporary" TYPE="...
It looks like you are trying to use jQuery and the jQuery Impromptu plugin to create a modal dialog that includes radio buttons. Your implementation is almost correct, but there are a couple of things you can check and modify to ensure that your radio buttons show up properly in the modal dialog. Here’s how you can mo...
48,373
[ { "from": "human", "value": "I like to have a popup modal dialog that need to show the list of options (like a radio button select event). But I don't know what I am missing! It works fine when no HTML tag is embedded in Impromtu. Do I include it in CSS?\n<html>\n <head>\n <LINK REL=StyleSheet HRE...
I am using a third party application and would like to change one of its files. The file is stored in XML but with an invalid doctype. When I try to read use a it errors out becuase the doctype contains "file:///ReportWiz.dtd" (as shown, with quotes) and I get an exception for cannot find file. Is there a way to tell t...
To handle an XML file with an invalid DOCTYPE that is causing parsing errors, there are several approaches you can consider. Here are a few methods, including some that may simplify your task without manually copying lines: ### 1. Use a Custom EntityResolver You can create a custom `EntityResolver` to ignore the DTD (...
47,498
[ { "from": "human", "value": "I am using a third party application and would like to change one of its files. The file is stored in XML but with an invalid doctype.\nWhen I try to read use a it errors out becuase the doctype contains \"file:///ReportWiz.dtd\"\n(as shown, with quotes) and I get an exception f...
I am performing a lot of JavaScript work in the browser and would like to have some of that backend functionality in the front-end. Specifically, it would be nice to have the functions get(), save(), all() and count() available to the client. Additionally, it would be great to have the field list of the model already a...
Yes, you can generate a JavaScript model from a Django model to facilitate the backend functionality you described in your JavaScript work. To achieve this, you can use Django Rest Framework (DRF) to expose your models as APIs and then consume those APIs on the front-end using JavaScript. Here's a step-by-step guide t...
31,285
[ { "from": "human", "value": "I am performing a lot of JavaScript work in the browser and would like to have some of that backend functionality in the front-end. Specifically, it would be nice to have the functions get(), save(), all() and count() available to the client. Additionally, it would be great to h...
I'm working on some upgrades to an internal web analytics system we provide for our clients (in the absence of a preferred vendor or Google Analytics), and I'm working on the following query: select path as EntryPage, count(Path) as [Count] from ( /* Sub-query 1 */ select pv...
It sounds like you had quite a journey optimizing your query for performance! It's great to see that you found a solution that drastically improved the execution time. The approach you took of maintaining entry and exit pages in the `Sessions` table not only simplifies your querying logic but can also significantly red...
40,819
[ { "from": "human", "value": "I'm working on some upgrades to an internal web analytics system we provide for our clients (in the absence of a preferred vendor or Google Analytics), and I'm working on the following query:\nselect \n path as EntryPage, \n count(Path) as [Count] \nfrom \n (\n /...
I create business applications with heavy database use. Most of the programming work is just to connect components to the database and modifying components to adapt to general interface behaviour. I mostly use Delphi with its rich VCL library, and generally buy components needed. I keep most of the business logic in th...
Yes, many developers in the business application space have similar experiences, especially when working with data-centric applications where the primary focus is on efficiently managing data and implementing business logic at the database level. Here are a few reflections on that experience: 1. **Database-Centric Dev...
49,317
[ { "from": "human", "value": "I create business applications with heavy database use. Most of the programming work is just to connect components to the database and modifying components to adapt to general interface behaviour. I mostly use Delphi with its rich VCL library, and generally buy components needed...
How would one draw an oval in JS?
To draw an oval (or an ellipse) in JavaScript, you typically use the HTML5 `<canvas>` element along with the Canvas API. Below are the steps to create a simple web page that draws an oval. ### Step 1: Set Up HTML First, you need to create an HTML file with a `<canvas>` element: ```html <!DOCTYPE html> <html lang="en...
41,489
[ { "from": "human", "value": "How would one draw an oval in JS?\n" }, { "from": "gpt", "value": "To draw an oval (or an ellipse) in JavaScript, you typically use the HTML5 `<canvas>` element along with the Canvas API. Below are the steps to create a simple web page that draws an oval.\n\n### Step...
Is there a standard when it comes to implementing keyboard shortcuts / accelerator keys for web applications. Example: Navigating through a list of items presented in a grid Are their guidelines on how to implement this? Google has one for GMail in the "labs" section. Also would it make business sense in investing ti...
When implementing keyboard shortcuts or accelerator keys for web applications, there are indeed some best practices and guidelines that can help ensure a user-friendly experience. Here are a few key considerations: ### 1. **Standardization and Consistency** - **Common Shortcuts**: Use commonly understood shortcuts (e....
45,057
[ { "from": "human", "value": "Is there a standard when it comes to implementing keyboard shortcuts / accelerator keys for web applications. \nExample: Navigating through a list of items presented in a grid\nAre their guidelines on how to implement this?\nGoogle has one for GMail in the \"labs\" section. \nAl...
I'm looking for a way to create a data access layer that can either reside on a server and be accessed via WCF services or can reside on the local machine in which case it would just be accessed directly without having to run through iis. Is there a way to abstract this in such a way that changing from the local to the...
Yes, you can definitely create a data access layer (DAL) that can function in both local and WCF service modes. The key to achieving this is to use a common interface and a factory pattern to abstract the data access implementation. This allows you to switch between local access and WCF access based on a configuration ...
43,903
[ { "from": "human", "value": "I'm looking for a way to create a data access layer that can either reside on a server and be accessed via WCF services or can reside on the local machine in which case it would just be accessed directly without having to run through iis. Is there a way to abstract this in such ...
How would I handle something like the below uri using ASP.NET MVC's routing capability: http://localhost/users/{username}/bookmarks/ - GET http://localhost/users/{username}/bookmark/{bookmarkid} - PUT Which lists the bookmarks for the user in {username}. Thanks
To handle the given URIs using ASP.NET MVC routing capabilities, you need to define routes in the `RouteConfig` class, typically located in the `App_Start` folder of your ASP.NET MVC project. Here’s how you can set it up for your specified URIs: ### Step 1: Define the Routes In your `RouteConfig.cs` file, you can def...
44,583
[ { "from": "human", "value": "How would I handle something like the below uri using ASP.NET MVC's routing capability:\nhttp://localhost/users/{username}/bookmarks/ - GET\nhttp://localhost/users/{username}/bookmark/{bookmarkid} - PUT\n\nWhich lists the bookmarks for the user in {username}.\nThanks\n" }, {...
I am looking for a tool like ltrace or strace that can trace locally defined functions in an executable. ltrace only traces dynamic library calls and strace only traces system calls. For example, given the following C program: #include <stdio.h> int triple ( int x ) { return 3 * x; } int main (void) { printf("%...
To trace locally defined functions in an executable without recompiling, you can consider using the following tools: 1. **GDB (GNU Debugger)**: GDB can be used for tracing function calls in a program. You can use the `catch` command to catch function calls or use breakpoints for specific functions. You can attach G...
45,291
[ { "from": "human", "value": "I am looking for a tool like ltrace or strace that can trace locally defined functions in an executable. ltrace only traces dynamic library calls and strace only traces system calls. For example, given the following C program:\n#include <stdio.h>\n\nint triple ( int x )\n{\n ...
I use $(window).bind( ... ) to set up event handlers, but for some reason I keep losing event handlers (i think). Is there any way when debugging (firebug) to see which custom events have been added to a given element? Yours Andreas
When working with jQuery and event handlers, it can sometimes be challenging to track which event handlers are attached to elements, especially if you suspect they are being removed or overridden. To debug and see which event handlers are attached to a specific element, you can use the following methods: ### 1. jQuer...
48,610
[ { "from": "human", "value": "I use \n$(window).bind( ... )\n\nto set up event handlers, but for some reason I keep losing event handlers (i think).\nIs there any way when debugging (firebug) to see which custom events have been added to a given element?\nYours\nAndreas\n" }, { "from": "gpt", "va...
I am working on an application which draws a simple dot grid. I would like the mouse to snap between the points on the grid, eventually to draw lines on the grid. I have a method which takes in the current mouse location (X,Y) and calculates the nearest grid coordinate. When I create an event and attempt to move the mo...
The jerky movement of the mouse cursor in your application is caused by the rapid firing of `MouseMove` events, which continuously trigger the cursor position change every time the mouse moves. This leads to a significant amount of processing and updates occurring in quick succession, resulting in a jumpy cursor. To i...
43,914
[ { "from": "human", "value": "I am working on an application which draws a simple dot grid. I would like the mouse to snap between the points on the grid, eventually to draw lines on the grid.\nI have a method which takes in the current mouse location (X,Y) and calculates the nearest grid coordinate.\nWhen I...
I need to perform a HTTP GET from PHP. More specifically, from within /index.php I need to get the content of /trac/ and /svn/, find the "ul" element and then render then inline on the index.php. /trac and /svn are relative URLs and not filesystem folders. http://myserver/trac and http://myserver/svn
To perform an HTTP GET request in PHP and fetch the content from the specified URLs, you can use PHP's `file_get_contents` function or the `cURL` library for more advanced features and better error handling. Below is an example of how to achieve this using both methods. ### Method 1: Using `file_get_contents` This me...
42,440
[ { "from": "human", "value": "I need to perform a HTTP GET from PHP. \nMore specifically, from within /index.php I need to get the content of /trac/ and /svn/, find the \"ul\" element and then render then inline on the index.php.\n/trac and /svn are relative URLs and not filesystem folders.\nhttp://myserver/...
I want find the index of a given DOM node. It's like the inverse of doing document.getElementById('id_of_element').childNodes[K] I want to instead extract the value of K given that I already have the reference to the child node and the parent node. How do I do this?
To find the index (K) of a given child node relative to its parent node in the DOM, you can use the `childNodes` property of the parent node and loop through its child nodes to find the index of the specific child node. Here's how you can do this in JavaScript: ```javascript function getChildIndex(parentNode, childNod...
49,977
[ { "from": "human", "value": "I want find the index of a given DOM node. It's like the inverse of doing \ndocument.getElementById('id_of_element').childNodes[K]\n\nI want to instead extract the value of K given that I already have the reference to the child node and the parent node. How do I do this? \n" }...
I have an update query being run by a cron task that's timing out. The query takes, on average, five minutes to execute when executed in navicat. The code looks roughly like this. It's quite simple: // $db is a mysqli link set_time_limit (0); // should keep the script from timing out $query = "SLOW QUERY"; $result = ...
When dealing with timeouts in PHP scripts, especially when running queries via a cron job, there are several factors to consider: 1. **PHP Script Timeout**: You've set `set_time_limit(0);`, which should allow the script to run indefinitely without timing out. However, ensure that this line is executed before the query...
45,530
[ { "from": "human", "value": "I have an update query being run by a cron task that's timing out. The query takes, on average, five minutes to execute when executed in navicat.\nThe code looks roughly like this. It's quite simple:\n// $db is a mysqli link\nset_time_limit (0); // should keep the script from ...
Any suggestions for an accurate Web Log analysis tool to generate reports on the IIS logs? We used WebTrends, but I don't feel it was accurate.
There are several web log analysis tools that you can consider for analyzing IIS logs. Here are some popular options known for their accuracy and feature set: 1. **AWStats**: - AWStats is a free and open-source log file analyzer that generates advanced web, streaming, FTP, or mail server statistics, in graphical an...
47,136
[ { "from": "human", "value": "Any suggestions for an accurate Web Log analysis tool to generate reports on the IIS logs? We used WebTrends, but I don't feel it was accurate.\n" }, { "from": "gpt", "value": "There are several web log analysis tools that you can consider for analyzing IIS logs. Her...
I have a table where I store customer sales (on periodicals, like newspaper) data. The product is stored by issue. Example custid prodid issue qty datesold 1 123 2 12 01052008 2 234 1 5 01022008 1 123 1 5 01012008 2 444 2 3 ...
To retrieve the last issue for all products for a specific customer from a large dataset, you can utilize Common Table Expressions (CTEs) in SQL Server 2005 and also use subqueries in SQL Server 2000. Below are sample queries for both versions. ### SQL Server 2005 Example Using a Common Table Expression (CTE): ```sq...
49,702
[ { "from": "human", "value": "I have a table where I store customer sales (on periodicals, like newspaper) data. The product is stored by issue. Example\n\ncustid prodid issue qty datesold\n1 123 2 12 01052008\n2 234 1 5 01022008\n1 123 1 5 ...
I have a problem redrawing a custom view in simple cocoa application. Drawing is based on one parameter that is being changed by a simple NSSlider. However, although i implement -setParameter: and -parameter methods and bind slider's value to that parameter in interface builder i cannot seem to make a custom view to re...
It looks like you're on the right track by using `setNeedsDisplay:` to mark your view for redrawing, but it seems you may have a couple of small issues in your implementation. Here's a checklist and some suggestions to help you troubleshoot why your custom view might not be redrawing as expected: 1. **Check Your Drawi...
43,012
[ { "from": "human", "value": "I have a problem redrawing a custom view in simple cocoa application. Drawing is based on one parameter that is being changed by a simple NSSlider. However, although i implement -setParameter: and -parameter methods and bind slider's value to that parameter in interface builder ...
I'm starting to use CUDA at the moment and have to admit that I'm a bit disappointed with the C API. I understand the reasons for choosing C but had the language been based on C++ instead, several aspects would have been a lot simpler, e.g. device memory allocation (via cudaMalloc). My plan was to do this myself, using...
Your approach to encapsulating CUDA memory management in C++ is interesting and raises several important points. Let’s address your questions one by one, and then I’ll provide some thoughts on extending this implementation. ### 1. Is my placement new overload semantically correct? Does it leak memory? Your placement ...
44,894
[ { "from": "human", "value": "I'm starting to use CUDA at the moment and have to admit that I'm a bit disappointed with the C API. I understand the reasons for choosing C but had the language been based on C++ instead, several aspects would have been a lot simpler, e.g. device memory allocation (via cudaMall...
What techniques can be used to speed up C++ compilation times? This question came up in some comments to Stack Overflow question C++ programming style, and I'm interested to hear what ideas there are. I've seen a related question, Why does C++ compilation take so long?, but that doesn't provide many solutions.
Speeding up C++ compilation times can significantly improve development efficiency. Here are several techniques that can help reduce compilation time: ### 1. **Precompiled Headers** Using precompiled headers (PCH) can greatly reduce compilation times by storing a compiled version of frequently used headers, avoiding t...
46,483
[ { "from": "human", "value": "What techniques can be used to speed up C++ compilation times?\nThis question came up in some comments to Stack Overflow question C++ programming style, and I'm interested to hear what ideas there are.\nI've seen a related question, Why does C++ compilation take so long?, but th...
I am starting to design a new application and what I am wondering is peoples opinions on Linq2SQL or Linq2Entities and what they feel is the better technology for rapid development. I am also doing some research into ADO.net data services.
When considering LINQ to SQL versus Entity Framework (often referred to as LINQ to Entities), there are several factors to evaluate that can influence rapid development and overall project success. Below, I outline some of the key differences, advantages, and considerations for both technologies, as well as some though...
45,075
[ { "from": "human", "value": "I am starting to design a new application and what I am wondering is peoples opinions on Linq2SQL or Linq2Entities and what they feel is the better technology for rapid development.\nI am also doing some research into ADO.net data services.\n" }, { "from": "gpt", "va...
I'm trying to inverse a matrix with version Boost boost_1_37_0 and MTL mtl4-alpha-1-r6418. I can't seem to locate the matrix inversion code. I've googled for examples and they seem to reference lu.h that seems to be missing in the above release(s). Any hints? @Matt suggested copying lu.h, but that seems to be from MTL2...
In MTL4 (Matrix Template Library), which is designed for high-performance numerical computations, matrix inversion is not directly provided as a straightforward function. Instead, it emphasizes the use of iterative solvers and decomposition methods, such as LU decomposition or using the ITL (Iterative Template Library)...
46,362
[ { "from": "human", "value": "I'm trying to inverse a matrix with version Boost boost_1_37_0 and MTL mtl4-alpha-1-r6418. I can't seem to locate the matrix inversion code. I've googled for examples and they seem to reference lu.h that seems to be missing in the above release(s). Any hints?\n@Matt suggested co...
I am looking into streaming binary data into a browser (through http). I am looking for opinions as to good ways to go about doing this. Ultimately I will have a real time data source and I would like to manipulate this data and display it (in real-ish time) in a browser. Firefox comes first, IE would be nice... but I'...
Streaming binary data to a web browser can be approached in several ways, especially since you prefer a plugin-free solution. Below are some popular techniques, including their pros and cons: ### 1. **WebSockets** - **Overview**: WebSockets provide a full-duplex communication channel over a single, long-lived connecti...
44,804
[ { "from": "human", "value": "I am looking into streaming binary data into a browser (through http). I am looking for opinions as to good ways to go about doing this. Ultimately I will have a real time data source and I would like to manipulate this data and display it (in real-ish time) in a browser. Firefo...
I've hit upon a problem with WSADuplicateSocket, which I'm using to duplicate a socket for use by a different process. It works find when both processes are running under the same Windows user, but fails with error code 10022 (WSAEINVAL) when they are running under different users. Specifically, the process calling WSA...
The issue you're encountering with `WSADuplicateSocket` is related to the security context in which the processes are running. Specifically, the problem arises because the socket duplication mechanism requires both processes to be able to access the socket, and Windows enforces security restrictions based on user accou...
44,456
[ { "from": "human", "value": "I've hit upon a problem with WSADuplicateSocket, which I'm using to duplicate a socket for use by a different process. It works find when both processes are running under the same Windows user, but fails with error code 10022 (WSAEINVAL) when they are running under different use...
Can you recommend any tool to migrate sources (with history) from TFS to SVN?
Migrating from Team Foundation Server (TFS) to Subversion (SVN) can be a complex process due to differences in how the two systems handle version control and history. There are a few tools and approaches that you can consider for this migration: 1. **svn2tfs**: This tool can help you convert a TFS repository to SVN. I...
48,381
[ { "from": "human", "value": "Can you recommend any tool to migrate sources (with history) from TFS to SVN?\n" }, { "from": "gpt", "value": "Migrating from Team Foundation Server (TFS) to Subversion (SVN) can be a complex process due to differences in how the two systems handle version control an...
The BlackBerry Desktop API has the interface IRimTable which apparently maps an "application database" on a BlackBerry device to a virtual structure (i.e, IRimTable has IRimRecords, each of which has IRimField) that developer can browse the handheld device data when it is connected to a desktop computer. Meanwhile, ap...
The relationship between the BlackBerry Desktop API's `IRimTable` and the `PersistenceStore` API used in applications on the handheld device primarily revolves around how data is structured and accessed. ### PersistenceStore API - The `PersistenceStore` API is designed to allow applications to save and retrieve data o...
45,391
[ { "from": "human", "value": "The BlackBerry Desktop API has the interface IRimTable which apparently maps an \"application database\" on a BlackBerry device to a virtual structure (i.e, IRimTable has IRimRecords, each of which has IRimField) that developer can browse the handheld device data when it is conn...
I've created a database in Visual Studio 2008 in an App_Data folder of a MVC Web Application project. This results in an mdf file for the database that can be explored in the Server Explorer tab. You can create a SQL script for changes you do to the database. So I'm wondering how you run these sql change scripts to an ...
In Visual Studio 2008, you can run SQL scripts directly against an MDF file in your MVC application without needing to use SQL Server Management Studio Express (SSMS). Here are the steps you can follow to execute SQL scripts against your MDF database file: ### Method 1: Using Server Explorer in Visual Studio 1. **Ope...
47,558
[ { "from": "human", "value": "I've created a database in Visual Studio 2008 in an App_Data folder of a MVC Web Application project. This results in an mdf file for the database that can be explored in the Server Explorer tab. You can create a SQL script for changes you do to the database.\nSo I'm wondering h...
How can I simplify an expression using basic arithmetic?
To simplify an expression using basic arithmetic, follow these steps: 1. **Identify Like Terms**: Look for terms that are the same (like \(3x\) and \(5x\)). Combine them by adding or subtracting their coefficients. 2. **Perform Operations**: Carry out any addition, subtraction, multiplication, or division as indicate...
44,593
[ { "from": "human", "value": "How can I simplify an expression using basic arithmetic?\n" }, { "from": "gpt", "value": "To simplify an expression using basic arithmetic, follow these steps:\n\n1. **Identify Like Terms**: Look for terms that are the same (like \\(3x\\) and \\(5x\\)). Combine them ...
Design patterns are great in that they distill a potentially complex technique into something idiomatic. Often just the fact that it has a name helps communication and understanding. The downside is that it makes it easier to try to use them as a silver bullet, applying them to every situation without thinking about th...
Certainly! Here are a few examples of well-known design patterns that have been misapplied or poorly implemented, along with explanations of the missed points. This should illustrate the importance of understanding not only the patterns themselves but also the context in which they are best used. ### 1. Singleton Patt...
46,880
[ { "from": "human", "value": "Design patterns are great in that they distill a potentially complex technique into something idiomatic. Often just the fact that it has a name helps communication and understanding.\nThe downside is that it makes it easier to try to use them as a silver bullet, applying them to...
I am using 3D textures for volume rendering of raw data. The raw data can be Luminance-Alpha or RGBA. Currently, I read the raw data and set the alpha value such that the furthest row (or slice)would be opaque (Alpha = 1) and the nearest slice would be "transparent" (say alpha = 0.1) and and alpha values are interpolat...
Certainly! It sounds like you're dealing with a classic problem in volume rendering, where you want to adjust the alpha values based on the camera orientation. Here are some ideas on how to achieve this efficiently on the GPU with OpenGL: ### 1. Use a Shader-Based Approach Utilize fragment shaders to compute the alpha...
44,683
[ { "from": "human", "value": "I am using 3D textures for volume rendering of raw data. The raw data can be Luminance-Alpha or RGBA.\nCurrently, I read the raw data and set the alpha value such that the furthest row (or slice)would be opaque (Alpha = 1) and the nearest slice would be \"transparent\" (say alph...
I'm looking for a way to easily load test and benchmark some of our SQL (using ADO.NET, nothing fancy using LINQ or PLINQ) that has to be performant when running under high parallel load. I've thought of using the new parallel extensions CTP and specifically Parallel.For / Parallel.ForEach to simply run the SQL over 10...
When considering load testing and benchmarking SQL using ADO.NET with high parallelism, there are a few key points to keep in mind regarding how `Parallel.For` and the .NET Task Parallel Library (TPL) manage threading, especially in I/O-bound scenarios like database access. ### 1. Understanding Parallel.For and Thread...
46,953
[ { "from": "human", "value": "I'm looking for a way to easily load test and benchmark some of our SQL (using ADO.NET, nothing fancy using LINQ or PLINQ) that has to be performant when running under high parallel load.\nI've thought of using the new parallel extensions CTP and specifically Parallel.For / Para...
Like the question says, if I have a request for a page on my site like this http://somename.something.here/Dada.aspx to something like this https://somename.something.here/Dada.aspx
To redirect HTTP requests to HTTPS for your website, you can use a few different methods depending on your server setup. Below are common methods for Apache and IIS servers: ### For Apache (.htaccess) If you're using an Apache server, you can add the following lines to your `.htaccess` file in the root directory of y...
49,386
[ { "from": "human", "value": "Like the question says, if I have a request for a page on my site like this\nhttp://somename.something.here/Dada.aspx\nto something like this\nhttps://somename.something.here/Dada.aspx\n" }, { "from": "gpt", "value": "To redirect HTTP requests to HTTPS for your websi...
I want to use git as a local repository against a remote SVN repository. I installed version 1.6.0.2 from http://code.google.com/p/msysgit/downloads/list. According to the documentation synchronization is done via the command git svn or a separate command wrapper called git-svn Neither of them is available in my in...
To use Git as a local repository against a remote SVN repository, you need the `git-svn` command, which is a part of the Git suite that provides support for using Git as a client to interact with an SVN repository. In your case, you are using an older version of Git (1.6.0.2) that may not include `git-svn` or might n...
43,766
[ { "from": "human", "value": "I want to use git as a local repository against a remote SVN repository. I installed version 1.6.0.2 from http://code.google.com/p/msysgit/downloads/list.\nAccording to the documentation synchronization is done via the command \ngit svn\n\nor a separate command wrapper called \n...
Can anyone recommend a library/SDK/etc. that is free or for purchase that I can integrate into my C++ application that enables the application to perform automatic error reporting? I have something now that I am using but it does not catch all exceptions. I'm looking for something more sophisticated and more robust tha...
There are several libraries and SDKs that can help with automatic error reporting in C++ applications. Here are some recommendations that are either free or available for purchase: 1. **Sentry**: - **Description**: Sentry is a powerful error tracking tool that helps developers monitor and fix crashes in real-time. ...
46,482
[ { "from": "human", "value": "Can anyone recommend a library/SDK/etc. that is free or for purchase that I can integrate into my C++ application that enables the application to perform automatic error reporting? I have something now that I am using but it does not catch all exceptions. I'm looking for somethi...
An interface is a 100% abstract class, so we can use an interface for efficient programming. Is there any situation where an abstract class is better than an interface?
Yes, there are several situations where using an abstract class can be more advantageous than using an interface. Here are some key scenarios: 1. **Common Code Implementation**: Abstract classes allow you to provide a default implementation of some methods. If you have common behavior that multiple subclasses should s...
49,740
[ { "from": "human", "value": "An interface is a 100% abstract class, so we can use an interface for efficient programming. Is there any situation where an abstract class is better than an interface?\n" }, { "from": "gpt", "value": "Yes, there are several situations where using an abstract class c...
I have a table that has, in essence, this structure: key value ------ ------ 2 val1 3 val2 5 val3 The keys are sequential integers from 1 up to (currently) 1 million, increasing by several thousand each day. Gaps in the keys occur when records have been deleted. I'm looking fo...
To achieve the desired result of displaying all keys, including those that do not have corresponding records in your table, you can use a Common Table Expression (CTE) along with a recursive query in standard SQL. The key point here is to generate a sequence of numbers that covers all possible keys based on the maximum...
44,190
[ { "from": "human", "value": "I have a table that has, in essence, this structure:\n key value\n ------ ------\n 2 val1\n 3 val2\n 5 val3\nThe keys are sequential integers from 1 up to (currently) 1 million, increasing by several thousand each day. Gaps in the keys occur...
problem description: This model works fine with one user at a time. As soon as I get multiple users at once, I get a serious of errors relating to not closing my SqlDataReader. When i turn off lazy loading like this: persistenceModel.Conventions.OneToManyConvention = (prop => prop.SetAttribute("lazy", "false")); It'...
It looks like you're running into issues with concurrent access to your database when multiple users are using your application simultaneously. The error regarding `SqlDataReader` not being closed suggests that connections are not being properly managed, likely due to how you're handling sessions in NHibernate. Here ...
46,849
[ { "from": "human", "value": "problem description: This model works fine with one user at a time. As soon as I get multiple users at once, I get a serious of errors relating to not closing my SqlDataReader. When i turn off lazy loading like this:\npersistenceModel.Conventions.OneToManyConvention = (prop =...
When I pass a list of objects out of my silverlight app using WCF everything works fine until the List grows too big. It seems that when I exceed 80 items I get the error: The remote server returned an unexpected response: (404) Not Found I'm presuming that it's because the List has grown too big as when the List had 7...
The issue you are encountering, where you receive a 404 error when attempting to send a large list of objects from your Silverlight application using WCF, is often related to the configuration settings of your service. While you've already adjusted the `maxBufferSize` and `maxReceivedMessageSize` in the client configur...
47,405
[ { "from": "human", "value": "When I pass a list of objects out of my silverlight app using WCF everything works fine until the List grows too big. It seems that when I exceed 80 items I get the error:\nThe remote server returned an unexpected response: (404) Not Found\nI'm presuming that it's because the Li...
Ctrl M-L doesn't toggle all the regions in vb.net (2008) when there's a hierarchy between the regions. I don't like regions. Is there a way to expand ALL the regions or remove them permanently?
In Visual Studio 2008, if you want to manage regions in your VB.NET code, particularly if you don't like using them, you have a couple of options: ### 1. **Expand All Regions** To expand all regions in your code, you can follow these steps: - You can use the keyboard shortcut `Ctrl + M, Ctrl + L` to expand all regions...
49,929
[ { "from": "human", "value": "Ctrl M-L doesn't toggle all the regions in vb.net (2008) when there's a hierarchy between the regions. I don't like regions. Is there a way to expand ALL the regions or remove them permanently? \n" }, { "from": "gpt", "value": "In Visual Studio 2008, if you want to m...
Specifically I want to know what the data structure for the imports (idata) section looks like.
In the context of the Portable Executable (PE) file format used in Windows operating systems, the Import Data Directory (IData) section is part of the PE header and defines the imported functions and libraries that the executable or dynamic link library (DLL) requires. The structure of the Import Data Directory consis...
47,840
[ { "from": "human", "value": "Specifically I want to know what the data structure for the imports (idata) section looks like.\n" }, { "from": "gpt", "value": "In the context of the Portable Executable (PE) file format used in Windows operating systems, the Import Data Directory (IData) section is...
I have two implementations of a method, one for value types and another for reference types: public static Result<T> ImplRef(T arg) where T : class {...} public static Result<T> ImplVal(T arg) where T : struct {...} I want to write a method which calls the correct implementation like this public static Result<T> Gener...
To create a generic method that calls the appropriate implementation based on whether `T` is a value type or a reference type, you can use method overloading and a generic constraint. Here's how you can achieve that without relying heavily on reflection: You can define two separate methods for value types and referenc...
49,376
[ { "from": "human", "value": "I have two implementations of a method, one for value types and another for reference types:\npublic static Result<T> ImplRef(T arg) where T : class {...}\npublic static Result<T> ImplVal(T arg) where T : struct {...}\n\nI want to write a method which calls the correct implement...
I've been given the task of working with SAML to implement an SSO solution between my company and a third party provider. My only issue is that I can't seem to find how to implement SAML in C# 2.0. I've been able to find a few examples for .Net 3.0 and 3.5, but none for 2.0 (and the classes they use don't appear to b...
Implementing SAML for Single Sign-On (SSO) in C# 2.0 can be a bit challenging because .NET 2.0 does not have built-in support for SAML, and many libraries and examples available online are for later versions of .NET. However, you can still achieve this by using lower-level classes and external libraries. ### Using a T...
44,605
[ { "from": "human", "value": "I've been given the task of working with SAML to implement an SSO solution between my company and a third party provider. My only issue is that I can't seem to find how to implement SAML in C# 2.0. I've been able to find a few examples for .Net 3.0 and 3.5, but none for 2.0 (a...
I'm not a JS guy so I'm kinda stumbling around in the dark. Basically, I wanted something that would add a link to a twitter search for @replies to a particular user while on that person's page. Two things I am trying to figure out: how to extract the user name from the page so that I can construct the right URL. ie....
To achieve your goal of adding a link to a Twitter search for @replies to a particular user, you'll need to extract the username from the page URL and then manipulate the DOM to insert your new link at the correct place. Here's how you can do that step by step: ### Step 1: Extract the Username You can extract the use...
45,228
[ { "from": "human", "value": "I'm not a JS guy so I'm kinda stumbling around in the dark. Basically, I wanted something that would add a link to a twitter search for @replies to a particular user while on that person's page. \nTwo things I am trying to figure out:\n\nhow to extract the user name from the pag...
I was curious if there's a .Net API that would allow me to identify what updates are pending for "Windows Update," failing that, is there a windows powershell command that can get it?
Yes, you can identify pending Windows Updates using both a .NET API and PowerShell. ### Using PowerShell If you want to check for pending Windows Updates, you can use the `Get-WindowsUpdate` cmdlet from the `PSWindowsUpdate` module, which is not included by default in Windows but can be installed via PowerShell Galle...
49,466
[ { "from": "human", "value": "I was curious if there's a .Net API that would allow me to identify what updates are pending for \"Windows Update,\"\nfailing that, is there a windows powershell command that can get it?\n" }, { "from": "gpt", "value": "Yes, you can identify pending Windows Updates u...
I'm trying to use some of the new MFC feature pack controls on an existing MFC app, with VS2008 SP1. None of the new controls appear in the dialog-editor toolbox. Should I expect them to be there, and if so, do people have any suggestion for how to get them to appear?
Using the new MFC Feature Pack controls in an existing MFC application with Visual Studio 2008 SP1 can be a bit tricky, as they may not appear in the dialog-editor toolbox by default. Here are some steps and suggestions to help you get them to appear: 1. **Ensure MFC Feature Pack is Installed**: First, make sure that ...
49,545
[ { "from": "human", "value": "I'm trying to use some of the new MFC feature pack controls on an existing MFC app, with VS2008 SP1. None of the new controls appear in the dialog-editor toolbox.\nShould I expect them to be there, and if so, do people have any suggestion for how to get them to appear?\n" }, ...