instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
How do you know if the HTTP compression setup is working? Is there any tool I can use to see the compressed page before it is uncompressed by the browser? Are there any tools to measure the amount compressed and response speed?
To check if HTTP compression is working correctly and to analyze the effectiveness of your setup, you can use various tools and techniques. Here are some methods and tools you can use: ### 1. Browser Developer Tools Most modern browsers have built-in developer tools that can help you analyze HTTP responses, including ...
20,102
[ { "from": "human", "value": "How do you know if the HTTP compression setup is working? Is there any tool I can use to see the compressed page before it is uncompressed by the browser? Are there any tools to measure the amount compressed and response speed?\n" }, { "from": "gpt", "value": "To che...
What libraries and/or packages have you used to create blog posts with code blocks? Having a JavaScript library that would support line numbers and indentation is ideal.
To create blog posts with code blocks in JavaScript, there are several libraries and packages that can help you format and display code with features such as syntax highlighting, line numbers, and proper indentation. Here are some popular options: 1. **Prism.js**: - Prism is a lightweight, extensible syntax highlig...
16,684
[ { "from": "human", "value": "What libraries and/or packages have you used to create blog posts with code blocks? Having a JavaScript library that would support line numbers and indentation is ideal.\n" }, { "from": "gpt", "value": "To create blog posts with code blocks in JavaScript, there are ...
What is the best way to create a clone of a DTO? There is not an ICloneable interface or a BinaryFormatter class in Silverlight. Is reflection the only way?
Creating a clone of a Data Transfer Object (DTO) in Silverlight, where options like `ICloneable` and `BinaryFormatter` are not available, can indeed be achieved, but reflection is not the only way. Here are some alternatives to consider: ### 1. Manual Cloning The simplest and often most efficient way is to manually im...
19,287
[ { "from": "human", "value": "What is the best way to create a clone of a DTO? There is not an ICloneable interface or a BinaryFormatter class in Silverlight. Is reflection the only way?\n" }, { "from": "gpt", "value": "Creating a clone of a Data Transfer Object (DTO) in Silverlight, where opt...
Here's another C#/.NET question based merely on curiousity more than an immediate need ... If you had a Socket instance and you wanted to wrap it in the higher-level TcpClient class, is that possible and how would you do it? Conversely if you have an instance of TcpClient, is it possible to get the underlying Socket?
Yes, it is indeed possible to wrap a `Socket` instance in a higher-level `TcpClient` class, and conversely, you can retrieve the underlying `Socket` from an instance of `TcpClient`. ### Wrapping a `Socket` in a `TcpClient` To wrap an existing `Socket` instance in a `TcpClient`, you can create a new `TcpClient` and th...
19,600
[ { "from": "human", "value": "Here's another C#/.NET question based merely on curiousity more than an immediate need ...\nIf you had a Socket instance and you wanted to wrap it in the higher-level TcpClient class, is that possible and how would you do it?\nConversely if you have an instance of TcpClient, is ...
I don't know anything about XPIs but I've searched through the install.rdf, *.js, and *.xul files and found no reference to an array of flash versions, so I cannot clearly see where the version list comes from.
XPIs are packaged add-ons for Mozilla-based applications like Firefox and Thunderbird. The structure of an XPI file typically includes various files like `install.rdf`, JavaScript files, and XUL files, which define the add-on’s properties, UI, and functionality. When you mention an "array of flash versions," it's unc...
22,683
[ { "from": "human", "value": "I don't know anything about XPIs but I've searched through the install.rdf, *.js, and *.xul files and found no reference to an array of flash versions, so I cannot clearly see where the version list comes from.\n" }, { "from": "gpt", "value": "XPIs are packaged add-o...
How can I find the XY coordinates of an HTML element (DIV) from JavaScript if they were not explicitly set?
To find the XY coordinates of an HTML element (like a `<div>`) in JavaScript, you can use the `getBoundingClientRect()` method. This method provides the position of the element relative to the viewport, including properties for the top, right, bottom, left, width, and height of the element. Here’s how you can do it: ...
22,233
[ { "from": "human", "value": "How can I find the XY coordinates of an HTML element (DIV) from JavaScript if they were not explicitly set?\n" }, { "from": "gpt", "value": "To find the XY coordinates of an HTML element (like a `<div>`) in JavaScript, you can use the `getBoundingClientRect()` method...
I am retrieving multiple rows into a listview control from an ODBC source. For simple SELECTs it seems to work well with a statement attribute of SQL_SCROLLABLE. How do I do this with a UNION query (with two selects)? The most likely server will be MS SQL Server (probably 2005). The code is C for the Win32 API. This...
When working with ODBC and using UNION queries, the behavior of cursors can vary, and indeed, they are often treated as forward-only. This means that certain functionality, such as scrollable cursors, may not be available when executing a UNION query. Here’s a breakdown of what you can do and consider regarding your ...
15,058
[ { "from": "human", "value": "I am retrieving multiple rows into a listview control from an ODBC source. For simple SELECTs it seems to work well with a statement attribute of SQL_SCROLLABLE. How do I do this with a UNION query (with two selects)?\nThe most likely server will be MS SQL Server (probably 200...
How do you ensure that the project will be build with "good" design decisions enabling a flexible software architecture? How do you balance between completely leaving the architecture to the teams on one side, and let all architecture control to a few individuals on the other side? Do you have an "architecture group", ...
Ensuring that a project is built with "good" design decisions that facilitate a flexible software architecture is a multifaceted challenge that involves several strategies. Here are some key considerations and approaches: ### 1. Establish Clear Architectural Guidelines - **Define Principles and Standards:** Create a ...
20,692
[ { "from": "human", "value": "How do you ensure that the project will be build with \"good\" design decisions enabling a flexible software architecture?\nHow do you balance between completely leaving the architecture to the teams on one side, and let all architecture control to a few individuals on the other...
Is there a way to use .NET reflection to capture the values of all parameters/local variables?
In .NET, reflection allows you to inspect the metadata of types, methods, and properties, but it does not provide a direct way to capture the values of local variables or parameters at runtime. Local variables and method parameters are usually optimized away by the compiler and do not retain their values in a manner th...
20,531
[ { "from": "human", "value": "Is there a way to use .NET reflection to capture the values of all parameters/local variables?\n" }, { "from": "gpt", "value": "In .NET, reflection allows you to inspect the metadata of types, methods, and properties, but it does not provide a direct way to capture t...
Is it possible to use oracle instant client for application that use oraoledb driver for connecting to oracle 9i DB.
The Oracle Instant Client can be used to connect to an Oracle 9i database, but there are some considerations regarding the ORAOLEDB driver and compatibility. 1. **Oracle Instant Client**: The Oracle Instant Client is a lightweight, freely distributable version of the Oracle Database Client. It allows applications to c...
19,207
[ { "from": "human", "value": "Is it possible to use oracle instant client for application that use oraoledb driver for connecting to oracle 9i DB.\n" }, { "from": "gpt", "value": "The Oracle Instant Client can be used to connect to an Oracle 9i database, but there are some considerations regardin...
I am trying to get system date in a C program on a MSVC++ 6.0 compiler. I am using a system call: system("date /T") (output is e.g. 13-Oct-08 which is date on my system in the format i have set) but this prints the date to the i/o console. How do i make take this date as returned by above system call and store it a...
In MSVC++ 6.0, you can obtain the current system date in a more efficient way than using the `system()` call. Instead of calling an external program and capturing its output, you can use the Windows API to get the current date and format it as needed. Here’s an example of how you can get the system date and format it ...
19,518
[ { "from": "human", "value": "I am trying to get system date in a C program on a MSVC++ 6.0 compiler. I am using a system call:\nsystem(\"date /T\") (output is e.g. 13-Oct-08 which is date on my system in the format i have set) \nbut this prints the date to the i/o console. \nHow do i make take this date a...
I've been using OpenGL for years, but after trying to use D3D for the first time, I wasted a significant amount of time trying figure out how to make my scene lights stay fixed in the world rather than fixed on my objects. In OpenGL light positions get transformed just like everything else with the MODELVIEW matrix, so...
Your experience with setting up lights in OpenGL versus Direct3D is a common point of confusion for many developers transitioning between the two graphics APIs. Here’s a quick breakdown of how lighting works in each API and how to achieve fixed world lighting in Direct3D: ### OpenGL In OpenGL, you set the light posit...
20,019
[ { "from": "human", "value": "I've been using OpenGL for years, but after trying to use D3D for the first time, I wasted a significant amount of time trying figure out how to make my scene lights stay fixed in the world rather than fixed on my objects.\nIn OpenGL light positions get transformed just like eve...
On my team, we usually do string concatentation like this: var url = // some dynamically generated URL var sb = new StringBuffer(); sb.append("<a href='").append(url).append("'>click here</a>"); Obviously the following is much more readable: var url = // some dynamically generated URL var sb = "<a href='" + url + "'>c...
In Java, the `StringBuffer` (or `StringBuilder`, which is typically preferred in modern Java unless you need thread safety) is used for efficiently concatenating strings, especially in situations where the concatenation is done within a loop or involves multiple concatenations. Here’s a brief comparison: 1. **`Strin...
17,559
[ { "from": "human", "value": "On my team, we usually do string concatentation like this:\nvar url = // some dynamically generated URL\nvar sb = new StringBuffer();\nsb.append(\"<a href='\").append(url).append(\"'>click here</a>\");\n\nObviously the following is much more readable:\nvar url = // some dynamica...
I have a form that I would like to style. specifcally I would like to chnage the background color of the form item's label. (the backgorundColor attribute changes both the label and the inputs background color) i.e. <mx:Form> <mx:FormItem label="username:"> <mx:TextInput /> </mx:FormItem> </mx:Form> ...
Yes, it is possible to achieve a different background color for the label of a `FormItem` while keeping the background color of the `TextInput` as default. To do this, you can use a combination of CSS styles and a custom component. Here's an approach you can take: 1. **Create a custom FormItem class**: You can create...
19,254
[ { "from": "human", "value": "I have a form that I would like to style. specifcally I would like to chnage the background color of the form item's label. (the backgorundColor attribute changes both the label and the inputs background color)\ni.e.\n\n\n<mx:Form>\n <mx:FormItem label=\"username:\">\n ...
The Python standard lib comes with the module textwrap which provides a simple text wrapping functionality. Is there something comparable in the java standard library? in Python it is something like this: >>> t = "a really really long string with lots of characters" >>> import textwrap >>> textwrap.wrap(t, 20) ['a real...
Yes, Java's standard library has functionality that can be used for text wrapping, although it is not as straightforward as the `textwrap` module in Python. You can achieve similar functionality in Java using the `String` class along with a few utility methods. One common way to implement text wrapping in Java is to c...
20,811
[ { "from": "human", "value": "The Python standard lib comes with the module textwrap which provides a simple text wrapping functionality. Is there something comparable in the java standard library?\nin Python it is something like this:\n>>> t = \"a really really long string with lots of characters\"\n>>> imp...
I'm using Spring's support for JDBC. I'd like to use JdbcTemplate (or SimpleJdbcTemplate) to execute a query and obtain the result as an instance of ResultSet. The only way that I can see of achieving this is using: String sql = "select * from...."; SqlRowSet results = jdbcTemplate.queryForRowSet(sql); ((ResultSetWrapp...
When using Spring's JDBC support, the typical approach to executing a query and processing the results is to leverage `JdbcTemplate` to map the results to Java objects or collections. However, if you specifically need a `ResultSet` for passing to a tool like JasperReports, you can achieve this without assuming the unde...
20,611
[ { "from": "human", "value": "I'm using Spring's support for JDBC. I'd like to use JdbcTemplate (or SimpleJdbcTemplate) to execute a query and obtain the result as an instance of ResultSet.\nThe only way that I can see of achieving this is using:\nString sql = \"select * from....\";\nSqlRowSet results = jdbc...
What application do you use to monitor HTTP communication on OS X?
On macOS, there are several applications you can use to monitor HTTP communication. Some popular options include: 1. **Charles Proxy**: A web debugging proxy application that enables you to view and analyze HTTP/HTTPS traffic between your computer and the internet. It provides powerful tools for debugging and monitori...
24,604
[ { "from": "human", "value": "What application do you use to monitor HTTP communication on OS X?\n" }, { "from": "gpt", "value": "On macOS, there are several applications you can use to monitor HTTP communication. Some popular options include:\n\n1. **Charles Proxy**: A web debugging proxy applic...
I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other: void f(int common1, int param1, int *out1); void g(int common1, int common2, int param1, int *out2) { f(common1, param1, ..)...
Encapsulating related parameters and operations in a class, as you've described, is a common design pattern in object-oriented programming. It can help improve code organization and readability by grouping related data and methods together. Here are some advantages and disadvantages of this approach: ### Advantages 1...
19,447
[ { "from": "human", "value": "I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other:\nvoid f(int common1, int param1, int *out1);\nvoid g(int common1, int common2, int pa...
How exactly can I create a new directory using Emacs? What commands do I use? (If possible, please provide an example)
In Emacs, you can create a new directory using the built-in command `make-directory`. Here's how you can do it: 1. **Open Emacs.** 2. **Access the command prompt:** You can do this by pressing `M-x` (where `M` usually stands for the `Alt` key on most keyboards). This will bring up the command prompt at the bottom of ...
21,494
[ { "from": "human", "value": "How exactly can I create a new directory using Emacs? What commands do I use? (If possible, please provide an example)\n" }, { "from": "gpt", "value": "In Emacs, you can create a new directory using the built-in command `make-directory`. Here's how you can do it:\n\n...
I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large <Table> with about 500 rows, the YUI render() function takes about a minute longer to run. When I open the same page without the layout manager it opens in less than a second. My only concern is with IE 7. I tried...
Using the YUI Layout Manager can introduce performance issues, especially with larger DOM elements like a table with many rows. Here are a few strategies to help you troubleshoot and potentially improve performance, especially for Internet Explorer 7: 1. **Examine Render Timing**: First, ensure that the slow performan...
20,299
[ { "from": "human", "value": "I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large <Table> with about 500 rows, the YUI render() function takes about a minute longer to run.\nWhen I open the same page without the layout manager it opens in less than a sec...
url = "http://example.com/file.xml" data = urllib2.urlopen(url) data.read() The question is, when exactly will the file be downloaded from the internet? When i do urlopen or .read()? On my network interface I see high traffic both times.
In the code you've provided, the process of downloading the file occurs in two stages: 1. **`urllib2.urlopen(url)`**: This method initiates the request to the specified URL and establishes a connection to the server. At this point, the HTTP headers are typically retrieved, but the file's content is not yet downloaded....
22,573
[ { "from": "human", "value": "url = \"http://example.com/file.xml\"\ndata = urllib2.urlopen(url)\ndata.read()\n\nThe question is, when exactly will the file be downloaded from the internet? When i do urlopen or .read()? On my network interface I see high traffic both times. \n" }, { "from": "gpt", ...
When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrieving column values: int id = rs.getInt("CUSTOMER_ID"); The best explanation I'v...
When using JDBC to interact with databases, you can retrieve column values from a `ResultSet` using either column indices or column labels (names). Each approach has its own advantages and disadvantages, which can impact readability, maintainability, and performance. Let's examine both methods: ### Retrieving by Colum...
19,540
[ { "from": "human", "value": "When using JDBC, I often come across constructs like \nResultSet rs = ps.executeQuery();\nwhile (rs.next()) {\n int id = rs.getInt(1);\n // Some other actions\n}\n\nI asked myself (and authors of code too) why not to use labels for retrieving column values: \nint id = rs...
What kind of collection I should use to convert NameValue collection to be bindable to GridView? When doing directly it didn't work. Code in aspx.cs private void BindList(NameValueCollection nvpList) { resultGV.DataSource = list; resultGV.DataBind(); } Code in aspx <asp:GridView ID="resultGV" runat="se...
To bind a `NameValueCollection` to a `GridView`, you can't directly set the `NameValueCollection` as the `DataSource`. You need to convert it into a more suitable collection type that the `GridView` can understand, such as a `List` of anonymous objects or a `DataTable`. Here are two common approaches: ### Approach 1:...
22,267
[ { "from": "human", "value": "What kind of collection I should use to convert NameValue collection to be bindable to GridView?\nWhen doing directly it didn't work.\nCode in aspx.cs\n private void BindList(NameValueCollection nvpList)\n {\n resultGV.DataSource = list;\n resultGV.DataBind();\n }\n\n...
Silverlight works on client side so putting any sensitive data like connection strings, passwords etc. in the code seems not to be a good thing. I want to build whole web app in Silverlight doing lots of authorization and database quering things. How to make it safe? Any tips&tricks and what things should I avoid?
Building a web application with Silverlight does present certain security challenges, particularly when handling sensitive information like connection strings and passwords. Since Silverlight applications run on the client side, it is essential to be cautious to avoid exposing sensitive data. Here are some tips and bes...
14,906
[ { "from": "human", "value": "Silverlight works on client side so putting any sensitive data like connection strings, passwords etc. in the code seems not to be a good thing. I want to build whole web app in Silverlight doing lots of authorization and database quering things. How to make it safe? Any tips&tr...
I am trying to capture output from an install script (that uses scp) and log it. However, I am not getting everything that scp is printing out, namely, the progress bar. screen output: Copying /user2/cdb/builds/tmp/uat/myfiles/* to server /users/myfiles as cdb cdb@server's password: myfile 100% |********...
Capturing the full output of `scp`, including the progress bar, can sometimes be tricky because `scp` uses a combination of standard output (stdout) and standard error (stderr) for its messages. You mentioned using `myscript.sh 2>&1 | tee mylogfile.log`, which captures both streams, but it may still not capture the pro...
18,979
[ { "from": "human", "value": "I am trying to capture output from an install script (that uses scp) and log it. However, I am not getting everything that scp is printing out, namely, the progress bar. \nscreen output:\n\nCopying\n /user2/cdb/builds/tmp/uat/myfiles/* to\n server /users/myfiles as cdb\ncdb@...
We are trying to build a High-Volume Orders Record System. There are three primary tables: 1. Orders 2. OrderDetails 3. OrderShipment The Shipment table contains n record per order and any record shipment entry can be changed before the Customer accepts th order, after which it is frozen. (A business requirement) Altho...
Dealing with `System.Data.Linq.ChangeConflictException` in LINQ to SQL can be challenging, especially when you're trying to implement a high-volume order record system that allows updates to the `OrderShipment` table before the order is accepted by the customer. Here are some strategies you can implement to mitigate th...
17,717
[ { "from": "human", "value": "We are trying to build a High-Volume Orders Record System.\nThere are three primary tables:\n1. Orders\n2. OrderDetails\n3. OrderShipment\nThe Shipment table contains n record per order and any record shipment entry can be changed before the Customer accepts th order, after whic...
I'd like to have a link for a user to join a Facebook group from within my Facebook application. Here is the link on Facebook's "display a group" page (minus a longer referrer part), but the group id is encrypted: http://www.new.facebook.com/group.php?sid=c431b3cfc02765def331081f8b71ffbd Anyone know how to either encry...
As of my last knowledge update in October 2023, Facebook does not provide a way to programmatically add users to groups or to encrypt group IDs for external linking. However, you can provide a direct link to the group that users can click to request to join. Here's how to create a link to your Facebook group: 1. **Fi...
22,764
[ { "from": "human", "value": "I'd like to have a link for a user to join a Facebook group from within my Facebook application.\nHere is the link on Facebook's \"display a group\" page (minus a longer referrer part), but the group id is encrypted:\nhttp://www.new.facebook.com/group.php?sid=c431b3cfc02765def33...
I'm writing a Rails plugin that builds up a menu in a view. I'm using link_to to build the link and current_page? to set class="active" on the current page. I've included ActionView::Helpers::UrlHelper so I can use link_to. To get current_page? working in the view, I've had to inherit the current class (apparently Acti...
It looks like the issue arises from how you are managing the context in which `link_to` and `current_page?` are being called. When you include `ActionView::Helpers::UrlHelper` directly in your `my_menu` class and try to access `@base.link_to` and `@base.current_page?`, it seems like the context that RSpec is using for ...
18,946
[ { "from": "human", "value": "I'm writing a Rails plugin that builds up a menu in a view. I'm using link_to to build the link and current_page? to set class=\"active\" on the current page.\nI've included ActionView::Helpers::UrlHelper so I can use link_to.\nTo get current_page? working in the view, I've had ...
I've looked at some of the Eclipse and Hibernate tutorials and the ones for Hibernate2 are pretty good, pretty intuitive. Recently I tried to setup Hibernate3, using the Eclipse plugin, and failed to get the Hibernate tools to work, outside of physically moving the jar files from the plugins directory to my lib direct...
Setting up Hibernate tools in Eclipse can sometimes be a bit tricky, but it shouldn't require manually moving JAR files. Here's a step-by-step guide to help you set up Hibernate 3 with Eclipse properly: ### Step 1: Install Eclipse IDE for Java EE Developers Ensure that you are using the Eclipse IDE for Java EE Develop...
16,946
[ { "from": "human", "value": "I've looked at some of the Eclipse and Hibernate tutorials and the ones for Hibernate2 are pretty good, pretty intuitive. Recently I tried to setup Hibernate3, using the Eclipse plugin, and failed to get the Hibernate tools to work, outside of physically moving the jar files fr...
I want to insert 'n' spaces (or any string) at the beginning of a string in C++. Is there a direct way to do this using either std::strings or char* strings? E.g., in Python you could simply do >>> "." * 5 + "lolcat" '.....lolcat'
In C++, there is no direct built-in function that replicates the exact behavior of Python's string multiplication, but you can achieve similar functionality quite easily using `std::string`. Below are examples of how you can insert a certain number of spaces (or any string) at the beginning of another string using both...
20,752
[ { "from": "human", "value": "I want to insert 'n' spaces (or any string) at the beginning of a string in C++. Is there a direct way to do this using either std::strings or char* strings?\nE.g., in Python you could simply do\n>>> \".\" * 5 + \"lolcat\"\n'.....lolcat'\n\n" }, { "from": "gpt", "val...
What is the best/fastest way to sort Alphanumeric fields?
Sorting alphanumeric fields can be challenging due to the mixed nature of the data. There are several approaches, and the best method often depends on the specific requirements of your use case, including the programming environment, the nature of your data, and performance considerations. Below are some common approac...
19,978
[ { "from": "human", "value": "What is the best/fastest way to sort Alphanumeric fields? \n" }, { "from": "gpt", "value": "Sorting alphanumeric fields can be challenging due to the mixed nature of the data. There are several approaches, and the best method often depends on the specific requiremen...
Some text before the code so that the question summary isn't mangled. class Tree { public event EventHandler MadeSound; public void Fall() { MadeSound(this, new EventArgs()); } static void Main(string[] args) { Tree oaky = new Tree(); oaky.Fall(); } } I haven't used events much in...
In C#, events are designed to provide a way for a class (the publisher) to notify other classes (the subscribers) when something of interest occurs. When you attempt to raise an event, it is indeed a common source of confusion regarding what happens when there are no subscribers to that event. Let's break down your qu...
21,275
[ { "from": "human", "value": "Some text before the code so that the question summary isn't mangled.\nclass Tree\n{\n public event EventHandler MadeSound;\n\n public void Fall() { MadeSound(this, new EventArgs()); }\n\n static void Main(string[] args)\n {\n Tree oaky = new Tree();\n ...
What parts of your application are not coded? I think one of the most obvious examples would be DB credentials - it's considered bad to have them hard coded. And in most of situations it is easy to decide if you want something to be externalized or coded.For me the rules are simple. Some part of the application should ...
You've raised some important points about when to externalize configuration in an application, and your rules for deciding what should be externalized are quite practical. Let me expand on your thoughts and provide some examples of benefits gained from externalizing configuration. ### Additional Guidelines for Externa...
19,960
[ { "from": "human", "value": "What parts of your application are not coded?\nI think one of the most obvious examples would be DB credentials - it's considered bad to have them hard coded. And in most of situations it is easy to decide if you want something to be externalized or coded.For me the rules are si...
I compile my project with VIsual Studio 2005 Express Edition, and get this linking error. Can anyone suggest how to solve that?
Certainly! To help you better with the linking error you're encountering in Visual Studio 2005 Express Edition, I'll need more specific information about the error message you're receiving. However, here are some common solutions for linking errors that might help: 1. **Check for Missing Libraries**: Ensure that all t...
21,455
[ { "from": "human", "value": "I compile my project with VIsual Studio 2005 Express Edition, and get this linking error. Can anyone suggest how to solve that?\n" }, { "from": "gpt", "value": "Certainly! To help you better with the linking error you're encountering in Visual Studio 2005 Express Edi...
I'm working on a query that needs to have some data rows combined based on date ranges. These rows are duplicated in all the data values, except the date ranges are split. For example the table data may look like StudentID StartDate EndDate Field1 Field2 1 9/3/2007 10/20/2007 3 True 1 ...
To achieve this result, we will need to use a SQL query that involves window functions and some logic to combine the date ranges based on the criteria given (combining ranges with a one-day gap). Here's how you can structure your SQL query: ```sql WITH CombinedRanges AS ( SELECT StudentID, StartDa...
18,033
[ { "from": "human", "value": "I'm working on a query that needs to have some data rows combined based on date ranges. These rows are duplicated in all the data values, except the date ranges are split. For example the table data may look like\nStudentID StartDate EndDate Field1 Field2\n1 ...
I've got the JSON coming back like this: { "responseData": [{ "responseData": { "translatedText": "elefante" }, "responseDetails": null, "responseStatus": 200 }, { "responseData": { "translatedText": "Burro" }, "responseDetails": null, "responseStatus": 200 }], "respo...
The issue you're facing stems from how your JSON structure is organized and how your `ResponseData` class is defined. In the JSON you provided, there is a nested structure, and the `translatedText` is located within another layer of the JSON, specifically inside the `responseData` property of each element in the `respo...
15,385
[ { "from": "human", "value": "I've got the JSON coming back like this:\n{\n \"responseData\": [{\n \"responseData\": {\n \"translatedText\": \"elefante\"\n },\n \"responseDetails\": null,\n \"responseStatus\": 200\n }, {\n \"responseData\": {\n \"translatedText\": \"Burro\"\n },...
I have a large 'Manager' class which I think is doing too much but I am unsure on how to divide it into more logical units. Generally speaking the class basically consists of the following methods: class FooBarManager { GetFooEntities(); AddFooEntity(..); UpdateFooEntity(..); SubmitFooEntity(..); GetFooType...
It sounds like you have a classic case of a class that has taken on too much responsibility and become bloated, often referred to as a "God Object." The principles of Single Responsibility and Separation of Concerns can guide you toward a more modular design. Here are some steps and design patterns you can use to refac...
18,932
[ { "from": "human", "value": "I have a large 'Manager' class which I think is doing too much but I am unsure on how to divide it into more logical units. \nGenerally speaking the class basically consists of the following methods:\n\nclass FooBarManager\n{\n GetFooEntities();\n AddFooEntity(..);\n UpdateFo...
I am developing a WebPart (it will be used in a SharePoint environment, although it does not use the Object Model) that I want to expose AJAX functionality in. Because of the nature of the environment, Adding the Script Manager directly to the page is not an option, and so must be added programmatically. I have attem...
The error message you're encountering indicates that you are trying to modify the control collection of the page at a point in the page lifecycle where it is not allowed. Specifically, adding controls to the page during the `Load` phase is not permitted. To correctly add the `ScriptManager` to the page from within a W...
20,650
[ { "from": "human", "value": "I am developing a WebPart (it will be used in a SharePoint environment, although it does not use the Object Model) that I want to expose AJAX functionality in. Because of the nature of the environment, Adding the Script Manager directly to the page is not an option, and so must...
I have been doing some remote development using emacs tramp and found that it was quite slow. Every time I save a file, it takes about 10 seconds to complete the save. So, now I am using rsync to transfer the files remotely and it works much faster, it takes about a second plus the local saves from emacs are instant....
Using TRAMP (Transparent Remote (file) Access, Multiple Protocols) with Emacs can sometimes lead to slow performance, particularly over certain protocols or when the network latency is high. There are some configuration options and practices you can consider to improve TRAMP's performance, as well as some advantages to...
16,726
[ { "from": "human", "value": "I have been doing some remote development using emacs tramp and found that it was quite slow. Every time I save a file, it takes about 10 seconds to complete the save. So, now I am using rsync to transfer the files remotely and it works much faster, it takes about a second plu...
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's https://stackoverflow.com/a/19799236/8479 What's a Windows command line statement(s) I can use to get the cu...
To create a .bat file that generates a timestamp in the desired `yyyy-mm-dd_HHMM` format, you can simplify the process with the following script. This approach handles the date and time formatting directly in the batch file, ensuring compatibility across different regional settings without relying on additional tools. ...
19,563
[ { "from": "human", "value": "Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's https://stackoverflow.com/a/19799236/8479\n\nWhat's a Windows comman...
I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware based solution to offloading the work. I have done some surfing to find out, an...
For offloading cryptographic operations like hashing, signing, and both symmetric and asymmetric encryption, you have several options that extend beyond SSL-focused solutions. Here are some suggestions: ### 1. **Hardware Security Modules (HSMs)** HSMs are specialized hardware devices designed for the secure generatio...
18,593
[ { "from": "human", "value": "I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware based solution to offloading the work. ...
I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice.
Certainly! Let's break it down for you. ### What are RFCs (Request for Comments)? **RFCs** are a series of memoranda describing methods, behaviors, investigations, or advances related to the operation of the Internet and Internet-connected systems. They were originally initiated in the early days of the Internet to s...
18,251
[ { "from": "human", "value": "I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice. \n" }, { "fr...
Is there a way to automatically increment the "minimum required version" fields in a ClickOnce deployment to always equal the current build number? Basically, I always want my deployment to be automatically updated at launch. I suspect I'm going to need a some pre-/post-build events, but I hope there's an easier way.
Automatically incrementing the "minimum required version" field in a ClickOnce deployment to match the current build number can be achieved through a few steps in your project file, but it's not as straightforward as some settings may suggest. However, you can accomplish this goal effectively with a combination of proj...
19,115
[ { "from": "human", "value": "Is there a way to automatically increment the \"minimum required version\" fields in a ClickOnce deployment to always equal the current build number? Basically, I always want my deployment to be automatically updated at launch.\nI suspect I'm going to need a some pre-/post-build...
I can connect to my SQL Server database via sqlcmd from a DOS command window, but not from a Cygwin window. From DOS: F:\Cygnus>sqlcmd -Q "select 'a test'" -S .\SQLEXPRESS a test (1 rows affected) F:\Cygnus> ==================================================== From Cygwin: $ sqlcmd -Q "select 'a test'" -S .\SQLEXPRE...
The issue you're facing is likely due to the way Cygwin handles paths and the connection to SQL Server. Here are some steps to help you troubleshoot and resolve the connection problem when using `sqlcmd` in Cygwin: ### 1. Use the Correct SQL Server Instance Name In the DOS command prompt, you use `-S .\SQLEXPRESS`, w...
11,184
[ { "from": "human", "value": "I can connect to my SQL Server database via sqlcmd from a DOS command window, but not from a Cygwin window. From DOS:\nF:\\Cygnus>sqlcmd -Q \"select 'a test'\" -S .\\SQLEXPRESS\n\n\na test\n(1 rows affected)\nF:\\Cygnus>\n\n====================================================\nF...
I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried: Watching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't. Misses other ways the dropdown could disappear (pressing escape, tabbing to an...
To detect when a select element's dropdown is not visible, you can use a combination of focus and blur events, along with the `mousedown` event. This approach accounts for different ways a user might interact with the dropdown, such as clicking, tabbing, or pressing the Escape key. Here's an example of how you can imp...
18,869
[ { "from": "human", "value": "I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried:\n\nWatching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't. Misses other ways the dropdown coul...
The MEF team keep saying it is about plug-in model. So, are we talking about UI plugins? How can we use this stuff in non-UI code? I downloaded the code and the examples are all about GUI. Am I guessing it wrong?
It sounds like you're referring to the MEF (Managed Extensibility Framework), which is a part of the .NET framework that allows for creating extensible applications through a plug-in architecture. While MEF is often discussed in the context of UI applications, particularly in WPF (Windows Presentation Foundation) appli...
15,781
[ { "from": "human", "value": "The MEF team keep saying it is about plug-in model. So, are we talking about UI plugins? How can we use this stuff in non-UI code? \nI downloaded the code and the examples are all about GUI. Am I guessing it wrong?\n" }, { "from": "gpt", "value": "It sounds like you'...
I'm running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I'd also like to return 1 column of random numbers along with them. I tried this: select column1, column2, floor(rand() * 10000) as column3 from table1 Which kinda works, but the problem is that this query return...
In SQL Server, when you use the `RAND()` function, it generates a single random number per query execution. As a result, when you call it within your `SELECT` statement, all rows in the result set will receive the same random number. To generate a unique random number for each row, you can use a combination of `NEWID(...
14,626
[ { "from": "human", "value": "I'm running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I'd also like to return 1 column of random numbers along with them. I tried this:\nselect column1, column2, floor(rand() * 10000) as column3 \nfrom table1\n\nWhich kinda wor...
Sometimes when using eclipse it loses references to the JRE. i.e. It cannot find classes like Object or Arraylist. Some projects report a problem while others don't and they both use the same JRE. I have found that if you switch the installed JRE to another and then back again to the one you want to use, it will then w...
The issue you're experiencing in Eclipse where it loses references to the JRE can be frustrating. Here are several steps you can take to address and potentially prevent this problem: 1. **Check Project Build Path:** - Right-click on the project in the Project Explorer. - Go to `Build Path` > `Configure Build Pat...
18,736
[ { "from": "human", "value": "Sometimes when using eclipse it loses references to the JRE.\ni.e. It cannot find classes like Object or Arraylist.\nSome projects report a problem while others don't and they both use the same JRE.\nI have found that if you switch the installed JRE to another and then back agai...
A couple of the options are: $connection = {my db connection/object}; function PassedIn($connection) { ... } function PassedByReference(&$connection) { ... } function UsingGlobal() { global $connection; ... } So, passed in, passed by reference, or using global. I'm thinking in functions that are only used w...
In your scenario, you are weighing the pros and cons of different approaches to managing your database connection within your PHP functions. Let’s break down your options: 1. **Passed In**: - This is the most common and recommended practice for function parameters. You explicitly pass the `$connection` variable to...
22,463
[ { "from": "human", "value": "A couple of the options are:\n$connection = {my db connection/object};\n\nfunction PassedIn($connection) { ... }\n\nfunction PassedByReference(&$connection) { ... }\n\nfunction UsingGlobal() {\n global $connection;\n ...\n}\n\nSo, passed in, passed by reference, or using g...
Trying to include ThickBox (from http://jquery.com/demo/thickbox/) in an ASP.NET application. Visual Studio is failing when I try to run the application with the error: js\ThickBox\jquery-1.2.6.min.js(11): error CS1056: Unexpected character '$' Using Visual Studio 2008 and jquery 1.2.6
The error you're encountering seems to stem from how Visual Studio is interpreting the JavaScript file. The `CS1056: Unexpected character '$'` error indicates that the Visual Studio compiler is mistakenly trying to compile JavaScript code as C#. This typically happens when files with a `.js` extension are incorrectly i...
20,384
[ { "from": "human", "value": "Trying to include ThickBox (from http://jquery.com/demo/thickbox/) in an ASP.NET application.\nVisual Studio is failing when I try to run the application with the error:\njs\\ThickBox\\jquery-1.2.6.min.js(11): error CS1056: Unexpected character '$'\nUsing Visual Studio 2008\nand...
I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks
In Visual Studio 2005, the Create GUID utility is actually a separate tool that can be accessed from a specific menu item, but it may not be directly available in the Tools menu as you would expect. Here's how you can find and use the Create GUID tool in Visual Studio 2005: 1. **Check the Tools Menu**: - Open Visua...
21,344
[ { "from": "human", "value": "I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks\n" }, { "from": "gpt", "value": "In Visual Studio 2005, the Crea...
I have a web application that generates a long report and I need to print it. If I just print the page it will break at the end of the physical page. How can I calculate where to make a break in the web page so that the page breaks line up with the physical pages when they print?
To ensure that your web application generates a long report that prints correctly across physical pages, you'll want to control page breaks using CSS for print media. Here are the steps to help you calculate and manage page breaks effectively: ### 1. Use CSS for Print Media You can use CSS to define how your content ...
19,283
[ { "from": "human", "value": "I have a web application that generates a long report and I need to print it. If I just print the page it will break at the end of the physical page. How can I calculate where to make a break in the web page so that the page breaks line up with the physical pages when they print...
I am getting a MouseEvent in Java. the getPoint() method is adding the height of the title bar into the y portion of the coordinate. I was wondering how I can find the height of the title bar of the current window in order to offset the y value by the correct amount.
In a Java Swing application, if you are dealing with `MouseEvent` objects and you want to find the height of the title bar (or the window's decoration), you can use the `Window` class to obtain the insets of the window. The insets will provide you with the dimensions of the border and title bar of the window. Here's h...
21,859
[ { "from": "human", "value": "I am getting a MouseEvent in Java. the getPoint() method is adding the height of the title bar into the y portion of the coordinate.\nI was wondering how I can find the height of the title bar of the current window in order to offset the y value by the correct amount.\n" }, ...
I have a custom SharePoint list definition that is based on the Document content type. My library instance that I create from this contains many HTML documents, and each of those documents has some images saved into a subfolder inside this library. What's the best way to create a view that will show all of those top-...
To create a custom view in your SharePoint list definition that shows only top-level HTML documents while excluding accessory image files, you can utilize the `View` element within the `schema.xml` of your list definition. To achieve this, you can set up a view that filters items based on the file type or a specific pr...
18,790
[ { "from": "human", "value": "I have a custom SharePoint list definition that is based on the Document content type. My library instance that I create from this contains many HTML documents, and each of those documents has some images saved into a subfolder inside this library. What's the best way to creat...
If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn't give an accurate read speed because Windows does disk read caching. Is there a way to flush the disk read cache of a drive in C# / .Net (or perhaps with...
When you're measuring the read speed of a drive, the Windows operating system indeed employs disk caching, which can interfere with the accuracy of your tests. To ensure that you're reading directly from the disk and bypassing the cache, you can use the Win32 API to control the caching behavior. ### Flushing the Disk ...
18,058
[ { "from": "human", "value": "If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn't give an accurate read speed because Windows does disk read caching. \nIs there a way to flush the disk read cach...
What is the difference between creating one index across multiple columns versus creating multiple indexes, one per column? Are there reasons why one should be used over the other? For example: Create NonClustered Index IX_IndexName On TableName (Column1 Asc, Column2 Asc, Column3 Asc) Versus: Create NonClustered Index...
When designing indexes in a relational database, the choice between creating a single composite index on multiple columns versus creating individual indexes for each column can significantly impact the performance and efficiency of queries. Here’s a breakdown of the differences, advantages, and disadvantages of each ap...
18,482
[ { "from": "human", "value": "What is the difference between creating one index across multiple columns versus creating multiple indexes, one per column?\nAre there reasons why one should be used over the other?\nFor example:\nCreate NonClustered Index IX_IndexName On TableName\n(Column1 Asc, Column2 Asc, Co...
I'm using .NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more robust way to represent the objects. One of these robust requirements is determinin...
To determine the intersection point of two lines in a drawing application, you can use a mathematical approach that calculates the intersection of the lines represented by their endpoints. Here's a method to achieve this using basic geometry. ### Intersection of Two Lines You can represent each line with two endpoin...
17,685
[ { "from": "human", "value": "I'm using .NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more robust way to represent the objects. One o...
I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it will break the applications on that machine...
You're correct in your understanding that .NET Framework 3.5 is an extension of the .NET Framework 2.0. Microsoft designed the .NET Framework with side-by-side compatibility in mind, which allows multiple versions of the framework to coexist on the same machine. Here are several points you can present to your server ad...
17,926
[ { "from": "human", "value": "I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it wi...
I've just found out about Stack Overflow and I'm just checking if there are ideas for a constraint I'm having with some friends in a project, though this is more of a theoretical question to which I've been trying to find an answer for some time. I'm not much given into cryptography but if I'm not clear enough I'll try...
Your question touches on some interesting and complex aspects of database security, encryption, and query capabilities. Let's break down the problems and potential solutions you’ve outlined. ### Problem Overview You're dealing with a scenario where: 1. The database contains sensitive information that must be encrypte...
18,612
[ { "from": "human", "value": "I've just found out about Stack Overflow and I'm just checking if there are ideas for a constraint I'm having with some friends in a project, though this is more of a theoretical question to which I've been trying to find an answer for some time.\nI'm not much given into cryptog...
I wonder if there is any good guideline for system administrators to calculate the resources needed to host an ASP.NET website? I want to do some estimates on the processing power needed so I know what kind of VPS/Cloud I need to get.
Calculating the resources needed to host an ASP.NET website requires considering several factors, including the nature of the application, expected traffic, and specific server configurations. Here’s a guideline to help you estimate the processing power and other resources required: ### 1. **Understand Your Applicatio...
17,647
[ { "from": "human", "value": "I wonder if there is any good guideline for system administrators to calculate the resources needed to host an ASP.NET website? I want to do some estimates on the processing power needed so I know what kind of VPS/Cloud I need to get.\n" }, { "from": "gpt", "value": ...
Coming from a Perl 5 background, what are the advantages of moving to Perl 6 or Python?
Transitioning from Perl 5 to either Perl 6 (now known as Raku) or Python offers various advantages depending on your goals, preferences, and the specific projects you are working on. Here’s a comparison of both options: ### Advantages of Moving to Raku (Perl 6): 1. **Modern Language Features**: Raku includes modern p...
19,969
[ { "from": "human", "value": "Coming from a Perl 5 background, what are the advantages of moving to Perl 6 or Python?\n" }, { "from": "gpt", "value": "Transitioning from Perl 5 to either Perl 6 (now known as Raku) or Python offers various advantages depending on your goals, preferences, and the s...
I'm asking all of you who aren't using a library for this, but are constructing your own objects for managing data flowing to and from your database tables. Do I have a recordset object? one object per row of data? Both? Neither? Any suggestions or experiences welcome. Please don't tell me to use an ORM or other suc...
When constructing your own data management objects without using an ORM or toolkit, there are a few patterns you might consider for handling your database records effectively. Here’s a breakdown of some options, including advantages and disadvantages: ### 1. Recordset Object **Definition**: A recordset object encapsu...
20,110
[ { "from": "human", "value": "I'm asking all of you who aren't using a library for this, but are constructing your own objects for managing data flowing to and from your database tables. Do I have a recordset object? one object per row of data? Both? Neither? Any suggestions or experiences welcome. Please...
I am currently working on a program to immediately clear the list of previously-run-commands which appears in the Windows Start -> Run dialog. The procedure for clearing this list by removing the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU key is well documented; however, before these c...
To achieve the clearing of the Windows Start -> Run command history (RunMRU) without requiring user interaction or system disruption, there are a couple of approaches you might consider. ### Option 1: Programmatic Registry Update with Refresh After you clear the registry entry, you may try signaling the `explorer.ex...
19,425
[ { "from": "human", "value": "I am currently working on a program to immediately clear the list of previously-run-commands which appears in the Windows Start -> Run dialog. The procedure for clearing this list by removing the HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU ...
In the same spirit of other platforms, it seemed logical to follow up with this question: What are common non-obvious mistakes in Java? Things that seem like they ought to work, but don't. I won't give guidelines as to how to structure answers, or what's "too easy" to be considered a gotcha, since that's what the votin...
Java is a versatile language, but it has its share of non-obvious pitfalls that can trip up both new and experienced developers. Here are some common mistakes that can be surprising: 1. **Integer Caching**: - Java caches `Integer` objects for values between -128 and 127. If you create two `Integer` objects with the...
18,022
[ { "from": "human", "value": "In the same spirit of other platforms, it seemed logical to follow up with this question: What are common non-obvious mistakes in Java? Things that seem like they ought to work, but don't.\nI won't give guidelines as to how to structure answers, or what's \"too easy\" to be cons...
I am using Windows 2003. I have mapped a web application into a virtual directory. This is built on framework 1.1 When i try to browse to the default page i get a error as Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error det...
The error message you are encountering suggests that there is an access issue with loading the `Interop.MSDASC` assembly, which is typically related to permissions or configuration settings in your application. Here are some steps you can take to troubleshoot and resolve this issue: ### 1. Check Permissions Ensure tha...
19,794
[ { "from": "human", "value": "I am using Windows 2003. I have mapped a web application into a virtual directory. This is built on framework 1.1 When i try to browse to the default page i get a error as \nDescription: An error occurred during the processing of a configuration file required to service this req...
Any salt at all will obviously help when salting and hashing a user's password. Are there any best practices for how long the salt should be? I'll be storing the salt in my user table, so I would like the best tradeoff between storage size and security. Is a random 10 character salt enough? Or do I need something lo...
When it comes to salting passwords, the security of the salt is important, but it should be designed to complement the hashing process rather than serve as the primary protection mechanism. Here are some best practices regarding the length and use of salts: ### Length of Salt 1. **Minimum Length**: A salt should typic...
21,829
[ { "from": "human", "value": "Any salt at all will obviously help when salting and hashing a user's password. Are there any best practices for how long the salt should be? I'll be storing the salt in my user table, so I would like the best tradeoff between storage size and security. Is a random 10 charact...
I'm trying to get into java again (it's been a few years). I never really did any GUI coding in java. I've been using Netbeans to get started with this. When using winforms in C# at work I use a usercontrols to build parts of my UI and add them to forms dynamically. I've been trying to use JPanels like usercontrols in...
In Java Swing, dynamically adding components to a panel (like your `mainPanel`) should generally work with the approach you're using, but there are a few things you should check and possibly adjust to ensure that the new `BlurbEditor` is displayed correctly. Here's a checklist and a sample code snippet to help guide y...
17,948
[ { "from": "human", "value": "I'm trying to get into java again (it's been a few years). I never really did any GUI coding in java. I've been using Netbeans to get started with this.\nWhen using winforms in C# at work I use a usercontrols to build parts of my UI and add them to forms dynamically. \nI've been...
I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same directory with an umbraco install, how can I switch the ...
Setting up a parallel site in Umbraco that shares resources but has separate content is a common requirement. You can achieve this by setting up multiple hostnames in your Umbraco installation and configuring the top node based on the URL being accessed. Here's a step-by-step approach to achieving this: ### Step 1: C...
19,622
[ { "from": "human", "value": "I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same directory with ...
I have seen arguments for using explicit interfaces as a method of locking a classes usage to that interface. The argument seems to be that by forcing others to program to the interface you can ensure better decoupling of the classes and allow easier testing. Example: public interface ICut { void Cut(); } public c...
Using explicit interface implementation, as you've described in your example, has its pros and cons. Let's explore the reasons for and against this approach: ### Advantages of Explicit Interface Implementation: 1. **Encapsulation of Behavior**: By implementing the interface explicitly, you keep the interface methods ...
18,180
[ { "from": "human", "value": "I have seen arguments for using explicit interfaces as a method of locking a classes usage to that interface. The argument seems to be that by forcing others to program to the interface you can ensure better decoupling of the classes and allow easier testing.\nExample:\npublic ...
I want to consume a web service over https from a java client. What steps will i need to take in order to do this?
Consuming a web service over HTTPS from a Java client involves several steps, including setting up the Java environment, configuring SSL/TLS, and writing the client code. Here’s a detailed outline of the steps you will need to take: ### Step 1: Environment Setup 1. **Java Development Kit (JDK)**: Make sure you have t...
17,544
[ { "from": "human", "value": "I want to consume a web service over https from a java client.\nWhat steps will i need to take in order to do this?\n" }, { "from": "gpt", "value": "Consuming a web service over HTTPS from a Java client involves several steps, including setting up the Java environmen...
I'm fairly new at programming, but I've wondered how shell text editors such as vim, emacs, nano, etc are able to control the command-line window. I'm primarily a Windows programmer, so maybe it's different on *nix. As far as I know, it's only possible to print text to a console, and ask for input. How do text edito...
Great question! Text editors like Vim, Emacs, and Nano do indeed provide a navigable and editable interface within the command-line environment, and they achieve this through a combination of terminal capabilities and specific programming techniques. Let's break it down into key components: ### 1. Terminal Control Te...
18,760
[ { "from": "human", "value": "I'm fairly new at programming, but I've wondered how shell text editors such as vim, emacs, nano, etc are able to control the command-line window. I'm primarily a Windows programmer, so maybe it's different on *nix. As far as I know, it's only possible to print text to a conso...
I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\WINDOWS\system32\ and registered it with "regsvr32 vxncom.dll". When I go to projects > add reference and go to the COM tab it shows up in the list of available components/libraries. But, when I select the librar...
It seems you're facing a common issue when trying to add a third-party COM DLL as a reference in your VB.NET project. Here are some steps and suggestions to help you resolve the issue: 1. **Check for x86/x64 Compatibility**: - Make sure that the architecture of your VB.NET application matches the architecture of th...
19,791
[ { "from": "human", "value": "I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\\WINDOWS\\system32\\ and registered it with \"regsvr32 vxncom.dll\". When I go to projects > add reference and go to the COM tab it shows up in the list of available compo...
I have a database in single user mode and I am trying to drop it so I can re-run the creation scripts on it, but I'm being locked out from it. How do I figure out who has the lock on it? How do I disable that lock?
If your SQL Server database is in single-user mode and you are unable to drop it, it usually indicates that another connection has been made to the database, which prevents you from accessing it. Here’s how you can identify the connection that has a lock on the database and how to resolve it. ### Step 1: Identify the ...
13,838
[ { "from": "human", "value": "I have a database in single user mode and I am trying to drop it so I can re-run the creation scripts on it, but I'm being locked out from it.\n\nHow do I figure out who has the lock on it?\nHow do I disable that lock?\n\n" }, { "from": "gpt", "value": "If your SQL S...
I would like to redirect www.example.com to example.com. The following htaccess code makes this happen: RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] But, is there a way to do this in a generic fashion without hardcoding the domain name?
Yes, you can achieve this in a more generic fashion using mod_rewrite in your `.htaccess` file without hardcoding the domain name. This can be accomplished by using environment variables to dynamically capture the host and redirect accordingly. Here's how you can do it: ```apache RewriteEngine On RewriteCond %{HTTP_HO...
24,014
[ { "from": "human", "value": "I would like to redirect www.example.com to example.com. The following htaccess code makes this happen:\nRewriteCond %{HTTP_HOST} ^www\\.example\\.com [NC]\nRewriteRule ^(.*)$ http://example.com/$1 [L,R=301]\n\nBut, is there a way to do this in a generic fashion without hardcodi...
Given an array of integers, what is the simplest way to iterate over it and figure out all the ranges it covers? for example, for an array such as: $numbers = array(1,3,4,5,6,8,11,12,14,15,16); The ranges would be: 1,3-6,8,11-12,14-16
To find the ranges covered by an array of integers, you can follow these steps: 1. **Sort the array** (if it isn't already sorted). 2. **Initialize an empty list** to hold the ranges. 3. **Iterate over the array** and determine the start and end of each range. 4. **Format the ranges** as required and store them in the...
20,458
[ { "from": "human", "value": "Given an array of integers, what is the simplest way to iterate over it and figure out all the ranges it covers? for example, for an array such as:\n$numbers = array(1,3,4,5,6,8,11,12,14,15,16);\n\nThe ranges would be:\n 1,3-6,8,11-12,14-16\n\n" }, { "from": "gpt", "...
I've seen a few sites that list related searches when you perform a search, namely they suggest other search queries you may be interested in. I'm wondering the best way to model this in a medium-sized site (not enough traffic to rely on visitor stats to infer relationships). My initial thought is to store the top 10 r...
Modeling related searches on a medium-sized site can indeed be a challenge, especially when you have limited traffic and user data to draw insights from. Here are some strategies to consider: ### 1. **Keyword Co-occurrence** - **Store Co-occurrences:** Track how often different search terms are entered together or ...
15,961
[ { "from": "human", "value": "I've seen a few sites that list related searches when you perform a search, namely they suggest other search queries you may be interested in.\nI'm wondering the best way to model this in a medium-sized site (not enough traffic to rely on visitor stats to infer relationships). M...
I am hosting a WCF service in a Windows Service on one of our servers. After making it work in basicHttpBinding and building a test client in .NET (which finally worked) I went along and try to access it from PHP using the SoapClient class. The final consumer will be a PHP site so I need to make it consumable in PHP. I...
No worries! It can be tricky working with WCF services, especially when trying to access them from different clients, such as PHP. Let's go through your questions step by step: ### 1. Finding the WSDL for your WCF service In WCF, the WSDL (Web Services Description Language) document is automatically generated when th...
16,805
[ { "from": "human", "value": "I am hosting a WCF service in a Windows Service on one of our servers. After making it work in basicHttpBinding and building a test client in .NET (which finally worked) I went along and try to access it from PHP using the SoapClient class. The final consumer will be a PHP site ...
Is there a way in PHP to compile a regular expression, so that it can then be compared to multiple strings without repeating the compilation process? Other major languages can do this -- Java, C#, Python, Javascript, etc.
Yes, PHP provides a way to compile regular expressions for reuse, similar to other programming languages. While PHP does not have a built-in method specifically named "compile" for regular expressions, you can optimize your usage of regular expressions by pre-compiling them and then using them multiple times. In PHP, ...
22,175
[ { "from": "human", "value": "Is there a way in PHP to compile a regular expression, so that it can then be compared to multiple strings without repeating the compilation process? Other major languages can do this -- Java, C#, Python, Javascript, etc.\n" }, { "from": "gpt", "value": "Yes, PHP pr...
It's been said on the blogosphere and by Microsoft themselves that MEF isn't another IoC container. OK...but why? It seems the same to me. Maybe it's not as good as Unity or Castle Windsor, but it still fits the definition, doesn't it? Why isn't MEF an IoC Container like Unity or Castle Windsor?
The Managed Extensibility Framework (MEF) and traditional Inversion of Control (IoC) containers, like Unity or Castle Windsor, serve different purposes and are designed with different goals in mind. While there are some overlapping functionalities, particularly around dependency resolution, there are several key distin...
21,668
[ { "from": "human", "value": "It's been said on the blogosphere and by Microsoft themselves that MEF isn't another IoC container.\nOK...but why? It seems the same to me. Maybe it's not as good as Unity or Castle Windsor, but it still fits the definition, doesn't it?\nWhy isn't MEF an IoC Container like Unity...
How do you generate a X.509 public and private key pair and a signing request (CSR file) to be sent to a CA for signing in C#?
To generate an X.509 public and private key pair and create a Certificate Signing Request (CSR) in C#, you can utilize the `System.Security.Cryptography` namespace available in the .NET framework. Below is a step-by-step guide along with code samples to help you accomplish this task. ### Step 1: Generate a Key Pair Y...
19,784
[ { "from": "human", "value": "How do you generate a X.509 public and private key pair and a signing request (CSR file) to be sent to a CA for signing in C#?\n" }, { "from": "gpt", "value": "To generate an X.509 public and private key pair and create a Certificate Signing Request (CSR) in C#, you ...
I'm trying to consume a SharePoint webservice from ColdFusion via cfinvoke ('cause I don't want to deal with (read: parse) the SOAP response itself). The SOAP response includes a byte-order-mark character (BOM), which produces the following exception in CF: "Cannot perform web service invocation GetList. The fault retu...
It sounds like you're facing an issue with the BOM (Byte Order Mark) when trying to consume a SharePoint web service using ColdFusion's `cfinvoke`. Since the BOM is causing problems with the XML parser in ColdFusion, there are a few workarounds you could consider to address this issue. ### Workarounds to Handle BOM in...
20,350
[ { "from": "human", "value": "I'm trying to consume a SharePoint webservice from ColdFusion via cfinvoke ('cause I don't want to deal with (read: parse) the SOAP response itself).\nThe SOAP response includes a byte-order-mark character (BOM), which produces the following exception in CF:\n\"Cannot perform we...
What is the API for getting the OS type? Windows CE or Windows mobile? Environment.OSVersion just gives the CE version. It does not provide information if 'Windows Mobile' is installed on the device.
In the context of .NET Compact Framework development, to differentiate between Windows CE and Windows Mobile, the `Environment.OSVersion` property indeed does not provide sufficient information. However, you can use the `System.Environment` class to check for certain conditions or specific characteristics that would in...
21,082
[ { "from": "human", "value": "What is the API for getting the OS type? Windows CE or Windows mobile? \nEnvironment.OSVersion \n\njust gives the CE version. It does not provide information if 'Windows Mobile' is installed on the device.\n" }, { "from": "gpt", "value": "In the context of .NET Comp...
I am going to write a database application for the camp I work for. I am thinking about writing it in C# with a Windows GUI interface but using a browser as the application is seeming more and more appelaing for various reasons. What I am wondering is why someone would not choose to write an application as a web applic...
There are several reasons why someone might choose to write a desktop application instead of a web application, despite the increasing popularity of web technologies. Here are some considerations: 1. **Performance**: Desktop applications generally offer better performance than web applications because they can leverag...
16,006
[ { "from": "human", "value": "I am going to write a database application for the camp I work for. I am thinking about writing it in C# with a Windows GUI interface but using a browser as the application is seeming more and more appelaing for various reasons. What I am wondering is why someone would not choos...
Is it possible to have multiple view of the same display object? (e.g. same-computer multi-player game using split screen) The sample code that failed to work follows: var content: Sprite = new Sprite(); var v1: Sprite = new Sprite(); var v2: Sprite = new Sprite(); with(content.graphics) { line...
In ActionScript (and similarly in other graphics frameworks), a DisplayObject (like your `content` sprite) can only have one parent at a time. This is why your attempt to add `content` to both `v1` and `v2` fails—when you add `content` to `v2`, it is removed from `v1`. To achieve a split-screen effect where both views...
17,852
[ { "from": "human", "value": "Is it possible to have multiple view of the same display object? (e.g. same-computer multi-player game using split screen)\nThe sample code that failed to work follows:\n var content: Sprite = new Sprite();\n var v1: Sprite = new Sprite();\n var v2: Sprite = new Sprite(...
I have two tables, both with start time and end time fields. I need to find, for each row in the first table, all of the rows in the second table where the time intervals intersect. For example: <-----row 1 interval-------> <---find this--> <--and this--> <--and this--> Please phrase your answer in the form...
To find the intersecting time intervals between two tables based on your description, you can use a SQL WHERE clause that checks for overlaps between the time intervals. Let's assume the following structure for your tables: - **Table1** (with fields: `StartTime`, `EndTime`) - **Table2** (with fields: `StartTime`, `E...
22,587
[ { "from": "human", "value": "I have two tables, both with start time and end time fields. I need to find, for each row in the first table, all of the rows in the second table where the time intervals intersect.\nFor example:\n <-----row 1 interval------->\n<---find this--> <--and this--> <--and th...
I've found that when running a VS2008 unit test that a hidden .svn subversion folder is copied under the Out folder that the unit test creates. This is because I've labeled a Resources folder in my unit test as "Additional File and Folder to deploy." Anybody know if you can mark a folder (in this case the .svn folder) ...
In Visual Studio 2008, there isn't a built-in way to specify an exclusion for specific folders (like `.svn`) when marking folders as "Additional Files and Folders to deploy" in your unit tests. However, there are a couple of workarounds you can consider: ### 1. Manually Remove the `.svn` Folder One straightforward app...
20,954
[ { "from": "human", "value": "I've found that when running a VS2008 unit test that a hidden .svn subversion folder is copied under the Out folder that the unit test creates. This is because I've labeled a Resources folder in my unit test as \"Additional File and Folder to deploy.\" Anybody know if you can ma...
The problem is you can't tell the user how many characters are allowed in the field because the escaped value has more characters than the unescaped one. I see a few solutions, but none looks very good: One whitelist for each field (too much work and doesn't quite solve the problem) One blacklist for each field (same ...
This is a common issue when dealing with user input that requires sanitization or encoding, especially for web applications where output and database storage need to be carefully managed. Given the challenges you've outlined, here are some alternatives and best practices to consider: 1. **Dynamic Length Calculation**:...
20,643
[ { "from": "human", "value": "The problem is you can't tell the user how many characters are allowed in the field because the escaped value has more characters than the unescaped one.\nI see a few solutions, but none looks very good:\n\nOne whitelist for each field (too much work and doesn't quite solve the ...
Our team would like to move from the Visual SourceSafe (VSS) to the Team Foundation Server (TFS). I know that the TFS is much more than just a version control system, but for the first time I would like to use it this way. Currently our projects are organized within the single solution that consists of the shared part ...
Migrating from Visual SourceSafe (VSS) to Team Foundation Server (TFS) can be a significant undertaking, but it can also be a beneficial move for your team, given TFS's modern features and capabilities. While TFS does offer more than just version control, it is flexible enough to accommodate various workflows and proje...
20,123
[ { "from": "human", "value": "Our team would like to move from the Visual SourceSafe (VSS) to the Team Foundation Server (TFS). I know that the TFS is much more than just a version control system, but for the first time I would like to use it this way.\nCurrently our projects are organized within the single ...
I'm working on a web app project (in java; not that it matters) and we have a form with drop down lists and input fields. Obviously drop down lists are provided because we expect a specific value from a set of values. So my question is this: does it make sense to ensure the submitted value is in the set of expected ...
It is generally a good practice to validate the submitted values from form inputs, including dropdown lists, even if your application does not generate "errors" from receiving unexpected values. Here are several reasons why you should ensure that the submitted value is part of the expected set: ### 1. **Data Integrity...
20,805
[ { "from": "human", "value": "I'm working on a web app project (in java; not that it matters) and we have a form with drop down lists and input fields. \nObviously drop down lists are provided because we expect a specific value from a set of values. \nSo my question is this: does it make sense to ensure the...
After developing a WPF application without Source Control, I decided to add the solution to TFS. After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event would be logged in the Application Event log: .NET Runtime version 2.0.50727.3053 - Fatal Exec...
The error you are encountering is a "Fatal Execution Engine Error," which usually indicates that there is a significant issue with the runtime environment or the assembly that is being loaded. This type of error can happen in various scenarios, including when using design view in Visual Studio. Here are some steps you ...
19,291
[ { "from": "human", "value": "After developing a WPF application without Source Control, I decided to add the solution to TFS.\nAfter doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event would be logged in the Application Event log:\n\n.NET...
Right now, I have two Eclipse projects - they both use Maven 2 for all their jar-dependency goodness. Inside Eclipse, I have project Foo included in project Bar's build path, so that I can use Foo's classes from project Bar. This works really well in Eclipse land, but when I try: mvn compile inside Bar's directory, ...
You are correct that Maven handles dependencies differently than Ant, and managing inter-project dependencies within the same workspace can be a little tricky if you're accustomed to Eclipse's built path settings. In Maven, the recommended way to handle dependencies between projects is to use a multi-module project se...
15,584
[ { "from": "human", "value": "Right now, I have two Eclipse projects - they both use Maven 2 for all their jar-dependency goodness.\nInside Eclipse, I have project Foo included in project Bar's build path, so that I can use Foo's classes from project Bar. This works really well in Eclipse land, but when I t...
If I have an array of a fixed size depending on how it is defined and used, I typically use one of two ways to reference it. Array type 1: Since it is a fixed size based on a define, I just use that define in all my loops referencing it. #define MAXPLAYERS 4 int playerscores[MAXPLAYERS]; for(i=0;i<MAXPLAYERS;++i) { ....
Your current methods for handling fixed-size and dynamically sized arrays are quite common and effective. However, there are some alternative approaches and improvements that could enhance the elegance and safety of your code. Here are a few suggestions: ### 1. Use Constants or Macros for Array Length For your fixed-...
17,045
[ { "from": "human", "value": "If I have an array of a fixed size depending on how it is defined and used, I typically use one of two ways to reference it.\nArray type 1: Since it is a fixed size based on a define, I just use that define in all my loops referencing it.\n#define MAXPLAYERS 4\n\nint playerscore...
I'm looking for the class name of the popup/message windows on the iPhone (it's a blueish window that comes up when you have a missed call, or a message comes in for example.)
The pop-up/message windows that appear on the iPhone for notifications, such as missed calls or messages, are generally referred to as "banner notifications" or "alert notifications." These notifications can appear at the top or center of the screen, depending on the type of notification and the settings in the iOS ope...
24,889
[ { "from": "human", "value": "I'm looking for the class name of the popup/message windows on the iPhone (it's a blueish window that comes up when you have a missed call, or a message comes in for example.)\n" }, { "from": "gpt", "value": "The pop-up/message windows that appear on the iPhone for n...
It is a bit of a "chicken or egg" kind of query, but can someone dreamup a query that can return the name of the current database instance in which the query executes? Believe me when I say I understand the paradox: why do you need to know the name of the database instance if you're already connected to execute the que...
In SQL Server, you can use the `DB_NAME()` function to return the name of the current database in which the query is executing. If you're looking to obtain the name of the instance rather than just the database, you'll need a slightly different approach. Here’s how you can retrieve the name of the current database and...
24,400
[ { "from": "human", "value": "It is a bit of a \"chicken or egg\" kind of query, but can someone dreamup a query that can return the name of the current database instance in which the query executes? Believe me when I say I understand the paradox: why do you need to know the name of the database instance if ...
The new awesome Ctrl + . keyboard shortcut to show smart tags has suddenly stopped working, a week or so after I discovered it :( I am missing it badly, having had to revert back to Ctrl + Alt + F10, which really just isn't the same. I recently installed F# CTP 1.9.6.2 Has anyone else installed this CTP and still has...
It sounds like you're facing an issue with the keyboard shortcut for showing smart tags in your development environment after installing the F# CTP. Here are some steps you can take to troubleshoot and potentially restore the `Ctrl + .` shortcut: 1. **Check Keyboard Shortcuts:** - Go to the **Tools** menu in Visual...
19,602
[ { "from": "human", "value": "The new awesome Ctrl + . keyboard shortcut to show smart tags has suddenly stopped working, a week or so after I discovered it :( \nI am missing it badly, having had to revert back to Ctrl + Alt + F10, which really just isn't the same.\nI recently installed F# CTP 1.9.6.2\nHas a...
<DataTemplate x:Key="Genre_DataTemplate"> <RadioButton GroupName="One" Content="{Binding... </DataTemplate> Above code is the ItemTemplate of my ItemsControl, I want all the Radiobuttons instantiated should behave as if it is in a group, I know the reason because the generated RadioButtons are not adjacent i...
In Silverlight, the behavior of `RadioButton` controls is indeed determined by the `GroupName` property, but they must be in the same visual tree for this property to take effect. Since the `RadioButton` controls generated by an `ItemsControl` are not necessarily adjacent in the visual tree, they won't behave as a sing...
19,118
[ { "from": "human", "value": " <DataTemplate x:Key=\"Genre_DataTemplate\">\n <RadioButton GroupName=\"One\" Content=\"{Binding...\n </DataTemplate>\n\nAbove code is the ItemTemplate of my ItemsControl, I want all the Radiobuttons instantiated should behave as if it is in a group, I know the reason bec...
window.scrollMaxY can be set via that property in IE and older versions of Firefox, but when trying in FF3 it says "Cannot set this property as it only has a getter". What is my alternative? EDIT: The reason why I'm asking is that I'm fixing some very horrible JS written by someone else, it has a function to keep a div...
In modern browsers, including Firefox, the `scrollMaxY` property is read-only, and you cannot set it directly. It represents the maximum vertical scroll position for the current window, which is determined by the content size of the page. The issue you are experiencing, where the page seems to grow in length while sc...
21,181
[ { "from": "human", "value": "window.scrollMaxY can be set via that property in IE and older versions of Firefox, but when trying in FF3 it says \"Cannot set this property as it only has a getter\".\nWhat is my alternative?\nEDIT:\nThe reason why I'm asking is that I'm fixing some very horrible JS written by...
I hope I haven't painted myself into a corner. I've gotten what seems to be most of the way through implementing a Makefile and I can't get the last bit to work. I hope someone here can suggest a technique to do what I'm trying to do. I have what I'll call "bills of materials" in version controlled files in a source ...
This is a complex situation but can be managed with a clever use of Makefile features. The goal is to efficiently regenerate dependencies based on the BOM versions you are working with while ensuring that changes to BOMs and version specifications are handled correctly. Let’s walk through how to approach this systemat...
18,344
[ { "from": "human", "value": "I hope I haven't painted myself into a corner. I've gotten what seems to be most of the way through implementing a Makefile and I can't get the last bit to work. I hope someone here can suggest a technique to do what I'm trying to do.\nI have what I'll call \"bills of material...
I'm using ASP.NET WebClient.DownloadFile(url) to obtain images from the Image Servers of several of our clients. The 'url' is usually simple, like "http://somewhere.com/images/image01.jpg". This works great for 99% of our clients. But one is giving me a "An existing connection was forcibly closed by the remote host". ...
The error message "An existing connection was forcibly closed by the remote host" indicates that the server closed the connection unexpectedly while your application was trying to download the file. This could be due to several reasons, including server configuration, security settings, or other factors. Here are some ...
17,837
[ { "from": "human", "value": "I'm using ASP.NET WebClient.DownloadFile(url) to obtain images from the Image Servers of several of our clients. The 'url' is usually simple, like \"http://somewhere.com/images/image01.jpg\". \nThis works great for 99% of our clients. But one is giving me a \"An existing connect...
I've been playing with the .NET built in localization features and they seem to all rely on putting data in resx files. But most systems can't rely on this because they are database driven. So how do you solve this issue? Is there a built in .NET way, or do you create a translations table in SQL and do it all manually...
You're correct in noting that the .NET built-in localization features primarily rely on `.resx` files, which can be limiting if your application is heavily database-driven. When localization needs to be dynamic, such as in the case of frequently updated content like an FAQ list, it may not be practical to manage transl...
17,577
[ { "from": "human", "value": "I've been playing with the .NET built in localization features and they seem to all rely on putting data in resx files. \nBut most systems can't rely on this because they are database driven. So how do you solve this issue? Is there a built in .NET way, or do you create a transl...