instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm writing an article about editing pages in order to hand pick what you really want to print. There are many tools (like "Print What you like") but I also found this script. Anyone knows anything about it? I haven't found any kind of documentation or references. javascript:document.body.contentEditable='true'; docume...
The JavaScript code snippet you provided is a simple way to enable editing of the content on a webpage directly in the browser. Let's break it down: ```javascript javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 ``` ### Explanation: 1. **`document.body.contentEditable='true';`**: -...
20,563
[ { "from": "human", "value": "I'm writing an article about editing pages in order to hand pick what you really want to print. There are many tools (like \"Print What you like\") but I also found this script. Anyone knows anything about it? I haven't found any kind of documentation or references.\njavascript:...
Does anyone have a good algorithm for re-sorting an array of values (already pre-sorted) so that they can be displayed in multiple (N) columns and be read vertically? This would be implemented in .Net but I'd prefer something portable and not some magic function. A good example of it working is the ASP.Net CheckBoxList...
To achieve the desired output of re-sorting an already sorted array into multiple columns displayed vertically, you can use a straightforward algorithm. The approach involves calculating how many rows you need and filling those rows based on the specified number of columns. Below is a simple implementation in C# that c...
20,880
[ { "from": "human", "value": "Does anyone have a good algorithm for re-sorting an array of values (already pre-sorted) so that they can be displayed in multiple (N) columns and be read vertically? This would be implemented in .Net but I'd prefer something portable and not some magic function.\nA good example...
I've got a list in a Python program that contains a series of numbers, which are themselves ASCII values. How do I convert this into a "regular" string that I can echo to the screen?
To convert a list of ASCII values into a regular string in Python, you can use the `chr()` function in a list comprehension or use the `join()` method to concatenate the characters together into a single string. Here's how you can do it: Assuming you have a list of ASCII values, for example: ```python ascii_values = ...
28,297
[ { "from": "human", "value": "I've got a list in a Python program that contains a series of numbers, which are themselves ASCII values. How do I convert this into a \"regular\" string that I can echo to the screen?\n" }, { "from": "gpt", "value": "To convert a list of ASCII values into a regular...
I know how to send mails using the Microsoft Enterprise Library 2.0 using a text formatter. But these emails are always in plain text. Is there any way with entlib 2.0 to send these mails in HTML format?
In Microsoft Enterprise Library 2.0, if you are using the `EmailSender` class along with a text formatter, it typically formats the email content as plain text. To send HTML-formatted emails, you would need to modify how you're configuring the email message. While the built-in text formatter may not support HTML direc...
24,280
[ { "from": "human", "value": "I know how to send mails using the Microsoft Enterprise Library 2.0 using a text formatter. But these emails are always in plain text. Is there any way with entlib 2.0 to send these mails in HTML format? \n" }, { "from": "gpt", "value": "In Microsoft Enterprise Libra...
On our site, we get a large amount of photos uploaded from various sources. In order to keep the file sizes down, we strip all exif data from the source using mogrify: mogrify -strip image.jpg What we'd like to be able to do is to insert some basic exif data (Copyright Initrode, etc) back onto this new "clean" image,...
To add EXIF data back to images using ImageMagick, you can use the `-set` option to specify EXIF tags when you are saving the image. However, please note that ImageMagick's ability to write EXIF data may vary depending on your version and the formats you're working with. Here’s an example command for adding some EXIF ...
23,129
[ { "from": "human", "value": "On our site, we get a large amount of photos uploaded from various sources. \nIn order to keep the file sizes down, we strip all exif data from the source using mogrify:\nmogrify -strip image.jpg\n\nWhat we'd like to be able to do is to insert some basic exif data (Copyright Ini...
Is there a way to make a python module load a dll in my application directory rather than the version that came with the python installation, without making changes to the python installation (which would then require I made an installer, and be careful I didn't break other apps for people by overwrting python modules ...
Yes, you can load a specific version of a DLL in your application directory without modifying your Python installation by following a few different approaches. Since your goal is to have Python use your version of `sqlite3.dll`, here are several strategies you can try: ### 1. Set the `PATH` Environment Variable One c...
23,483
[ { "from": "human", "value": "Is there a way to make a python module load a dll in my application directory rather than the version that came with the python installation, without making changes to the python installation (which would then require I made an installer, and be careful I didn't break other apps...
Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run? Also in the dreaded case of actual overflow what happens? Does it crash, trigger an exception or signal? Is there a standard or is it different on all systems and compilers? I'm looking spec...
Understanding how to measure stack usage and the behavior of stack overflow can vary by operating system and programming environment. Here's a breakdown for Windows, Linux, and macOS: ### Measuring Stack Space Usage 1. **Windows**: - In Windows, you can measure the stack space using the `GetCurrentThreadStackLimit...
21,394
[ { "from": "human", "value": "Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run?\nAlso in the dreaded case of actual overflow what happens? \nDoes it crash, trigger an exception or signal? Is there a standard or is it different on ...
For the XLC compiler, templated code goes in a *.c file. Then when your program is compiled that uses the template functions, the compiler finds the template definisions in the .c file and instantiates them. The problem is that these .c files are not by default included when doing an xlC -qmakedepend to generate the b...
When using the XLC compiler with templated code in `.c` files, ensuring that changes in those files trigger appropriate rebuilds can be challenging. If `xlC -qmakedepend` does not automatically include the dependency information from these `.c` files, you can consider a few strategies to manage build dependencies more ...
24,195
[ { "from": "human", "value": "For the XLC compiler, templated code goes in a *.c file. Then when your program is compiled that uses the template functions, the compiler finds the template definisions in the .c file and instantiates them.\nThe problem is that these .c files are not by default included when d...
Why is it that there are two kinds of references in xaml. One looks like this: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" But mine look like this: xmlns:WPFToolKit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" Why can't I do this: xmlns:local="http://myschema.mydomain.com/MyControlNamesp...
In XAML, namespace declarations allow you to reference different types of objects from various assemblies or namespaces. The two different styles you observed in your `xmlns` declarations serve different purposes and are used in distinct contexts. ### 1. **XML Namespace Declarations** (like `xmlns:x`): These declarat...
21,085
[ { "from": "human", "value": "Why is it that there are two kinds of references in xaml.\nOne looks like this:\nxmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \n\nBut mine look like this:\nxmlns:WPFToolKit=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\n\nWhy can't I do this:\nxmln...
Here's my situation: Windows Server Apache CruiseControl The last step of my CruiseControl deploy scripts copies the build to Apache's htdocs folder, in a "demos" folder (I believe this is referred to as a "hot deploy"?) All is good and dandy, except that SOMETIMES (not common, but it happens enough that it bugs me),...
It sounds like you're encountering a frustrating issue with your deployment process to Apache on Windows Server using CruiseControl and ANT. The symptoms you're describing—files occasionally missing from the `demos` folder—could be caused by several factors. Let's explore some potential causes and solutions. ### Possi...
18,753
[ { "from": "human", "value": "Here's my situation:\n\nWindows Server\nApache\nCruiseControl\n\nThe last step of my CruiseControl deploy scripts copies the build to Apache's htdocs folder, in a \"demos\" folder (I believe this is referred to as a \"hot deploy\"?)\nAll is good and dandy, except that SOMETIMES ...
I have a polygon soup of triangles that I would like to construct a BSP tree for. My current program simply constructs a BSP tree by inserting a random triangle from the model one at a time until all the triangles are consumed, then it checks the depth and breadth of the tree and remembers the best score it achieved (...
Constructing a Binary Space Partitioning (BSP) tree for a polygon soup of triangles can be a complex task, especially when trying to optimize for both depth and breadth. Here are some strategies and tests you might consider to assess the quality of your BSP tree and determine when to stop searching for an optimal const...
21,264
[ { "from": "human", "value": "I have a polygon soup of triangles that I would like to construct a BSP tree for. My current program simply constructs a BSP tree by inserting a random triangle from the model one at a time until all the triangles are consumed, then it checks the depth and breadth of the tree a...
For example in C# or in JavaScript documents. If not, is there point in using Javadoc comments in ASP.NET programming?
In the context of ASP.NET programming, the use of Javadoc-style comments (often referred to as XML comments in C#) serves a similar purpose to Javadoc in Java. They provide a way to document your code, making it easier for other developers (and yourself) to understand what each part of your code is doing. ### XML Docu...
26,378
[ { "from": "human", "value": "For example in C# or in JavaScript documents.\nIf not, is there point in using Javadoc comments in ASP.NET programming?\n" }, { "from": "gpt", "value": "In the context of ASP.NET programming, the use of Javadoc-style comments (often referred to as XML comments in C#)...
When I'm writing a Spring command line application which parses command line arguments, how do I pass them to Spring? Would I want to have my main() structured so that it first parses the command line args and then inits Spring? Even so, how would it pass the object holding the parsed args to Spring?
In a Spring Boot application, you can pass command line arguments to the Spring context quite conveniently. You don't need to manually parse the command line arguments; Spring provides support for this out of the box using the `@CommandLineRunner` or `@SpringBootApplication` annotations. Here's how to structure your `...
21,224
[ { "from": "human", "value": "When I'm writing a Spring command line application which parses command line arguments, how do I pass them to Spring? Would I want to have my main() structured so that it first parses the command line args and then inits Spring? Even so, how would it pass the object holding the ...
I've used both and I've found MySql to have several frustrating bugs, limited support for: IDE integration, profiling, integration services, reporting, and even lack of a decent manager. Total cost of ownership of MSSQL Server is touted to be less than MySQL too (.net environment), but maintaining an open mind could so...
MySQL is a widely used relational database management system, and while it may have its limitations compared to SQL Server, it also offers several compelling features that can make it a good choice for specific use cases. Here are some of the notable strengths and "killer features" of MySQL: 1. **Cost-Effective for Op...
24,927
[ { "from": "human", "value": "I've used both and I've found MySql to have several frustrating bugs, limited support for: IDE integration, profiling, integration services, reporting, and even lack of a decent manager. Total cost of ownership of MSSQL Server is touted to be less than MySQL too (.net environmen...
I want to try out DXperience component suite on Linux (Suse Linux enterprise desktop). Since it relies heavily on the PInvoke calls, Mono would not work out here. Some people were able to get this running by installing .NET 2.0 under wine on Linux. I've tried to do this with the winetricks and manually. Every time .NET...
Running .NET applications, especially those relying on PInvoke and other Windows-specific features, on Linux can indeed be challenging due to compatibility issues with Wine. Here are some suggestions you can try to resolve the issues with installing .NET 2.0 under Wine on your Suse Linux Enterprise Desktop: 1. **Use a...
21,197
[ { "from": "human", "value": "I want to try out DXperience component suite on Linux (Suse Linux enterprise desktop). Since it relies heavily on the PInvoke calls, Mono would not work out here.\nSome people were able to get this running by installing .NET 2.0 under wine on Linux.\nI've tried to do this with t...
In Ruby, is it possible to pass by reference a parameter with value-type semantics (e.g. a Fixnum)? I'm looking for something similar to C#'s 'ref' keyword. Example: def func(x) x += 1 end a = 5 func(a) #this should be something like func(ref a) puts a #should read '6' Btw. I know I could just use: a = func(a...
In Ruby, all variables hold references to objects, and when you pass an argument to a method, you are passing the reference to that object. However, in Ruby, some objects, like integers (Fixnum), are immutable. This means that when you try to modify an integer within a method, you are actually creating a new integer ob...
25,713
[ { "from": "human", "value": "In Ruby, is it possible to pass by reference a parameter with value-type semantics (e.g. a Fixnum)?\nI'm looking for something similar to C#'s 'ref' keyword.\nExample:\ndef func(x) \n x += 1\nend\n\na = 5\nfunc(a) #this should be something like func(ref a)\nputs a #should ...
I need to resize PNG, JPEG and GIF files. How can I do this using Java?
To resize PNG, JPEG, and GIF files in Java, you can use the `BufferedImage` class along with the `ImageIO` class for reading and writing images. Below is a simple example that demonstrates how to resize images of different formats using Java. Make sure you have the necessary imports: ```java import javax.imageio.Imag...
25,030
[ { "from": "human", "value": "I need to resize PNG, JPEG and GIF files. How can I do this using Java?\n" }, { "from": "gpt", "value": "To resize PNG, JPEG, and GIF files in Java, you can use the `BufferedImage` class along with the `ImageIO` class for reading and writing images. Below is a simple...
I created a list of lists: >>> xs = [[1] * 4] * 3 >>> print(xs) [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then, I changed one of the innermost values: >>> xs[0][0] = 5 >>> print(xs) [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] Why did every first element of each sublist change to 5? See also: How do I clone a list ...
The behavior you're observing in your list of lists is due to how Python handles mutable objects like lists. When you create `xs` using the expression `[[1] * 4] * 3`, you're not creating three distinct inner lists. Instead, you're creating one list that is referenced three times. Here's a step-by-step breakdown of w...
27,341
[ { "from": "human", "value": "I created a list of lists:\n>>> xs = [[1] * 4] * 3\n>>> print(xs)\n[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]\n\nThen, I changed one of the innermost values:\n>>> xs[0][0] = 5\n>>> print(xs)\n[[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]\n\nWhy did every first element of each subli...
I'm writing a web application in Python, intended for use by teachers and pupils in a classroom. It'll run from a hosted website, but I also want people to be able to download a self-contained application they can install locally if they want more performance or they simply won't have an Internet connection available i...
Creating a self-contained application that can be easily installed by non-technical users on Windows is definitely achievable, and there are several ways to accomplish this. Below are some potential approaches you might consider: ### 1. NSIS (Nullsoft Scriptable Install System) Using NSIS for your installer is a viab...
22,906
[ { "from": "human", "value": "I'm writing a web application in Python, intended for use by teachers and pupils in a classroom. It'll run from a hosted website, but I also want people to be able to download a self-contained application they can install locally if they want more performance or they simply won'...
So what's the best way to create new tables in a Sqlite database in Rails 2. I have created the database using rake db:migrate command. So should I write individual sql scripts to create a database or use rake somehow. I don't need scaffolding.
In Rails 2, the best practice for creating new tables in a SQLite database (or any other database supported by Rails) is to use migrations rather than writing individual SQL scripts. Migrations allow you to define changes to your database schema in a Ruby format that is easier to read and maintain. Here's a step-by-st...
24,892
[ { "from": "human", "value": "So what's the best way to create new tables in a Sqlite database in Rails 2. I have created the database using rake db:migrate command. So should I write individual sql scripts to create a database or use rake somehow. I don't need scaffolding.\n" }, { "from": "gpt", ...
Why are pipes considered dangerous to use? What can be done to avoid these security issues? I'm mostly interested in Windows, but if you have other OS information, please provide.
Pipes, which are used for inter-process communication (IPC) in operating systems, can present several security risks if not handled properly. Below are some key reasons why pipes can be considered dangerous, especially in Windows, along with suggestions to mitigate these security issues. ### Security Risks Associated ...
23,696
[ { "from": "human", "value": "Why are pipes considered dangerous to use? What can be done to avoid these security issues?\nI'm mostly interested in Windows, but if you have other OS information, please provide.\n" }, { "from": "gpt", "value": "Pipes, which are used for inter-process communicatio...
I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than x items or is greater than y MB? I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache of all the feeds items. There are some feeds whi...
Choosing between XML and SQLite (or any other database) for data storage depends on various factors including the size of the data, complexity of the operations you need to perform, and performance requirements. Here are some considerations that can help guide your decision: ### When to Prefer SQLite over XML 1. **Sc...
17,490
[ { "from": "human", "value": "I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than x items or is greater than y MB?\nI am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache of all...
When should unions be used? Why do we need them?
Unions are typically formed to represent the interests of workers in negotiations with employers regarding wages, working conditions, benefits, and other employment-related issues. Here are several reasons and contexts in which unions are beneficial and necessary: 1. **Collective Bargaining Power**: Unions allow worke...
26,346
[ { "from": "human", "value": "When should unions be used? Why do we need them?\n" }, { "from": "gpt", "value": "Unions are typically formed to represent the interests of workers in negotiations with employers regarding wages, working conditions, benefits, and other employment-related issues. Here...
Using NHibernate ICriteria and adding .AddOrder ... I want to sort by a property that is sometimes null with all the populated ones at the top. Will .AddOrder allow me to do this? If not is there an alternative? The sorting options for ILists leave a lot to be desired.
In NHibernate, when using `ICriteria`, you can indeed sort a collection where some properties may be null by using the `AddOrder` method. However, the default behavior of sorting does not automatically place null values at the bottom or the top. Instead, you'll need to create a custom sort using SQL functions to achiev...
24,541
[ { "from": "human", "value": "Using NHibernate ICriteria and adding .AddOrder ... I want to sort by a property that is sometimes null with all the populated ones at the top. Will .AddOrder allow me to do this? If not is there an alternative? \nThe sorting options for ILists leave a lot to be desired. \n" }...
I am trying to load a small sample of records from a large database into a test database. How do you tell mysqldump to only give you n records out of 8 million? Thanks
To export only a specific number of records from a large MySQL database using `mysqldump`, you can use a combination of a query and the `--where` option in `mysqldump`, or simply create a temporary table that contains the desired subset of data. However, `mysqldump` itself doesn't have a built-in option to limit the nu...
27,205
[ { "from": "human", "value": "I am trying to load a small sample of records from a large database into a test database.\nHow do you tell mysqldump to only give you n records out of 8 million?\nThanks\n" }, { "from": "gpt", "value": "To export only a specific number of records from a large MySQL d...
We know that code coverage is a poor metric to use when gauging the quality of test code. We also know that testing the language/framework is a waste of time. On the other hand, what metrics can we use to identify quality tests? Are there any best practices or rules of thumbs that you've learned to help you identify...
When evaluating the quality of tests, there are several metrics and best practices that can help identify more effective and valuable tests beyond just code coverage. Here are some considerations: ### Metrics for Identifying Quality Tests: 1. **Test Case Quality**: - **Test Case Design**: Evaluate tests based on h...
21,352
[ { "from": "human", "value": "We know that code coverage is a poor metric to use when gauging the quality of test code. We also know that testing the language/framework is a waste of time. \nOn the other hand, what metrics can we use to identify quality tests? Are there any best practices or rules of thumb...
I am creating a "department picker" form that is going to serve as a modal popup form with many of my "primary" forms of a Winforms application. Ideally the user is going to click on an icon next to a text box that will pop up the form, they will select the department they need, and when they click OK, the dialog will ...
You're on the right track with trying to pass data back to your parent form from the modal dialog. However, as you've discovered, merely using a `ByRef` parameter in the constructor won't work when you try to store that value in a member variable of the dialog class. One effective approach is to use a property in your...
23,022
[ { "from": "human", "value": "I am creating a \"department picker\" form that is going to serve as a modal popup form with many of my \"primary\" forms of a Winforms application. Ideally the user is going to click on an icon next to a text box that will pop up the form, they will select the department they n...
Assume a table with the following columns: pri_id, item_id, comment, date What I want to have is a SQL query that will delete any records, for a specific item_id that are older than a given date, BUT only as long as there are more than 15 rows for that item_id. This will be used to purge out comment records older than ...
To achieve the desired functionality of deleting old comment records for a specific `item_id` while ensuring that you keep at least 15 of the most recent records, you can use a SQL query that incorporates a combination of a subquery and conditional deletion. Below is a generic SQL query that should work across most SQL...
22,965
[ { "from": "human", "value": "Assume a table with the following columns:\npri_id, item_id, comment, date\nWhat I want to have is a SQL query that will delete any records, for a specific item_id that are older than a given date, BUT only as long as there are more than 15 rows for that item_id.\nThis will be u...
When compiling the following simpleType with the XJC compile (from the JAXB package)... <xs:simpleType name="test"> <xs:annotation> <xs:appinfo> <jaxb:typesafeEnumClass/> </xs:appinfo> </xs:annotation> <xs:restriction base="xs:string"> <xs:enumeration value="4"> <xs...
The behavior you're encountering with JAXB's `XJC` compiler is a known issue regarding the naming conventions it applies when generating the enumeration classes. The `value()` method is indeed a standard naming pattern used by JAXB for enum values, but it can be inconvenient when you wish to use JavaBeans conventions (...
24,365
[ { "from": "human", "value": "When compiling the following simpleType with the XJC compile (from the JAXB package)...\n<xs:simpleType name=\"test\">\n <xs:annotation>\n <xs:appinfo>\n <jaxb:typesafeEnumClass/>\n </xs:appinfo>\n </xs:annotation>\n <xs:restriction base=\"xs:st...
I wonder what the best way to make an entire tr clickable would be? The most common (and only?) solution seems to be using JavaScript, by using onclick="javascript:document.location.href('bla.htm');" (not to forget: Setting a proper cursor with onmouseover/onmouseout). While that works, it is a pity that the target URL...
Making an entire table row (`<tr>`) clickable can be achieved using both JavaScript and HTML. While using JavaScript is one option, there are better practices that involve using anchor (`<a>`) elements, which naturally handle URL links and display the target URL in the status bar. ### Recommended Approach: Use `<a>` E...
20,539
[ { "from": "human", "value": "I wonder what the best way to make an entire tr clickable would be?\nThe most common (and only?) solution seems to be using JavaScript, by using onclick=\"javascript:document.location.href('bla.htm');\" (not to forget: Setting a proper cursor with onmouseover/onmouseout).\nWhile...
Is there a way to spawn a new window via javascript in IE7 that hides the statusbar? I've added the intranet app as a trusted site. Not sure what else I can use to try. This is my JS window.open("http:/localhost/start.html", "MyApp", "left=0, top=0, width=" + screen.width + "," + "height="...
In Internet Explorer 7, the ability to hide the status bar using `window.open` is somewhat limited and may not work as intended, even when you set `status=no` in the features string. Unfortunately, the behavior of the status bar is influenced by the browser's security settings, and certain features may be overridden by...
22,268
[ { "from": "human", "value": "Is there a way to spawn a new window via javascript in IE7 that hides the statusbar?\nI've added the intranet app as a trusted site. Not sure what else I can use to try. This is my JS\nwindow.open(\"http:/localhost/start.html\", \"MyApp\", \"left=0, top=0, width=\" + screen.widt...
If I need to throw an exception from within my application which of the built-in .NET exception classes can I use? Are they all fair game? When should I derive my own?
In .NET, there are many built-in exception classes available within the framework that you can use to throw exceptions in your application. Here’s a brief overview of how to choose the right one and when it is appropriate to derive your own custom exception class: ### Using Built-in Exception Classes The built-in exc...
24,402
[ { "from": "human", "value": "If I need to throw an exception from within my application which of the built-in .NET exception classes can I use? Are they all fair game? When should I derive my own?\n" }, { "from": "gpt", "value": "In .NET, there are many built-in exception classes available withi...
It seems MySQL does not support the flag "NO_ WRITE_ TO_ BINLOG" for TRUNCATE. So I have to wait until delay is 0, then stop the replication, make the TRUNCATE of the table/s, reset the master, and then start replication again. Really painful. Any other suggestion?
You're correct that MySQL does not support the `NO_WRITE_TO_BINLOG` option for `TRUNCATE` statements. Therefore, when truncating tables in a replication environment, the operation is always written to the binary log, and this can be problematic when you want to avoid replicating the `TRUNCATE` operation to your replica...
25,340
[ { "from": "human", "value": "It seems MySQL does not support the flag \"NO_ WRITE_ TO_ BINLOG\" for TRUNCATE. So I have to wait until delay is 0, then stop the replication, make the TRUNCATE of the table/s, reset the master, and then start replication again. Really painful. Any other suggestion?\n" }, {...
I'm working on getting the full license for VS 2008 (or my boss is) but my trial has expired, and I need to do some work. How can I re-install? Or, if I install on a different machine (or virtual machine) - how can I get another key without going through the whole download process from MS again?
If your Visual Studio 2008 trial has expired and you need to get back to work, here are some options you can consider: ### 1. **Reinstall on the Same Machine:** - If you want to reinstall Visual Studio 2008 on the same machine, you may need to completely uninstall it first. You can do this through the Control Panel...
26,060
[ { "from": "human", "value": "I'm working on getting the full license for VS 2008 (or my boss is) but my trial has expired, and I need to do some work.\nHow can I re-install? \nOr, if I install on a different machine (or virtual machine) - how can I get another key without going through the whole download p...
I want to start working with TDD but I don't know really where to start. We coding with .NET (C#/ASP.NET).
Getting started with Test-Driven Development (TDD) in a .NET environment is a great choice! TDD helps ensure that your code is reliable and maintainable. Here are the steps to help you get started: ### Step 1: Understand the TDD Cycle The TDD cycle typically consists of three main steps, often referred to as "Red, Gr...
23,458
[ { "from": "human", "value": "I want to start working with TDD but I don't know really where to start. We coding with .NET (C#/ASP.NET).\n" }, { "from": "gpt", "value": "Getting started with Test-Driven Development (TDD) in a .NET environment is a great choice! TDD helps ensure that your code is ...
When doing case-insensitive comparisons, is it more efficient to convert the string to upper case or lower case? Does it even matter? It is suggested in this SO post that C# is more efficient with ToUpper because "Microsoft optimized it that way." But I've also read this argument that converting ToLower vs. ToUpper d...
When considering case-insensitive string comparisons and whether to convert to upper case or lower case, there are several factors to consider: ### 1. Performance: `ToUpper` vs. `ToLower` The performance difference between `ToUpper()` and `ToLower()` can depend on several factors, including: - **Implementation Detai...
23,875
[ { "from": "human", "value": "When doing case-insensitive comparisons, is it more efficient to convert the string to upper case or lower case? Does it even matter?\nIt is suggested in this SO post that C# is more efficient with ToUpper because \"Microsoft optimized it that way.\" But I've also read this ar...
I'm building a site using ajax and am trying to decide where to put the files that supply the data for the ajax requests. For example, I am going to have a .js file that can be included in a page that will create country/state select boxes. I will have the .js file under /inc/js. However, I am not sure where I want to...
Organizing your AJAX requests effectively can greatly enhance the maintainability and clarity of your codebase. Here are a few strategies you can consider for structuring your AJAX-related files: ### 1. **Folder Structure by Feature** Create a structured folder hierarchy based on features. For example, if your country...
25,847
[ { "from": "human", "value": "I'm building a site using ajax and am trying to decide where to put the files that supply the data for the ajax requests.\nFor example, I am going to have a .js file that can be included in a page that will create country/state select boxes. I will have the .js file under /inc/...
I have the following code below in my Servlet, but when IE hits the page, it returns a blank html page. If I use the response.getOutputStream() directly in the StreamResult constructor, the page loads fine. What am I missing? response is an instance of HttpServletResponse and xsl is an instance of Transformer from XS...
The issue you are encountering is likely due to how the `GZIPOutputStream` is being handled in relation to the content type and finalization of the response. Here are a few adjustments and considerations to help ensure that Internet Explorer (IE) handles the gzipped response properly: 1. **Set the Content Type**: Befo...
24,837
[ { "from": "human", "value": "I have the following code below in my Servlet, but when IE hits the page, it returns a blank html page. If I use the response.getOutputStream() directly in the StreamResult constructor, the page loads fine. What am I missing?\nresponse is an instance of HttpServletResponse and...
I'm looking for the simplest, most straightforward way to implement the following: The main program instantiates worker threads to do a task. Only n tasks can be running at once. When n is reached, no more workers are started until the count of running threads drops back below n.
You can achieve this in Python using the `threading` module in combination with a semaphore. A semaphore can be used to limit the number of concurrent threads. Below is a simple implementation that demonstrates this concept. ```python import threading import time # Define the number of concurrent tasks allowed MAX_TH...
25,562
[ { "from": "human", "value": "I'm looking for the simplest, most straightforward way to implement the following:\n\nThe main program instantiates worker\nthreads to do a task.\nOnly n tasks can be running at once.\nWhen n is reached, no more workers\nare started until the count of\nrunning threads drops back...
We have the following simple Stored Procedure that runs as an overnight SQL server agent job. Usually it runs in 20 minutes, but recently the MatchEvent and MatchResult tables have grown to over 9 million rows each. This has resulted in the store procedure taking over 2 hours to run, with all 8GB of memory on our SQL b...
To optimize your stored procedure and reduce memory consumption, we can make several adjustments. Given that the main concern is the size of the temporary table and the subsequent operations, we can try the following approaches: 1. **Avoid using a temp table**: Instead of storing results in a temp table, use a common ...
25,818
[ { "from": "human", "value": "We have the following simple Stored Procedure that runs as an overnight SQL server agent job. Usually it runs in 20 minutes, but recently the MatchEvent and MatchResult tables have grown to over 9 million rows each. This has resulted in the store procedure taking over 2 hours to...
I have a very strange problem with the Delphi 2006 IDE. If the IDE is minimized, and the PC is locked. I return to the pc, unlock it and maximize the IDE, I sometimes get the error "Cannot change Visible in OnShow or OnHide". If this happens, I have to kill the IDE with the taskmanager. Is there anybody out there who ...
The error message "Cannot change Visible in OnShow or OnHide" in Delphi usually indicates that there is a problem with how visibility changes are being handled during the form's lifecycle, especially in relation to events that are fired when the form is shown or hidden. This issue may be triggered by specific component...
23,840
[ { "from": "human", "value": "I have a very strange problem with the Delphi 2006 IDE.\nIf the IDE is minimized, and the PC is locked. I return to the pc, unlock it and maximize the IDE, I sometimes get the error \"Cannot change Visible in OnShow or OnHide\". \nIf this happens, I have to kill the IDE with the...
I've been using spring for some time, but I always wondered how does it work, more specifically, how do they load and weave beans/classes marked only with an interface or @annotation. For the xml declarations, it's easy to see how spring preprocesses my beans (they are declared in the xml context that spring reads), b...
You're correct in your understanding that Spring can work with classes annotated with certain annotations and that it does this without requiring a Java agent. Spring’s support for annotations and interfaces is fundamentally different from the class transformation that is done with the `java.lang.instrument.ClassFileTr...
23,849
[ { "from": "human", "value": "I've been using spring for some time, but I always wondered how does it work, more specifically, how do they load and weave beans/classes marked only with an interface or @annotation. \nFor the xml declarations, it's easy to see how spring preprocesses my beans (they are declare...
What is the most elegant way to calculate the previous business day in shell ksh script ? What I got until now is : #!/bin/ksh set -x DAY_DIFF=1 case `date '+%a'` in "Sun") DAY_DIFF=2 ;; "Mon") DAY_DIFF=3 ;; esac PREV_DT=`perl -e '($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time()-${D...
To pass the `${DAY_DIFF}` variable as a value and not as a string into the Perl command in your ksh script, you can use the `-e` option with Perl to directly include the variable value. You can achieve this by using double quotes around the Perl command, which will allow variable interpolation in ksh. Here's how you c...
24,673
[ { "from": "human", "value": "What is the most elegant way to calculate the previous business day in shell ksh script ?\nWhat I got until now is :\n#!/bin/ksh\n\nset -x\n\nDAY_DIFF=1\ncase `date '+%a'` in\n\"Sun\")\n DAY_DIFF=2\n ;;\n\"Mon\")\n DAY_DIFF=3\n ;;\nesac\n\nPREV_DT=`perl -e '($sec,$min,$h...
I am trying to figure out the best way to model a spreadsheet (from the database point of view), taking into account : The spreadsheet can contain a variable number of rows. The spreadsheet can contain a variable number of columns. Each column can contain one single value, but its type is unknown (integer, date, strin...
Your approach to modeling the spreadsheet in a relational database is quite reasonable for your requirements, but there are some considerations and potential optimizations you might want to explore to balance flexibility, performance, and complexity. ### Current Model Your current model includes: - **Spreadsheet**: R...
24,241
[ { "from": "human", "value": "I am trying to figure out the best way to model a spreadsheet (from the database point of view), taking into account :\n\nThe spreadsheet can contain a variable number of rows.\nThe spreadsheet can contain a variable number of columns.\nEach column can contain one single value, ...
The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don't have this problem. How can I find the problem . .there's a lot of JS on that page. Checking by hand is not a good ideea EDIT : It's a page from a project i'm working on... but I need a tool to find ...
It sounds like you encountered a classic issue with Internet Explorer (IE) when dealing with JavaScript-heavy pages. Performance problems can often arise from certain features or implementations that IE handles less efficiently compared to modern browsers like Firefox (FF) and Chrome. To troubleshoot and optimize Java...
20,595
[ { "from": "human", "value": "The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don't have this problem.\nHow can I find the problem . .there's a lot of JS on that page. Checking by hand is not a good ideea\nEDIT : It's a page from a project i...
I have a buddy that's having a hard time with the language barrier. I tried to think of any IDEs that are also available in Spanish, but couldn't think of any. Any ideas?
There are several Integrated Development Environments (IDEs) that support multiple languages, including Spanish. Here are a few you can consider: 1. **Visual Studio Code**: This popular code editor has extensive support for extensions, including language packs. You can easily install the Spanish language pack to trans...
28,110
[ { "from": "human", "value": "I have a buddy that's having a hard time with the language barrier. I tried to think of any IDEs that are also available in Spanish, but couldn't think of any. Any ideas?\n" }, { "from": "gpt", "value": "There are several Integrated Development Environments (IDEs) th...
I have a C++ program representing a TCP header as a struct: #include "stdafx.h" /* TCP HEADER 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | So...
The behavior you're observing regarding the size of the `TCP_HEADER` struct is primarily due to the way data alignment and padding work in C/C++. ### Structure Padding and Alignment In C and C++, structures are often padded to ensure that their members are aligned in memory according to their data types. On a 32-bit x...
22,724
[ { "from": "human", "value": "I have a C++ program representing a TCP header as a struct:\n#include \"stdafx.h\"\n\n/* TCP HEADER\n\n 0 1 2 3 \n 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 \n +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...
I have a home project that really needs to be in Source Control. I tried installing Subversion, which I have some experience with, but couldn't get it working. I don't particularly want to use SourceSafe. I'm a bit nervous about Git/Mercury as being somewhat cryptic, although this is only based on opinion rather tha...
It's great to hear that you've found a solution with VisualSVN! It's a solid choice for Subversion (SVN) and provides a user-friendly GUI on Windows, which can make managing your version control much easier. If you ever want to explore other options in the future, here are a few additional open-source version control ...
24,918
[ { "from": "human", "value": "I have a home project that really needs to be in Source Control. I tried installing Subversion, which I have some experience with, but couldn't get it working. I don't particularly want to use SourceSafe. I'm a bit nervous about Git/Mercury as being somewhat cryptic, although...
In an MFC application there is a small rectangular region where the scroll bars meet (bottom right of the window). It seems that this region only invalidates when the frame is resized. On other occasions (for example, if another window is dragged over it), this region does not repaint. I've been able to reproduce it ...
This issue you're experiencing is related to the way the MFC framework handles the painting of the scroll bars in the `CScrollView`. The rectangle at the bottom-right corner, where the scroll bars meet, may not be invalidated properly during certain types of window operations (like dragging another window over it). To ...
22,414
[ { "from": "human", "value": "In an MFC application there is a small rectangular region where the scroll bars meet (bottom right of the window). It seems that this region only invalidates when the frame is resized. On other occasions (for example, if another window is dragged over it), this region does not...
How do I escape '<' and '>' character in sed. I have some xml files which needs some text between the tags to be replaced. How do I escape the '>' and '<' characters. The problem with > and < is it has special meaning in the shell to redirect the output to a file. So backslash doesn't work.
In `sed`, the characters `<` and `>` do not have special meanings that need to be escaped, so you typically don't need to do anything special to use them in a `sed` command. However, when working in a shell (like bash), these characters are interpreted by the shell as redirection operators, which can create confusion. ...
27,241
[ { "from": "human", "value": "How do I escape '<' and '>' character in sed.\nI have some xml files which needs some text between the tags to be replaced. How do I escape the '>' and '<' characters.\nThe problem with > and < is it has special meaning in the shell to redirect the output to a file. So backslash...
As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed. KeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control. My first attempt was just to consider the KeyCode to be the ascii...
The issue you're experiencing is related to the way focus and keyboard events are handled in Windows Forms, particularly when dealing with a ComboBox inside a DataGridView. Since you want to capture the actual character typed by the user when using the `KeyDown` event, you'll need to consider both `KeyDown` and `KeyPre...
23,626
[ { "from": "human", "value": "As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed.\nKeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control.\nMy first attempt was j...
How can I make xargs execute the command exactly once for each line of input given? It's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. From http://en.wikipedia.org/wiki/Xargs: find /path -type f -print0 | xargs -0 rm In this example, find feeds the inpu...
To make `xargs` execute a command exactly once for each line of input, you can use the `-n` option followed by `1`. This tells `xargs` to use only one argument from the input per command execution. Here is the syntax: ```bash find /path -type f -print0 | xargs -0 -n 1 rm ``` Breaking it down: - `-0` makes `xargs` r...
27,485
[ { "from": "human", "value": "How can I make xargs execute the command exactly once for each line of input given?\nIt's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. \n\nFrom http://en.wikipedia.org/wiki/Xargs: \nfind /path -type f -print0 | xar...
I have a GIF image that has an alpha set, and when my site loads in Firefox 3.0, it acts transparently on the parts of the image that should. However, when I try to load the GIF image in IE7, it comes back as a solid block. Actually, it is like the color from the image bled into the transparent area. Do anyone have a...
Hi Sean, The issue you're experiencing with GIF images and transparency in IE7 is a well-known problem. IE7 does not handle GIF transparency as well as modern browsers like Firefox. Here are some suggestions and workarounds to address the issue: ### 1. **Check GIF Transparency Settings:** Ensure that your GIF is p...
25,274
[ { "from": "human", "value": "I have a GIF image that has an alpha set, and when my site loads in Firefox 3.0, it acts transparently on the parts of the image that should. However, when I try to load the GIF image in IE7, it comes back as a solid block. Actually, it is like the color from the image bled in...
I read some properties from an xml file, amongst which is a string that refers to an llblgen object for example 'article'. For now I have set up a rather long Select Case myString Case "article" return New ArticleEntity() Etc. which is getting rather ugly as it gets longer and longer ;). Is there a better way t...
Yes, there are definitely more elegant ways to handle this scenario than using a long `Select Case` or `switch` statement. One common approach is to use a dictionary to map the string identifiers to their corresponding entity constructors. Here's how you can do it in both VB.NET and C#. ### VB.NET Example ```vb.net P...
26,089
[ { "from": "human", "value": "I read some properties from an xml file, amongst which is a string that refers to an llblgen object for example 'article'. For now I have set up a rather long \nSelect Case myString\n Case \"article\"\n return New ArticleEntity()\n\nEtc. which is getting rather ugly as it ge...
I'm working on something that was built on a PC set-up using php and an ms access database. When I port the app to my MAMP environment, I get Fatal error: Call to undefined function odbc_connect() in /path/to/index.php on line 37 line 37 looks like this: return odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; ...
The error you're encountering, `Fatal error: Call to undefined function odbc_connect()`, indicates that the ODBC extension is not enabled in your MAMP installation of PHP. MAMP often comes with a version of PHP that doesn't include certain extensions, including ODBC, by default. Here are a few ways you can try to reso...
22,163
[ { "from": "human", "value": "I'm working on something that was built on a PC set-up using php and an ms access database. When I port the app to my MAMP environment, I get \nFatal error: Call to undefined function odbc_connect() in /path/to/index.php on line 37\n\nline 37 looks like this:\nreturn odbc_connec...
Given a date range, I need to know how many Mondays (or Tuesdays, Wednesdays, etc) are in that range. I am currently working in C#.
To calculate the number of occurrences of a specific day of the week (e.g., Mondays, Tuesdays, etc.) within a given date range in C#, you can use the following method. This method takes two `DateTime` objects representing the start and end of the range, as well as a `DayOfWeek` enumeration to specify which day you want...
25,517
[ { "from": "human", "value": "Given a date range, I need to know how many Mondays (or Tuesdays, Wednesdays, etc) are in that range.\nI am currently working in C#.\n" }, { "from": "gpt", "value": "To calculate the number of occurrences of a specific day of the week (e.g., Mondays, Tuesdays, etc.) ...
I'm working on an embedded linux system in C, I'm looking for the source code to the equivalet of SendARP in Windows. Any pointers?
If you're looking to replicate the functionality of the `SendARP` function from Windows in an embedded Linux system, you can do so using raw sockets in C to send ARP requests. Below is a basic example of how to implement this in Linux using raw sockets. This code creates and sends an ARP request to a specified IP addre...
15,889
[ { "from": "human", "value": "I'm working on an embedded linux system in C, I'm looking for the source code to the equivalet of SendARP in Windows. Any pointers?\n" }, { "from": "gpt", "value": "If you're looking to replicate the functionality of the `SendARP` function from Windows in an embedded...
I'm working on a report in SSRS (SQL Server Reporting Services) right now, and I'm having a problem getting a rectanlge I draw on the page in the report designer to grow. Basically, I've got a rectangle drawn, and then I put a text field inside of it. The contents of this text field can be either very short or very l...
The behavior you're experiencing with the rectangle and the text box in SSRS is a common issue. Here are some steps and considerations to ensure that your rectangle grows appropriately to contain the text box: 1. **Check the Rectangle's Properties**: - Make sure the `CanGrow` property of the text box inside the rec...
26,453
[ { "from": "human", "value": "I'm working on a report in SSRS (SQL Server Reporting Services) right now, and I'm having a problem getting a rectanlge I draw on the page in the report designer to grow. Basically, I've got a rectangle drawn, and then I put a text field inside of it. The contents of this text...
I have an existing website that uses the same code base, but is deployed in a number of different configurations on different servers. Each configuration has a set of users, and they can upload personal files. The files are stored in an "uploaded files" directory on each server, and this directory is stuck in right nex...
To manage your codebase with Subversion while keeping user-uploaded files separate, you can follow these steps: ### 1. Structure Your Repository Create a Subversion repository that includes your codebase but excludes the user-uploaded files. You can structure your repository like this: ``` /your-repo /trunk ...
24,997
[ { "from": "human", "value": "I have an existing website that uses the same code base, but is deployed in a number of different configurations on different servers. Each configuration has a set of users, and they can upload personal files. The files are stored in an \"uploaded files\" directory on each serve...
I have a RichTextBox where I need to update the Text property frequently, but when I do so the RichTextBox "blinks" annoyingly as it refreshes all throughout a method call. I was hoping to find an easy way to temporarily suppress the screen refresh until my method is done, but the only thing I've found on the web is to...
To prevent the flickering or blinking of a `RichTextBox` while updating its `Text` property, you can use a more straightforward approach without overriding the `WndProc` method. One common technique is to temporarily suppress the painting of the control while you are updating its content. You can achieve this by using ...
23,807
[ { "from": "human", "value": "I have a RichTextBox where I need to update the Text property frequently, but when I do so the RichTextBox \"blinks\" annoyingly as it refreshes all throughout a method call.\nI was hoping to find an easy way to temporarily suppress the screen refresh until my method is done, bu...
I've read a number of posts touting the merits of migrating from VS 2005 to 2008. However, I'd love to hear what the various pitfalls are in actually doing the migration. We're about to migrate and I'd prefer knowing what speed bumps to anticipate and plan for instead of discovering them by surprise along the way. Any ...
Migrating from Visual Studio 2005 to Visual Studio 2008 can offer numerous improvements, but it also comes with potential pitfalls that you'll want to prepare for. Here are some specific insights and common challenges that you may encounter during the migration process, especially in a C++ development environment: ###...
23,209
[ { "from": "human", "value": "I've read a number of posts touting the merits of migrating from VS 2005 to 2008. However, I'd love to hear what the various pitfalls are in actually doing the migration. We're about to migrate and I'd prefer knowing what speed bumps to anticipate and plan for instead of discove...
My company is a custom development shop for a number of projects, some larger and some smaller. Currently we handle all of our client communication through email. So we email a design doc, they mark it up and send it back. Then we roll out a beta version of their product and they email us with any bugs, new features, e...
It sounds like you're in the process of optimizing your client communication and project management processes, which is great for both efficiency and client satisfaction. Using a dedicated bug tracking system can significantly improve your workflow compared to traditional email exchanges. Here are some suggestions and ...
24,086
[ { "from": "human", "value": "My company is a custom development shop for a number of projects, some larger and some smaller. Currently we handle all of our client communication through email. So we email a design doc, they mark it up and send it back. Then we roll out a beta version of their product and the...
I'm not committed to any particular GUI tookit or anything - just needs to be Java based. I want to do simple syntax highlighting ( XML and XQuery ) inside editable text areas. My only candidate so far is Swing's JTextPane, as it supports seems to support the styling of text, but I have no idea how to implement it in t...
If you're looking to implement syntax highlighting for XML and XQuery in a Java-based GUI application, `JTextPane` from Swing is indeed a viable option. `JTextPane` allows you to create rich text components and style portions of text using different attributes, which is useful for implementing syntax highlighting. Her...
20,942
[ { "from": "human", "value": "I'm not committed to any particular GUI tookit or anything - just needs to be Java based. I want to do simple syntax highlighting ( XML and XQuery ) inside editable text areas.\nMy only candidate so far is Swing's JTextPane, as it supports seems to support the styling of text, b...
Is it best practice to not use C:\Inetpub\wwwroot\wss\ for SharePoint? My concern is that the configuration wizard seems to look for this C: path and it may be too complicated to not use the default path(s),
Using the default directory for SharePoint, such as `C:\Inetpub\wwwroot\wss`, is generally considered a best practice for several reasons, particularly during installation and initial configuration. Here are some points to consider: 1. **Simplicity**: Using the default path simplifies the installation and configuratio...
27,501
[ { "from": "human", "value": "Is it best practice to not use C:\\Inetpub\\wwwroot\\wss\\ for SharePoint? My concern is that the configuration wizard seems to look for this C: path and it may be too complicated to not use the default path(s),\n" }, { "from": "gpt", "value": "Using the default dire...
I'd like to create a macro/variable for my project properties, similar to $(ConfigurationName), $(OutDir), etc - without making environment variables. I've found that this can be done in later versions of Visual Studio, but I do not have the option of updating my IDE. Can this be done in the .Net 2003 version (if so,...
In Visual Studio .NET 2003, the functionality to define custom macros or project properties directly within the IDE is quite limited compared to later versions. However, you can achieve similar functionality through a couple of methods, though they will require some workarounds since you cannot create custom macros dir...
25,467
[ { "from": "human", "value": "I'd like to create a macro/variable for my project properties, similar to $(ConfigurationName), $(OutDir), etc - without making environment variables. I've found that this can be done in later versions of Visual Studio, but I do not have the option of updating my IDE. Can this...
What user context do SharePoint timer jobs run under? The farm account? I'm going to be accessing some external resources (network share) via the timer job, so I need to know which SharePoint service account to grant permissions.
In SharePoint, timer jobs typically run under the context of the **SharePoint farm account**. The farm account is a special service account that has privileges across the entire SharePoint farm and is usually the one configured to execute scheduled tasks, including timer jobs. If your timer job needs to access externa...
28,284
[ { "from": "human", "value": "What user context do SharePoint timer jobs run under? The farm account?\nI'm going to be accessing some external resources (network share) via the timer job, so I need to know which SharePoint service account to grant permissions.\n" }, { "from": "gpt", "value": "In ...
I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?
Yes, in VB6, the `IsNumeric()` function is used to determine if an expression can be evaluated as a number. If you're looking for something similar in newer programming languages or environments, here are a few alternatives in different languages: ### VB.NET In VB.NET, you can still use `IsNumeric()` directly, as it i...
24,977
[ { "from": "human", "value": "I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?\n" }, { "from": "gpt", "value": "Yes, in VB6, the `IsNumeric()` function is used to determine if an expression can be evaluated as a number. If you're looking for something...
I need to show only one element at a time when a link is clicked on. Right now I'm cheating by hiding everything again and then toggling the element clicked on. This works, unless i want EVERYTHING to disappear again. Short of adding a "Hide All" button/link what can i do? I would like to be able to click on the link a...
You can achieve the desired functionality by using a single click event handler and managing the state of the elements dynamically. You can modify your existing code to store the last opened element and hide it again if the same link is clicked. Here's an updated version of your jQuery code that achieves this: ```java...
24,185
[ { "from": "human", "value": "I need to show only one element at a time when a link is clicked on. Right now I'm cheating by hiding everything again and then toggling the element clicked on. This works, unless i want EVERYTHING to disappear again. Short of adding a \"Hide All\" button/link what can i do? I w...
So i have a piece of assembly that needs to call a function with the fastcall calling convention on windows, but gcc doesn't (afaict) support it. GCC does provide the regparm attribute but that expects the first 3 parameters to be passed in eax, edx and ecx, whereas fastcall expects the first two parameters to be pass...
You're correct that the `fastcall` calling convention on Windows uses the `ecx` and `edx` registers for the first two parameters, while the `regparm` attribute in GCC does not align with that. If you need to interface assembly code with a GCC-compiled function that uses `fastcall`, one approach is to create a wrapper f...
20,663
[ { "from": "human", "value": "So i have a piece of assembly that needs to call a function with the fastcall calling convention on windows, but gcc doesn't (afaict) support it. GCC does provide the regparm attribute but that expects the first 3 parameters to be passed in eax, edx and ecx, whereas fastcall ex...
I have a Windows shell script that opens an application. I'd like to modify it to make it open a file automatically upon opening the application. I know it uses VBscript but I'm not familiar with the language; all the tutorials I found just talked about using VBS for web pages, not for Windows scripts. I know the synta...
To open an application and automatically load a specific file using VBScript, you need to correctly pass the file path as a parameter to the application being started. Simply appending the file path with the `&` symbol won’t work because it’s not valid syntax for command execution in VBScript. Here’s a basic example o...
14,798
[ { "from": "human", "value": "I have a Windows shell script that opens an application. I'd like to modify it to make it open a file automatically upon opening the application.\nI know it uses VBscript but I'm not familiar with the language; all the tutorials I found just talked about using VBS for web pages,...
Is there a way to get Visual Studio 2008 to do matching brace highlighting for Javascript? If there is no way to do it in Studio, can it be done using ReSharper? Thanks!!
In Visual Studio 2008, built-in support for JavaScript is somewhat limited compared to newer versions. While Visual Studio 2008 does provide some basic JavaScript editing features, it doesn't include features like brace matching for JavaScript out of the box. ### Visual Studio 2008: Unfortunately, Visual Studio 2008 d...
27,303
[ { "from": "human", "value": "Is there a way to get Visual Studio 2008 to do matching brace highlighting for Javascript?\nIf there is no way to do it in Studio, can it be done using ReSharper?\nThanks!!\n" }, { "from": "gpt", "value": "In Visual Studio 2008, built-in support for JavaScript is som...
I have a problem regarding hosting of a WCF service on IIS 6. My host is fine, I assume, and I can connect to it from a normal app, and get my stuff done. But now I want to stress test the service and I wanna do it from a web client, normal aspx page calling the wcf service with a click of a button, and being able to s...
Hello Christian, It sounds like you're running into issues related to timeouts when trying to stress test your WCF service through a web client (ASP.NET page) hosted on IIS 6. There are several factors that could be causing this problem, especially since you mentioned using WSHttpBinding and the potential for authenti...
20,976
[ { "from": "human", "value": "I have a problem regarding hosting of a WCF service on IIS 6.\nMy host is fine, I assume, and I can connect to it from a normal app, and get my stuff done.\nBut now I want to stress test the service and I wanna do it from a web client, normal aspx page calling the wcf service wi...
I have a bunch of records in several tables in a database that have a "process number" field, that's basically a number, but I have to store it as a string both because of some legacy data that has stuff like "89a" as a number and some numbering system that requires that process numbers be represented as number/year. T...
Handling a process number field that needs to be stored as a string while allowing for numeric ordering and incrementing can be challenging. Here are several strategies you can implement to solve this problem: ### 1. **Pad Numbers with Leading Zeros** One effective way to maintain a proper numeric ordering in your st...
22,950
[ { "from": "human", "value": "I have a bunch of records in several tables in a database that have a \"process number\" field, that's basically a number, but I have to store it as a string both because of some legacy data that has stuff like \"89a\" as a number and some numbering system that requires that pro...
I am having an issue setting up cURL with IIS 6.0, Windows Server 2003, PHP 5.2.6 I have installed to C:\PHP set PHPRC = C:\PHP\php.ini copied ssleay32.dll and libeay32.dll to C:\PHP in php.ini, uncommented the line extension=php_curl.dll extension_dir="C:\PHP\ext" c:\php\ext has the dll php_curl.dll C:\PHP is in PA...
It sounds like you've already taken several important steps to enable cURL in PHP, but there are a few areas to double-check and some additional steps that might help you resolve the `Fatal error: Call to undefined function curl_init()` issue. Here are some troubleshooting steps you can follow: 1. **Confirm PHP Config...
23,290
[ { "from": "human", "value": "I am having an issue setting up cURL with IIS 6.0, Windows Server 2003, PHP 5.2.6\nI have installed to C:\\PHP\nset PHPRC = C:\\PHP\\php.ini\n\ncopied ssleay32.dll and libeay32.dll to C:\\PHP\nin php.ini, uncommented the line\nextension=php_curl.dll\n\nextension_dir=\"C:\\PHP\\e...
What is the best way to add "Expires" in http header for static content? eg. images, css, js The web server is IIS 6.0; the language is classical ASP
To set the "Expires" HTTP header for static content like images, CSS, and JavaScript files in IIS 6.0, you can use the following methods: ### Method 1: Using IIS Manager 1. **Open IIS Manager:** - Go to "Start" -> "Run", type `inetmgr`, and press Enter to open IIS Manager. 2. **Select Your Website:** - In the ...
9,946
[ { "from": "human", "value": "What is the best way to add \"Expires\" in http header for static content? eg. images, css, js\nThe web server is IIS 6.0; the language is classical ASP\n" }, { "from": "gpt", "value": "To set the \"Expires\" HTTP header for static content like images, CSS, and JavaS...
When using TempData, my understanding is that it will keep whatever you put in it around for only one request. So when using TempData to retain data across a redirect (in order to use the Post-Request-Get pattern), isn't it possible that some other request from the user could come into the server in between the respons...
You are correct in your understanding of how `TempData` works in ASP.NET MVC and other similar frameworks: it is designed to persist data only for a single request after which it is removed. This is indeed meant to facilitate the Post-Redirect-Get (PRG) pattern, allowing a form submission to redirect to a different pag...
23,994
[ { "from": "human", "value": "When using TempData, my understanding is that it will keep whatever you put in it around for only one request. So when using TempData to retain data across a redirect (in order to use the Post-Request-Get pattern), isn't it possible that some other request from the user could co...
my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1) and a Thread t2 (for task2). I want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I can't tell which of task1 and task2 will finish first... Which...
To manage concurrent tasks in Java while ensuring that a specific action is executed only after both tasks have completed, you can use the `ExecutorService` along with `Future` objects or the `CompletableFuture` class. Below, I'll demonstrate both approaches: ### Approach 1: Using `ExecutorService` and `Future` This ...
20,087
[ { "from": "human", "value": "my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1) and a Thread t2 (for task2).\nI want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I can't tell which of ...
Imagine in the Global.asax.cs file I had an instance class as a private field. Let's say like this: private MyClass _myClass = new MyClass(); And I had a static method on Global called GetMyClass() that gets the current HttpApplication and returns that instance. public static MyClass GetMyClass() { return ((Global...
Your implementation of a shared instance of a class within the `Global.asax.cs` file certainly brings up interesting considerations regarding design patterns, particularly the singleton pattern. However, it is important to clarify that the approach you described does not fit the traditional definition of a singleton, a...
17,035
[ { "from": "human", "value": "Imagine in the Global.asax.cs file I had an instance class as a private field. Let's say like this:\nprivate MyClass _myClass = new MyClass();\n\nAnd I had a static method on Global called GetMyClass() that gets the current HttpApplication and returns that instance.\npublic stat...
When I am developing a bunch of designers/tools, what are some of the best fit patterns that go with a VSX Package and/or VSX Isolated Shell Package? Any samples, links would be great.
When developing Visual Studio extensions, particularly when dealing with VSX (Visual Studio Extension) Packages and VSX Isolated Shell Packages, several design patterns and best practices can help ensure your extension is robust, maintainable, and user-friendly. Here are some of the key patterns and concepts to conside...
20,325
[ { "from": "human", "value": "When I am developing a bunch of designers/tools, what are some of the best fit patterns that go with a VSX Package and/or VSX Isolated Shell Package?\nAny samples, links would be great.\n" }, { "from": "gpt", "value": "When developing Visual Studio extensions, partic...
I've recently begun evaluating a few project management projects for the company I work for. It's the classic case - growing company looking for the right solution (meaning, free or really cheap). It's a combination shop - Windows, Macs, and Linux on the desktop. The tech savviness, of course, ranges from newbie to ...
Finding a project management tool that covers all of your requirements can indeed be challenging, especially when you're looking for something that's web-based, methodology-independent, and free or low-cost. Here are some suggestions and considerations based on your needs: ### 1. **OpenProject** - **Web-Based**: Yes -...
23,634
[ { "from": "human", "value": "I've recently begun evaluating a few project management projects for the company I work for. It's the classic case - growing company looking for the right solution (meaning, free or really cheap). It's a combination shop - Windows, Macs, and Linux on the desktop. The tech sav...
So is it a certified answer that you can't install Team foundation on windows 2008 64-bit? Update Is it better just do install it on windows 2003 or 2008?
Team Foundation Server (TFS) has specific system requirements that must be met for installation. For TFS 2010 and later versions, Windows Server 2008 and Windows Server 2008 R2 are supported platforms. Windows Server 2003 is generally not recommended for newer versions of TFS due to its lack of support for newer techno...
26,917
[ { "from": "human", "value": "So is it a certified answer that you can't install Team foundation on windows 2008 64-bit?\nUpdate\nIs it better just do install it on windows 2003 or 2008?\n" }, { "from": "gpt", "value": "Team Foundation Server (TFS) has specific system requirements that must be me...
I know how to lighten the colors for certain commands, however I'd like to lighten the standard ansi colors across all commands.
If you're looking to lighten the standard ANSI colors across all terminal commands, you'll need to customize your terminal emulator's color settings. The specific steps can vary based on the terminal emulator you are using (e.g., GNOME Terminal, iTerm2, Alacritty, Windows Terminal, etc.). Below are general steps that a...
25,313
[ { "from": "human", "value": "I know how to lighten the colors for certain commands, however I'd like to lighten the standard ansi colors across all commands.\n" }, { "from": "gpt", "value": "If you're looking to lighten the standard ANSI colors across all terminal commands, you'll need to custom...
I'm modifying a mature CGI application written in Perl and the question of content encoding has come up. The browser reports that the content is iso-8859-1 encoded and the application is declaring iso-8859-1 as the charset in the HTTP headers but doesn't ever seem to actually do the encoding. None of the various enco...
In legacy CGI applications written in Perl, especially older ones, handling character encoding may not be as explicit or structured as it is in modern applications. Here are a few things to consider regarding content encoding in a mature Perl CGI application: 1. **Default Encoding in Perl**: Perl does not have a stric...
20,068
[ { "from": "human", "value": "I'm modifying a mature CGI application written in Perl and the question of content encoding has come up. The browser reports that the content is iso-8859-1 encoded and the application is declaring iso-8859-1 as the charset in the HTTP headers but doesn't ever seem to actually d...
So I've got some C code: #include <stdio.h> #include <string.h> /* putting one of the "char*"s here causes a segfault */ void main() { char* path = "/temp"; char* temp; strcpy(temp, path); } This compiles, runs, and behaves as it looks. However, if one or both of the character pointers is declared as global var...
The issue you are encountering in your C code is related to how memory allocation works, particularly with pointers. ### Explanation of Your Code In your code snippet: ```c char* path = "/temp"; char* temp; strcpy(temp, path); ``` 1. `char* path = "/temp";` initializes `path` to point to a string literal. String li...
12,310
[ { "from": "human", "value": "So I've got some C code:\n#include <stdio.h>\n#include <string.h>\n\n/* putting one of the \"char*\"s here causes a segfault */\nvoid main() {\n char* path = \"/temp\";\n char* temp;\n strcpy(temp, path);\n}\n\nThis compiles, runs, and behaves as it looks. However, if one or ...
I've got a DateTime? that I'm trying to insert into a field using a DbParameter. I'm creating the parameter like so: DbParameter datePrm = updateStmt.CreateParameter(); datePrm.ParameterName = "@change_date"; And then I want to put the value of the DateTime? into the dataPrm.Value while accounting for nulls. I thought...
Yes, you're correct in your conclusion. The issue with using the `??` operator in your initial attempt stems from the fact that `DBNull.Value` is not of the same type as `DateTime?`. The `??` operator expects both operands to be of compatible types, and since `DBNull.Value` is of type `object`, it doesn't match the nul...
26,195
[ { "from": "human", "value": "I've got a DateTime? that I'm trying to insert into a field using a DbParameter. I'm creating the parameter like so:\nDbParameter datePrm = updateStmt.CreateParameter();\ndatePrm.ParameterName = \"@change_date\";\n\nAnd then I want to put the value of the DateTime? into the data...
When setting the size of fonts in CSS, should I be using a percent value (%) or em? Can you explain the advantage?
When setting the size of fonts in CSS, both percentage values (`%`) and `em` units have their own advantages and use cases. Here’s a breakdown of each: ### Percentage (%) 1. **Relative to Parent Element:** When you set the font size using a percentage, it is relative to the font size of the parent element. For exampl...
24,325
[ { "from": "human", "value": "When setting the size of fonts in CSS, should I be using a percent value (%) or em? Can you explain the advantage?\n" }, { "from": "gpt", "value": "When setting the size of fonts in CSS, both percentage values (`%`) and `em` units have their own advantages and use ca...
Error message: "Virtual Server was unable to commit the changes made during the current session of "". A likely cause of this problem is the parent virtual hard disk cannot be opened for read/write or it might be in use or the user has no read/write/modify permissions. The data in the undo disk is retained." I can star...
The error message you are encountering suggests that there is a permissions issue with the parent virtual hard disk (VHD) that is preventing the changes from being committed. Here are some steps to help you check your permissions and resolve the issue: ### 1. **Check File Permissions** You need to ensure that you have...
19,198
[ { "from": "human", "value": "Error message: \"Virtual Server was unable to commit the changes made during the current session of \"\". A likely cause of this problem is the parent virtual hard disk cannot be opened for read/write or it might be in use or the user has no read/write/modify permissions. The da...
I want to do this (no particular language): print(foo.objects.bookdb.books[12].title); or this: book = foo.objects.bookdb.book.new(); book.title = 'RPC for Dummies'; book.save(); Where foo actually is a service connected to my program via some IPC, and to access its methods and objects, some layer actually sends and ...
To achieve an object-oriented programming (OOP) model that maps transparently over process boundaries, you can employ a combination of design patterns, serialization mechanisms, and IPC systems. Here’s a general approach that you could consider, which can be implemented in languages like C#, Java, or Python: ### 1. De...
19,710
[ { "from": "human", "value": "I want to do this (no particular language):\nprint(foo.objects.bookdb.books[12].title);\n\nor this:\nbook = foo.objects.bookdb.book.new();\nbook.title = 'RPC for Dummies';\nbook.save();\n\nWhere foo actually is a service connected to my program via some IPC, and to access its me...
i've been tasked with re-organizing a pure HTML site into a CMS. if all goes well, the new site will eventually become the main URL, and the old domain will be phased out. the old domain has a decent enough page rank, and the company wishes to mitigate any loss of page rank for that. in looking over the options availab...
Transitioning a static HTML site to a CMS while maintaining or improving page rank can indeed be a complex process, particularly when the URLs of the pages change significantly. Here are some strategies and best practices to help mitigate potential issues with lost page rank due to URL changes: 1. **301 Redirects**: A...
23,148
[ { "from": "human", "value": "i've been tasked with re-organizing a pure HTML site into a CMS. if all goes well, the new site will eventually become the main URL, and the old domain will be phased out. the old domain has a decent enough page rank, and the company wishes to mitigate any loss of page rank for ...
The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method. I need to change a field width. The ALTER TABLE statement is working ...
Yes, you can determine the size of a field in an MS Access database using the OleDb connection. You can query the database's schema to get the information about the fields in a specific table. This involves using the `OleDbConnection.GetSchema` method to retrieve the schema information about the columns in the specifie...
18,209
[ { "from": "human", "value": "The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method. \nI need to change a field wi...
In flash you can open a file on the user's computer. In flash 9 you can upload and download the file and in flash 10 you can access the contents of the file. It is secure because the user has to choose the file from a file dialog box to allow flash access to it. What I would like to do in my application is to get a dir...
You are correct in your understanding of the limitations of Flash in terms of file access. In Flash, specifically Flash Player, there are strict security measures in place to protect users' files and privacy. As of Flash Player 9 and 10, while you can upload and download files and access their contents, you cannot acce...
28,615
[ { "from": "human", "value": "In flash you can open a file on the user's computer. In flash 9 you can upload and download the file and in flash 10 you can access the contents of the file.\nIt is secure because the user has to choose the file from a file dialog box to allow flash access to it.\nWhat I would l...
I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the display will be sent as a compressed bitmap. This issue is resolved in Vista-Vista comunicatio...
The issue you mentioned is indeed relevant for developers considering WPF (Windows Presentation Foundation) applications, especially in scenarios where remote desktop access is involved. Here’s a concise breakdown of the situation: ### WPF and Remote Desktop 1. **WPF Graphics Rendering**: WPF uses DirectX for renderi...
21,046
[ { "from": "human", "value": "I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the display will be sent as a compressed bitmap.\nThis is...
I have an abstract class and I would like to use it quickly by NOT create a concrete class that inherit the abstract class. Well, to define the abstract method anonymously. Something like that: Command c = new Command(myObject){ public override void Do() { } ...
In C# .NET 2.0, you cannot directly create anonymous classes or use anonymous methods in the way you are attempting with an abstract class. However, you can create an anonymous class by using a workaround with delegates, but that won't apply to abstract classes since they require explicit type definition. To achieve w...
26,569
[ { "from": "human", "value": "I have an abstract class and I would like to use it quickly by NOT create a concrete class that inherit the abstract class. Well, to define the abstract method anonymously.\nSomething like that:\n Command c = new Command(myObject){\n public override void ...
I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how to do. Obviously, I had to make it be mor...
Your game idea sounds intriguing, and it's clear you've put thought into how to manage the complexity of sequences and their effects. Here are some considerations for your implementation ideas and some additional suggestions: ### 1. Circular n-linked list (or tree structure) Using a tree structure (as a directed acyc...
22,015
[ { "from": "human", "value": "I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how ...
I have a modal popup that initially shows some content but expands a div if a checkbox is selected. The modal expands correctly but doesn't recenter unless you scroll up or down. Is there a javascript event I can tack on to my javascript function to recenter the entire modal?
To recenter a modal popup when it expands due to a checkbox being selected, you can use the `resize` event of the window. However, a more straightforward approach would be to create a function that explicitly centers the modal after the expansion happens. Here's a basic approach to accomplish this: 1. Create a funct...
21,525
[ { "from": "human", "value": "I have a modal popup that initially shows some content but expands a div if a checkbox is selected. The modal expands correctly but doesn't recenter unless you scroll up or down. Is there a javascript event I can tack on to my javascript function to recenter the entire modal?\n"...
I want to experiment with GCC whole program optimizations. To do so I have to pass all C-files at once to the compiler frontend. However, I use makefiles to automate my build process, and I'm not an expert when it comes to makefile magic. How should I modify the makefile if I want to compile (maybe even link) using jus...
To enable whole program optimizations with GCC, you can pass all your C files to the compiler in a single command. This requires modifying your Makefile to compile all object files together instead of individually. Here’s how you can do this: 1. Instead of compiling each `.c` file into an object file separately, we wi...
20,594
[ { "from": "human", "value": "I want to experiment with GCC whole program optimizations. To do so I have to pass all C-files at once to the compiler frontend. However, I use makefiles to automate my build process, and I'm not an expert when it comes to makefile magic.\nHow should I modify the makefile if I w...
I've a windows service that updates our product. It copies the product files into a temp directory, usually "C:\Windows\Temp", patches the binaries, and then uses MoveFileEx to copy the files back to the install directory on a reboot, usually "C:\Program Files\Product". The files in the install directory are inheriting...
This behavior you're encountering can be explained by how Windows handles file permissions and security descriptors during file operations like copying and moving. ### Explanation of the Behavior: 1. **Inheritance of ACLs**: When files are created or copied to a directory in Windows, they inherit the Access Control L...
19,538
[ { "from": "human", "value": "I've a windows service that updates our product. It copies the product files into a temp directory, usually \"C:\\Windows\\Temp\", patches the binaries, and then uses MoveFileEx to copy the files back to the install directory on a reboot, usually \"C:\\Program Files\\Product\". ...
I can add custom version strings to a C++ DLL in Visual Studio by editing the .rc file by hand. For example, if I add to the VersionInfo section of the .rc file VALUE "BuildDate", "2008/09/19 15:42:52" Then that date is visible in the file explorer, in the DLL's properties, under the Version tab. Can I do the same fo...
Yes, you can embed custom version information into a C# DLL similar to how it's done in a C++ DLL. However, instead of directly editing an `.rc` file, you would typically use a resource file to achieve this. The steps below outline how to create a resource file and include custom version information in a C# DLL: ### S...
16,902
[ { "from": "human", "value": "I can add custom version strings to a C++ DLL in Visual Studio by editing the .rc file by hand. For example, if I add to the VersionInfo section of the .rc file\nVALUE \"BuildDate\", \"2008/09/19 15:42:52\"\n\nThen that date is visible in the file explorer, in the DLL's propert...
An abstract class can only be used as a base class which is extended by some other class, right? The constructor(s) of an abstract class can have the usual access modifiers (public, protected, and private (for internal use)). Which of protected and public is the correct access modifier to use, since the abstract type ...
You are correct that an abstract class in object-oriented programming is intended to be a base class that cannot be instantiated directly but must be extended by concrete subclasses. Regarding constructors in abstract classes, both `protected` and `public` access modifiers are valid, but they serve different purposes...
27,713
[ { "from": "human", "value": "An abstract class can only be used as a base class which is extended by some other class, right? The constructor(s) of an abstract class can have the usual access modifiers (public, protected, and private (for internal use)). Which of protected and public is the correct access ...
The target driver I'm building is not a native driver but a minidriver working with Microsoft Universal Pinter Driver According to DDK: Descriptions of these items [fonts in my case] are placed in a resource DLL, as described in the Platform SDK documentation. It then goes on to say: In the printer's resource DL...
Creating a resource DLL for a printer minidriver that includes font descriptions can be a bit tricky, especially when dealing with `.ifi` files and their inclusion in the resource DLL. Here's a step-by-step guide on how you can tackle this issue. ### Step 1: Understanding the File Types - **.ufi (User Font Informatio...
18,994
[ { "from": "human", "value": "The target driver I'm building is not a native driver but a minidriver working with Microsoft Universal Pinter Driver\nAccording to DDK:\n\nDescriptions of these items [fonts in my case] are\n placed in a resource DLL, as described\n in the Platform SDK documentation.\n\nIt th...