instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am wondering whether it is safe to mix jdk 1.5 and 1.6 (Java 6) object serialization (biderctional communication). I searched for an explicit statement from sun concerning this question but did not succeed. So, besides the technical feasability I am searching for an "official" statement concerning the problem.
Mixing different versions of Java (such as JDK 1.5 and JDK 1.6) for object serialization can be challenging and is generally not recommended without thorough testing. The official documentation from Oracle (formerly Sun) does not provide explicit guidelines stating that mixing serialized objects across these versions i...
24,274
[ { "from": "human", "value": "I am wondering whether it is safe to mix jdk 1.5 and 1.6 (Java 6) object serialization (biderctional communication). I searched for an explicit statement from sun concerning this question but did not succeed. So, besides the technical feasability I am searching for an \"official...
Is the code gen tool sqlmetal only a mapper to linq to sql? I'm looking for something that will create common CRUD operations also like: GetUserByID UpdateUserByID InsertUser GetAllUsers etc.
`SqlMetal` is a tool provided by Microsoft that generates a DataContext and entity classes for use with LINQ to SQL based on the schema of a SQL Server database. It primarily serves as a mapper, creating the necessary classes that represent your database tables and their relationships. While it simplifies the interacti...
22,816
[ { "from": "human", "value": "Is the code gen tool sqlmetal only a mapper to linq to sql?\nI'm looking for something that will create common CRUD operations also like:\nGetUserByID\nUpdateUserByID\nInsertUser\nGetAllUsers\netc.\n" }, { "from": "gpt", "value": "`SqlMetal` is a tool provided by Mic...
Whats the available solutions for PHP to create word document in linux environment?
Creating Word documents in a Linux environment using PHP can be accomplished using several libraries and tools. Here are some popular solutions: 1. **PhpWord**: - **Description**: PhpWord is a popular library for creating and manipulating Word documents in PHP. It supports both `.docx` and `.doc` formats. - **In...
22,517
[ { "from": "human", "value": "Whats the available solutions for PHP to create word document in linux environment?\n" }, { "from": "gpt", "value": "Creating Word documents in a Linux environment using PHP can be accomplished using several libraries and tools. Here are some popular solutions:\n\n1....
I have been writing Flex applications for a few months now and luckily have not needed a full debugger as of yet, so far I have just used a few Alert boxes... Is there an available debugger that is included in the free Flex SDK? I am not using FlexBuilder (I have been using Emacs and compiling with ant). If not, how do...
While the Flex SDK itself does not come with a built-in debugger similar to what is available in FlexBuilder (now called Flash Builder), you can still debug Flex applications without it. Here are a few options you can consider: ### 1. Use Flash Player Debugger Version Adobe provides a special version of the Flash Play...
19,216
[ { "from": "human", "value": "I have been writing Flex applications for a few months now and luckily have not needed a full debugger as of yet, so far I have just used a few Alert boxes...\nIs there an available debugger that is included in the free Flex SDK? I am not using FlexBuilder (I have been using Ema...
I have a dialog box that allows users to set hotkeys for use in a 3d program on windows. I'm using CHotKeyCtrl, which is pretty good, but doesn't handle some keys that the users would like to use - specifically, tab and space. The hotkey handling is smart enough to be able to fire on those keys, I just need a UI to l...
If `CHotKeyCtrl` does not support setting the Tab and Space keys directly, you might consider creating a custom control or using a combination of existing controls to achieve your goal. Below are some suggestions for implementing this functionality in your dialog box for setting hotkeys: ### Custom Control Implementat...
21,993
[ { "from": "human", "value": "I have a dialog box that allows users to set hotkeys for use in a 3d program on windows. I'm using CHotKeyCtrl, which is pretty good, but doesn't handle some keys that the users would like to use - specifically, tab and space.\nThe hotkey handling is smart enough to be able to...
I have two tables in my database, called ratings and movies. Ratings: | id | movie_id | rating | Movies: | id | title | A typical movie record might be like this: | 4 | Cloverfield (2008) | and there may be several rating records for Cloverfield, like this: | 21 | 4 | 3 | (rating number 21, on movie number 4, gi...
To select rows from the `movies` table that have more than `x` ratings in the `ratings` table, you can use a `JOIN` combined with a `GROUP BY` clause and a `HAVING` clause. Here's how you can write the SQL query for this: ```sql SELECT m.id, m.title FROM movies m JOIN ratings r ON m.id = r.movie_id GROUP BY m.id, m.ti...
24,971
[ { "from": "human", "value": "I have two tables in my database, called ratings and movies.\nRatings:\n\n| id | movie_id | rating |\n\nMovies:\n\n| id | title |\n\nA typical movie record might be like this:\n\n| 4 | Cloverfield (2008) |\n\nand there may be several rating records for Cloverfield, like this:\n\...
I'm architecting a new app at the moment, with a high read:write ratio. At my current employer we have lots of denormalised data on our tables for performance reasons. Is it better practice to have totally 3NF tables and then use indexed views to do all the denormalisation? Should I run queries against the tables or vi...
When architecting an application with a high read-to-write ratio, there are several considerations to take into account regarding the normalization of your database schema, performance, and maintainability. Here’s a breakdown of best practices related to your question about normalization, indexed views, and query perfo...
22,638
[ { "from": "human", "value": "I'm architecting a new app at the moment, with a high read:write ratio. At my current employer we have lots of denormalised data on our tables for performance reasons. Is it better practice to have totally 3NF tables and then use indexed views to do all the denormalisation? Shou...
As a developer, how do you use gdb to track down bugs within your code? What techniques tricks do you use to make your life easier?
Using GDB (GNU Debugger) to track down bugs in your code can be an invaluable skill for a developer. Here are some techniques and tricks to make your debugging process more efficient and effective: ### Getting Started 1. **Compile with Debugging Symbols**: Always compile your code with debugging information enable...
18,118
[ { "from": "human", "value": "As a developer, how do you use gdb to track down bugs within your code? What techniques tricks do you use to make your life easier?\n" }, { "from": "gpt", "value": "Using GDB (GNU Debugger) to track down bugs in your code can be an invaluable skill for a developer. ...
Possible Duplicate: “const correctness” in C# I have programmed C++ for many years but am fairly new to C#. While learning C# I found that the use of the const keyword is much more limited than in C++. AFAIK, there is, for example, no way to declare arguments to a function const. I feel uncomfortable with the idea t...
In C#, while the `const` keyword is indeed more limited compared to C++, there are alternative approaches to ensure that your function arguments are not inadvertently modified. Here are some strategies you can use to achieve similar behavior: 1. **Use `readonly` Fields**: If you're dealing with a class and want to ens...
23,604
[ { "from": "human", "value": "\nPossible Duplicate:\n“const correctness” in C# \n\nI have programmed C++ for many years but am fairly new to C#. While learning C# I found that the use of the const keyword is much more limited than in C++. AFAIK, there is, for example, no way to declare arguments to a functio...
I had a problem that was partially solved. To explain it quickly : I have a grid binded to a complex object that require to be serialized. When the object is build back from the serialization, event like on the grid doesn't refresh the table display. Someone told me to rebuild the event once unserialize, it works! But ...
The behavior you're experiencing is due to the fact that the `Len` property is not automatically notifying the UI when its value changes. In your current implementation, the `Len` property simply returns the length of the `Name` property, and it does not raise the `PropertyChanged` event when the `Name` changes. As a r...
22,675
[ { "from": "human", "value": "I had a problem that was partially solved. To explain it quickly : I have a grid binded to a complex object that require to be serialized. When the object is build back from the serialization, event like on the grid doesn't refresh the table display. Someone told me to rebuild t...
I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.1.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J instance) and package it into each EJB JAR module NO MATTER...
Migrating from OC4J 10.1.2.3 to 10.1.3.1.4, especially with EJB 2.1 applications, can be tricky due to changes in the way JDeveloper handles packaging and deployment of EJB JAR files. Given the issue you're facing with the `ejb-jar.xml` file being included multiple times, there are a few approaches you might consider t...
20,979
[ { "from": "human", "value": "I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.1.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J instance) and pack...
All of this is pertaining to WebHttp binding, hosted in a custom Service Host (IIS is not an option at this time). I've implemented a custom UserNamePasswordValidator, and a custom IAuthorizationPolicy. When I configure the endpoint's binding to use Basic authentication, everything works just as I'd like (custom princ...
To achieve your goal of allowing both Basic Authentication and anonymous access in a custom Service Host without creating two separate endpoints, you can modify your authentication handling logic to accommodate anonymous users. Here's a general outline of how you can accomplish this: ### Step 1: Adjust Your Binding Co...
21,949
[ { "from": "human", "value": "All of this is pertaining to WebHttp binding, hosted in a custom Service Host (IIS is not an option at this time).\nI've implemented a custom UserNamePasswordValidator, and a custom IAuthorizationPolicy. When I configure the endpoint's binding to use Basic authentication, every...
What do you insert into Python source code to have it break into pdb (when execution gets to that spot)?
To have your Python program break into the Python debugger (pdb) at a specific point in your source code, you can insert the following line: ```python import pdb; pdb.set_trace() ``` Here's an example of how you might use it in your code: ```python def my_function(): x = 10 y = 20 import pdb; pdb.set_tra...
27,459
[ { "from": "human", "value": "What do you insert into Python source code to have it break into pdb (when execution gets to that spot)? \n" }, { "from": "gpt", "value": "To have your Python program break into the Python debugger (pdb) at a specific point in your source code, you can insert the fol...
I need to develop a generic jQuery-based search plugin for the ASP.NET MVC application I'm building, but I can't figure out how it's supposed to fit, or what the best practice is. I want to do the following: $().ready(function() { $('#searchHolder').customSearch('MyApp.Models.User'); }); As long as I have impleme...
Developing a jQuery-based search plugin for your ASP.NET MVC application can indeed introduce complexities related to the separation of concerns inherent in the MVC architectural pattern. Below are some suggestions on how to structure your plugin so it adheres more closely to the MVC principles, promoting maintainabili...
19,032
[ { "from": "human", "value": "I need to develop a generic jQuery-based search plugin for the ASP.NET MVC application I'm building, but I can't figure out how it's supposed to fit, or what the best practice is. I want to do the following:\n$().ready(function() {\n $('#searchHolder').customSearch('MyApp.Mo...
Searching for a string within a string is extremely well supported in .NET but what do you do when the data you need to search isn't a string? I have binary data arriving in regular chunks via a NetworkStream. Packets are binary but they all start with a signature sequence of bytes. I accumulate the chunks into a large...
You're on the right track with your thoughts on searching for a byte sequence within a larger byte array. The Knuth-Morris-Pratt (KMP) algorithm is indeed a well-known string matching algorithm that can be adapted for byte arrays. Given that you need to search for a signature sequence of bytes within a larger buffer ...
17,435
[ { "from": "human", "value": "Searching for a string within a string is extremely well supported in .NET but what do you do when the data you need to search isn't a string?\nI have binary data arriving in regular chunks via a NetworkStream. Packets are binary but they all start with a signature sequence of b...
What's the best/easiest to integrate templating system for PHP, and what are the benefits of using one? I currently don't use one at all, and am thinking that it might help to seperate content from presentation a little more.
Using a templating system in PHP can significantly enhance your project's organization and maintainability by separating the logic from presentation. Here are some of the most popular and easy-to-integrate templating engines for PHP, along with their benefits: ### Popular PHP Templating Engines 1. **Twig** - **Web...
20,172
[ { "from": "human", "value": "What's the best/easiest to integrate templating system for PHP, and what are the benefits of using one?\nI currently don't use one at all, and am thinking that it might help to seperate content from presentation a little more. \n" }, { "from": "gpt", "value": "Using ...
As may be known by many, the Express versions of Visual Studio 2008 don't include support for MFC and a few other packages required to compile a lot of windows programs. So, here's my problem: I have the full version of Visual Studio 2005. I've been using this to compile a project that a friend of mine was working on,...
Using Visual Studio 2005 with a project upgraded to Visual Studio 2008 can be tricky, especially if the project relies on features, libraries, or header files introduced in the later version of Visual Studio. Here are some steps and considerations to help you potentially work around your issue: ### 1. Modify Project S...
21,832
[ { "from": "human", "value": "As may be known by many, the Express versions of Visual Studio 2008 don't include support for MFC and a few other packages required to compile a lot of windows programs. \nSo, here's my problem:\nI have the full version of Visual Studio 2005. I've been using this to compile a pr...
I'm quite surprised how large some major websites homepages are. This is the total amount downloaded just when opening the homepage. cnn.com - 845kb microsoft.com - 470kb yahoo.com - 235kb gillette.com (flash) - 3.8Mb abc.com - 3.4Mb nbc.com - 1.4Mb youtube.com - 530kb Anyone care to add to the list? I'm just trying t...
It's definitely interesting to see how much data modern websites are serving on their homepages, especially as websites have become more media-rich and interactive. Here are a few additional examples of popular websites and their approximate homepage sizes, based on what was common around October 2023: 1. **facebook.c...
25,674
[ { "from": "human", "value": "I'm quite surprised how large some major websites homepages are.\nThis is the total amount downloaded just when opening the homepage.\ncnn.com - 845kb\nmicrosoft.com - 470kb\nyahoo.com - 235kb\ngillette.com (flash) - 3.8Mb\nabc.com - 3.4Mb\nnbc.com - 1.4Mb\nyoutube.com - 530kb\n...
I would like a code sample for a function that takes a tDateTime and an integer as input and sets the system time using setlocaltime after advancing that tDateTime by (int) months. The time should stay the same. pseudo code example SetNewTime(NOW,2); The issues I'm running into are rather frustrating. I cannot use in...
To create a function in Delphi (which typically uses `TDateTime` for date and time representation) that takes a `TDateTime` and an integer (representing months) to advance the date while keeping the time part the same, you can follow these steps: 1. Break the `TDateTime` into its individual components (year, month, da...
22,804
[ { "from": "human", "value": "I would like a code sample for a function that takes a tDateTime and an integer as input and sets the system time using setlocaltime after advancing that tDateTime by (int) months. The time should stay the same.\npseudo code example\nSetNewTime(NOW,2);\n\nThe issues I'm running ...
We have several hundred javascript files in our app that are currently being served uncompressed. One piece of our solution to gain a little more client performance is to minify our javascript files. I've created an automated solution to do this on the build, however, when these new files are deployed, the files' times...
You're correct that if you change the timestamps of all your JavaScript files every time you build, clients will re-download all of them, which defeats the purpose of minification and can lead to performance issues. Here are some common strategies that many developers employ to tackle this problem: ### 1. Versioning a...
23,286
[ { "from": "human", "value": "We have several hundred javascript files in our app that are currently being served uncompressed. One piece of our solution to gain a little more client performance is to minify our javascript files. I've created an automated solution to do this on the build, however, when these...
Does anyone know where to get the source code for LambdaProbe? Alternatively, does anyone know if the project could be moved to a community repository? Besides the tool not being updated for over a year, the LambdaProbe website has been down since late September 2008. Background: Lambda Probe is a useful tool for vie...
LambdaProbe was a popular monitoring tool for Apache Tomcat, but as you've noted, the project's website has been down for many years, and it appears to have been abandoned. Unfortunately, if the official website is no longer accessible and there's no maintained repository, finding the source code can be challenging. H...
24,606
[ { "from": "human", "value": "Does anyone know where to get the source code for LambdaProbe? \nAlternatively, does anyone know if the project could be moved to a community repository?\nBesides the tool not being updated for over a year, the LambdaProbe website has been down since late September 2008. \nBackg...
At work one of our target platforms is a resource constrained mini-server running Linux (kernel 2.6.13, custom distribution based on an old Fedora Core). The application is written in Java (Sun JDK 1.6_04). The Linux OOM killer is configured to kill processes when memory usage exceeds 160MB. Even during high load our a...
Yes, your understanding of copy-on-write (COW) in relation to the `fork()` system call is correct. Here’s a breakdown of your questions: ### 1. Is this true? Yes, newer versions of the Linux kernel implement `fork()` using a copy-on-write mechanism. This means that when a process forks, the memory pages of the parent...
22,048
[ { "from": "human", "value": "At work one of our target platforms is a resource constrained mini-server running Linux (kernel 2.6.13, custom distribution based on an old Fedora Core). The application is written in Java (Sun JDK 1.6_04). The Linux OOM killer is configured to kill processes when memory usage e...
I have a UIImageView and the objective is to scale it down proportionally by giving it either a height or width. UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3092/2915896504_a88b69c9de.jpg"]]]; UIImageView *imageView = [[UIImageView ...
When you resize the `UIImageView` by changing its width, the center point of the view remains the same, which is why the image appears to be repositioned. To keep the image view at the top-left corner of its superview when resizing, you need to adjust the `frame.origin` property after resizing the width. Here's how to...
17,999
[ { "from": "human", "value": "I have a UIImageView and the objective is to scale it down proportionally by giving it either a height or width. \nUIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@\"http://farm4.static.flickr.com/3092/2915896504_a88b69c9de.jpg\"...
I have someone connecting to my repository using the url (substituted the IP address): svn+ssh://craig@123.45.67.89/subversion Yet when they commit files, the author entry is "null". According to this article: http://tortoisesvn.net/node/80 it should be working fine. Does anyone have any suggestions?
The issue with the author entry showing as "null" in your SVN repository can be caused by a few different factors. Here are some suggestions to troubleshoot and resolve the problem: 1. **SVN Configuration**: Check the user's SVN configuration. The user should have their username set correctly in their SVN client confi...
23,206
[ { "from": "human", "value": "I have someone connecting to my repository using the url (substituted the IP address):\nsvn+ssh://craig@123.45.67.89/subversion\nYet when they commit files, the author entry is \"null\".\nAccording to this article: http://tortoisesvn.net/node/80\nit should be working fine.\nDoes...
I'm having a problem with my Seam code and I can't seem to figure out what I'm doing wrong. It's doing my head in :) Here's an excerpt of the stack trace: Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.home.PresenceHome.customerId to java.lang.String I'm tryi...
The issue you are facing seems to stem from a type mismatch when trying to set the `customerId` parameter from the URL into your bean property. The error message `java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.home.PresenceHome.customerId to java.lang.String` indicates tha...
12,952
[ { "from": "human", "value": "I'm having a problem with my Seam code and I can't seem to figure out what I'm doing wrong. It's doing my head in :) Here's an excerpt of the stack trace:\nCaused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.home.PresenceHom...
We have a fairly large .NET solution with multiple executable projects (winforms and command line programs). Currently each of these projects has its own app.config that contains connection strings, mail server settings and the like. As you can imagine it's not that convenient to make a change in every app.config file ...
Centralized management of settings in a large .NET solution can significantly simplify maintenance and improve consistency. Both of the approaches you've considered have their merits, but let's explore them further along with some additional options. ### Option 1: Custom Configuration Class with XML Serialization This...
19,943
[ { "from": "human", "value": "We have a fairly large .NET solution with multiple executable projects (winforms and command line programs). Currently each of these projects has its own app.config that contains connection strings, mail server settings and the like. As you can imagine it's not that convenient t...
I'm trying to decide on the best strategy for accessing the database. I understand that this is a generic question and there's no a single good answer, but I will provide some guidelines on what I'm looking for. The last few years we have been using our own persistence framework, that although limited has served as wel...
Given your requirements and the context of your existing custom persistence framework, here are some suggestions that may align well with your goals: ### Suggested Frameworks 1. **Entity Framework (EF)**: - **Pros**: - Strong support for object-oriented programming, including one-to-many and many-to-many rela...
20,211
[ { "from": "human", "value": "I'm trying to decide on the best strategy for accessing the database. I understand that this is a generic question and there's no a single good answer, but I will provide some guidelines on what I'm looking for.\nThe last few years we have been using our own persistence framewor...
I have inherited a load of VB6 code which has tons of individual OCX files, each of which contain a single control. I have two questions: Firstly, Is it possible to refactor them so that I can have a single OCX file with all the OCX's in it? Secondly, if it is possible, how do I do this? TIA
Yes, it is possible to refactor your individual OCX files into a single OCX file that contains multiple controls. This can help streamline your project and simplify deployment. Below are answers to your questions: ### 1. Is it possible to refactor them so that I can have a single OCX file with all the OCX's in it? Ye...
20,266
[ { "from": "human", "value": "I have inherited a load of VB6 code which has tons of individual OCX files, each of which contain a single control. I have two questions:\nFirstly, Is it possible to refactor them so that I can have a single OCX file with all the OCX's in it? \nSecondly, if it is possible, how...
I needed to find all the files that contained a specific string pattern. The first solution that comes to mind is using find piped with xargs grep: find . -iname '*.py' | xargs grep -e 'YOUR_PATTERN' But if I need to find patterns that spans on more than one line, I'm stuck because vanilla grep can't find multiline pa...
You can handle multiline patterns in a few different ways, but one common approach is to use `grep` with the `-P` (Perl regex) option or `-z` option combined with `xargs`. Below are some methods to achieve this: ### Using `grep -P` for multiline patterns If you're using `grep` with the `-P` option, you can use a singl...
23,828
[ { "from": "human", "value": "I needed to find all the files that contained a specific string pattern. The first solution that comes to mind is using find piped with xargs grep:\nfind . -iname '*.py' | xargs grep -e 'YOUR_PATTERN'\n\nBut if I need to find patterns that spans on more than one line, I'm stuck ...
My DataGridView needs to support a number of types and these types may have any number of public properties, not all of which I want to display. Can anyone suggest a way to dynamically customise a DataGridView's columns when binding a class a datasource? Is there an attribute that will tell a control whether to use a p...
To dynamically customize the columns of a `DataGridView` when binding to a class as a datasource in C#, you can use reflection along with custom attributes. This allows you to specify which properties should be displayed in the `DataGridView`. Here's a general approach you can take: ### Step 1: Define a Custom Attribu...
20,177
[ { "from": "human", "value": "My DataGridView needs to support a number of types and these types may have any number of public properties, not all of which I want to display.\nCan anyone suggest a way to dynamically customise a DataGridView's columns when binding a class a datasource? Is there an attribute t...
Which of these pieces of code is faster? if (obj is ClassA) {} if (obj.GetType() == typeof(ClassA)) {} Edit: I'm aware that they don't do the same thing.
The two code snippets you provided serve different purposes, so it's important to clarify their behavior first: 1. `if (obj is ClassA) {}`: This checks if `obj` is of type `ClassA` or any type derived from `ClassA`. It also handles cases where `obj` might be `null`, returning `false` in that case. This is a more polym...
26,342
[ { "from": "human", "value": "Which of these pieces of code is faster?\nif (obj is ClassA) {}\n\nif (obj.GetType() == typeof(ClassA)) {}\n\nEdit:\nI'm aware that they don't do the same thing.\n" }, { "from": "gpt", "value": "The two code snippets you provided serve different purposes, so it's imp...
If I want to move to C++ and SDL in the future, is Python and pygame a good way to learn SDL?
While Python and Pygame are not directly related to C++ and SDL (Simple DirectMedia Layer), using Pygame as a learning tool can still be beneficial for understanding game development concepts that will later apply to SDL in C++. Here are some points to consider: ### Benefits of Starting with Python and Pygame: 1. **E...
24,295
[ { "from": "human", "value": "If I want to move to C++ and SDL in the future, is Python and pygame a good way to learn SDL?\n" }, { "from": "gpt", "value": "While Python and Pygame are not directly related to C++ and SDL (Simple DirectMedia Layer), using Pygame as a learning tool can still be ben...
Code below is not working as expected to detect if it is in design mode (VS.Net 2003 - Control Library): if (this.Site != null && this.Site.DesignMode == true) { // Design Mode } else { // Run-time } It is used in a complex user control, deriving from another user control and including other user controls on it. I...
The code you have provided should generally work for detecting design mode in Visual Studio .NET 2003, but there are a few things that could cause it to fail in a complex user control scenario. Let's go through some troubleshooting steps and alternative approaches to ensure you can reliably determine whether the contro...
21,050
[ { "from": "human", "value": "Code below is not working as expected to detect if it is in design mode (VS.Net 2003 - Control Library):\nif (this.Site != null && this.Site.DesignMode == true) \n{\n // Design Mode\n}\nelse\n{\n // Run-time\n}\nIt is used in a complex user control, deriving from another user ...
Looking at the C# and VB.NET language specs I think it says that the logical Xor/Or/And operations have different precendence in the two languages. Am I reading that right? I was expecting them to have the same precendence. For example in C# 100 | 200 ^ 300 & 400 is the same as... 100 | (200 ^ (300 & 400)) But the e...
Yes, you are correct in your observation regarding the precedence of logical operators in C# and VB.NET. The two languages indeed have different rules for operator precedence when it comes to bitwise and logical operations. In C#: - The precedence order is as follows: 1. `&` (bitwise AND) 2. `^` (bitwise XOR) 3...
24,384
[ { "from": "human", "value": "Looking at the C# and VB.NET language specs I think it says that the logical Xor/Or/And operations have different precendence in the two languages. Am I reading that right? I was expecting them to have the same precendence.\nFor example in C#\n100 | 200 ^ 300 & 400\n\nis the sam...
I'm a Java developer and I have a question about automating a task I've been given. I'm having to 3 times daily, login to this website we have at work, select a few form elements and then click on submit to get a report printed out. I'm wondering how I can write some sort of script that will automate this task? Where...
Automating a web-based task like logging into a website, selecting form elements, and submitting a form can be accomplished in several ways. The choice of language and tool often depends on the complexity of the task, the environment you're working in, and your comfort with the chosen tools. Here are a few popular appr...
17,710
[ { "from": "human", "value": "I'm a Java developer and I have a question about automating a task I've been given. \nI'm having to 3 times daily, login to this website we have at work, select a few form elements and then click on submit to get a report printed out. \nI'm wondering how I can write some sort of...
I have an internal web app with an image at the top of the page, currently containing some english text with drop shadows. I now need to provide localized versions of this page for various languages. My main choices are: Have a different graphic per supported language, containing the localized text. Use CSS to positio...
It sounds like you're facing a common challenge in creating a localized experience for users while maintaining the aesthetic quality of your web app. Here are some alternative options you might consider: 1. **SVG with Text Elements**: Instead of using a static graphic, consider using an SVG (Scalable Vector Graphics) ...
16,199
[ { "from": "human", "value": "I have an internal web app with an image at the top of the page, currently containing some english text with drop shadows. I now need to provide localized versions of this page for various languages. My main choices are:\n\nHave a different graphic per supported language, contai...
I'm trying to determine a fast way of storing a set of objects, each of which have an x and y coordinate value, such that I can quickly retrieve all objects within a certain rectangle or circle. For small sets of objects (~100) the naive approach of simply storing them in a list, and iterating through it, is relatively...
To efficiently store and retrieve objects based on spatial coordinates, especially when dealing with larger sets of objects that frequently move, you might consider using spatial data structures designed for such tasks. Here are a few options that could improve both insertion and querying performance: ### 1. **Quadtre...
21,833
[ { "from": "human", "value": "I'm trying to determine a fast way of storing a set of objects, each of which have an x and y coordinate value, such that I can quickly retrieve all objects within a certain rectangle or circle.\nFor small sets of objects (~100) the naive approach of simply storing them in a lis...
Let's say I have this type in my application: public class A { public int id; public B b; public boolean equals(Object another) { return this.id == ((A)another).id; } public int hashCode() { return 31 * id; //nice prime number } } and a Set<A> structure. Now, I have an object of type A and want to do the foll...
In your scenario, since you want to update an existing object in a `Set<A>` based on its equality defined by the `equals` method, using a `Set` can lead to complications as it does not allow you to directly access elements for update. The `Set` interface only provides methods to add, remove, and check for the presence ...
21,999
[ { "from": "human", "value": "Let's say I have this type in my application:\npublic class A {\n public int id;\n public B b;\n\n public boolean equals(Object another) { return this.id == ((A)another).id; }\n public int hashCode() { return 31 * id; //nice prime number }\n}\n\nand a Set<A> structure. Now, ...
I just installed a SSL certificate. This certificate is encrypted with 2048 bit encryption. However, the cypher is 128 bit encryption(or 40, or some other variation depending on the browser.) It seems that there are two different types of encryption here. The "handshake" encryption of 2048 and the "over the wire" encry...
Yes, you are on the right track regarding the distinction between the different types of encryption used in SSL/TLS (Secure Sockets Layer/Transport Layer Security) protocols. Let's clarify the concepts further: ### 1. Public Key Encryption (Handshake Encryption) - **2048-bit Encryption**: The SSL certificate itself u...
23,784
[ { "from": "human", "value": "I just installed a SSL certificate. This certificate is encrypted with 2048 bit encryption.\nHowever, the cypher is 128 bit encryption(or 40, or some other variation depending on the browser.)\nIt seems that there are two different types of encryption here. The \"handshake\" enc...
I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip for the listbox as a whole. I am working...
That's a great scenario, and it's always beneficial to share solutions and explore other alternatives. Below, I'll provide a solution for WinForms and then describe how you could achieve a similar effect in WPF. ### WinForms Solution In WinForms, you can use the `ListBox` control's `MouseMove` event to show a tooltip...
23,008
[ { "from": "human", "value": "I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip...
I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" would match "file .* does not exist" and be accounted as two occurrences of "fil...
Given your requirements, a great option would be to use the JSON format. JSON is human-readable, easy to edit, and does not require escaping for most characters, making it a suitable choice for your use case. You can represent your dictionary of regular expressions and corresponding display strings as a JSON object. ...
20,277
[ { "from": "human", "value": "I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example \"file x does not exist\" and \"file y does not exist\" would match \"file .* does not exis...
I am looking for a well tested class for manipulating URLs in .NET. Specifically I want to be able to add/update querystring values given a url. I have found various classes on the web that do this but none seem really robust and well tested. I also cannot find anything in the .NET framework; the Uri class doesn't le...
While the .NET Framework does not provide a built-in class specifically designed for manipulating query strings, you can create a robust utility class for this purpose. Below is an example implementation of a class called `UrlHelper` that provides methods to add, update, and remove query string parameters in a URL. ##...
13,580
[ { "from": "human", "value": "I am looking for a well tested class for manipulating URLs in .NET. Specifically I want to be able to add/update querystring values given a url.\nI have found various classes on the web that do this but none seem really robust and well tested. I also cannot find anything in th...
I'm writing a function to find triangle numbers and the natural way to write it is recursively: function triangle (x) if x == 0 then return 0 end return x+triangle(x-1) end But attempting to calculate the first 100,000 triangle numbers fails with a stack overflow after a while. This is an ideal function to memo...
To create a memoization function in Lua that can be applied to any function, you can define a higher-order function that takes a function as an argument and returns a new function that remembers the results of previous calls. Here’s how you could implement this: ```lua function memoize(f) local cache = {} retu...
24,480
[ { "from": "human", "value": "I'm writing a function to find triangle numbers and the natural way to write it is recursively:\nfunction triangle (x)\n if x == 0 then return 0 end\n return x+triangle(x-1)\nend\n\nBut attempting to calculate the first 100,000 triangle numbers fails with a stack overflow af...
What would you recommend to search a sql server table (varchar(max) column) for a term? Let's say, like in ebay, if you search for "wii brand new", you get results like "Brand New Nintendo Wii Fit Game + Balance Board Bundle", "Wii Fit (Wii) BRAND NEW WII FIT GAME + BALANCE BOARD". I think it basically searches every w...
To implement a search mechanism similar to what you've described, where you search for a set of terms in a SQL Server table with a `varchar(max)` column, you can use a combination of SQL features. The goal is to return rows that contain all the search terms. Here are a few options to consider: ### Option 1: Using `LIK...
19,709
[ { "from": "human", "value": "What would you recommend to search a sql server table (varchar(max) column) for a term?\nLet's say, like in ebay, if you search for \"wii brand new\", you get results like \"Brand New Nintendo Wii Fit Game + Balance Board Bundle\", \"Wii Fit (Wii) BRAND NEW WII FIT GAME + BALANC...
We're running a Debian with a 2.6.16 kernel, with iptables enabled. The system is running a custom made HTTP proxy, which is subjected to a mild load (it works fine with the same load on other sites). The system comprises of 4 servers that are preceded by a load balancer with virtual IP, which is preceded by an array o...
It sounds like you're encountering a specific issue with TCP connections where some SYN packets are not receiving SYN-ACK responses from your proxy servers. Given the details you’ve provided, it does seem like iptables or some related network configuration could be a factor. Here are several steps and troubleshooting ...
21,650
[ { "from": "human", "value": "We're running a Debian with a 2.6.16 kernel, with iptables enabled. The system is running a custom made HTTP proxy, which is subjected to a mild load (it works fine with the same load on other sites). The system comprises of 4 servers that are preceded by a load balancer with vi...
In a VS2008 web site project, I have a page open in split view. I try to drag an Infragistics web control onto the page's design surface. Nothing happens. I try to drag same onto the htmlz. Dialog box with The operation could not be completed. Invalid formatetc structure. Subsequently the dragged control does not a...
The issue you're experiencing with dragging controls onto the design surface in Visual Studio 2008 could be due to several factors, particularly when dealing with third-party controls like Infragistics. Here are some specific steps and troubleshooting tips you can try: 1. **Check for Updates and Hotfixes**: Since you'...
22,013
[ { "from": "human", "value": "In a VS2008 web site project, I have a page open in split view. I try to drag an Infragistics web control onto the page's design surface. Nothing happens. I try to drag same onto the htmlz. Dialog box with \n\nThe operation could not be completed. Invalid formatetc structure. \n...
I noticed some posts here on string matching, which reminded me of an old problem I'd like to solve. Does anyone have a good Levenshtein-like algorithm that is weighted toward Qwerty keyboards? I want to compare two strings, and and allow for typos. Levenshtein is okay, but I'd prefer to also accept spelling errors bas...
Certainly! To solve the problem of string matching with a focus on QWERTY keyboard proximity, you can create a modified version of the Levenshtein distance algorithm that incorporates the physical distance between characters on a QWERTY keyboard. Here’s a step-by-step guide to achieve this: ### 1. Define the QWERTY K...
18,127
[ { "from": "human", "value": "I noticed some posts here on string matching, which reminded me of an old problem I'd like to solve. Does anyone have a good Levenshtein-like algorithm that is weighted toward Qwerty keyboards?\nI want to compare two strings, and and allow for typos. Levenshtein is okay, but I'd...
To give an example of the kind of request that I can't figure out what else to do for: The application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score. The data is modeled as: Game - members like name, user, reference to the ...
Optimizing your bowling score/stat tracker application involves addressing several potential performance bottlenecks, especially related to the way frames and games are updated. Given your application’s structure, here are a few strategies you might consider to reduce CPU load and improve responsiveness: ### 1. Batch ...
18,250
[ { "from": "human", "value": "To give an example of the kind of request that I can't figure out what else to do for:\nThe application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score. The data is modeled as:\nGame -...
Comparing string in C# is pretty simple. In fact there are several ways to do it. I have listed some in the block below. What I am curious about are the differences between them and when one should be used over the others? Should one be avoided at all costs? Are there more I haven't listed? string testString = "...
In C#, comparing strings can be accomplished using several methods, each with its own nuances and suitable use cases. Let’s discuss the three methods you've listed, their differences, and when to use each. ### 1. `CompareTo()` ```csharp if (testString.CompareTo(anotherString) == 0) {} ``` - **Description**: The `Compa...
11,916
[ { "from": "human", "value": "Comparing string in C# is pretty simple. In fact there are several ways to do it. I have listed some in the block below. What I am curious about are the differences between them and when one should be used over the others? Should one be avoided at all costs? Are there more ...
I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custom data object that the ObjectDataSource is associated with {TypeName="myDataClass"}. The valu...
To pass all selected values from a multi-select ListBox to your `myDataClass` through an `ObjectDataSource`, you need to implement a custom approach because `ControlParameter` does not directly support multi-select scenarios. Here’s how you can achieve this: ### Step-by-Step Solution 1. **Modify your ListBox Control*...
20,256
[ { "from": "human", "value": "I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custom data object that the ObjectDataSource is associate...
As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. One of the more interesting things — something I never knew before from any of my prior attempts to learn C — is the ## preprocessor operator. According to K&R: The preprocessor operator ## provides a way ...
The `##` operator in the C preprocessor is a powerful tool for creating complex macros and generating code dynamically. It concatenates its operands, allowing for more flexible and readable code. Here are some practical uses and examples of the `##` operator, along with potential gotchas: ### Practical Examples of Usi...
21,891
[ { "from": "human", "value": "As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. One of the more interesting things — something I never knew before from any of my prior attempts to learn C — is the ## preprocessor operator. According to K&R:\n\nThe...
How do you track outbound links for your web site, since the request is logged on the destination server, not yours?
Tracking outbound links from your website can be accomplished using a variety of methods, even though the requests are logged on the destination server. Here are some common techniques to monitor outbound link clicks: 1. **Event Tracking with Google Analytics**: - You can use Google Analytics to set up event tracki...
21,285
[ { "from": "human", "value": "How do you track outbound links for your web site, since the request is logged on the destination server, not yours? \n" }, { "from": "gpt", "value": "Tracking outbound links from your website can be accomplished using a variety of methods, even though the requests a...
I am trying to implement a decorator chain for my data-access based on IRepository. I have a Repository that does the data- access (at the moment just in-memory list) {1}, and I have one that does validation {2}. On top of that, I have a specialisation of my Repository, IUsersRepository {3}, which defines another met...
It sounds like you're working on a complex design involving decorators and specialization in your repository pattern. Let's break down your concerns and explore potential solutions. ### 1. Using Fluent Interface for Registration If you're using a Dependency Injection (DI) container that supports a fluent interface fo...
19,651
[ { "from": "human", "value": "I am trying to implement a decorator chain for my data-access based on\nIRepository. I have a Repository that does the data-\naccess (at the moment just in-memory list) {1}, and I have one that\ndoes validation {2}. On top of that, I have a specialisation of my\nRepository, IU...
What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more difficult to understand/build than HQL. When do you use Criteria and when HQL? What do you prefer in which use cases? Or is it just a matter of ta...
When working with Hibernate, both Criteria API and HQL (Hibernate Query Language) serve as tools for querying the database, but they have different characteristics, benefits, and drawbacks. Here’s a breakdown of the pros and cons of each: ### Criteria API **Pros:** 1. **Type Safety:** The Criteria API offers compile-...
20,203
[ { "from": "human", "value": "What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more difficult to understand/build than HQL. \nWhen do you use Criteria and when HQL? What do you prefer in whi...
I was recommeded a book called: Accelerated C++ Practical Programming by Example by Andrew Koenig and Barbara E. Moo Addison-Wesley, 2000 ISBN 0-201-70353-X The basis of this book is that Object Oriented Programming is highly wasteful memory-wise, and that most source-code should not be written this way, rather tha...
The book "Accelerated C++" by Andrew Koenig and Barbara E. Moo offers a distinct perspective on C++ programming, focusing on practical techniques and emphasizing the use of features like inline functions and procedural programming. While it presents valid points about efficiency, especially in terms of resource utiliza...
20,657
[ { "from": "human", "value": "I was recommeded a book called: \nAccelerated C++ Practical Programming by Example\nby Andrew Koenig and Barbara E. Moo \nAddison-Wesley, 2000 \nISBN 0-201-70353-X \nThe basis of this book is that Object Oriented Programming is highly wasteful memory-wise, and that most source-c...
Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x?
In the context of the MD5 hash function, a "fixed point" would be an input \( x \) such that when the MD5 transformation is applied to it, the output is equal to the input itself (i.e., \( \text{md5}(x) = x \)). MD5 is designed to produce a 128-bit hash from any input, and it operates by processing the input in a non...
24,050
[ { "from": "human", "value": "Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x?\n" }, { "from": "gpt", "value": "In the context of the MD5 hash function, a \"fixed point\" would be an input \\( x \\) such that when the MD5 transformation is applied t...
I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this?
ClickOnce is designed to provide a simple way to deploy Windows applications via the web, but it has certain limitations, including the inability to create traditional desktop shortcuts for applications. This design decision is meant to enhance security and ensure that ClickOnce applications are installed in a controll...
21,166
[ { "from": "human", "value": "I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this?\n" }, { "from": "gpt", "value": "ClickOnce is designed to provide a simple way to deploy Windows applications via ...
How do I stop a function/procedure in a superclass from been overridden in a subclass in Delphi (2007)? I want to mark it so it can not be altered, I believe there is a final keyword but can not for the life of me find the documentation for it, so I am not 100% sure that's what I need.
In Delphi, if you want to prevent a method in a superclass from being overridden in a subclass, you can use the `final` keyword. When you declare a method as `final`, it ensures that the method cannot be overridden in any descendant class. Here's a simple example to illustrate how you can use the `final` keyword in a ...
26,071
[ { "from": "human", "value": "How do I stop a function/procedure in a superclass from been overridden in a subclass in Delphi (2007)?\nI want to mark it so it can not be altered, I believe there is a final keyword but can not for the life of me find the documentation for it, so I am not 100% sure that's what...
I have a pattern to match with the string: string pattern = @"asc" I am checking the SQL SELECT query for right syntax, semantics, ... I need to say that in the end of the query string I can have "asc" or "desc". How can it be written in C#?
To match a SQL query string that ends with either "asc" or "desc", you can use a regular expression in C#. You can modify your pattern to allow for the possibility of either of these two keywords at the end of your query. Here's how you can write this in C#: ```csharp using System; using System.Text.RegularExpression...
25,125
[ { "from": "human", "value": "I have a pattern to match with the string:\nstring pattern = @\"asc\"\nI am checking the SQL SELECT query for right syntax, semantics, ...\nI need to say that in the end of the query string I can have \"asc\" or \"desc\".\nHow can it be written in C#?\n" }, { "from": "gp...
The following code number=1 if [[ $number =~ [0-9] ]] then echo matched fi works. If I try to use quotes in the regex, however, it stops: number=1 if [[ $number =~ "[0-9]" ]] then echo matched fi I tried "\[0-9\]", too. What am I missing? Funnily enough, bash advanced scripting guide suggests this should work. Ba...
In Bash, when using the `[[ ... =~ ... ]]` syntax for regex matching, the right-hand side (the regex pattern) should not be quoted. If you enclose the regex pattern in quotes, Bash treats it as a literal string rather than a regex expression. Here’s a brief explanation of your two examples: 1. **Without quotes**: ...
24,404
[ { "from": "human", "value": "The following code\nnumber=1\nif [[ $number =~ [0-9] ]]\nthen\n echo matched\nfi\n\nworks. If I try to use quotes in the regex, however, it stops:\nnumber=1\nif [[ $number =~ \"[0-9]\" ]]\nthen\n echo matched\nfi\n\nI tried \"\\[0-9\\]\", too. What am I missing?\nFunnily enoug...
When I get a java.io.InvalidClassException, it gives me the serialVersionUID that it wants, and the serialVersionUID that it got. Is there an easy way to tell which of my dozens of jars using the wrong serialVersionUID? Update: I should mention that our intention is to update everything at the same time, but I'm tryin...
When you encounter a `java.io.InvalidClassException`, it indicates a mismatch between the serialized version of a class and the one that is currently loaded. The error message gives you the expected `serialVersionUID` and the one that was found. To debug this situation and identify which JAR file contains the offending...
23,038
[ { "from": "human", "value": "When I get a java.io.InvalidClassException, it gives me the serialVersionUID that it wants, and the serialVersionUID that it got. Is there an easy way to tell which of my dozens of jars using the wrong serialVersionUID?\nUpdate: I should mention that our intention is to update ...
Suppose I have a table. Now, I'm interested in Getting Useful Data Easily. This means I'd rather not drop it into Excel and go through contortions, nor somehow get it into CSV and then into a DB, and then into SQL. I'd like to be able to execute a SQL query directly against a table in HTML. Has anyone heard of a tool l...
Yes, there are several tools and libraries that can help you run SQL-like queries directly against HTML tables without needing to export the data into a different format like CSV or import it into a database. Here are a few options you might consider: 1. **DataTables with jQuery**: DataTables is a popular jQuery plugi...
25,731
[ { "from": "human", "value": "Suppose I have a table. Now, I'm interested in Getting Useful Data Easily. This means I'd rather not drop it into Excel and go through contortions, nor somehow get it into CSV and then into a DB, and then into SQL.\nI'd like to be able to execute a SQL query directly against a t...
Does anybody know of a good media framework for Flex? I'd like to be able to create apps that can play not only those formats that the Flex framework provides support for, but other formats as well (like wav, wma, ogg and other...). EDIT 13.10.2008.: It was recently pointed out to me in the answers section that I shoul...
When it comes to media playback in Flex/AIR applications, the built-in capabilities of the Flex framework primarily support a limited range of formats, such as MP3 and FLV. However, for additional audio formats like WAV, WMA, and OGG, you may consider a few options: 1. **Third-Party Libraries**: There are some third-p...
22,637
[ { "from": "human", "value": "Does anybody know of a good media framework for Flex?\nI'd like to be able to create apps that can play not only those formats that the Flex framework provides support for, but other formats as well (like wav, wma, ogg and other...).\nEDIT 13.10.2008.: It was recently pointed ou...
I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word. /page/{currentPage} so.. can someone give me a regex which matches when the word is a number (any int) greater than 0 (ie. 1 <-> int.max).
To create a regex that matches a number greater than 0 for the URL segment `/page/{currentPage}`, you can use the following regex pattern: ``` /page/([1-9][0-9]*) ``` ### Explanation: - `/page/` - This part matches the literal string `/page/`. - `(` - This starts a capturing group. - `[1-9]` - This matches any digit ...
26,424
[ { "from": "human", "value": "I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word.\n/page/{currentPage}\nso.. can someone give me a regex which matches when the word is a number (any int) g...
In @mmalc's response to this question he states that "In general you should not use accessor methods in dealloc (or init)." Why does mmalc say this? The only really reasons I can think of are performance and avoiding unknown side-effects of @dynamic setters. Discussion?
In Objective-C, especially in the context of memory management and object lifecycle, there are a few important considerations when it comes to using accessor methods (getters and setters) in `dealloc` or `init` methods. Here are some of the primary reasons behind the advice given by @mmalc: 1. **Performance Concerns**...
23,763
[ { "from": "human", "value": "In @mmalc's response to this question he states that \"In general you should not use accessor methods in dealloc (or init).\" Why does mmalc say this?\nThe only really reasons I can think of are performance and avoiding unknown side-effects of @dynamic setters.\nDiscussion?\n" ...
What is the "functional body" of a program? I thought it was its functions' prototypes, is it?
The term "functional body" of a program can be a bit ambiguous and is not commonly used in formal programming language terminology. However, if you're referring to the part of the program that contains the actual implementation of its functionality, it typically includes the following components: 1. **Function Definit...
25,580
[ { "from": "human", "value": "What is the \"functional body\" of a program?\nI thought it was its functions' prototypes, is it?\n" }, { "from": "gpt", "value": "The term \"functional body\" of a program can be a bit ambiguous and is not commonly used in formal programming language terminology. Ho...
I'm writing some JNI code in C++ to be called from an applet on Windows XP. I've been able to successfully run the applet and have the JNI library loaded and called, even going so far as having it call functions in other DLLs. I got this working by setting up the PATH system environment variable to include the direct...
The `UnsatisfiedLinkError` with the message "The specified procedure could not be found" can indeed be frustrating, especially when your JNI code seems to work correctly with other calls. Here are a few common causes and troubleshooting steps that may help you resolve the issue: 1. **Name Mangling**: If your new funct...
20,051
[ { "from": "human", "value": "I'm writing some JNI code in C++ to be called from an applet on Windows XP. I've been able to successfully run the applet and have the JNI library loaded and called, even going so far as having it call functions in other DLLs. I got this working by setting up the PATH system e...
I realise that the view/controller stuff will be different between Mac and IPhone apps but the model code may well be similar/the same. So whats the best way to organise a project(s) so that the model code is/can be shared? Copy/paste - just duplicate it and manually keep it in sync Have 2 xcode projects point at th...
You're right that the model code in an application can often be shared between different platforms, such as macOS and iOS. The best approach for organizing a project to share model code depends on your specific needs and preferences, but here are some commonly used strategies: ### 1. **Use a Common Framework or Librar...
22,684
[ { "from": "human", "value": "I realise that the view/controller stuff will be different between Mac and IPhone apps but the model code may well be similar/the same. So whats the best way to organise a project(s) so that the model code is/can be shared?\n\nCopy/paste - just duplicate it and manually keep it...
Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish. Which made me wonder, why would I want to use Glassfish (in the sense that I...
Certainly! GlassFish is an open-source application server that is particularly well-suited for running Java applications, especially those that adhere to the Java EE (Enterprise Edition) specifications. Here’s an overview of its strengths, weaknesses, and use cases, which should help clarify when you might want to use ...
14,999
[ { "from": "human", "value": "Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish.\nWhich made me wonder, why would I ...
I'm trying to commit to an SVN server hosted on my school's network. I have installed SVN 1.5.2 with binaries downloaded from CollabNet here. The error reported is: svn: Commit failed (details follow): svn: MKACTIVITY of '/opensvn/cs598r/!svn/act/defe271c-f33b-4851-a706-b2906301fed0': authorization failed (http://dna.c...
The error message you are seeing suggests that there is an authorization problem when trying to commit to the SVN server, even though it’s not explicitly stating a "403 Forbidden" error. Since you mentioned that other members of your team are able to commit from their machines, but are facing the same issue when trying...
22,351
[ { "from": "human", "value": "I'm trying to commit to an SVN server hosted on my school's network. I have installed SVN 1.5.2 with binaries downloaded from CollabNet here. The error reported is:\nsvn: Commit failed (details follow):\nsvn: MKACTIVITY of '/opensvn/cs598r/!svn/act/defe271c-f33b-4851-a706-b29063...
I'm just starting with Mercurial and one of the things that I should do is select a merge tool. I was thinking to use WinMerge for that purpose, but I can't find the way to select this in particular. There are references for all the other merge tools around, but not for WinMerge. So, should I use WinMerge or there's a ...
Using WinMerge as a merge tool for Mercurial on Windows is a great choice! It is a powerful visual comparison tool that allows you to see the differences between files clearly and manage merges effectively. Here’s how you can set up WinMerge as your merge tool in Mercurial: ### Setting Up WinMerge as the Merge Tool in...
24,020
[ { "from": "human", "value": "I'm just starting with Mercurial and one of the things that I should do is select a merge tool. I was thinking to use WinMerge for that purpose, but I can't find the way to select this in particular. There are references for all the other merge tools around, but not for WinMerge...
Can I use comments inside a JSON file? If so, how?
No, JSON (JavaScript Object Notation) does not support comments. According to the official JSON specification (RFC 8259), any text that is not part of the JSON syntax is not allowed, which means that you cannot include comments in a JSON file. If you need to include comments for documentation or clarity purposes, you ...
25,570
[ { "from": "human", "value": "Can I use comments inside a JSON file? If so, how?\n" }, { "from": "gpt", "value": "No, JSON (JavaScript Object Notation) does not support comments. According to the official JSON specification (RFC 8259), any text that is not part of the JSON syntax is not allowed, ...
With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to be: <%= Person.Name %> Which was fine with webforms as alot of model data was bound to controls programatically. But with MVC we are now using this syntax more oftern. The issue I have with it is quite trivial, but annoying either...
The syntax used in ASP.NET Web Forms and MVC views can definitely feel verbose, especially when you're used to more concise template engines found in other frameworks. In Web Forms, the `<%= %>` syntax is often required to write output directly to the response stream, and while it's consistent, it can lead to a more cl...
20,403
[ { "from": "human", "value": "With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to be: \n<%= Person.Name %>\n\nWhich was fine with webforms as alot of model data was bound to controls programatically. But with MVC we are now using this syntax more oftern. \nThe issue I have ...
How can I access a public static member of a Java class from ColdFusion?
In ColdFusion, you can access a public static member of a Java class by using the `CreateObject()` function, along with the Java class path. ColdFusion provides a way to call Java methods and access Java fields directly. Here’s how you can do it: ### Example: Assume you have a Java class `MyJavaClass` with a public s...
22,275
[ { "from": "human", "value": "How can I access a public static member of a Java class from ColdFusion?\n" }, { "from": "gpt", "value": "In ColdFusion, you can access a public static member of a Java class by using the `CreateObject()` function, along with the Java class path. ColdFusion provides ...
The file upload control in asp.net does not allow me to select a folder and enables me to select only the files. Is there any way in which I can select a folder (obviously without using the file upload control). Why I want to select the folder is basically to store its entire path in a database table.
In a standard ASP.NET web application, the file upload control (`<input type="file">`) does not support selecting folders directly due to browser limitations and security concerns. However, if your goal is to allow users to select a folder and then store its path, you can use JavaScript along with the HTML File System ...
22,521
[ { "from": "human", "value": "The file upload control in asp.net does not allow me to select a folder and enables me to select only the files. Is there any way in which I can select a folder (obviously without using the file upload control).\nWhy I want to select the folder is basically to store its entire p...
What is better? A: server:1080/repo/projectA/trunk/... branches/branch1 branches/branch2 branches/branch3 tags/tag1/... tags/tag2/... server:1080/repo/projectB/trunk/... ...
Choosing between Repository Structure A and Repository Structure B depends on various factors, such as team preferences, project complexity, ease of navigation, and the tools being used. Let's break down the advantages and disadvantages of each structure to help you determine which might be better for your use case. #...
22,271
[ { "from": "human", "value": "What is better?\nA:\nserver:1080/repo/projectA/trunk/...\n branches/branch1\n branches/branch2\n branches/branch3\n tags/tag1/...\n tags/tag2/...\nserver:...
I would like to create an application that serves web pages internally and can be run in multiple instances on the same machine. To do so, I would like to create an HttpListener that listens on a port that is: Randomly selected Currently unused Essentially, what I would like is something like: mListener = new HttpL...
To create an `HttpListener` that listens on a randomly selected, currently unused port, you can follow these steps: 1. Create a new `HttpListener` instance. 2. Add a prefix with port `0` to it, which tells the system to assign a random available port. 3. Start the listener to bind it to the selected port. 4. Retrieve ...
22,095
[ { "from": "human", "value": "I would like to create an application that serves web pages internally and can be run in multiple instances on the same machine. To do so, I would like to create an HttpListener that listens on a port that is:\n\nRandomly selected \nCurrently unused\n\nEssentially, what I would...
Is there an open source alternative to SharePoint? I'd like something that gives the same hierarchical structure and portlet-based design of SharePoint, but is open in source. Web based administration and customization is also a plus.
Yes, there are several open-source alternatives to SharePoint that offer hierarchical structure, portlet-based design, and web-based administration and customization features. Here are a few notable options: 1. **Liferay**: - Liferay is a well-known open-source portal solution that provides a robust platform for b...
25,170
[ { "from": "human", "value": "Is there an open source alternative to SharePoint?\nI'd like something that gives the same hierarchical structure and portlet-based design of SharePoint, but is open in source. Web based administration and customization is also a plus.\n" }, { "from": "gpt", "value":...
I am inserting a column in a DataGridView programmatically (i.e., not bound to any data tables/databases) as follows: int lastIndex = m_DGV.Columns.Count - 1; // Count = 4 in this case DataGridViewTextBoxColumn col = (DataGridViewTextBoxColumn)m_DGV.Columns[lastIndex]; m_DGV.Columns.RemoveAt(lastIndex); m_DGV.Columns....
The issue you're experiencing with the `DisplayIndex` of columns in a `DataGridView` is a common one when manipulating columns directly. Let's break down what's happening and why you need to manually set the `DisplayIndex`. ### Understanding `DisplayIndex` - The `DisplayIndex` property of a column indicates the order...
24,111
[ { "from": "human", "value": "I am inserting a column in a DataGridView programmatically (i.e., not bound to any data tables/databases) as follows:\nint lastIndex = m_DGV.Columns.Count - 1; // Count = 4 in this case\nDataGridViewTextBoxColumn col = (DataGridViewTextBoxColumn)m_DGV.Columns[lastIndex];\nm_DGV...
How do you enumerate the fields of a certificate help in a store. Specifically, I am trying to enumerate the fields of personal certificates issued to the logged on user.
To enumerate the fields of personal certificates issued to the logged-on user on a Windows system, you can use PowerShell. The personal certificates are typically stored in the "Personal" store under the "Current User" context. Here’s how you can enumerate those fields using PowerShell: ### Using PowerShell 1. **Ope...
14,170
[ { "from": "human", "value": "How do you enumerate the fields of a certificate help in a store. Specifically, I am trying to enumerate the fields of personal certificates issued to the logged on user.\n" }, { "from": "gpt", "value": "To enumerate the fields of personal certificates issued to the ...
Is std::string size() a O(1) operation? The implementation of STL I'm using is the one built into VC++
In C++, the `std::string::size()` function is generally considered to be a constant time operation, or O(1). This is because the size of the string is typically stored internally in the string's data structure, allowing the function to return this pre-stored value without needing to traverse the string or perform any c...
27,342
[ { "from": "human", "value": "Is std::string size() a O(1) operation?\nThe implementation of STL I'm using is the one built into VC++\n" }, { "from": "gpt", "value": "In C++, the `std::string::size()` function is generally considered to be a constant time operation, or O(1). This is because the s...
I am getting the following error when I get to the line that invokes a REALLY BASIC web service I have running on Tomcat/Axis. Element or attribute do not match QName production: QName::=(NCName':')?NCName Have I got something wrong with QName?- I can't even find any useful information about it. My client code is belo...
The error you are encountering is related to how you're specifying the `QName` for the operation name in your Axis client code. The `QName` class constructor expects two parameters: the namespace URI and the local part of the name (the operation name itself). The issue lies in how you are specifying these values. Here...
25,524
[ { "from": "human", "value": "I am getting the following error when I get to the line that invokes a REALLY BASIC web service I have running on Tomcat/Axis.\nElement or attribute do not match QName production: QName::=(NCName':')?NCName\n\nHave I got something wrong with QName?- I can't even find any useful ...
I have an application that manages patient demographic information. Along with this data a user can scan a picture of a patient and assign that picture to a patient. When the user clicks the scan button a separate application is opened as a dialog in order to scan the image. When running this on XP everything worked fi...
The issue you're experiencing with window focus in Windows Vista compared to Windows XP is a known difference in how the two operating systems manage window focus and dialogs. Here are some potential solutions and workarounds that you can try to help resolve this issue without modifying the actual imaging application: ...
23,638
[ { "from": "human", "value": "I have an application that manages patient demographic information. Along with this data a user can scan a picture of a patient and assign that picture to a patient. When the user clicks the scan button a separate application is opened as a dialog in order to scan the image. Whe...
The situation is like this : Main project A. and a class library B. A references B Project B has the classes that will be serialized. The classes are used in A. Now, the problem appears when from Project A I try to serialize the objects from B. An exception is thrown that says a class from A cannot be serialized. This ...
It sounds like you're facing challenges with serialization in .NET, especially dealing with properties that reference non-serializable types, like event handlers. Given that you've resolved one of the issues related to `PropertyChanged` listeners, you may want to approach the remaining problem similarly. Here’s how you...
21,144
[ { "from": "human", "value": "The situation is like this : Main project A. and a class library B. A references B\nProject B has the classes that will be serialized. The classes are used in A. Now, the problem appears when from Project A I try to serialize the objects from B. An exception is thrown that says ...
I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds. How can I do that with code? On a machine where MS Access is not installed. I know from trying it that JRO.JetEngine.CompactDatabase does NOT work. In other words, I want to do what Access or JETCOMP.exe is doing, n...
If you need to repair a corrupt Microsoft Access database without having MS Access installed on the machine, you will need to use an alternative method to invoke the repair functionality. While `JRO.JetEngine.CompactDatabase` does not work for corrupt databases, you can consider the following options: ### Using `Acces...
21,452
[ { "from": "human", "value": "I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds.\nHow can I do that with code? On a machine where MS Access is not installed.\nI know from trying it that JRO.JetEngine.CompactDatabase does NOT work.\nIn other words, I want ...
EDIT: I'm still waiting for more answers. Thanks! In SQL 2000 days, I used to use temp table method where you create a temp table with new identity column and primary key then select where identity column between A and B. When SQL 2005 came along I found out about Row_Number() and I've been using it ever since... But n...
When working with large datasets in SQL Server 2005, performance issues with `ROW_NUMBER()` are not uncommon, especially when sorting on non-identity columns or when dealing with a significant number of records. Here are some strategies and considerations for optimizing pagination: ### 1. **Using Temporary Tables:** C...
17,206
[ { "from": "human", "value": "EDIT: I'm still waiting for more answers. Thanks!\nIn SQL 2000 days, I used to use temp table method where you create a temp table with new identity column and primary key then select where identity column between A and B.\nWhen SQL 2005 came along I found out about Row_Number()...
I have Apache 2 running on a VPS server (running Debian). I recently changed the timezone on the server (using dpkg-reconfigure tzdata) from America/New_York to America/Los_Angeles to match my move across country. I have also rebooted the virtual machine since making the change. However, the Apache processes seem to ...
The inconsistency in the timestamps in your Apache access log, showing both PDT (-0700) and EDT (-0400), indicates that the Apache process may still be referencing a different timezone setting than what you have configured on the server. Here are some steps to help you troubleshoot and ensure that Apache is correctly ...
23,049
[ { "from": "human", "value": "I have Apache 2 running on a VPS server (running Debian). I recently changed the timezone on the server (using dpkg-reconfigure tzdata) from America/New_York to America/Los_Angeles to match my move across country. I have also rebooted the virtual machine since making the chang...
I'm trying to get the following code working: string url = String.Format(@"SOMEURL"); string user = "SOMEUSER"; string password = "SOMEPASSWORD"; FtpWebRequest ftpclientRequest = (FtpWebRequest)WebRequest.Create(new Uri(url)); ftpclientRequest.Method = WebRequestMethods.Ftp.ListDirectory; ftpclientRequest...
The behavior you're experiencing is likely due to the way the .NET Framework's `FtpWebRequest` class handles FTP connections. When you create an `FtpWebRequest` and set the method to `ListDirectory`, it will typically try to change to the directory specified in the URL. In your case, if you are using a URL that points...
25,217
[ { "from": "human", "value": "I'm trying to get the following code working: \n string url = String.Format(@\"SOMEURL\");\n string user = \"SOMEUSER\";\n string password = \"SOMEPASSWORD\";\n\n FtpWebRequest ftpclientRequest = (FtpWebRequest)WebRequest.Create(new Uri(url));\n ftpclientRequest.Method = We...
I have an XML document, and contained within one of the nodes, I have <li> tags. I don't need <ul></ul> tags for Flash because it only accepts <li> tags anyway. For example, here's part of the XML doc: <node> <li>item1</li> <li>item2</li> </node> I want to put all the data within the <node> tags, with bullets, into ...
To handle your XML document in a way that allows you to extract the contents of the `<li>` tags and display them as bulleted text in a TextArea component in Flash 8, you can follow these steps: 1. **Use CDATA in XML**: The first thing is to avoid any issues with interpreting the `<li>` tags by using CDATA sections. Yo...
22,731
[ { "from": "human", "value": "I have an XML document, and contained within one of the nodes, I have <li> tags. I don't need <ul></ul> tags for Flash because it only accepts <li> tags anyway. For example, here's part of the XML doc:\n<node>\n <li>item1</li>\n <li>item2</li>\n</node>\n\nI want to put all the d...
I am trying to set attributes for an IFRAME html control from the code-behind aspx.cs file. I came across a post that says you can use FindControl to find the non-asp controls using: The aspx file contains: <iframe id="contentPanel1" runat="server" /> and then the code-behind file contains: protected void Page_Load(ob...
It seems you've found the solution to your issue, but let's clarify a few points to ensure everything is clear regarding accessing server controls in ASP.NET when using `runat="server"`. ### Explanation 1. **Direct Access to Server Controls**: When you declare a control with `runat="server"`, ASP.NET creates a fie...
19,507
[ { "from": "human", "value": "I am trying to set attributes for an IFRAME html control from the code-behind aspx.cs file.\nI came across a post that says you can use FindControl to find the non-asp controls using:\nThe aspx file contains:\n<iframe id=\"contentPanel1\" runat=\"server\" />\n\nand then the code...
I have a route // Sample URL: /Fixtures/Team/id routes.MapRoute( "Fixtures-by-TeamID", "Fixtures/Team/{teamId}", new { controller = "Fixtures", action = "GetByTeamID", }, new { teamId = @"\d{1,3}" } ); and I am trying to use ActionLink in ASP.net MVC p5. <%= Html.ActionLink(g.HomeTeam.TeamName, "T...
The issue you're encountering with `Html.ActionLink` generating a query string instead of a proper route is due to the way it resolves the route values. When you're using `Html.ActionLink`, it can sometimes not recognize the routing you've set up, particularly if it expects an action and controller that are slightly di...
24,240
[ { "from": "human", "value": "I have a route\n// Sample URL: /Fixtures/Team/id\nroutes.MapRoute(\n \"Fixtures-by-TeamID\",\n \"Fixtures/Team/{teamId}\",\n new { controller = \"Fixtures\", action = \"GetByTeamID\", },\n new { teamId = @\"\\d{1,3}\" }\n);\n\nand I am trying to use ActionLink in...
I ran accross a CSR file (Certificate Signing Request) and I need to extract some information from it. There's a way to decode it using .NET Framework?
Yes, you can decode a Certificate Signing Request (CSR) using the .NET Framework. The CSR is typically encoded in base64 format, and it contains information such as the subject's details and public key. To decode the CSR and extract information in .NET, you can use the `System.Security.Cryptography` namespace along wi...
22,459
[ { "from": "human", "value": "I ran accross a CSR file (Certificate Signing Request) and I need to extract some information from it.\nThere's a way to decode it using .NET Framework?\n" }, { "from": "gpt", "value": "Yes, you can decode a Certificate Signing Request (CSR) using the .NET Framework....
I can do this: $ find . . ./b ./b/foo ./c ./c/foo And this: $ find . -type f -exec cat {} \; This is in b. This is in c. But not this: $ find . -type f -exec cat > out.txt {} \; Why not?
The command you are trying to run, `find . -type f -exec cat > out.txt {} \;`, is not working as you expect due to the way the shell handles redirection (`> out.txt`) and the `-exec` option of the `find` command. In this command, the output redirection (`> out.txt`) is processed by the shell before the `find` command ...
22,844
[ { "from": "human", "value": "I can do this:\n$ find .\n.\n./b\n./b/foo\n./c\n./c/foo\n\nAnd this:\n$ find . -type f -exec cat {} \\;\nThis is in b.\nThis is in c.\n\nBut not this:\n$ find . -type f -exec cat > out.txt {} \\;\n\nWhy not?\n" }, { "from": "gpt", "value": "The command you are trying...
I would like to run multiple copies of my application and force the first to open on one monitor and the second instance on a second monitor
To run multiple copies of an application and position each instance on a different monitor, you can follow these general steps. The exact implementation will depend on the operating system you are using (Windows, macOS, or Linux), but here are some general strategies: ### For Windows: 1. **Identify the Monitors**: ...
19,116
[ { "from": "human", "value": "I would like to run multiple copies of my application and force the first to open on one monitor and the second instance on a second monitor\n" }, { "from": "gpt", "value": "To run multiple copies of an application and position each instance on a different monitor, y...
I am currently working on a leave application (which is a subset of my e-scheduler project) and I have my database design as follows: event (event_id, dtstart, dtend... *follows icalendar standard*) event_leave (event_id*, leave_type_id*, total_days) _leave_type (leave_type_id, name, max_carry_forward) _leave_alloca...
It looks like you're designing a leave management system with a focus on handling leave allocation, types, and carry forward. The complexity you've identified at the start of the year regarding the carry forward calculations is a common challenge in such applications. Here’s a potential redesign and some strategies you...
20,840
[ { "from": "human", "value": "I am currently working on a leave application (which is a subset of my e-scheduler project) and I have my database design as follows:\nevent (event_id, dtstart, dtend... *follows icalendar standard*)\n\nevent_leave (event_id*, leave_type_id*, total_days)\n\n_leave_type (leave_ty...
I'm stuck with .Net 1.1 application (i.e. I can not use the generics goodies from 2.0 for now), and I was trying to optimize some parts of the code. As it deals a lot with runtime callable wrappers, which need to be released, I ended up to create a utility method which loops until all references are released. The signa...
In .NET 1.1, you don't have the option to use generics or advanced features like covariance and contravariance that would normally allow for easier type conversion. Since you're dealing with COM objects of various types and want to nullify them after releasing, you can use a workaround by taking advantage of boxing and...
25,611
[ { "from": "human", "value": "I'm stuck with .Net 1.1 application (i.e. I can not use the generics goodies from 2.0 for now), and I was trying to optimize some parts of the code. As it deals a lot with runtime callable wrappers, which need to be released, I ended up to create a utility method which loops unt...
I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side. How do we fix this? Error details below: Server Error in '/XXX' Application. -------------------------------------------------------------------------------- Invalid po...
The error you're encountering is due to ASP.NET's event validation mechanism, which helps protect against attacks that manipulate controls and their data when posting back. When JavaScript modifies the contents of an ASP.NET control (like an `asp:ListBox`), the changes can cause a mismatch between what the server expec...
22,751
[ { "from": "human", "value": "I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side.\nHow do we fix this?\nError details below:\nServer Error in '/XXX' Application.\n\n---------------------------------------------...
The number of products out there right now still seems to be slim.
It sounds like you're referring to a specific category of products or perhaps a market segment that you find lacking in variety. Could you clarify which products or market you are talking about? This would help me provide more relevant information or insights.
29,171
[ { "from": "human", "value": "The number of products out there right now still seems to be slim.\n" }, { "from": "gpt", "value": "It sounds like you're referring to a specific category of products or perhaps a market segment that you find lacking in variety. Could you clarify which products or ma...
I installed Visual Studio 2008 Standard Edition a month or so ago after a reformat (on Vista64, if that matters). I got it for free from one of those "Heroes Happen Here" launch events. I then installed SQL Server 2008 Express Edition a week or so ago (we're supposed to be getting that for free in the mail but I gave u...
You are correct in your assessment that the "Visual Studio 2008 Shell" splash screen indicates that a version of Visual Studio specifically designed for the SQL Server environment is being invoked. This is often the case when you install SQL Server Express, as it can include a lightweight version of Visual Studio (the ...
24,704
[ { "from": "human", "value": "I installed Visual Studio 2008 Standard Edition a month or so ago after a reformat (on Vista64, if that matters). I got it for free from one of those \"Heroes Happen Here\" launch events.\nI then installed SQL Server 2008 Express Edition a week or so ago (we're supposed to be ge...
Is there a way to get the SearchPath API to not search in c:\windows when using the default search path (passing NULL as the first param)? I can't modify the caller to send in a specific path. I have a system with an application ini file in c:\windows (which I don't want it to use, but for legacy reasons has to remain ...
The behavior you're experiencing with `SearchPath` is due to the way the function prioritizes locations when searching for files. When you pass `NULL` as the first parameter, it defaults to using the search path associated with the process, which includes the current directory, system directories, and so on, depending ...
25,339
[ { "from": "human", "value": "Is there a way to get the SearchPath API to not search in c:\\windows when using the default search path (passing NULL as the first param)? I can't modify the caller to send in a specific path.\nI have a system with an application ini file in c:\\windows (which I don't want it t...