instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am having some trouble manipulating images using CodeIgniter 1.7. With the following code, the image is uploaded correctly. Alas, instead of a new image being made, and then modified; the existing image is modified. Any help? //Upload image first $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif...
It looks like you're trying to create a thumbnail image from an uploaded image in CodeIgniter 1.7 but ending up modifying the original image instead. There are a couple of potential issues in your code. To ensure that you create a new thumbnail image without modifying the original, you need to check your configuratio...
26,950
[ { "from": "human", "value": "I am having some trouble manipulating images using CodeIgniter 1.7. With the following code, the image is uploaded correctly. Alas, instead of a new image being made, and then modified; the existing image is modified. Any help?\n//Upload image first\n$config['upload_path'] = '....
I'm looking to re-organize the way we release our internal software. All of the code (PHP webapps, some Java apps and Perl scripts) is checked into Subversion repositories but there are no branches or tags, everything is checked into trunk (only around 1-3 devs per app). On the production linux servers, the software is...
Hi Haes, It sounds like you're in a situation that many teams encounter as they scale and iterate on their software. Here are some steps and tools you can consider for improving your release engineering process in a heterogeneous environment like yours. ### 1. Implement a Branching Strategy First and foremost, it's ...
26,947
[ { "from": "human", "value": "I'm looking to re-organize the way we release our internal software. All of the code (PHP webapps, some Java apps and Perl scripts) is checked into Subversion repositories but there are no branches or tags, everything is checked into trunk (only around 1-3 devs per app). On the ...
I've a terrible memory. Whenever I do a CONNECT BY query in Oracle - and I do mean every time - I have to think hard and usually through trial and error work out on which argument the PRIOR should go. I don't know why I don't remember - but I don't. Does anyone have a handy memory mnemonic so I always remember ? For ex...
Remembering how to properly use `PRIOR` in Oracle's `CONNECT BY` queries can indeed be tricky. Here are some mnemonic devices and visualizations to help you internalize the rules. ### Mnemonic 1: "PRIOR goes UP, current goes DOWN" - **When going down the tree (to child nodes):** Think of `PRIOR` being the *parent* bec...
28,806
[ { "from": "human", "value": "I've a terrible memory. Whenever I do a CONNECT BY query in Oracle - and I do mean every time - I have to think hard and usually through trial and error work out on which argument the PRIOR should go.\nI don't know why I don't remember - but I don't.\nDoes anyone have a handy me...
I'm interested in what you find are the best development references for learning and using jQuery. Books, websites, etc. are all welcome.
Certainly! jQuery, once a widely-used JavaScript library for simplifying HTML document manipulation, event handling, and animations, has diminished in popularity with the rise of modern frameworks like React, Angular, and Vue.js. However, it still remains relevant for many projects, especially those that are not using ...
29,717
[ { "from": "human", "value": "I'm interested in what you find are the best development references for learning and using jQuery. Books, websites, etc. are all welcome.\n" }, { "from": "gpt", "value": "Certainly! jQuery, once a widely-used JavaScript library for simplifying HTML document manipulat...
I am in a process of designing a custom SharePoint application. On a previous project, all the data was kept in SharePoint lists and that's the way I've been trying now. But, I'm getting to the point where the data model grows and I feel a need to normalize it and split one logical entity into several physical lists. I...
When designing a custom SharePoint application and considering your data model, it's important to evaluate both SharePoint Lists and traditional databases in the context of your project's requirements. Here are some considerations to help you make this decision: ### Pros and Cons of Using SharePoint Lists **Pros:** 1...
30,300
[ { "from": "human", "value": "I am in a process of designing a custom SharePoint application. On a previous project, all the data was kept in SharePoint lists and that's the way I've been trying now. But, I'm getting to the point where the data model grows and I feel a need to normalize it and split one logi...
I need the values of form inputs to be populated by the sql database. My code works great for all text and textarea inputs but I can't figure out how to assign the database value to the drop down lists eg. 'Type of property' below. It revolves around getting the 'option selected' to represent the value held in the data...
To populate the dropdown list with the selected value from your database, you need to compare each option's value with the value retrieved from the database. If they match, you should set that option as selected. Here's how you can modify your code: ```php $result = $db->sql_query("SELECT * FROM ".$prefix."_users WHER...
27,175
[ { "from": "human", "value": "I need the values of form inputs to be populated by the sql database. My code works great for all text and textarea inputs but I can't figure out how to assign the database value to the drop down lists eg. 'Type of property' below. It revolves around getting the 'option selected...
I was looking into embedding custom version strings using in assemblies a while back, and one approach that the documentation suggested was to embed a windows resource. The only way I can see to create a windows resource is to use the 'Native Resource Template', but the template is a binary file that isn't suitable for...
Yes, you can create a Windows resource as part of a C# project using a human-editable text format. While C# projects do not directly use `.rc` files as C++ projects do, you can still work with resources through a couple of approaches. ### Using `*.rc` Files in C# Projects You can create a C++ resource script (`*.rc`...
27,472
[ { "from": "human", "value": "I was looking into embedding custom version strings using in assemblies a while back, and one approach that the documentation suggested was to embed a windows resource.\nThe only way I can see to create a windows resource is to use the 'Native Resource Template', but the templat...
I want to come up with the minimal set of queries that return the databases and tables in a Microsoft SQL Server instance, on as many versions of SQL Server as possible. I'm not sure if I should half-answer my own question, but here's what I think I need for 2000 and 2005. Ideally I'd go back further, but I don't have ...
You've made a solid start in identifying how to retrieve databases and tables from SQL Server 2000 and 2005. Below is a more comprehensive overview of the queries you can use across multiple versions of SQL Server, including 2000, 2005, and beyond. This will help you get the minimal set of queries to achieve your goals...
27,896
[ { "from": "human", "value": "I want to come up with the minimal set of queries that return the databases and tables in a Microsoft SQL Server instance, on as many versions of SQL Server as possible.\nI'm not sure if I should half-answer my own question, but here's what I think I need for 2000 and 2005. Idea...
In CSS, you can specify the spacing between table cells using the border-spacing property of a table. However, this results in uniform spacing between columns and rows, and I am finding more situations where the designs I am using call for gaps between rows, but not columns, or visa versa. If I have a solid background,...
Yes, you can achieve non-uniform spacing between table rows and columns without adding extra markup or using borders to mimic spacing. One approach is to use CSS properties like `border-collapse`, `border-spacing`, and negative margins for the rows or columns, allowing for more control over the spacing. Here’s how you...
27,087
[ { "from": "human", "value": "In CSS, you can specify the spacing between table cells using the border-spacing property of a table.\nHowever, this results in uniform spacing between columns and rows, and I am finding more situations where the designs I am using call for gaps between rows, but not columns, or...
I always believed that when it came to software for a platform the parties were referred to as such: First-party: The owner/creator of the platform Second-party: The user of the platform Third-party: A developer who is not the first-party. Now second-party seems to be used to refer to a developer owned/contracte...
The terminology surrounding first-party, second-party, and third-party software can indeed vary depending on context and has evolved over time. Here’s a breakdown of these terms and how they’re generally understood: 1. **First-party**: This usually refers to software or content developed by the platform owner or creat...
32,650
[ { "from": "human", "value": "I always believed that when it came to software for a platform the parties were referred to as such:\n\nFirst-party: The owner/creator of the\n platform\nSecond-party: The user of the platform\nThird-party: A developer who is not\n the first-party.\n\nNow second-party seems t...
I know that JavaScript doesn't support macros (Lisp-style ones) but I was wondering if anyone had a solution to maybe simulate macros? I Googled it, and one of the solutions suggested using eval(), but as he said, would be quite costly. They don't really have to be very fancy. I just want to do simple stuff with them. ...
You're correct that JavaScript does not have built-in support for macros in the same way languages like Lisp do. However, there are a few patterns and techniques you can use to simulate some macro-like behavior. Here are a few suggestions: ### 1. Higher-Order Functions You can use higher-order functions to encapsulate...
28,540
[ { "from": "human", "value": "I know that JavaScript doesn't support macros (Lisp-style ones) but I was wondering if anyone had a solution to maybe simulate macros? I Googled it, and one of the solutions suggested using eval(), but as he said, would be quite costly.\nThey don't really have to be very fancy. ...
I've got an embedded Windows Media player in an HTML page, and when the audio gets to the end, it just starts again from the beginning. According to the documentation, there's an autorewind parameter/attribute and also a loop. The problem is, I've set both of those to false (and/or zero) and it doesn't seem to make any...
It sounds like you are experiencing an issue with the embedded Windows Media Player that may not be behaving as expected when it comes to autoplay and looping. Given that you have set the `autorewind` and `loop` attributes to false, here are a few things to consider and troubleshoot: 1. **Double-Check Parameters**: Ma...
27,712
[ { "from": "human", "value": "I've got an embedded Windows Media player in an HTML page, and when the audio gets to the end, it just starts again from the beginning.\nAccording to the documentation, there's an autorewind parameter/attribute and also a loop.\nThe problem is, I've set both of those to false (a...
I'm refactoring a number of classes in an application to use interfaces instead of base classes. Here's the interfaces I created so far: ICarryable implemented by all Item objects IActable implemented by all Actor objects IUseable implemented by some Item sub-classes IWieldable implemented by some Item sub-classes...
Naming interfaces can be a bit tricky, but it's important to choose a name that clearly conveys the purpose and behavior of the interface. Since your interface is intended to represent objects that have a location on a map, here are a few suggestions that might resonate better than `IMappable`: 1. **ILocatable**: This...
32,470
[ { "from": "human", "value": "I'm refactoring a number of classes in an application to use interfaces instead of base classes. Here's the interfaces I created so far:\n\nICarryable implemented by all Item objects \nIActable implemented by all Actor objects\nIUseable implemented by some Item sub-classes\nI...
I'm building a wrapper for DTS around the Microsoft.SqlServer.DTSPkg80 (the RCW generated from DTSPKG80.DLL). Inside the RCW, on the Connection2 interface, the property "UseDSL" is defined. This property is not in the SQL Server Books Online documentation, and googling it just found a bunch of "fix my code" listings w...
The `UseDSL` property in the `Connection2` interface of the `Microsoft.SqlServer.DTSPkg80` library is indeed not well-documented, and this can make it challenging to understand its exact purpose and implications. From what is generally known about DTS (Data Transformation Services), and from examining similar interfac...
30,090
[ { "from": "human", "value": "I'm building a wrapper for DTS around the Microsoft.SqlServer.DTSPkg80 (the RCW generated from DTSPKG80.DLL). Inside the RCW, on the Connection2 interface, the property \"UseDSL\" is defined. This property is not in the SQL Server Books Online documentation, and googling it jus...
Is there any way to make Visual Studio word-wrap at 80 characters? I'm using VS2008. This post is loosely related.
In Visual Studio 2008, you can enable word wrapping and configure it to wrap text at a certain character limit, but there are no direct built-in settings to wrap at exactly 80 characters. However, you can adjust the editor settings and use some workarounds. ### Enable Word Wrap 1. Open Visual Studio 2008. 2. Go to `To...
30,634
[ { "from": "human", "value": "Is there any way to make Visual Studio word-wrap at 80 characters? I'm using VS2008.\nThis post is loosely related.\n" }, { "from": "gpt", "value": "In Visual Studio 2008, you can enable word wrapping and configure it to wrap text at a certain character limit, but t...
I am having a problem displaying a Javascript string with embedded Unicode character escape sequences (\uXXXX) where the initial "\" character is itself escaped as "\" What do I need to do to transform the string so that it properly evaluates the escape sequences and produces output with the correct Unicode charact...
To transform the string containing the escaped Unicode character escape sequences so that they are properly evaluated and produce the correct Unicode characters, you need to follow a two-step process: 1. Replace the `\` with a single backslash (`\`). 2. Use `JSON.parse()` to evaluate the resulting string with Unic...
33,311
[ { "from": "human", "value": "I am having a problem displaying a Javascript string with embedded Unicode character escape sequences (\\uXXXX) where the initial \"\\\" character is itself escaped as \"\\"\nWhat do I need to do to transform the string so that it properly evaluates the escape sequences and ...
Using WritePrivateProfileString and GetPrivateProfileString results in ??? instead of the real characters.
When you encounter issues like "???" being returned instead of the expected characters while using the `WritePrivateProfileString` and `GetPrivateProfileString` functions, it's often due to a mismatch in the character encoding. By default, these functions work with ANSI strings in older versions of the Windows API, whi...
30,322
[ { "from": "human", "value": "Using WritePrivateProfileString and GetPrivateProfileString results in ??? instead of the real characters.\n" }, { "from": "gpt", "value": "When you encounter issues like \"???\" being returned instead of the expected characters while using the `WritePrivateProfileSt...
I have an ASP page which will fetch records from a SQL server DB table. The table "order_master" has a field called order_date. I want to frame a select query to fetch order date > a date entered by user(ex : 07/01/2008) I tried with convert and cast, but both are not working. The sample data in order_date column is 4/...
To query records from the `order_master` table where the `order_date` is greater than a specified date, and given that you're not certain if the `order_date` field is stored as `varchar` or `datetime`, you'll want to handle both scenarios carefully. If `order_date` is stored as a `datetime` type, the query is straight...
28,538
[ { "from": "human", "value": "I have an ASP page which will fetch records from a SQL server DB table. The table \"order_master\" has a field called order_date. I want to frame a select query to fetch order date > a date entered by user(ex : 07/01/2008)\nI tried with convert and cast, but both are not working...
Is using a handrolled POCO queue class using pseudo code T Dequeue() { lock(syncRoot) { if(queue.Empty) Thread.Wait(); } } void Enqueue(T item) { queue.Enqueue(item); Thread.Notify(); } For WCF is request queueing a scalable approach?
Using a hand-rolled Plain Old CLR Object (POCO) queue with locking and condition variables, as suggested in your pseudo code, can work for basic use cases, but it raises a few considerations when it comes to scalability, particularly in a Windows Communication Foundation (WCF) context. ### Considerations for Using a H...
31,679
[ { "from": "human", "value": "Is using a handrolled POCO queue class using pseudo code\nT Dequeue() {\n lock(syncRoot) { \n if(queue.Empty) Thread.Wait(); \n }\n}\n\nvoid Enqueue(T item) {\n queue.Enqueue(item);\n Thread.Notify();\n}\n\nFor WCF is request queueing a scalable approach?\n" }, ...
There are certain messages which i wish to display to the personal who is doing putty to a linux shell. How do i like configure some kind of welcome message when people login to the linux shell?
To configure a welcome message that is displayed to users when they log in to a Linux shell (including when using PuTTY), you can use the `/etc/motd` file (Message of the Day) or edit the user's shell profile configuration files. Here are a couple of methods to achieve this: ### Method 1: Using `/etc/motd` 1. **Edit...
28,380
[ { "from": "human", "value": "There are certain messages which i wish to display to the personal who is doing putty to a linux shell. How do i like configure some kind of welcome message when people login to the linux shell?\n" }, { "from": "gpt", "value": "To configure a welcome message that is ...
GNU gcc 4.3 partially supports the upcoming c++0x standard: among the implemented features the rvalue reference. By means of the rvalue reference it should be possible to move a non-copyable object or return it from a function. Are std::streams already movable by means of rvalue reference or does the current library i...
In C++11, the concept of move semantics was introduced, which includes the use of rvalue references to enable efficient transfer of resources from one object to another. This is particularly useful for types that manage dynamic resources, such as memory or file handles. As for `std::streams`, they are indeed designed ...
30,037
[ { "from": "human", "value": "GNU gcc 4.3 partially supports the upcoming c++0x standard: among the implemented features the rvalue reference. By means of the rvalue reference it should be possible to move a non-copyable object or return it from a function. \nAre std::streams already movable by means of rval...
I'm looking for an open-source web search library that does not use a search index file. Do you know any? Thanks, Kenneth
Hello Kenneth, If you're looking for an open-source web search library that does not rely on a traditional search index file, you might consider the following options: 1. **Whoosh**: Whoosh is a fast, featureful pure-Python search engine library. While it can use an index file, it also allows for in-memory indexing, ...
31,762
[ { "from": "human", "value": "I'm looking for an open-source web search library that does not use a search index file.\nDo you know any?\nThanks,\nKenneth\n" }, { "from": "gpt", "value": "Hello Kenneth,\n\nIf you're looking for an open-source web search library that does not rely on a traditional...
I want to call ShowDialog() when a keyboard hook event is triggered, but I'm having some difficulties: ShowDialog() blocks, so I can't call it from the hook triggered event, because it will block the OS. I can start a new thread and call ShowDialog() from there, but I get some nasty exception. I guess I can't call Sho...
You're correct in noting that calling `ShowDialog()` from a keyboard hook event directly will lead to issues, because `ShowDialog()` needs to be called on the UI thread. The keyboard hook event will typically not run on the UI thread, and starting a new thread will not work either, as you noted. A clean and effective...
22,156
[ { "from": "human", "value": "I want to call ShowDialog() when a keyboard hook event is triggered, but I'm having some difficulties:\n\nShowDialog() blocks, so I can't call it from the hook triggered event, because it will block the OS.\nI can start a new thread and call ShowDialog() from there, but I get so...
what is the right way of using XElement.Save(filepath)? Do I need to call this in a try/catch block all the time? How does it deal with concurrency?
When using `XElement.Save(filepath)` in C#, it's important to consider a few best practices regarding error handling and concurrency. ### Usage The `Save` method is straightforward. You simply need to call it on an `XElement` instance and provide the file path where you want to save the XML data. Here’s a simple exam...
31,945
[ { "from": "human", "value": "what is the right way of using XElement.Save(filepath)? Do I need to call this in a try/catch block all the time? How does it deal with concurrency? \n" }, { "from": "gpt", "value": "When using `XElement.Save(filepath)` in C#, it's important to consider a few best pr...
From the reading I've done I'm under the impression the DataContractSerializer handles versionong issues by, if members in the request are not there it will set the default value, and if addional members are in the request but not in the definition the serializer will simply ignores these fields and not process them. F...
Your understanding of the `DataContractSerializer` and how it handles versioning is mostly correct. Here are answers to your questions: 1. **Versioning with DataContractSerializer**: - **Missing Members**: If members in the serialized data (the incoming request) are not present in the data contract (the class defi...
32,725
[ { "from": "human", "value": "From the reading I've done I'm under the impression the DataContractSerializer handles versionong issues by, if members in the request are not there it will set the default value, and if addional members are in the request but not in the definition the serializer will simply ign...
The following code fails at runtime… Dim Id As Guid = CType(e.CommandArgument, Guid) It throws this exception… System.InvalidCastException was unhandled by user code Specified cast is not valid Why can't I cast e.CommandArgument as a Guid?
The error you're encountering, `System.InvalidCastException`, occurs because the value of `e.CommandArgument` is not of the type `Guid`. In .NET, the `CType` operator tries to convert an object to a specified type, and if the object isn't compatible with that type, it throws an exception. Here are a few reasons why th...
31,758
[ { "from": "human", "value": "The following code fails at runtime…\n\nDim Id As Guid = CType(e.CommandArgument, Guid)\n\nIt throws this exception…\n\nSystem.InvalidCastException was unhandled by user code\nSpecified cast is not valid\n\nWhy can't I cast e.CommandArgument as a Guid?\n" }, { "from": "g...
I'd like the canonical way to do this. My Google searches have come up short. I have one ActiveRecord model that should map to a different database than the rest of the application. I would like to store the new configurations in the database.yml file as well. I understand that establish_connection should be called,...
To connect an ActiveRecord model to a different database using Rails, you can follow a more canonical approach. Here are the steps and the recommended way to establish the connection. ### 1. Database Configuration First, you need to configure the additional database connection in your `config/database.yml` file. Here...
17,038
[ { "from": "human", "value": "I'd like the canonical way to do this. My Google searches have come up short. I have one ActiveRecord model that should map to a different database than the rest of the application. I would like to store the new configurations in the database.yml file as well.\nI understand t...
I've been trying to find a free database creator for mac os, and i'm not being able to find any. Anyone know of a free one i could download? EDIT: I need that the application generate the sql (mysql in this case) also :) ty
There are several free database management tools you can use on macOS that can generate SQL for MySQL. Here are a few options: 1. **DBeaver**: DBeaver is a free, open-source database management tool that supports a wide range of databases, including MySQL. It has a user-friendly interface and can generate SQL queries ...
31,593
[ { "from": "human", "value": "I've been trying to find a free database creator for mac os, and i'm not being able to find any. Anyone know of a free one i could download?\nEDIT: I need that the application generate the sql (mysql in this case) also :)\nty\n" }, { "from": "gpt", "value": "There ar...
Short of putting a UIWebView as the back-most layer in my nib file, how can I add a repeating background image to an iPhone app (like the corduroy look in the background of a grouped UITableView)? Do I need to create an image that's the size of the iPhone's screen and manually repeat it using copy and paste?
To create a repeating background image for your iPhone app, you don't need to resort to using a UIWebView or manually creating an image that covers the whole screen. Instead, you can achieve this using a simple approach with `UIImageView` and `UIView`. Here's how you can do it programmatically or in Interface Builder: ...
30,001
[ { "from": "human", "value": "Short of putting a UIWebView as the back-most layer in my nib file, how can I add a repeating background image to an iPhone app (like the corduroy look in the background of a grouped UITableView)?\nDo I need to create an image that's the size of the iPhone's screen and manually ...
It seems almost magical. What is the traceroute command doing in order to map out the entire path to some other node on the Internet?
The `traceroute` command is a network diagnostic tool used to track the path that packets take from one host to another over an Internet Protocol (IP) network. It provides insights into the route that data packets traverse, including all intermediate nodes (or routers) along the way. Here's how it works, broken down in...
30,903
[ { "from": "human", "value": "It seems almost magical. What is the traceroute command doing in order to map out the entire path to some other node on the Internet?\n" }, { "from": "gpt", "value": "The `traceroute` command is a network diagnostic tool used to track the path that packets take from ...
I want to define some member variable and some code just in Debug Mode, When change to Release mode, they will not appear. I know I can use #ifdef xxx to do this task. My question is : is there any handy macro provided by MFC to do this.
In MFC (Microsoft Foundation Classes) and C/C++ in general, you can use the predefined macros that the compiler provides to differentiate between Debug and Release builds. The most common macros are: - `_DEBUG`: Defined when the project is compiled in Debug mode. - `NDEBUG`: Defined when the project is compiled in Rel...
31,885
[ { "from": "human", "value": "I want to define some member variable and some code just in Debug Mode,\nWhen change to Release mode, they will not appear.\nI know I can use #ifdef xxx to do this task.\nMy question is : is there any handy macro provided by MFC to do this.\n" }, { "from": "gpt", "va...
I created a grid in procedural code on my WPF page. Now I want to reference that grid. Grid grid = (Grid)This.FindName("myGridName") does not work. Ideas?
In WPF, when you create a grid programmatically, it might not be added to the logical tree of the XAML page. Therefore, `FindName` will not work as it searches for names in the XAML namescope. Here are a few ways you can reference your programmatically created grid: 1. **Add the Grid to the Visual Tree**: Ensure that...
31,244
[ { "from": "human", "value": "I created a grid in procedural code on my WPF page. Now I want to reference that grid. \nGrid grid = (Grid)This.FindName(\"myGridName\")\n\ndoes not work. Ideas?\n" }, { "from": "gpt", "value": "In WPF, when you create a grid programmatically, it might not be added...
I'm learning some PowerShell. Is it possible to see the source code for a built-in cmdlet like Get-ChildItem?
Yes, you can view the source code of a PowerShell built-in cmdlet, but the way you access it depends on how the cmdlet is implemented. 1. **Managed Cmdlets**: Many built-in cmdlets, like `Get-ChildItem`, are implemented in .NET and are part of the Windows PowerShell or PowerShell Core libraries. The source code for th...
30,937
[ { "from": "human", "value": "I'm learning some PowerShell. Is it possible to see the source code for a built-in cmdlet like Get-ChildItem?\n" }, { "from": "gpt", "value": "Yes, you can view the source code of a PowerShell built-in cmdlet, but the way you access it depends on how the cmdlet is im...
What is the return value of the WaitForObject() function? I do not mean the type of return value (int). What does it return if the event is signalled and what does it return if the event is not signalled?
The `WaitForObject()` function, typically found in the context of Windows programming (specifically in the Windows API), is used to wait for the state of an object (such as an event, mutex, or semaphore) to change. The return value of `WaitForObject()` can be interpreted as follows: 1. **If the object is signaled**:...
33,883
[ { "from": "human", "value": "What is the return value of the WaitForObject() function?\nI do not mean the type of return value (int).\nWhat does it return if the event is signalled and what does it return if the event is not signalled?\n" }, { "from": "gpt", "value": "The `WaitForObject()` funct...
In Bash I'm executing a command and putting the result in a variable like this: export var=`svn ls` But if SVN fails for some reason--say it returns a non-zero error code--export still returns status code 0. How do I detect if the executed command fails?
In Bash, the command substitution syntax (using backticks \``...`\` or `$()` for command substitution) does not affect the exit status of the command being run. Instead, you can check the exit status of the command immediately after you execute it. Here's how you can capture the output of the `svn ls` command into a v...
31,398
[ { "from": "human", "value": "In Bash I'm executing a command and putting the result in a variable like this:\nexport var=`svn ls`\nBut if SVN fails for some reason--say it returns a non-zero error code--export still returns status code 0. How do I detect if the executed command fails?\n" }, { "from"...
In C, is it possible to forward the invocation of a variadic function? As in, int my_printf(char *fmt, ...) { fprintf(stderr, "Calling printf with fmt %s", fmt); return SOMEHOW_INVOKE_LIBC_PRINTF; } Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could l...
Yes, you can forward the invocation of a variadic function in C using the `stdarg` library, which provides facilities to handle variable argument lists. To achieve this, you need to use `va_list`, `va_start`, `va_end`, and potentially `vprintf` or `vfprintf` if you want to call the variadic function with the same argum...
29,804
[ { "from": "human", "value": "In C, is it possible to forward the invocation of a variadic function? As in,\nint my_printf(char *fmt, ...) {\n fprintf(stderr, \"Calling printf with fmt %s\", fmt);\n return SOMEHOW_INVOKE_LIBC_PRINTF;\n}\n\nForwarding the invocation in the manner above obviously isn't s...
I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did .. Now everything works fine except javascript debugging. I am unable to debug javascript .. I can set b...
It sounds like you're dealing with a common issue in Visual Studio related to JavaScript debugging. Here are several steps you can try to resolve the problem: ### 1. Ensure JavaScript debugging is enabled: - Open Visual Studio 2008. - Go to `Tools` > `Options`. - In the `Options` dialog, navigate to `Debuggin...
30,270
[ { "from": "human", "value": "I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did ..\nNow everything works fine except javascript debugging. I am...
e.g, foo1 foo2 foo10 foo100 rather than foo1 foo10 foo100 foo2 Update: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me.
If you're looking to sort strings in a way that accounts for the numeric values they contain (i.e., natural sort order), many modern database systems support this functionality. Here's how to achieve natural sorting in some common databases: ### 1. PostgreSQL PostgreSQL has a `string_agg()` function combined with a `...
32,867
[ { "from": "human", "value": "e.g,\nfoo1\nfoo2\nfoo10\nfoo100\n\nrather than\nfoo1\nfoo10\nfoo100\nfoo2\n\nUpdate: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me.\n" }, { "from": "gpt", "value": "If you're loo...
I need to modify a (xml-)file from Apache Ant. "loadfile" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification? Of course I could write custom task to perform this operation but I would like to know if there's some existing implemen...
In Apache Ant, while the `loadfile` task allows you to load a file's content into a property, there is no direct built-in task specifically designed to write a property back to a file. However, you can use the `echo` task along with `redirector` or the `copy` task with a `filter` to achieve this. Here’s a common appro...
28,699
[ { "from": "human", "value": "I need to modify a (xml-)file from Apache Ant. \"loadfile\" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification?\nOf course I could write custom task to perform this operation but I would li...
I've been having performance issues with a high traffic ASP.NET 2.0 site running on Windows 2000. While editing the web.config file I noticed that the authentication mode was set to 'Windows'. I changed it to 'None'. The only users this site has are anonymous and it gets 25,000+ page views at day. Could this have b...
Changing the authentication mode from 'Windows' to 'None' could potentially help alleviate performance issues in a high-traffic ASP.NET 2.0 site, particularly if the site is designed to allow anonymous access. Here’s why: 1. **Overhead of Windows Authentication**: When Windows authentication is enabled, every request ...
32,753
[ { "from": "human", "value": "I've been having performance issues with a high traffic ASP.NET 2.0 site running on Windows 2000. While editing the web.config file I noticed that the authentication mode was set to 'Windows'. I changed it to 'None'. The only users this site has are anonymous and it gets 25,0...
I'm looking for a .vssettings file that has emacs keybindings in it so that a member of our development team can use them. Anyone already have one setup they can share?
Creating a `.vssettings` file for Visual Studio that includes Emacs keybindings is not something that can be directly shared, as these settings are often specific to an individual's setup and preferences. However, I can guide you through the process of creating your own `.vssettings` file with Emacs keybindings. ### S...
29,710
[ { "from": "human", "value": "I'm looking for a .vssettings file that has emacs keybindings in it so that a member of our development team can use them.\nAnyone already have one setup they can share?\n" }, { "from": "gpt", "value": "Creating a `.vssettings` file for Visual Studio that includes Em...
I'm working on a stripes app that uses a bit of jQuery to make the UI more dynamic/usable. I set up an Error Resolution, so if an error is thrown, the user is redirected to an error.jsp page. However, if an error is thrown during a jQuery Ajax call, instead of redirecting to the error.jsp page, I get html printed to th...
To handle errors in jQuery AJAX calls effectively, you can use the `fail` method or provide an error callback in the `$.post` function. If the AJAX request fails, you can redirect the user to your `error.jsp` page. Here's how you can modify your code to handle errors and perform a redirect: ```javascript $.post("Send...
31,190
[ { "from": "human", "value": "I'm working on a stripes app that uses a bit of jQuery to make the UI more dynamic/usable.\nI set up an Error Resolution, so if an error is thrown, the user is redirected to an error.jsp page.\nHowever, if an error is thrown during a jQuery Ajax call, instead of redirecting to t...
What is the preferred way to insert strings that can contain both single and double quotes (",') into MySql using DBI? For example, $val1 and $val2 can contain quotes: my $dbh = DBI->connect( ... ); my $sql = "insert into tbl_name(col_one,col_two) values($val1, $val2)"; my $sth = $dbh->prepare($sql); $sth->execute(); ...
To safely insert strings that may contain both single and double quotes into a MySQL database using Perl's DBI, you should use parameterized queries. Parameterized queries not only handle special characters, such as quotes, but also help protect against SQL injection attacks. Here’s how you can rewrite your code to us...
33,131
[ { "from": "human", "value": "What is the preferred way to insert strings that can contain both single and double quotes (\",') into MySql using DBI? For example, $val1 and $val2 can contain quotes:\nmy $dbh = DBI->connect( ... );\nmy $sql = \"insert into tbl_name(col_one,col_two) values($val1, $val2)\";\nm...
I have read that I need to set the PYTHON_EGG_CACHE environment variable, or install the python library as an uncompressed .egg Which do you suggest?
The choice between setting the `PYTHON_EGG_CACHE` environment variable or installing the Python library as an uncompressed `.egg` file depends on your specific use case and environment. Here’s a brief overview of both options to help you decide: ### Setting `PYTHON_EGG_CACHE` - **Advantages:** - You can keep the `....
32,807
[ { "from": "human", "value": "I have read that I need to set the PYTHON_EGG_CACHE environment variable, or install the python library as an uncompressed .egg\nWhich do you suggest?\n" }, { "from": "gpt", "value": "The choice between setting the `PYTHON_EGG_CACHE` environment variable or installin...
Hi I have a problem with a dependency hierarchy I am unsure how to solve: alt text http://img525.imageshack.us/my.php?image=56330713it2.jpg http://img525.imageshack.us/my.php?image=56330713it2.jpg The problem is with how I should reference these dependencies from MyProject project. I have built BaseProject and the Comm...
When dealing with dependency versions in .NET (or any software environment with versioned dependencies), there are a few principles to guide you: 1. **Compatibility**: First, you need to assess the compatibility between the different versions of `CommonUtil`. If `CommonUtil v.2.0` is backward-compatible with `CommonUt...
31,146
[ { "from": "human", "value": "Hi I have a problem with a dependency hierarchy I am unsure how to solve:\nalt text http://img525.imageshack.us/my.php?image=56330713it2.jpg\nhttp://img525.imageshack.us/my.php?image=56330713it2.jpg\nThe problem is with how I should reference these dependencies from MyProject pr...
Does anyone have any experience in using compression on their cached data? I understand that stackoverflow is internally using this method. What are the pros and cons? And are there any gotchyas?
Using compression on cached data can be a valuable technique for optimizing storage space and potentially reducing network bandwidth usage. However, it comes with its own set of pros and cons. Here’s a breakdown: ### Pros: 1. **Reduced Storage Requirements**: - Compression can significantly reduce the amount of di...
25,782
[ { "from": "human", "value": "Does anyone have any experience in using compression on their cached data?\nI understand that stackoverflow is internally using this method. \nWhat are the pros and cons? \nAnd are there any gotchyas?\n" }, { "from": "gpt", "value": "Using compression on cached data ...
I am using Spring Forms for my web application. For nested properties, the form tag generates the input elements having id / name in form of . For example, Person is the command class and Address is contained into its address field then the city element would be, <input type="text" id="address**.**city" name="address**...
The issue you're facing is due to the fact that jQuery selectors do not support using the dot (`.`) character in the `id` or `name` attributes without escaping them. In your case, the `id` and `name` attributes contain the dot as a separator for the nested property, which needs to be handled differently in jQuery. To ...
31,198
[ { "from": "human", "value": "I am using Spring Forms for my web application. For nested properties, the form tag generates the input elements having id / name in form of .\nFor example, Person is the command class and Address is contained into its address field then the city element would be,\n<input type=\...
Double out = otherTypes.someMethod(c, c2); assertEquals((Double)-1.0D, out); I get error "Double cannot be resolved" (the Double in assertEquals), is there any way to hack around it except extracting variable? Is this bug in Java or just very usefull feature that wont be fix?
The error you are encountering, "Double cannot be resolved", typically occurs when the Java compiler does not recognize the `Double` class. This may happen due to a number of reasons, such as an incorrect import statement or a naming conflict in your code. However, based on your specific code snippet, it seems that yo...
31,369
[ { "from": "human", "value": "Double out = otherTypes.someMethod(c, c2);\nassertEquals((Double)-1.0D, out);\n\nI get error \"Double cannot be resolved\" (the Double in assertEquals), is there any way to hack around it except extracting variable?\nIs this bug in Java or just very usefull feature that wont be ...
I could have sworn i have done this somewhere - im using 2.0 right now - was this something i found in a later version? IE: pass the content of a Literal in the constructor I remember myself saying 'huh, and all this time i created a new instance and then set the text property' - or did I go to sleep drunk that night?...
It sounds like you're referring to a feature of a framework or library where you can pass the content of a `Literal` control directly to its constructor, rather than creating an instance first and then setting the `Text` property. In many frameworks, including ASP.NET, the `Literal` control typically requires you to cr...
31,264
[ { "from": "human", "value": "I could have sworn i have done this somewhere - im using 2.0 right now - was this something i found in a later version? IE: pass the content of a Literal in the constructor\nI remember myself saying 'huh, and all this time i created a new instance and then set the text property...
Ok: This is some of my table structure that matters here CaseStudyID int Title nvarchar(50) OverrideTitle nvarchar(50) Part of my procedure Declare @Temp table(CaseStudyID int, Title nvarchar(50)) Insert Into @Temp SELECT CaseStudyID,Title FROM CaseStudy WHERE Visible = 1 AND DisplayOnHomePage = 1 ORD...
Certainly! If you need to replace the titles in your temporary table with their corresponding override titles when the title occurs more than once, you can accomplish this by first creating a mapping of the titles that need to be overridden. Here’s how you can modify your procedure to achieve that: 1. You'll first ne...
28,784
[ { "from": "human", "value": "Ok: This is some of my table structure that matters here\nCaseStudyID int\nTitle nvarchar(50)\nOverrideTitle nvarchar(50)\n\nPart of my procedure\nDeclare @Temp table(CaseStudyID int,\n Title nvarchar(50))\n\nInsert Into @Temp \nSELECT CaseStudyID,Title \nFROM CaseStu...
Suppose I have a python object x and a string s, how do I set the attribute s on x? So: >>> x = SomeObject() >>> attr = 'myAttr' >>> # magic goes here >>> x.myAttr 'magic' What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__().
To set an attribute on an object using a string in Python, you can use the built-in `setattr()` function. This allows you to dynamically set an attribute with a name specified as a string. Here's how you can do it in your case: ```python class SomeObject: pass # Create an instance of SomeObject x = SomeObject() ...
33,993
[ { "from": "human", "value": "Suppose I have a python object x and a string s, how do I set the attribute s on x? So:\n>>> x = SomeObject()\n>>> attr = 'myAttr'\n>>> # magic goes here\n>>> x.myAttr\n'magic'\n\nWhat's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__(). \n" }, ...
I have the following rails migration: create_table :articles do |t| t.integer :user_id, :allow_null => false t.integer :genre_id, :allow_null => false t.string :url, :limit => 255, :allow_null => false t.string :title, :limit => 60, :allow_null => false t.text :summary, :limit => 350, :allow_null => false t...
In Ruby on Rails migrations, the correct way to specify that a column should not allow null values is to use the `null: false` option rather than `:allow_null => false`. It's also important to clarify that the `:limit` option is not applicable to text fields (like `summary`), as it is only used with string fields. Her...
27,892
[ { "from": "human", "value": "I have the following rails migration:\ncreate_table :articles do |t|\n t.integer :user_id, :allow_null => false\n t.integer :genre_id, :allow_null => false\n t.string :url, :limit => 255, :allow_null => false\n t.string :title, :limit => 60, :allow_null => false\n t.text :s...
I've created a PHP DOM xml piece and saved it to a string like this: <?php // create a new XML document $doc = new DomDocument('1.0'); ... ... ... $xmldata = $doc->saveXML(); ?> Now I can't use the headers to send a file download prompt and I can't write the file to the server, or rather I don't want th...
To create a downloadable XML file directly from a PHP script without saving it on the server, you can send the appropriate headers to prompt the user for a file download. This can be done by setting the `Content-Type` and `Content-Disposition` headers in your PHP script. Here’s an example of how to do this: ```php <?...
31,830
[ { "from": "human", "value": "I've created a PHP DOM xml piece and saved it to a string like this:\n<?php\n // create a new XML document \n $doc = new DomDocument('1.0');\n ... \n ...\n ...\n $xmldata = $doc->saveXML();\n?>\n\nNow I can't use the headers to send a file download prompt and I can't writ...
I have a MySQL database of keywords that are presently mixed-case. However, I want to convert them all to lowercase. Is there an easy command to do this, either using MySQL or MySQL and PHP?
You can easily convert all entries in a MySQL database column to lowercase using a simple SQL `UPDATE` command. Assuming you have a table named `keywords` and a column named `keyword`, you can use the `LOWER()` function in MySQL to achieve this. Here’s the SQL command you would use: ```sql UPDATE keywords SET keywor...
30,619
[ { "from": "human", "value": "I have a MySQL database of keywords that are presently mixed-case. However, I want to convert them all to lowercase. Is there an easy command to do this, either using MySQL or MySQL and PHP?\n" }, { "from": "gpt", "value": "You can easily convert all entries in a MyS...
I have a table that was imported as all UPPER CASE and I would like to turn it into Proper Case. What script have any of you used to complete this?
You can convert a table's column from all uppercase to proper case (where the first letter of each word is capitalized) using SQL. The exact method can depend on the SQL database you are using, but here’s an example for a few common databases. ### For SQL Server You can use the `UPPER`, `LOWER`, and `STUFF` functions ...
23,885
[ { "from": "human", "value": "I have a table that was imported as all UPPER CASE and I would like to turn it into Proper Case. What script have any of you used to complete this?\n" }, { "from": "gpt", "value": "You can convert a table's column from all uppercase to proper case (where the first le...
Imagine the following REBOL code: foo: context [bar: 3] I now have a context foo in which 'bar is defined. How can I dynamically inject a new word into this context? Is it possible? I've tried: set/any in foo 'baz 3 But that doesn't work because the expression in foo 'baz fails because there is no word 'baz defined in ...
In REBOL, if you want to dynamically inject a new word into an existing context (such as your `foo` context) and you don't have access to its prototype block, you can use the `set` function in conjunction with the context directly. The `set` function allows you to assign values to words without needing to define them i...
30,610
[ { "from": "human", "value": "Imagine the following REBOL code:\nfoo: context [bar: 3]\nI now have a context foo in which 'bar is defined. How can I dynamically inject a new word into this context? Is it possible?\nI've tried:\nset/any in foo 'baz 3\nBut that doesn't work because the expression in foo 'baz f...
So I'm using python to do some parsing of web pages and I want to split the full web address into two parts. Say I have the address http://www.stackoverflow.com/questions/ask. I would need the protocol and domain (e.g. http://www.stackoverflow.com) and the path (e.g. /questions/ask). I figured this might be solved by s...
You can achieve the desired result of splitting the full web address into the protocol/domain and the path using Python's built-in libraries, specifically `urlparse` from the `urllib.parse` module. This approach is generally more reliable than using regular expressions for URL parsing. Here's how you can do it: ```pyt...
33,844
[ { "from": "human", "value": "So I'm using python to do some parsing of web pages and I want to split the full web address into two parts. Say I have the address http://www.stackoverflow.com/questions/ask. I would need the protocol and domain (e.g. http://www.stackoverflow.com) and the path (e.g. /questions/...
I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a shadow on three or even four sides?
To create a shadow on three sides (left, bottom, right) or four sides (all around) of a block element using CSS, you can utilize the `box-shadow` property, but since `box-shadow` naturally creates a shadow around all sides, you'll need to play with the shadow offsets and possibly the `inset` value to achieve your desir...
28,511
[ { "from": "human", "value": "I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a s...
I recently installed RailRoad gem to generate an .svg diagram of my app's models and controllers. The rake task keeps breaking with a similar error: 1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant I tried the rake task on 2 se...
The error you're encountering with the RailRoad gem likely stems from how Rails handles dependencies and constant loading. The uninitialized constant error can happen for several reasons, including: 1. **Class Naming Conventions:** Ensure that the models and controllers follow Rails' naming conventions. For example, i...
30,454
[ { "from": "human", "value": "I recently installed RailRoad gem to generate an .svg diagram of my app's models and controllers.\nThe rake task keeps breaking with a similar error:\n1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitiali...
Years ago when I was working with C# I could easily create a temporary file and get its name with this function: Path.GetTempFileName(); This function would create a file with a unique name in the temporary directory and return the full path to that file. In the Cocoa API's, the closest thing I can find is: NSTempora...
You're correct that the Cocoa API provides `NSTemporaryDirectory`, which returns the path to the temporary directory, but it does not create a unique file within that directory. In Cocoa (or more generally in Objective-C and Swift), if you need to create a temporary file with a unique name, you can do so by generating ...
32,007
[ { "from": "human", "value": "Years ago when I was working with C# I could easily create a temporary file and get its name with this function:\nPath.GetTempFileName();\n\nThis function would create a file with a unique name in the temporary directory and return the full path to that file. \nIn the Cocoa API'...
How to set the turbo c path in windows globally so that i can compile and run my C programs (which are in other drives) using command prompt in windows XP? Can any one tell me how to get commands at every drive in the command prompt just by typing in c:\tcc in command prompt in windows and turbo c environment?
To set the Turbo C path globally in Windows XP, allowing you to compile and run your C programs from any drive using the Command Prompt, you can follow these steps: ### Step 1: Find Your Turbo C Directory First, determine where Turbo C is installed on your system. Typically, it could be something like `C:\TurboC3` or ...
28,802
[ { "from": "human", "value": "How to set the turbo c path in windows globally so that i can compile and run my C programs (which are in other drives) using command prompt in windows XP?\nCan any one tell me how to get commands at every drive in the command prompt just by typing in \nc:\\tcc \n\nin comman...
How do I limit a SQL Server Profiler trace to a specific database? I can't see how to filter the trace to not see events for all databases on the instance I connect to.
To limit a SQL Server Profiler trace to a specific database, you can set up a filter on the `DatabaseName` column in the trace properties. Here’s how you can do that: 1. **Open SQL Server Profiler**: Start SQL Server Profiler from the SQL Server tools. 2. **Create a New Trace**: Connect to your SQL Server instance, a...
32,444
[ { "from": "human", "value": "How do I limit a SQL Server Profiler trace to a specific database? I can't see how to filter the trace to not see events for all databases on the instance I connect to.\n" }, { "from": "gpt", "value": "To limit a SQL Server Profiler trace to a specific database, you ...
I am having trouble using the attribute XPath Selector in ElementTree, which I should be able to do according to the Documentation Here's some sample code XML <root> <target name="1"> <a></a> <b></b> </target> <target name="2"> <a></a> <b></b> </target> </root> Python def parse(document): root ...
The issue you're encountering is with the XPath expression you're using in the `findall` method. The `findall` method of ElementTree does not support the full XPath syntax, including the use of the `//` syntax for searching through all descendants. Instead, you should use the root element's `findall` method directly. ...
33,052
[ { "from": "human", "value": "I am having trouble using the attribute XPath Selector in ElementTree, which I should be able to do according to the Documentation\nHere's some sample code\nXML\n<root>\n <target name=\"1\">\n <a></a>\n <b></b>\n </target>\n <target name=\"2\">\n <a></a>\n <b></b>\n ...
I know MSDE is no longer supported on Vista, is this also the case for Windows Server 2008?
Microsoft Data Engine (MSDE) is indeed no longer supported on Windows Vista, but it is also not supported on Windows Server 2008. While MSDE was designed to work with earlier versions of Windows, Microsoft recommends moving to newer versions of SQL Server for better support and features, especially since both MSDE and ...
34,443
[ { "from": "human", "value": "I know MSDE is no longer supported on Vista, is this also the case for Windows Server 2008?\n" }, { "from": "gpt", "value": "Microsoft Data Engine (MSDE) is indeed no longer supported on Windows Vista, but it is also not supported on Windows Server 2008. While MSDE w...
I've googled around and can't find a clear answer. I simply want to start some of my iis 6.0 websites via a script that will be run on start up. anyone got any tips for that?
Starting IIS 6.0 websites via a script on startup can be accomplished using a batch script that utilizes the `adsutil.vbs` script, which is included with IIS. Below are the steps to create a script that starts your websites when the server starts up: ### Step 1: Create a Script to Start Websites 1. **Open Notepad** o...
28,153
[ { "from": "human", "value": "I've googled around and can't find a clear answer.\nI simply want to start some of my iis 6.0 websites via a script that will be run on start up.\nanyone got any tips for that?\n" }, { "from": "gpt", "value": "Starting IIS 6.0 websites via a script on startup can be ...
I have a UITableView cell that is going to have a variable size depending on it's content (potentially several lines of text). SInce it appears that heightForRowAtIndexPath is called before I layout the cell, I just guess the correct height by calling [NSString sizeWithFont] on my text string. Is there a better way to...
To handle variable height for UITableView cells based on their content, the best approach is to use Auto Layout and set the constraints properly, which allows the system to automatically calculate the height of the cell based on its content. This avoids the need for manually estimating the height using `NSString sizeWi...
30,959
[ { "from": "human", "value": "I have a UITableView cell that is going to have a variable size depending on it's content (potentially several lines of text). \nSInce it appears that heightForRowAtIndexPath is called before I layout the cell, I just guess the correct height by calling [NSString sizeWithFont] o...
I was wondering which of the built in python libraries, support DTD validation. I've been looking around and haven't been able to get a straight answer. I know ElementTree does NOT Support DTD validation. Which ones do?
In Python, the built-in libraries that support DTD (Document Type Definition) validation for XML include: 1. **`xml.dom.minidom`**: This module can parse XML documents and you can manually perform DTD validation against a parsed document, but it does not provide built-in DTD validation. You'll have to write your own l...
30,033
[ { "from": "human", "value": "I was wondering which of the built in python libraries, support DTD validation.\nI've been looking around and haven't been able to get a straight answer. I know ElementTree does NOT Support DTD validation.\nWhich ones do?\n" }, { "from": "gpt", "value": "In Python, t...
I've written an Access 2003 application to handle internal things at my company over the past couple years and we are talking about upgrading all of our computers to Office 2007 which means Access will be updated. Is this going to cause a problem for me?
Upgrading from Access 2003 to Access 2007 can introduce some potential issues, but many of them can be managed with proper planning. Here are a few considerations: 1. **File Format**: Access 2007 introduces a new file format (.accdb) which provides new features, but also means that your existing .mdb files will need t...
31,289
[ { "from": "human", "value": "I've written an Access 2003 application to handle internal things at my company over the past couple years and we are talking about upgrading all of our computers to Office 2007 which means Access will be updated. Is this going to cause a problem for me?\n" }, { "from":...
We need to handle this event in the base form, regardless of which controls currently have focus. We have a couple of global key commands that need to work regardless of control focus. This works by handling the PreviewKeyDown event in the form normally. When we add a user control to the form, the event no longer fire...
When you have a user control on a form, it's common for events like `PreviewKeyDown` to be handled by the user control instead of bubbling up to the form. This is because the user control may be handling key events for its own purpose. Here are a few approaches you can take to ensure that your global key commands work ...
29,694
[ { "from": "human", "value": "We need to handle this event in the base form, regardless of which controls currently have focus. We have a couple of global key commands that need to work regardless of control focus.\nThis works by handling the PreviewKeyDown event in the form normally. When we add a user con...
I want to check in Transact SQL if a specific column in a table has statistics and if so to get them all.
In Transact-SQL (T-SQL), you can check if a specific column in a table has statistics by querying the system catalog views. You can use the `sys.stats` and `sys.stats_columns` views to determine if statistics exist for a specific column and retrieve information about those statistics. Here is an example query that che...
30,704
[ { "from": "human", "value": "I want to check in Transact SQL if a specific column in a table has statistics and if so to get them all.\n" }, { "from": "gpt", "value": "In Transact-SQL (T-SQL), you can check if a specific column in a table has statistics by querying the system catalog views. You ...
I'm wondering if it's possible to embed Ruby as a scripting language in Microsoft XNA, and what's the best way to do that. I'm looking for something like Xnua, except for Ruby. I've stumbled upon Ruby.NET and IronRuby and both seem to be in very early stages, so I'm not sure how usable they are. Furthermore, I'm not s...
Embedding Ruby as a scripting language in Microsoft XNA is a challenging task, primarily due to the limitations of the XNA framework and the specific requirements for running on the Xbox 360. However, let's explore the possibilities and the best approaches to achieve this. ### Options for Embedding Ruby: 1. **IronRub...
32,537
[ { "from": "human", "value": "I'm wondering if it's possible to embed Ruby as a scripting language in Microsoft XNA, and what's the best way to do that. I'm looking for something like Xnua, except for Ruby. \nI've stumbled upon Ruby.NET and IronRuby and both seem to be in very early stages, so I'm not sure h...
My Situation: I love e editor, however I'm on a new computer and my license is being used on my old one. I can't exactly afford another license, so I'm looking for a free editor that meets the follow criteria: Decent syntax highlighting Ability to view a directory and its contents on the side panel, without the need t...
Based on your requirements, here are a few free code editors you might want to consider: 1. **Visual Studio Code**: - **Syntax Highlighting**: Yes, supports various languages. - **Directory View**: You can open a folder directly without creating a project. - **Theming**: Dark themes available and customizable...
25,131
[ { "from": "human", "value": "My Situation: I love e editor, however I'm on a new computer and my license is being used on my old one. I can't exactly afford another license, so I'm looking for a free editor that meets the follow criteria:\n\nDecent syntax highlighting\nAbility to view a directory and its co...
What is the best way to approach removing items from a collection in C#, once the item is known, but not it's index. This is one way to do it, but it seems inelegant at best. //Remove the existing role assignment for the user. int cnt = 0; int assToDelete = 0; foreach (SPRoleAssignment spAssignment in workspace.RoleAs...
If you're looking to remove an item from a collection in C# without explicitly looping through it and keeping track of indexes, you can utilize LINQ (Language Integrated Query) to make your code cleaner and more expressive. For instance, if you're dealing with a collection of `SPRoleAssignment` objects and you want t...
30,377
[ { "from": "human", "value": "What is the best way to approach removing items from a collection in C#, once the item is known, but not it's index. This is one way to do it, but it seems inelegant at best.\n//Remove the existing role assignment for the user.\nint cnt = 0;\nint assToDelete = 0;\nforeach (SPRo...
I manage a small group and I'd keep my work breakdown in project. However, it's difficult to provide my team with an adequate view into the project and ability to report on their progress. I looked at MS Project Server (the sharepoint webpart) but it's an expensive proposition. Has anyone had any experience with any ...
There are several web-based project management tools that can help your team view and report on their work while being cost-effective alternatives to MS Project Server. Here are some options you might consider: 1. **Monday.com**: This tool is very visual and user-friendly. It allows teams to track their progress throu...
29,826
[ { "from": "human", "value": "I manage a small group and I'd keep my work breakdown in project. However, it's difficult to provide my team with an adequate view into the project and ability to report on their progress. I looked at MS Project Server (the sharepoint webpart) but it's an expensive proposition...
Just forgot the command which I used to execute at DOS Prompt to list all running CLR instances on a Machine. Anyone remembers it??
To list all running Common Language Runtime (CLR) instances on a machine, you can use the `clrstack` utility that comes with the .NET Framework's debugging tools. However, if you're looking for a command in a more general sense, you might be looking for one of the following commands based on your context: 1. **Using t...
32,079
[ { "from": "human", "value": "Just forgot the command which I used to execute at DOS Prompt to list all running CLR instances on a Machine. Anyone remembers it??\n" }, { "from": "gpt", "value": "To list all running Common Language Runtime (CLR) instances on a machine, you can use the `clrstack` u...
I would like to set some initial variables (like format compact and the current directory) automatically on each startup of Matlab. How can I do that?
To set some initial variables and configurations automatically every time you start MATLAB, you can use the `startup.m` file. Here's how you can create and configure this file: 1. **Locate or Create the `startup.m` File**: - MATLAB looks for a file named `startup.m` in its current directory or in a directory that ...
30,663
[ { "from": "human", "value": "I would like to set some initial variables (like format compact and the current directory) automatically on each startup of Matlab.\nHow can I do that?\n" }, { "from": "gpt", "value": "To set some initial variables and configurations automatically every time you star...
Is there any benefit on Windows to use the WSA winsock functions compared to the BSD-style ones?
Yes, there are several benefits and considerations when using Windows Sockets API (Winsock) functions compared to BSD-style sockets on Windows. Here are some key points: ### Benefits of Using Winsock on Windows: 1. **Native Support**: Winsock is specifically designed for Windows and provides APIs that are optimized f...
30,875
[ { "from": "human", "value": "Is there any benefit on Windows to use the WSA winsock functions compared to the BSD-style ones?\n" }, { "from": "gpt", "value": "Yes, there are several benefits and considerations when using Windows Sockets API (Winsock) functions compared to BSD-style sockets on Wi...
I am using T4 to generate some screens and middle-tier code for a project, and would like to use Linq to simplify some of my template code. However, when I try to use Linq, the template reports a syntax error.
When using T4 templates, there are some nuances regarding syntax that you need to consider, especially when incorporating LINQ queries. Here are a few tips to help you resolve syntax errors when using LINQ in T4 templates: 1. **Using `<# ... #>` Blocks**: Make sure that your LINQ queries are placed inside `<# ... #>` ...
28,363
[ { "from": "human", "value": "I am using T4 to generate some screens and middle-tier code for a project, and would like to use Linq to simplify some of my template code. However, when I try to use Linq, the template reports a syntax error.\n" }, { "from": "gpt", "value": "When using T4 templates...
I want to make a generic class that accepts only serializable classes, can it be done with the where constraint? The concept I'm looking for is this: public class MyClass<T> where T : //[is serializable/has the serializable attribute]
In C#, you cannot directly enforce a constraint on a generic type parameter to ensure that it is marked with the `[Serializable]` attribute using the `where` constraint. The `where` clause only supports constraints for reference types, value types, and specific interfaces, but not attributes. However, there is a commo...
30,371
[ { "from": "human", "value": "I want to make a generic class that accepts only serializable classes, can it be done with the where constraint?\nThe concept I'm looking for is this:\npublic class MyClass<T> where T : //[is serializable/has the serializable attribute]\n\n" }, { "from": "gpt", "valu...
I have the following sql query for transforming data but is it possible to save the value of the int in some variable to avoid casting multiple times? update prospekts set sni_kod = case when cast(sni_kod as int) >= 1000 and cast(sni_kod as int) <= 1499 or cast(sni_kod as int) >= 1600 and cast(sni_kod as int...
In SQL Server 2000, you can't declare variables in a single UPDATE statement, but you can use a Common Table Expression (CTE) or a subquery to simplify your query. However, SQL Server 2000 does not support CTEs. Instead, you can use a derived table (subquery) in the `FROM` clause of your `UPDATE` statement to avoid mul...
31,810
[ { "from": "human", "value": "I have the following sql query for transforming data but is it possible to save the value of the int in some variable to avoid casting multiple times?\nupdate prospekts set sni_kod = case\n\nwhen \n cast(sni_kod as int) >= 1000 and cast(sni_kod as int) <= 1499 \n or cast(s...
I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords in console input (the TTY) rather than stdin or the command line. Does anybody know a solution? Setting up password-less sudo is not an option. expect could be an option, but it's not present on my stripped-down system.
When you need to handle command-line operations that require passwords, like `su`, `sudo`, or `ssh`, and you can't use tools like `expect`, you'll need to rely on alternative methods. Here are a few suggestions: ### 1. Using `read` with `/dev/tty` You can read the password directly from `/dev/tty` to ensure it goes t...
29,134
[ { "from": "human", "value": "I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords in console input (the TTY) rather than stdin or the command line.\nDoes anybody know a solution?\nSetting up password-less sudo is not an option.\nexpect could be an option, but it'...
As I don't use vi all that much and certainly not for my primary editor, I can't remember any of the vi commands. Does anyone have a recommendation for a quick start guide or command summary?
Certainly! Here’s a quick reference guide to get you started with `vi` (or `vim`, which is an improved version of `vi`). This guide includes basic commands to help you edit text efficiently. ### Quick Start Guide to `vi` #### Starting and Exiting `vi` - **Open a file:** `vi filename` - **Switch to insert mode:** Pres...
28,362
[ { "from": "human", "value": "As I don't use vi all that much and certainly not for my primary editor, I can't remember any of the vi commands. Does anyone have a recommendation for a quick start guide or command summary?\n" }, { "from": "gpt", "value": "Certainly! Here’s a quick reference guide...
In CSS, with: @page { @top-right { content: "Page " counter(page) " of " counter(pages); } } I can have page numbers displayed at the top of every page when the page is printed. This works great. But now, how can I make it so the page number starts with 2 instead of 1? Can I do that by modifying the CSS rule above?
In CSS, the `counter()` function does not provide a direct way to set a starting number for page counters. The `counter(page)` function will always start counting from 1 for the first page. However, you can achieve your goal using a little workaround in your content generation. You can adjust the displayed page number...
32,429
[ { "from": "human", "value": "In CSS, with:\n@page { @top-right { content: \"Page \" counter(page) \" of \" counter(pages); } }\n\nI can have page numbers displayed at the top of every page when the page is printed. This works great. But now, how can I make it so the page number starts with 2 instead of 1? C...
I have an app that executes commands on a Linux server via SSH just fine. When I connect to a Solaris server, things don't work. It seems that the Solaris command line is limited to 267 characters. Is there a way to change this? Update: As was pointed out before, this is a limit to the default shell for Solaris (sh)...
On Solaris, the default shell, `sh`, indeed has a command length limitation that can restrict the number of characters you can pass in a command. Unlike `bash` on Linux, which allows for longer command lengths, `sh` has a more constrained maximum command line length, generally around 267 characters. While you cannot c...
31,640
[ { "from": "human", "value": "I have an app that executes commands on a Linux server via SSH just fine. When I connect to a Solaris server, things don't work. It seems that the Solaris command line is limited to 267 characters.\nIs there a way to change this?\nUpdate: As was pointed out before, this is a ...
I'm wondering if it is possible to deploy Windows Media Foundation without Windows media player 10 or 11? Here's the context. I have a WPF application running in a corporate enterprise setting. WPF requires Windows Media Foundation for rich media support. Windows Media Foundation is distributed via Windows media player...
Windows Media Foundation (WMF) is integrated into the Windows operating system starting from Windows Vista and is designed to provide rich media capabilities for applications, including those built on WPF. However, it is essential to understand that while WMF is part of the Windows operating system, it is also tightly ...
30,702
[ { "from": "human", "value": "I'm wondering if it is possible to deploy Windows Media Foundation without Windows media player 10 or 11?\nHere's the context. I have a WPF application running in a corporate enterprise setting. WPF requires Windows Media Foundation for rich media support. Windows Media Foundati...
I'm trying to drop a SQL Server database using the following code: SqlCommand command = new SqlCommand("USE MASTER; ALTER DATABASE @database SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE @Database", connection); command.Parameters.AddWithValue("@database", TestingEnvironment.DatabaseName); command.ExecuteNonQu...
The problem you're facing is due to the way you're using parameters in your SQL command. SQL Server does not allow you to use parameters for identifiers such as database names in dynamic SQL statements. In your case, `@database` cannot be used as a placeholder for the database name in the `ALTER DATABASE` and `DROP DAT...
30,601
[ { "from": "human", "value": "I'm trying to drop a SQL Server database using the following code:\nSqlCommand command = new SqlCommand(\"USE MASTER; ALTER DATABASE @database SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE @Database\", connection);\ncommand.Parameters.AddWithValue(\"@database\", Testing...
I've been trying to come up with a way to write generic repositories that work against various data stores: public interface IRepository { IQueryable<T> GetAll<T>(); void Save<T>(T item); void Delete<T>(T item); } public class MemoryRepository : IRepository {...} public class SqlRepository : IRepository {.....
Both approaches you are considering for implementing generic repositories have their own advantages and disadvantages. Let's break them down: ### 1. The First Approach #### Feasibility: Your first approach defines a generic repository interface `IRepository` without type constraints for its methods. You can certainly...
31,139
[ { "from": "human", "value": "I've been trying to come up with a way to write generic repositories that work against various data stores:\npublic interface IRepository\n{\n IQueryable<T> GetAll<T>();\n void Save<T>(T item);\n void Delete<T>(T item);\n}\npublic class MemoryRepository : IRepository {....
Ok, so I have a Rails app set up on DreamHost and I had it working a while ago and now it's broken. I don't know a lot about deployment environments or anything like that so please forgive my ignorance. Anyway, it looks like the app is crashing at this line in config/environment.rb: require File.join(File.dirname(__F...
It sounds like you're facing an issue where your Rails application isn't booting correctly after some recent changes or updates. Since you're not getting any specific error messages, here are some troubleshooting steps you can follow to identify and possibly resolve the issue: ### 1. Check the Server Logs Even though...
30,045
[ { "from": "human", "value": "Ok, so I have a Rails app set up on DreamHost and I had it working a while ago and now it's broken. I don't know a lot about deployment environments or anything like that so please forgive my ignorance. Anyway, it looks like the app is crashing at this line in config/environme...
I have a page where a few textboxes cannot be empty before clicking a Save button. <TextBox... <TextBox.Text> <Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <local:StringRequiredValida...
To disable the Save button until all validation errors on your text boxes are resolved, you can utilize the `Validation.HasError` property in combination with a `MultiBinding` or use a combination of properties in your ViewModel if you are following the MVVM pattern. ### Option 1: Using `MultiBinding` If you have mu...
25,012
[ { "from": "human", "value": "I have a page where a few textboxes cannot be empty before clicking a Save button. \n<TextBox...\n\n <TextBox.Text>\n <Binding Path =\"LastName\" UpdateSourceTrigger=\"PropertyChanged\">\n\n <Binding.ValidationRules>\n ...
Can someone tell me how i can change the .xml file that a flash movie loads using c#. ie: i would like an ActionScript variable that defines the location of the flash movie. I would like to be able to change this variable using c# if possible. i dont really know how it would look, but something like: <object xmlpath='...
To achieve the goal of loading a dynamic XML file in a Flash movie using C#, you can pass the XML path as a variable from your C# application to the Flash movie via the HTML object embedding. The process involves embedding the Flash movie in your web page or application and specifying a parameter that the Flash movie c...
27,080
[ { "from": "human", "value": "Can someone tell me how i can change the .xml file that a flash movie loads using c#. ie: i would like an ActionScript variable that defines the location of the flash movie. I would like to be able to change this variable using c# if possible.\ni dont really know how it would l...
C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declarations don't work correctly. Hence, this is OK in C, but not ...
To efficiently translate your C code into C++ while maintaining the semantics of the enumeration for bit flags, you can create a scoped enumeration (`enum class`) along with operator overloads for bitwise operations. This method retains the debugging-friendly nature of using the enumeration while ensuring the code is c...
29,821
[ { "from": "human", "value": "C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declarations don't work co...
We're working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this: master alice/branch1 alice/branch2 bob/branch1 michael/feature release/1.0 release/1.1 Working locally in my tree I have topic/feature, which corre...
To simplify your workflow with pushing and pulling changes to and from the remote repository while ensuring that the naming conventions are followed, you can modify your `.git/config` and set up a remote that uses a different fetch refspec. Here's how you can do that step by step. ### Step 1: Configure a New Remote Y...
30,253
[ { "from": "human", "value": "We're working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this:\nmaster\nalice/branch1\nalice/branch2\nbob/branch1\nmichael/feature\nrelease/1.0\nrelease/1.1\nWorking loc...
It seems like there is a lot of overhead involved in rapidly opening and closing sqlconnections. Should I persist a connection (one, per client, per database), or continue declaring a new sqlconnection object whenever I need one, and making sure I clean up after myself? What have you done? What worked well and what wor...
The decision to persist SQL connections versus opening and closing them as needed depends on several factors, including your application's architecture, performance requirements, and the specific database technology you are using. Below are some considerations for both approaches along with best practices that have wor...
29,564
[ { "from": "human", "value": "It seems like there is a lot of overhead involved in rapidly opening and closing sqlconnections. Should I persist a connection (one, per client, per database), or continue declaring a new sqlconnection object whenever I need one, and making sure I clean up after myself?\nWhat ha...
Currently I have a structure like this: A | +--B | +--C It's mapped with one table per subclass using joined tables. For historic reasons I also use a discriminator, so the current situation is as described in Section 9.1.3 of the Hibernate manual. Question: How do I extend the mapping for a structure like this: A | +...
In Hibernate, you can indeed create a subclass of a subclass in a hierarchical structure like the one you've described. In your case, you want to extend the mapping to include class `D` as a subclass of class `B`, while still maintaining the existing hierarchy. To achieve this, you will use Hibernate's mapping feature...
28,147
[ { "from": "human", "value": "Currently I have a structure like this:\nA\n|\n+--B\n|\n+--C\n\nIt's mapped with one table per subclass using joined tables. For historic reasons I also use a discriminator, so the current situation is as described in Section 9.1.3 of the Hibernate manual.\nQuestion: How do I ex...
// goal: update Address record identified by "id", with new data in "colVal" string cstr = ConnectionApi.GetSqlConnectionString("SwDb"); // get connection str using (DataContext db = new DataContext(cstr)) { Address addr = (from a in db.GetTable<Address>() where a.Id == id s...
It looks like you're attempting to update an address record in a database using LINQ to SQL. The code you've provided generally appears to be correct, but there could be a few issues that may cause `SubmitChanges()` to not produce the expected result. Let's go through some potential reasons and solutions: 1. **Connect...
25,704
[ { "from": "human", "value": "// goal: update Address record identified by \"id\", with new data in \"colVal\"\n\nstring cstr = ConnectionApi.GetSqlConnectionString(\"SwDb\"); // get connection str\nusing (DataContext db = new DataContext(cstr)) {\n Address addr = (from a in db.GetTable<Address>()\n ...
I want to check for empty arrays. Google gave me varied solutions but nothing worked. Maybe I am not applying them correctly. Function GetBoiler(ByVal sFile As String) As String 'Email Signature Dim fso As Object Dim ts As Object Set fso = CreateObject("Scripting.FileSystemObject") Set ts = fso.GetFile(...
To prevent calling the `GetBoiler` function when the `FileNamesList` array is empty, you should check if the array has any elements before you try to access its contents. In VBA, you can safely check if an array is empty by using the `IsEmpty()` function or checking its size with `UBound()`. Here's an updated version ...
30,328
[ { "from": "human", "value": "I want to check for empty arrays. Google gave me varied solutions but nothing worked. Maybe I am not applying them correctly.\nFunction GetBoiler(ByVal sFile As String) As String\n'Email Signature\n Dim fso As Object\n Dim ts As Object\n Set fso = CreateObject(\"Scripti...
Please write a list of tasks that a copy constructor and assignment operator need to do in C++ to keep exception safety, avoid memory leaks etc.
In C++, when implementing a copy constructor and an assignment operator, it's crucial to ensure exception safety and manage memory appropriately to avoid leaks and undefined behavior. Below is a list of tasks that should be performed in both a copy constructor and an assignment operator to achieve these goals: ### Cop...
24,373
[ { "from": "human", "value": "Please write a list of tasks that a copy constructor and assignment operator need to do in C++ to keep exception safety, avoid memory leaks etc. \n" }, { "from": "gpt", "value": "In C++, when implementing a copy constructor and an assignment operator, it's crucial to...
I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?
To detect vigorous shaking of an iPhone in your app, you can use the `CMMotionManager` class from the Core Motion framework. This allows you to access the device's accelerometer data, which can be used to identify a shake gesture. Here’s a step-by-step guide on how to implement this: 1. **Import the Core Motion frame...
28,451
[ { "from": "human", "value": "I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?\n" }, { "from": "gpt", "value": "To detect vigorous shaking of an iPhone in ...
How can I check if a given string is a valid URL address? My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.
Checking if a given string is a valid URL can indeed be complex due to the variety of valid URL formats. However, you can use regular expressions to create a simple and effective method for validating URLs. Here's a straightforward approach using a regular expression in Python. The regex pattern here checks for common...
27,577
[ { "from": "human", "value": "How can I check if a given string is a valid URL address?\nMy knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.\n" }, { "from": "gpt", "value": "Checking if a given string i...
In C#, is it possible to extend a class that has no constructors? Maybe I'm thinking about this incorrectly and just need a kick in the crotch. I have a Silverlight class that extends System.Windows.Media.Transform, With the official release of Silverlight 2, Transform now has no constructor. So, when I compile my c...
In C#, when you attempt to extend a class that does not have any public or protected constructors, you may run into issues if you need to instantiate that class within your derived class. Since `System.Windows.Media.Transform` does not expose any constructors, you can't directly instantiate it from your derived class. ...
31,935
[ { "from": "human", "value": "In C#, is it possible to extend a class that has no constructors?\nMaybe I'm thinking about this incorrectly and just need a kick in the crotch. I have a Silverlight class that extends System.Windows.Media.Transform, With the official release of Silverlight 2, Transform now ha...