instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
The .XFDL file extension identifies XFDL Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications. I know how to view XFDL files using a file viewer I found ...
It's great that you've successfully decoded and unzipped the .xfdl file into an XML format! To re-encode your modified XML file back into base64-encoded gzip format, you can follow these steps using Ruby or the command line. ### Using Ruby You can use Ruby's built-in libraries to handle gzip compression and base64 en...
412
[ { "from": "human", "value": "The .XFDL file extension identifies XFDL Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications.\nI know how to vi...
When I try to do that I get the following error: Changes to 64-bit applications are not allowed. @Wilka: That option wasn't available until I selected Tools > Options > Projects and Solutions > General and check "Show advanced build configurations". Though I found this hint from your MSDN link. So if you edit your c...
It sounds like you're running into an issue related to the target platform of your application in Visual Studio 2008 Express. Here are some steps you can follow to resolve the "Changes to 64-bit applications are not allowed" error by changing your application to target a 32-bit platform: 1. **Open Project Properties**...
232
[ { "from": "human", "value": "When I try to do that I get the following error:\n\nChanges to 64-bit applications are not allowed.\n\n\n@Wilka: That option wasn't available until I selected Tools > Options > Projects and Solutions > General and check \"Show advanced build configurations\". Though I found this...
I have a large database and would like to select table names that have a certain column name. I have done something like this in MySQL, but can't find any info on SQL Server. I want to do something like: select [table] from [db] where table [has column 'classtypeid'] How can I do something like this?
In SQL Server, you can query the system catalog views to find tables that contain a specific column. The relevant catalog view for this purpose is `INFORMATION_SCHEMA.COLUMNS`. You can use the following SQL query to retrieve the names of tables that have a specific column name: ```sql SELECT TABLE_NAME FROM INFORMATI...
1,586
[ { "from": "human", "value": "I have a large database and would like to select table names that have a certain column name. I have done something like this in MySQL, but can't find any info on SQL Server.\nI want to do something like:\nselect [table] \nfrom [db] \nwhere table [has column 'classtypeid']\n\nHo...
I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. Is this possible? How about managing a SQL Server 2005 DB using Management Studio 2008?
When it comes to managing different versions of SQL Server databases using SQL Server Management Studio (SSMS), compatibility between different versions can vary. 1. **Managing SQL Server 2008 with SSMS 2005:** - SQL Server Management Studio 2005 cannot manage a SQL Server 2008 database. SSMS 2005 is not designed t...
1,818
[ { "from": "human", "value": "I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. \nIs this possible? \nHow about managing a SQL Server 2005 DB using Management Studio 2...
Is there any IL level debugger in form of a VS plugin or standalone application? Visual studio’s debugger is great, but it allows you to debug on either HLL code level or assembly language, you can’t debug IL. It seems that in some situations it would be useful to have an opportunity to debug at IL level. In particula...
Yes, there are tools available that allow you to debug Intermediate Language (IL) code, even when you do not have the source code. These tools are useful for examining the behavior of .NET applications at the IL level. Here are a few notable options: 1. **ILSpy**: - ILSpy is an open-source .NET assembly browser and...
73
[ { "from": "human", "value": "Is there any IL level debugger in form of a VS plugin or standalone application?\nVisual studio’s debugger is great, but it allows you to debug on either HLL code level or assembly language, you can’t debug IL.\nIt seems that in some situations it would be useful to have an oppo...
It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way. List<string> sl = new List<string>(); List<object> ol; ol = sl; results in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object> And then... Lis...
You're right; in C#, you cannot directly assign a `List<string>` to a `List<object>` variable, and casting won't work either because generic types are invariant. This means that `List<string>` is not considered a subtype of `List<object>`, even though `string` is a subtype of `object`. If you want to convert a `List<s...
1,119
[ { "from": "human", "value": "It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.\nList<string> sl = new List<string>();\nList<object> ol;\nol = sl;\n\nresults in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Co...
Is there a tag in HTML that will only display its content if JavaScript is enabled? I know <noscript> works the opposite way around, displaying its HTML content when JavaScript is turned off. But I would like to only display a form on a site if JavaScript is available, telling them why they can't use the form if they d...
HTML does not have a built-in tag that exclusively displays its content only when JavaScript is enabled. However, you can achieve the desired effect using JavaScript in combination with CSS. Here's a common approach using a combination of CSS for hiding and JavaScript for showing the content: 1. **Hide the form by de...
722
[ { "from": "human", "value": "Is there a tag in HTML that will only display its content if JavaScript is enabled? I know <noscript> works the opposite way around, displaying its HTML content when JavaScript is turned off. But I would like to only display a form on a site if JavaScript is available, telling t...
I'd like to use Segoe UI 9 pt on Vista, and Tahoma 8 pt on Windows XP/etc. (Actually, I'd settle for Segoe UI on both, but my users probably don't have it installed.) But, these being quite different, they really screw up the layout of my forms. So... is there a good way to deal with this? An example: I have a Label, w...
To address the layout issues caused by the different font metrics of Segoe UI and Tahoma in Windows Forms, you'll need to adopt a more flexible approach for positioning your controls. Here are several strategies you can consider: ### 1. Use Padding and Margins Adjust the `Padding` and `Margin` properties of your labe...
346
[ { "from": "human", "value": "I'd like to use Segoe UI 9 pt on Vista, and Tahoma 8 pt on Windows XP/etc. (Actually, I'd settle for Segoe UI on both, but my users probably don't have it installed.) But, these being quite different, they really screw up the layout of my forms. So... is there a good way to deal...
I have a library I created, File mylib.c: #include <mylib.h> int testlib() { printf("Hello, World!\n"); return (0); } File mylib.h: #include <stdio.h> extern int testlib(); In my program, I've attempted to call this library function: File myprogram.c: #include <mylib.h> int main (int argc, char *argv[]) { ...
The warning you're seeing, "function declaration isn't a prototype," is due to the way the `testlib()` function is declared in your header file `mylib.h`. In C, a function prototype should include the parameter types, even if there are no parameters. Here's how to properly declare the function prototype in `mylib.h`:...
1,324
[ { "from": "human", "value": "I have a library I created,\nFile mylib.c:\n#include <mylib.h>\n\nint\ntestlib() {\n printf(\"Hello, World!\\n\");\n return (0);\n}\n\nFile mylib.h:\n#include <stdio.h>\nextern int testlib();\n\nIn my program, I've attempted to call this library function:\nFile myprogram.c...
Let's say I have a list of server names stored in a vector, and I would like to contact them one at a time until one has successfully responded. I was thinking about using STL's find_if algorithm in the following way: find_if(serverNames.begin(), serverNames.end(), ContactServer()); Where ContactServer is a predicate ...
You're on the right track with using `std::find_if` to try and contact server names one at a time, but there are a couple of considerations to address regarding your proposed approach. 1. **Statelessness of the Predicate**: As you noted, your `ContactServer` predicate will behave in a stateless manner since it does no...
484
[ { "from": "human", "value": "Let's say I have a list of server names stored in a vector, and I would like to contact them one at a time until one has successfully responded. I was thinking about using STL's find_if algorithm in the following way:\nfind_if(serverNames.begin(), serverNames.end(), ContactServe...
Whenever I use my MacBook away from my desk and later plug it into an external display (as primary), I get into the state of having windows deposited in both the notebook monitor and the external one. To move all windows to a single screen, my current solution is to "Turn on mirroring" in the display preferences and th...
If you're looking for a way to quickly move all open windows from your secondary display to your primary display without having to toggle mirroring, you can consider using third-party window management applications or some built-in macOS features. Here are a few suggestions: 1. **Use Mission Control**: You can use Mis...
38
[ { "from": "human", "value": "Whenever I use my MacBook away from my desk and later plug it into an external display (as primary), I get into the state of having windows deposited in both the notebook monitor and the external one.\nTo move all windows to a single screen, my current solution is to \"Turn on m...
On an 8-bit micro controller I would like to do the following: 16bit_integer = another_16bit_integer * 0.997; with the least possible number of instructions.
To perform the operation `16bit_integer = another_16bit_integer * 0.997` on an 8-bit microcontroller efficiently, you can leverage fixed-point arithmetic instead of floating-point operations, as many 8-bit microcontrollers do not have a floating-point unit. Here are the steps to achieve this with minimal instructions...
342
[ { "from": "human", "value": "On an 8-bit micro controller I would like to do the following:\n16bit_integer = another_16bit_integer * 0.997;\nwith the least possible number of instructions.\n" }, { "from": "gpt", "value": "To perform the operation `16bit_integer = another_16bit_integer * 0.997` o...
How can I create this file in a directory in windows 2003 SP2: .hgignore I get error: You must type a file name.
Creating a file with a specific name like `.hgignore` in Windows 2003 (or any Windows version) can be a bit tricky because files that start with a dot (.) are typically hidden files in Unix/Linux systems and are not directly supported in the Windows GUI. However, you can create such a file using the command prompt or a...
559
[ { "from": "human", "value": "How can I create this file in a directory in windows 2003 SP2:\n.hgignore\n\nI get error: You must type a file name.\n" }, { "from": "gpt", "value": "Creating a file with a specific name like `.hgignore` in Windows 2003 (or any Windows version) can be a bit tricky be...
How do I forcefully unload a ByteArray from memory using ActionScript 3? I have tried the following: // First non-working solution byteArray.length = 0; byteArray = new ByteArray(); // Second non-working solution for ( var i:int=0; i < byteArray.length; i++ ) { byteArray[i] = null; }
In ActionScript 3, managing memory can be tricky because it relies on automatic garbage collection. When you want to free up memory occupied by a `ByteArray`, simply setting its length to 0 or assigning it a new instance does not guarantee that it will be immediately released, especially if there are references to it e...
152
[ { "from": "human", "value": "How do I forcefully unload a ByteArray from memory using ActionScript 3?\nI have tried the following:\n// First non-working solution\nbyteArray.length = 0;\nbyteArray = new ByteArray();\n\n// Second non-working solution\nfor ( var i:int=0; i < byteArray.length; i++ ) {\n byte...
There are two weird operators in C#: the true operator the false operator If I understand this right these operators can be used in types which I want to use instead of a boolean expression and where I don't want to provide an implicit conversion to bool. Let's say I have a following class: public class MyType ...
In C#, the `true` and `false` operators are indeed specialized operators that can be defined for user-defined types. Your understanding is correct that they allow you to use a custom type in a conditional context, effectively simulating boolean-like behavior without requiring an implicit conversion to `bool`. However...
213
[ { "from": "human", "value": "There are two weird operators in C#:\n\nthe true operator\nthe false operator\n\nIf I understand this right these operators can be used in types which I want to use instead of a boolean expression and where I don't want to provide an implicit conversion to bool.\nLet's say I hav...
I'm trying to perform a SQL query through a linked SSAS server. The initial query works fine: SELECT "Ugly OLAP name" as "Value" FROM OpenQuery( OLAP, 'OLAP Query') But if I try to add: WHERE "Value" > 0 I get an error Invalid column name 'Value' Any ideas what I might be doing wrong? So the problem was that the...
You're correct in identifying the issue with the SQL query. In SQL, aliases defined in the `SELECT` clause cannot be referenced in the `WHERE` clause because the `WHERE` clause is processed before the `SELECT` clause. In your case, since you want to filter the results based on the alias "Value", you have a couple of o...
1,840
[ { "from": "human", "value": "I'm trying to perform a SQL query through a linked SSAS server. The initial query works fine:\nSELECT \"Ugly OLAP name\" as \"Value\" \nFROM OpenQuery( OLAP, 'OLAP Query')\n\nBut if I try to add:\nWHERE \"Value\" > 0\n\nI get an error\n\nInvalid column name 'Value'\n\nAny ideas...
Consider the following setup: A windows PC with a LAN interface and a WiFi interface (the standard for any new laptop). Each of the interfaces might be connected or disconnected from a network. I need a way to determine which one of the adapters is the one connected to the internet - specifically, in case they are both...
Determining the correct network adapter to bind to when both are connected can be challenging, especially in varied network environments. While your current approach with `GetBestInterface` is valid, here are some alternative methods and considerations that can complement or enhance your solution: ### 1. Inspect the R...
12
[ { "from": "human", "value": "Consider the following setup:\nA windows PC with a LAN interface and a WiFi interface (the standard for any new laptop). Each of the interfaces might be connected or disconnected from a network. I need a way to determine which one of the adapters is the one connected to the inte...
What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?
When considering open source licenses that are more corporate-friendly and allow for the integration of the licensed software into commercial products without the obligation to open-source the resulting product, a few key licenses stand out: 1. **MIT License**: This is a permissive license that allows for virtually un...
278
[ { "from": "human", "value": "What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?\n" }, { "from": "gpt", "value": "When considering open source licenses that are more corporate-friendly and al...
Is there a way to shutdown a computer using a built-in Java method?
Java does not provide a built-in method specifically for shutting down a computer, as this action is considered a system-level operation and Java is designed to be platform-independent and secure. However, you can execute system commands that can shut down the computer using Java's `Runtime` or `ProcessBuilder` classes...
930
[ { "from": "human", "value": "Is there a way to shutdown a computer using a built-in Java method?\n" }, { "from": "gpt", "value": "Java does not provide a built-in method specifically for shutting down a computer, as this action is considered a system-level operation and Java is designed to be pl...
I am aware that in .NET there are three timer types (see Comparing the Timer Classes in the .NET Framework Class Library). I have chosen a threaded timer as the other types can drift if the main thread is busy, and I need this to be reliable. The way this timer works in the control of the timer is put on another thread...
In a console application, using a threaded timer can indeed lead to your main thread exiting while the timer continues to run on a background thread. To keep the console application alive without blocking the main thread, you can use a `ManualResetEvent` or simply handle it by allowing the main thread to wait on the ti...
154
[ { "from": "human", "value": "I am aware that in .NET there are three timer types (see Comparing the Timer Classes in the .NET Framework Class Library). I have chosen a threaded timer as the other types can drift if the main thread is busy, and I need this to be reliable.\nThe way this timer works in the con...
I have a mapping application that needs to draw a path, and then display icons on top of the path. I can't find a way to control the order of virtual earth layers, other than the order in which they are added. Does anyone know how to change the z index of Virtual Earth shape layers, or force a layer to the front?
In Microsoft Virtual Earth (now known as Bing Maps), the order of layers is typically determined by the order in which you add them to the map. Unfortunately, there isn't a straightforward method to directly change the z-index of existing layers after they have been added to the map. However, you can work around this l...
420
[ { "from": "human", "value": "I have a mapping application that needs to draw a path, and then display icons on top of the path. I can't find a way to control the order of virtual earth layers, other than the order in which they are added. \nDoes anyone know how to change the z index of Virtual Earth shape l...
I need to add a web part zone to a wiki page. I'm opening the page using SharePoint Designer, but there doesn't seem to be an obvious way (such as a menu) to add a Web Part Zone.
Adding a Web Part Zone to a Wiki page in SharePoint can be a bit different from traditional SharePoint pages. Here are steps you can follow using SharePoint Designer to add a Web Part Zone: 1. **Open SharePoint Designer**: Start by opening your SharePoint site in SharePoint Designer. 2. **Navigate to the Wiki Page**:...
476
[ { "from": "human", "value": "I need to add a web part zone to a wiki page. I'm opening the page using SharePoint Designer, but there doesn't seem to be an obvious way (such as a menu) to add a Web Part Zone.\n" }, { "from": "gpt", "value": "Adding a Web Part Zone to a Wiki page in SharePoint can...
Is there a function like document.getElementById("FirstDiv").clear()?
In JavaScript, there isn't a built-in `clear()` function for HTML elements like `document.getElementById("FirstDiv")`. However, you can achieve a similar effect by manipulating the inner content of the element. If you want to remove all the child elements and content inside an element with the ID of "FirstDiv", you c...
1,099
[ { "from": "human", "value": "Is there a function like document.getElementById(\"FirstDiv\").clear()?\n" }, { "from": "gpt", "value": "In JavaScript, there isn't a built-in `clear()` function for HTML elements like `document.getElementById(\"FirstDiv\")`. However, you can achieve a similar effect...
Which class design is better and why? public class User { public String UserName; public String Password; public String FirstName; public String LastName; } public class Employee : User { public String EmployeeId; public String EmployeeCode; public String DepartmentId; } public class Membe...
When considering the two class designs you provided for representing `User`, `Employee`, and `Member`, there are some pros and cons associated with each approach. Let's break down each design. ### Design 1: Inheritance-based Design ```csharp public class User { public String UserName; public String Password; ...
5
[ { "from": "human", "value": "Which class design is better and why?\npublic class User\n{\n public String UserName;\n public String Password;\n public String FirstName;\n public String LastName;\n}\n\npublic class Employee : User\n{\n public String EmployeeId;\n public String EmployeeCode;\...
What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought.
When comparing IEEE floating-point numbers (both `float` and `double`), it's important to understand that due to the nature of floating-point arithmetic, exact comparisons for equality can often lead to misleading results due to precision issues. Therefore, a robust approach to comparing floats and doubles for equality...
362
[ { "from": "human", "value": "What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought.\n" }, { "from": "gpt", "value": "When comparing IEEE floating-point numbers (both `float` and `double`), it's...
I want to format my existing comments as 'RDoc comments' so they can be viewed using ri. What are some recommended resources for starting out using RDoc?
To get started with RDoc and properly format your comments for documentation that can be viewed using `ri`, here are some recommended resources and steps: ### Official Documentation 1. **RDoc Documentation**: The official RDoc documentation is an excellent starting point. You can find it here: [RDoc GitHub Repository]...
341
[ { "from": "human", "value": "I want to format my existing comments as 'RDoc comments' so they can be viewed using ri.\nWhat are some recommended resources for starting out using RDoc?\n" }, { "from": "gpt", "value": "To get started with RDoc and properly format your comments for documentation th...
Char's are great because they are fixed size and thus make for a faster table. They are however limited to 255 characters. I want to hold 500 characters but a blob is variable length and that's not what I want. Is there some way to have a fixed length field of 500 characters in MySQL or am I going to have to use 2 char...
In MySQL, if you want to store a fixed-length string that is longer than the maximum of 255 characters allowed by the `CHAR` type, you can use the `CHAR` type with a length of up to 255 characters, but to achieve a length of 500 characters, you should use the `CHAR` type (or `VARCHAR` type) with a defined length of 500...
1,936
[ { "from": "human", "value": "Char's are great because they are fixed size and thus make for a faster table. They are however limited to 255 characters. I want to hold 500 characters but a blob is variable length and that's not what I want.\nIs there some way to have a fixed length field of 500 characters in...
I need to set the height of every textbox on my form, some of which are nested within other controls. I thought I could do something like this: private static IEnumerator<TextBox> FindTextBoxes(Control rootControl) { foreach (Control control in rootControl.Controls) { if (control.Controls.Count > 0) ...
Yes, you can modify your `FindTextBoxes` method to return an `IEnumerable<TextBox>` instead of an `IEnumerator<TextBox>`. This way, you can utilize the `yield return` functionality without the need to implement a separate class. Here's how you can refactor your code: ```csharp private static IEnumerable<TextBox> Fin...
1,238
[ { "from": "human", "value": "I need to set the height of every textbox on my form, some of which are nested within other controls. I thought I could do something like this:\nprivate static IEnumerator<TextBox> FindTextBoxes(Control rootControl)\n{\n foreach (Control control in rootControl.Controls)\n ...
Which Database table Schema is more efficient and why? "Users (UserID, UserName, CompamyId)" "Companies (CompamyId, CompanyName)" OR "Users (UserID, UserName)" "Companies (CompamyId, CompanyName)" "UserCompanies (UserID, CompamyId)" Given the fact that user and company have one-to-one relation.
When comparing the two database table schemas you provided, the choice between the two primarily depends on the specific use case, as both schemas can have their advantages and disadvantages. Here's a breakdown of the two options in the context of efficiency and maintainability: ### Option 1: ``` Users (UserID, UserN...
3
[ { "from": "human", "value": "Which Database table Schema is more efficient and why?\n\"Users (UserID, UserName, CompamyId)\"\n\"Companies (CompamyId, CompanyName)\"\n\nOR\n\"Users (UserID, UserName)\"\n\"Companies (CompamyId, CompanyName)\"\n\"UserCompanies (UserID, CompamyId)\"\n\nGiven the fact that user ...
What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)?
In Visual Studio 2008, when using ReSharper, you can open a file within your solution using the shortcut `Ctrl + Shift + T`. This shortcut opens the "Go to File" dialog, allowing you to quickly search for and open files in your solution. If you are not using ReSharper, the default shortcut to open a file in the solut...
1,819
[ { "from": "human", "value": "What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)?\n" }, { "from": "gpt", "value": "In Visual Studio 2008, when using ReSharper, you can open a file within your solution using the shortcut `Ctrl + Shift + T`. This shortcut o...
Using online interfaces to a version control system is a nice way to have a published location for the most recent versions of code. For example, I have a LaTeX package here (which is released to CTAN whenever changes are verified to actually work): http://github.com/wspr/pstool/tree/master The package itself is derive...
You're encountering a common challenge in version control where generated files can clutter your repository and complicate commits. However, there are several approaches you can consider to manage this situation more effectively while still providing easy access to users: 1. **Use `.gitignore` for Generated Files**: B...
51
[ { "from": "human", "value": "Using online interfaces to a version control system is a nice way to have a published location for the most recent versions of code. For example, I have a LaTeX package here (which is released to CTAN whenever changes are verified to actually work):\nhttp://github.com/wspr/pstoo...
The login page in my Tapestry application has a property in which the password the user types in is stored, which is then compared against the value from the database. If the user enters a password with multi-byte characters, such as: áéíóú ...an inspection of the return value of getPassword() (the abstract method for...
It sounds like you encountered a common issue related to character encoding, particularly when dealing with multi-byte characters such as those found in UTF-8. The problem you're experiencing, where characters like "áéíóú" are being incorrectly represented as "áéíóú", typically indicates that the data is being mis...
379
[ { "from": "human", "value": "The login page in my Tapestry application has a property in which the password the user types in is stored, which is then compared against the value from the database. If the user enters a password with multi-byte characters, such as:\náéíóú\n\n...an inspection of the return val...
Inspired by this CodingHorror article, "Protecting Your Cookies: HttpOnly" How do you set this property? Somewhere in the web config?
To set the `HttpOnly` property for cookies in a web application, you can do so in different ways depending on the technology stack you are using. Here's how to set it for ASP.NET applications using the `web.config` file and programmatically in code. ### Setting HttpOnly in `web.config` For ASP.NET applications, you c...
454
[ { "from": "human", "value": "Inspired by this CodingHorror article, \"Protecting Your Cookies: HttpOnly\"\nHow do you set this property? Somewhere in the web config?\n" }, { "from": "gpt", "value": "To set the `HttpOnly` property for cookies in a web application, you can do so in different ways ...
I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed). If I use TlbImp I can specify the required version with the /asmversion flag but when I add it directly from Visual Studio it...
When working with COM DLLs in a .NET project, especially when you want to ensure that the interop assembly reflects the version of the original COM DLL, you can indeed face challenges with Visual Studio's automatic referencing. Here are some steps and considerations to achieve your goal without manually using `TlbImp` ...
102
[ { "from": "human", "value": "I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed).\nIf I use TlbImp I can specify the required version with the /asmversion flag but wh...
I've been using TortoiseSVN in a Windows environment for quite some time. It seems very feature-complete and nicely integrated into the Windows shell, and more importantly, it's fairly painless to teach to colleagues with little or no experience with source control. However, since we have moved to Windows Vista 64bi...
If you're experiencing issues with TortoiseSVN on Windows Vista 64-bit, here are some alternative Subversion clients for Windows that you might find useful: 1. **SmartSVN**: SmartSVN is a powerful and user-friendly Subversion client that offers a graphical user interface. It supports features like conflict resolution,...
741
[ { "from": "human", "value": "I've been using TortoiseSVN in a Windows environment for quite some time. It seems very feature-complete and nicely integrated into the Windows shell, and more importantly, it's fairly painless to teach to colleagues with little or no experience with source control. However, ...
I have an SQL server database that I am querying and I only want to get the information when a specific row is null. I used a where statement such as: WHERE database.foobar = NULL and it does not return anything. However, I know that there is at least one result because I created an instance in the database where 'foo...
In SQL, to check for `NULL` values, you should use the `IS NULL` condition instead of comparing it directly with `NULL`. The comparison `database.foobar = NULL` will not return any results because `NULL` is not equal to anything, not even itself. To check if a column is `NULL`, you should use: ```sql WHERE database.f...
2,276
[ { "from": "human", "value": "I have an SQL server database that I am querying and I only want to get the information when a specific row is null. I used a where statement such as:\nWHERE database.foobar = NULL\n\nand it does not return anything. However, I know that there is at least one result because I cr...
How can I calculate the value of PI using C#? I was thinking it would be through a recursive function, if so, what would it look like and are there any math equations to back it up? I'm not too fussy about performance, mainly how to go about it from a learning point of view.
Calculating the value of π (pi) can be done using various mathematical series and algorithms. If you're interested in using recursion to compute π, one of the most commonly referenced series is the Gregory-Leibniz series, which states: \[ \pi = 4 \sum_{n=0}^{\infty} \frac{(-1)^n}{2n + 1} \] This series converges to π...
481
[ { "from": "human", "value": "How can I calculate the value of PI using C#?\nI was thinking it would be through a recursive function, if so, what would it look like and are there any math equations to back it up?\nI'm not too fussy about performance, mainly how to go about it from a learning point of view.\n...
I need to create a historical timeline starting from 1600's to the present day. I also need to have some way of showing events on the timeline so that they do not appear cluttered when many events are close together. I have tried using Visio 2007 as well as Excel 2007 Radar Charts, but I could not get the results I wan...
Creating a clean and visually appealing historical timeline can be achieved with various tools and techniques. Here are some alternatives to Visio and Excel that you might find helpful: ### Tools for Creating Timelines 1. **Tiki-Toki**: - An online timeline maker that allows you to create interactive timelines. Yo...
485
[ { "from": "human", "value": "I need to create a historical timeline starting from 1600's to the present day. I also need to have some way of showing events on the timeline so that they do not appear cluttered when many events are close together.\nI have tried using Visio 2007 as well as Excel 2007 Radar Cha...
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc even in --aggressive mode. What can I do next to fix this repository error? $ git-fsck bad sha1 file: .git/objects/55/tmp_obj_a07724
The error message you're seeing from `git fsck` indicates that there is a corrupted object file in your Git repository. Specifically, it seems that there is a temporary object file located at `.git/objects/55/tmp_obj_a07724` that Git cannot read or recognize. Here are some steps you can take to try and fix this issue:...
582
[ { "from": "human", "value": "Hello I have the following error by git-fsck, which cannot be cleaned by git-gc even in --aggressive mode. What can I do next to fix this repository error? \n$ git-fsck\nbad sha1 file: .git/objects/55/tmp_obj_a07724\n\n" }, { "from": "gpt", "value": "The error messag...
I'm trying to use svnmerge.py to merge some files. Under the hood it uses python, and when I use it I get an error - "The system cannot find the file specified". Colleagues at work are running the same version of svnmerge.py, and of python (2.5.2, specifically r252:60911) without an issue. I found this link, which desc...
The issue you are encountering with `subprocess.Popen` is likely due to the way you are passing the command to it. When using `subprocess.Popen`, you should pass the command and its arguments as a list, rather than as a single string. This is because `subprocess.Popen` does not parse the command line the same way the s...
1,114
[ { "from": "human", "value": "I'm trying to use svnmerge.py to merge some files. Under the hood it uses python, and when I use it I get an error - \"The system cannot find the file specified\". Colleagues at work are running the same version of svnmerge.py, and of python (2.5.2, specifically r252:60911) with...
My office has a central Source Safe 2005 install that we use for source control. I can't change what the office uses on the server. I develop on a laptop and would like to have a different local source control repository that can sync with the central server (when available) regardless of the what that central provide...
Yes, there are several distributed version control systems (DVCS) that can help you maintain a local source control repository while allowing you to sync with a central SourceSafe 2005 server when needed. Here are a few options that might work for your situation: 1. **Git**: Git is the most popular distributed version...
283
[ { "from": "human", "value": "My office has a central Source Safe 2005 install that we use for source control. I can't change what the office uses on the server. \nI develop on a laptop and would like to have a different local source control repository that can sync with the central server (when available) r...
I'm trying to extend some "base" classes in Python: class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self x = xlist([1,2,3]) print x.len() ## >>>...
In Python, the behavior you're observing is due to the immutability of built-in types like `int`. When you perform operations that seem to modify an `int`, such as `self += value`, you aren't actually modifying the integer in place. Instead, you're creating a new integer object and reassigning `self` to this new object...
455
[ { "from": "human", "value": "I'm trying to extend some \"base\" classes in Python:\nclass xlist (list):\n def len(self):\n return len(self)\n\n def add(self, *args):\n self.extend(args)\n return None\n\n\nclass xint (int):\n def add(self, value):\n self += value\n ...
Within Ruby on Rails applications database.yml is a plain text file that stores database credentials. When I deploy my Rails applications I have an after deploy callback in my Capistrano recipe that creates a symbolic link within the application's /config directory to the database.yml file. The file itself is stored i...
Using a symbolic link to store your `database.yml` file outside of your Rails application's release structure is a common practice to keep sensitive credentials out of version control. However, while setting the permissions to `chmod 400` is a good step to restrict access, there are still considerations and best practi...
364
[ { "from": "human", "value": "Within Ruby on Rails applications database.yml is a plain text file that stores database credentials.\nWhen I deploy my Rails applications I have an after deploy callback in my Capistrano \nrecipe that creates a symbolic link within the application's /config directory to the dat...
Does anyone know how to transform a enum value to a human readable value? For example: ThisIsValueA should be "This is Value A".
To convert an enum value like `ThisIsValueA` into a more human-readable format such as "This is Value A", you can use a few techniques in programming languages. Below, I'll demonstrate how to achieve this in C# and Python. ### C# In C#, you can use the `String.Join` method with a regular expression or a custom metho...
862
[ { "from": "human", "value": "Does anyone know how to transform a enum value to a human readable value?\nFor example:\n\nThisIsValueA should be \"This is Value A\".\n\n" }, { "from": "gpt", "value": "To convert an enum value like `ThisIsValueA` into a more human-readable format such as \"This is ...
Is there a way to find the name of the program that is running in Java? The class of the main method would be good enough.
Yes, in Java, you can find the name of the program that is currently running by using the `main` method's class information. The `main` method is defined in the class you are executing, and you can retrieve the name of that class at runtime using the `getClass()` method along with the `getName()` method. Here’s a simp...
272
[ { "from": "human", "value": "Is there a way to find the name of the program that is running in Java? The class of the main method would be good enough.\n" }, { "from": "gpt", "value": "Yes, in Java, you can find the name of the program that is currently running by using the `main` method's class...
I have tried both of : ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes'); and also : php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes" in the .htaccess file. Both methods actually do work but only intermittently. That is, they will work fine for about 37 p...
It sounds like you're experiencing an intermittent issue with your include path settings that could be caused by a few different factors. Here are several approaches you can take to troubleshoot and potentially resolve the problem: 1. **Debugging Include Path**: Log the include path before your `require()` calls to se...
120
[ { "from": "human", "value": "I have tried both of :\nini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes');\n\nand also :\nphp_value include_path \".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes\"\n\nin the .htaccess file.\nBoth methods actually do work but only intermitt...
The TRACE macro can be used to output diagnostic messages to the debugger when the code is compiled in Debug mode. I need the same messages while in Release mode. Is there a way to achieve this? (Please do not waste your time discussing why I should not be using TRACE in Release mode :-)
Yes, you can achieve outputting diagnostic messages in Release mode by defining your own macro that behaves similarly to `TRACE`. Here's one approach to accomplish this: 1. **Define a Custom Macro:** You can define a custom macro that sends output to the debug output window, similar to `TRACE`. This way, you can use i...
499
[ { "from": "human", "value": "The TRACE macro can be used to output diagnostic messages to the debugger when the code is compiled in Debug mode. I need the same messages while in Release mode. Is there a way to achieve this?\n(Please do not waste your time discussing why I should not be using TRACE in Releas...
I know Microsoft has made efforts in the direction of semantic and cross-browser compliant XHTML and CSS, but it still seems like a PitA to pull off elegant markup. I've downloaded and tweaked the CSS Friendly Adapters and all that. But I still find myself frustrated with bloated and unattractive code. Is elegant, sema...
Creating elegant, semantic HTML and CSS with ASP.NET has certainly improved over the years, but challenges can still arise, especially if you're working with older versions of ASP.NET Web Forms or if you're heavily using controls that generate complex markup. Here are some tips to help you achieve more elegant and sema...
79
[ { "from": "human", "value": "I know Microsoft has made efforts in the direction of semantic and cross-browser compliant XHTML and CSS, but it still seems like a PitA to pull off elegant markup. I've downloaded and tweaked the CSS Friendly Adapters and all that. But I still find myself frustrated with bloate...
Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the myPieChart.dataTipFunction. For data that looks like: myPieChart.dataProvider =...
It sounds like you're diving into some interesting customizations with Yahoo's ASTRA framework. While the documentation may not provide all the necessary details, we can work together to enhance your `dataTipFunction` to include the desired flexibility and percentage information. ### Step 1: Accessing Configurable Fie...
474
[ { "from": "human", "value": "Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the myPieChart.dataTipFunction. For data t...
Edit: This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a format supported by your browsers (That would be H.264 if Internet Explorer is needed, and probably AV1, VP8/VP9 if not) ...
Given the age of this question and the advancements in web standards since 2008, it's important to recognize that relying on older video formats like WMV and technologies like Windows Media Player is not advisable for modern web development. ### Current Best Practices: 1. **Adopt HTML5**: The `<video>` element is the...
1,300
[ { "from": "human", "value": "Edit: This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a format supported by your browsers (That would be H.264 if Internet Explorer is n...
I'm trying to fetch Wikipedia pages using LWP::Simple, but they're not coming back. This code: #!/usr/bin/perl use strict; use LWP::Simple; print get("http://en.wikipedia.org/wiki/Stack_overflow"); doesn't print anything. But if I use some other webpage, say http://www.google.com, it works fine. Is there some other ...
The issue you're encountering is likely due to the way Wikipedia handles user agents. By default, LWP::Simple (and LWP in general) may not specify a user agent string when making HTTP requests, which can result in the server blocking or limiting access to the request. Wikipedia's servers can return a response that ei...
1,040
[ { "from": "human", "value": "I'm trying to fetch Wikipedia pages using LWP::Simple, but they're not coming back. This code:\n#!/usr/bin/perl\nuse strict;\nuse LWP::Simple;\n\nprint get(\"http://en.wikipedia.org/wiki/Stack_overflow\");\n\ndoesn't print anything. But if I use some other webpage, say http://ww...
I would like to move a file or folder from one place to another within the same repository without having to use Repo Browser to do it, and without creating two independent add/delete operations. Using Repo Browser works fine except that your code will be hanging in a broken state until you get any supporting changes ...
Yes, TortoiseSVN provides an equivalent way to move files or folders within the repository without having to perform separate add/delete operations. You can use the "Rename" feature, which functions like a move. Here's how to do it: 1. **Open TortoiseSVN**: Navigate to the working copy of your repository using Windows...
1,791
[ { "from": "human", "value": "I would like to move a file or folder from one place to another within the same repository without having to use Repo Browser to do it, and without creating two independent add/delete operations. Using Repo Browser works fine except that your code will be hanging in a broken st...
I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application. On OSX, I can open a window in the finder with os.system('open "%s"' % foldername) and on Windows with os.startfile(foldername) What about unix/linux? Is there a standard way to do thi...
Opening a file manager window on Unix/Linux does not have a single, universal command like you find on Windows or macOS. However, you can make use of a common utility that should work across different desktop environments by checking for some common file managers. Here’s a way you can do this in Python: 1. **Check fo...
895
[ { "from": "human", "value": "I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.\nOn OSX, I can open a window in the finder with\nos.system('open \"%s\"' % foldername)\n\nand on Windows with\nos.startfile(foldername)\n\nWhat a...
I know Windows Vista (and XP) cache recently loaded DLL's in memory... How can this be disabled via the command prompt?
In Windows Vista and Windows XP, DLL caching (or "DLL preload") is a behavior of the operating system to improve performance by keeping recently used DLLs in memory. However, if you want to disable the caching of DLLs, this is not directly configurable via a command in the Command Prompt. Instead, the caching behavior...
1,412
[ { "from": "human", "value": "I know Windows Vista (and XP) cache recently loaded DLL's in memory...\nHow can this be disabled via the command prompt?\n" }, { "from": "gpt", "value": "In Windows Vista and Windows XP, DLL caching (or \"DLL preload\") is a behavior of the operating system to improv...
Is there any efficiency difference in an explicit vs implicit inner join? For example: SELECT * FROM table a INNER JOIN table b ON a.id = b.id; vs. SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id;
In SQL, both explicit and implicit inner joins can achieve the same result, but there are some differences in how they are written and potentially in their readability and maintainability. Here's a breakdown of the two types of joins you've provided: 1. **Explicit Inner Join**: ```sql SELECT * FROM table a INNER...
540
[ { "from": "human", "value": "Is there any efficiency difference in an explicit vs implicit inner join?\nFor example:\nSELECT * FROM\ntable a INNER JOIN table b\nON a.id = b.id;\n\nvs.\nSELECT a.*, b.*\nFROM table a, table b\nWHERE a.id = b.id;\n\n" }, { "from": "gpt", "value": "In SQL, both expl...
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%?
In ASP.NET, the `|DataDirectory|` placeholder is not hard-coded to always resolve to the `App_Data` folder specifically. Instead, it utilizes a generalized mechanism that allows it to be set at runtime. When you use `|DataDirectory|`, it refers to a path that is determined by the `AppDomain.CurrentDomain.SetData("Data...
2,022
[ { "from": "human", "value": "I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%?\n" }, { "from": "gpt", "value": "In ASP.NET, the `|DataDirectory|` placeholde...
I'm not sure whether I'm asking the question correctly, but I've been told SQL Server cannot run on a Novell server. Is this true? If yes, why not?
Your question touches on compatibility between SQL Server and the Novell operating system. As of my last knowledge update in October 2023, Microsoft SQL Server is designed to run primarily on Windows-based operating systems. Here are some key points to consider: 1. **Operating System Compatibility**: SQL Server is spe...
1,403
[ { "from": "human", "value": "I'm not sure whether I'm asking the question correctly, but I've been told SQL Server cannot run on a Novell server. Is this true? If yes, why not?\n" }, { "from": "gpt", "value": "Your question touches on compatibility between SQL Server and the Novell operating sys...
I've been using a lot of new .NET 3.5 features in the work that I've been doing, lately. The application that I'm building is intended for distribution among consumers who will probably not have the latest version (or perhaps any version) of the .NET framework on their machines. I went to go download the .NET 3.5 redis...
If your application requires .NET Framework 3.5, and you're concerned about the size of the redistributable package for users who do not have it installed, you have a few options to consider: 1. **Use a Smaller Installer**: You can create a bootstrapper or a small installer that checks for the presence of the .NET Fra...
649
[ { "from": "human", "value": "I've been using a lot of new .NET 3.5 features in the work that I've been doing, lately. The application that I'm building is intended for distribution among consumers who will probably not have the latest version (or perhaps any version) of the .NET framework on their machines....
I have an xPC target application that talks to a device over RS-232. I am using the xPC serial block for this. To talk to this device I first have to start at a default speed, say, 9600 bps, request a change of speed to, say 57600 bps, then change the speed on my side to match it. The problem with the xPC block is that...
In xPC Target (now known as Simulink Real-Time), the xPC Serial block does require you to specify a baud rate before starting the simulation, and it doesn’t allow for changing the baud rate dynamically during runtime. However, there are a few workarounds that you might consider to achieve your goal of switching baud ra...
564
[ { "from": "human", "value": "I have an xPC target application that talks to a device over RS-232. I am using the xPC serial block for this.\nTo talk to this device I first have to start at a default speed, say, 9600 bps, request a change of speed to, say 57600 bps, then change the speed on my side to match ...
I've convinced myself that they can't. Take for example: 4 4 + 4 / stack: 4 stack: 4 4 4 + 4 = 8 stack: 8 stack: 8 4 8 / 4 = 2 stack: 2 There are two ways that you could write the above expression with the same operators and operands such that the operands all come first: "4 4 4 + /" and "4 4 4 / +", neither of which...
You're diving into an interesting exploration of stack-based evaluations, particularly in the context of postfix (reverse Polish notation) expressions. In postfix notation, operators follow their operands. The way you are manipulating the stack and the order of operations is crucial in determining the final result. 1....
35
[ { "from": "human", "value": "I've convinced myself that they can't.\nTake for example:\n4 4 + 4 /\nstack: 4\nstack: 4 4\n 4 + 4 = 8\nstack: 8\nstack: 8 4\n 8 / 4 = 2\nstack: 2\nThere are two ways that you could write the above expression with the\nsame operators and operands such that the operands all come ...
You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C. myObject.property = YES; or [myObject setProperty:YES]; Is there a difference in performance (in terms of accessing the property)? Is it just a matter of preference in terms of coding style?
In Objective-C, both dot notation and method calls (setter methods) are essentially syntactic sugar that accomplish the same thing when accessing or modifying properties. However, there are some subtle differences worth noting, particularly around performance and coding style. ### Performance 1. **Underlying Mechanis...
1,200
[ { "from": "human", "value": "You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.\nmyObject.property = YES;\n\nor\n[myObject setProperty:YES];\n\nIs there a difference in performance (in terms of accessing the property)? Is it just a matter of...
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be silly but and I don't have issues with my age but sometimes it is good to calculate the exact age of someone, I have introduced my birthdate in my profile (01/12/1975) "dd/mm/yyyy" and it calculated 33 and I'm 32 actually still, isn't it...
Your approach to calculating someone's age using `TimeSpan` is on the right track, but it is not the most accurate way to compute age. The reason is that simply dividing the total number of days by 365 does not account for leap years and can lead to inaccuracies. A better way to calculate the exact age in years is to ...
946
[ { "from": "human", "value": "\nPossible Duplicate:\nHow do I calculate someone's age in C#? \n\nMaybe this could be silly but and I don't have issues with my age but sometimes it is good to calculate the exact age of someone, I have introduced my birthdate in my profile (01/12/1975) \"dd/mm/yyyy\" and it ca...
Is a GUID unique 100% of the time? Will it stay unique over multiple threads?
A GUID (Globally Unique Identifier) or UUID (Universally Unique Identifier) is designed to be unique across space and time, which makes it highly unlikely for duplicates to occur. However, "100% unique" is a complex assertion, as it depends on the version of the GUID being used and the context in which it is generated....
765
[ { "from": "human", "value": "Is a GUID unique 100% of the time?\nWill it stay unique over multiple threads?\n" }, { "from": "gpt", "value": "A GUID (Globally Unique Identifier) or UUID (Universally Unique Identifier) is designed to be unique across space and time, which makes it highly unlikely ...
I'd like to ignore multiple wildcard routes. With asp.net mvc preview 4, they ship with: RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); I'd also like to add something like: RouteTable.Routes.IgnoreRoute("Content/{*pathInfo}"); but that seems to break some of the helpers that generate urls in my program...
When you use the `IgnoreRoute` method in ASP.NET MVC, it tells the routing engine to ignore specific URL patterns, allowing requests that match those patterns to be handled differently (e.g., served directly from the file system). For your specific case, when you want to ignore routes for a folder like "Content", you...
711
[ { "from": "human", "value": "I'd like to ignore multiple wildcard routes. With asp.net mvc preview 4, they ship with:\nRouteTable.Routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\n\nI'd also like to add something like:\nRouteTable.Routes.IgnoreRoute(\"Content/{*pathInfo}\");\n\nbut that seems to break s...
I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an int field? Edit: The data is actually already in a MySQL table, so I need to be able to this using SQL. Sorry for the mi...
You can remove the quotes and commas from your numbers in a MySQL table using the `REPLACE` function. Here's an example SQL query that demonstrates how to achieve this: Assuming your table is named `your_table` and the column containing the numbers is named `your_column`, you can update the column to remove commas and...
941
[ { "from": "human", "value": "I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. \nWhat's a good way to remove both the quotes and the comma from this so I can put it into an int field?\nEdit: \nThe data is actually already in a MySQL table, so I need to...
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection. The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but would rather not reinvent the wheel if it'...
You can indeed convert latitude and longitude coordinates to Easting/Northing coordinates for the Alberta 10 TM (Transverse Mercator) projection using various libraries and tools that have built-in support for these kinds of coordinate transformations. Here's a simple way to achieve this using Python with the `pyproj` ...
639
[ { "from": "human", "value": "I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection.\nThe 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but ...
I recently asked a question about IIf vs. If and found out that there is another function in VB called If which basically does the same thing as IIf but is a short-circuit. Does this If function perform better than the IIf function? Does the If statement trump the If and IIf functions?
In VB (Visual Basic), there are indeed two different constructs that are often used for conditional expressions: `IIf` and the newer `If` function (introduced in Visual Basic 2010), along with the `If` statement. ### Performance Comparison: 1. **IIf Function**: - `IIf(condition, truePart, falsePart)` evaluates bot...
82
[ { "from": "human", "value": "I recently asked a question about IIf vs. If and found out that there is another function in VB called If which basically does the same thing as IIf but is a short-circuit.\nDoes this If function perform better than the IIf function? Does the If statement trump the If and IIf f...
Does anyone know how I can, in platform-independent C++ code prevent an object from being created on the heap? That is, for a class "Foo", I want to prevent users from doing this: Foo *ptr = new Foo; and only allow them to do this: Foo myfooObject; Does anyone have any ideas? Cheers,
To prevent objects of a class from being created on the heap using `new`, you can use a technique involving private constructors or the deletion of the allocation operator. Below are a few ways to achieve this in C++: ### Method 1: Private Constructor You can make the constructor of your class `Foo` private and only p...
809
[ { "from": "human", "value": "Does anyone know how I can, in platform-independent C++ code prevent an object from being created on the heap? That is, for a class \"Foo\", I want to prevent users from doing this:\nFoo *ptr = new Foo;\n\nand only allow them to do this:\nFoo myfooObject;\n\nDoes anyone have any...
Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one?
You're not crazy! The default access modifier for classes in C# is `internal`, which means that the class is only accessible within the same assembly. Visual Studio often defaults to `internal` for new classes because it's a common practice in software design to encapsulate functionality within a single assembly, promo...
1,266
[ { "from": "human", "value": "Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one?\n" }, { "from": "gpt", "value": "You're not crazy! The default access modifier for classes in C# is `internal`, which means that the class is...
I'm having trouble with events in Internet Explorer 7. When I have a form with two or more input[type=text] and I press enter, the events occurs in this order: submit button (onClick) form (onSubmit) Sample code: <form onSubmit="{alert('form::onSubmit'); return false;}"> <input type="text"> <input type="text"...
The behavior you're observing in Internet Explorer 7 is due to how form submissions are handled in that particular browser. When you have a form with only one input field, pressing "Enter" will trigger the form submission directly without firing the `onClick` event of the submit button. In contrast, if you have multipl...
1,024
[ { "from": "human", "value": "I'm having trouble with events in Internet Explorer 7.\nWhen I have a form with two or more input[type=text] and I press enter, the events occurs in this order:\n\nsubmit button (onClick)\nform (onSubmit)\n\nSample code:\n<form onSubmit=\"{alert('form::onSubmit'); return false;}...
I thought that I had the latest CTP of PowerShell 2 but when I try the command: invoke-expression –computername Server01 –command 'get-process PowerShell' I get an error message: A parameter cannot be found that matches parameter name 'computername'. So the question is: How can I tell which version of PowerShell I have...
To determine which version of PowerShell you have installed, you can run the following command in your PowerShell console: ```powershell $PSVersionTable.PSVersion ``` This will display the version number of PowerShell currently in use. As for the latest version of PowerShell, as of my last knowledge update in Octobe...
1,713
[ { "from": "human", "value": "I thought that I had the latest CTP of PowerShell 2 but when I try the command:\ninvoke-expression –computername Server01 –command 'get-process PowerShell'\nI get an error message:\nA parameter cannot be found that matches parameter name 'computername'.\nSo the question is: How ...
We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents. My question is, is there a way t...
Yes, it is possible to convert Word and Excel documents into PDF programmatically without having the Office Suite installed. Below are some options you can consider: ### 1. **LibreOffice / OpenOffice** You can use **LibreOffice** or **OpenOffice** in headless mode to convert documents to PDF. This method allows you to...
32
[ { "from": "human", "value": "We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel do...
Does anyone use have a good regex library that they like to use? Most of the regexes that you find online either contain bugs or are so focused on the edge cases that it turns into a competition to validate whatever spec 100%. Of course you can write your own, but when you are billing by the hour its handy to have a li...
There are several good regex libraries available in various programming languages that can help simplify your work with regular expressions. Here are some widely used libraries that are known for their reliability and ease of use: ### Python - **`re` module**: The built-in `re` module provides a robust set of function...
495
[ { "from": "human", "value": "Does anyone use have a good regex library that they like to use? Most of the regexes that you find online either contain bugs or are so focused on the edge cases that it turns into a competition to validate whatever spec 100%. Of course you can write your own, but when you are b...
Say I have an object that stores a byte array and I want to be able to efficiently generate a hashcode for it. I've used the cryptographic hash functions for this in the past because they are easy to implement, but they are doing a lot more work than they should to be cryptographically oneway, and I don't care about th...
You are correct that using the default `GetHashCode()` method for arrays will not provide the desired behavior, as it depends on reference equality. A custom hash code implementation is needed to ensure that two arrays with the same contents produce the same hash code. For your case, you can implement a more efficient...
276
[ { "from": "human", "value": "Say I have an object that stores a byte array and I want to be able to efficiently generate a hashcode for it. I've used the cryptographic hash functions for this in the past because they are easy to implement, but they are doing a lot more work than they should to be cryptograp...
I have the following tables in my database that have a many-to-many relationship, which is expressed by a connecting table that has foreign keys to the primary keys of each of the main tables: Widget: WidgetID (PK), Title, Price User: UserID (PK), FirstName, LastName Assume that each User-Widget combination is uniq...
When considering the design of a many-to-many relationship using a connecting table, both options you presented have their own merits and considerations. Let's delve into the differences between the two approaches, taking into account factors such as performance, clarity, and design principles. ### Option 1: Single Co...
13
[ { "from": "human", "value": "I have the following tables in my database that have a many-to-many relationship, which is expressed by a connecting table that has foreign keys to the primary keys of each of the main tables:\n\nWidget: WidgetID (PK), Title, Price \nUser: UserID (PK), FirstName, LastName\n\nAs...
I have a Queue<T> object that I have initialised to a capacity of 2, but obviously that is just the capacity and it keeps expanding as I add items. Is there already an object that automatically dequeues an item when the limit is reached, or is the best solution to create my own inherited class?
In .NET, the `Queue<T>` class does not provide built-in functionality to automatically dequeue items when a specified limit is reached. If you want a queue that automatically removes the oldest item when a new item is added beyond a specified capacity, you will need to implement that logic yourself. A common approach ...
100
[ { "from": "human", "value": "I have a Queue<T> object that I have initialised to a capacity of 2, but obviously that is just the capacity and it keeps expanding as I add items. Is there already an object that automatically dequeues an item when the limit is reached, or is the best solution to create my own...
If I have a <input id="uploadFile" type="file" /> tag, and a submit button, how do I determine, in IE6 (and above) if a file has been selected by the user. In FF, I just do: var selected = document.getElementById("uploadBox").files.length > 0; But that doesn't work in IE.
In Internet Explorer 6 and other versions of IE that do not support the `files` property on file input elements, you can use a different approach to check whether a file has been selected. You can do this by checking the `value` property of the file input element. Here's how you can check if a file has been selected i...
1,214
[ { "from": "human", "value": "If I have a \n<input id=\"uploadFile\" type=\"file\" />\n\ntag, and a submit button, how do I determine, in IE6 (and above) if a file has been selected by the user.\nIn FF, I just do:\nvar selected = document.getElementById(\"uploadBox\").files.length > 0;\n\nBut that doesn't wo...
Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers? I'm particularly interested in Windows users, but all other OS's are welcome too.
While there isn't a single definitive online resource that consistently maintains up-to-date statistics on the install base of Java, including JRE version information, there are a few resources and reports that can provide insights into Java usage across different platforms. 1. **Oracle's Java Statistics**: Oracle occ...
733
[ { "from": "human", "value": "Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers?\nI'm particularly interested in Windows users, but all other OS's are welcome too.\n" }, {...
Is there a way to identify, from within a VM, that your code is running inside a VM? I guess there are more or less easy ways to identify specific VM systems, especially if the VM has the provider's extensions installed (such as for VirtualBox or VMWare). But is there a general way to identify that you are not running ...
Yes, there are several methods to detect if your code is running inside a virtual machine (VM), though the effectiveness of these methods can vary based on the VM technology and configuration. Here are some common techniques: 1. **CPUID Instruction**: - The `CPUID` instruction can provide details about the processo...
609
[ { "from": "human", "value": "Is there a way to identify, from within a VM, that your code is running inside a VM?\nI guess there are more or less easy ways to identify specific VM systems, especially if the VM has the provider's extensions installed (such as for VirtualBox or VMWare). But is there a general...
Virtual memory from a computer size perspective is [a way to make the program] think it has a large range of contiguous addresses; but in reality the parts it is currently using are scattered around RAM, and the inactive parts are saved in a disk file. (Wikipedia) I would interpret VM Size in the Windows ...
Your interpretation of VM Size in the Windows Task Manager is on the right track, but let's clarify what the different terms mean and why you might see VM Size less than Memory Usage (Mem Usage). 1. **Virtual Memory (VM Size)**: This refers to the total amount of virtual address space that a process can potentially us...
343
[ { "from": "human", "value": "Virtual memory from a computer size perspective is \n\n[a way to make the program] think it\n has a large range of contiguous\n addresses; but in reality the parts it\n is currently using are scattered\n around RAM, and the inactive parts are\n saved in a disk file. (Wikip...
Effectively I want to give numeric scores to alphabetic grades and sum them. In Excel, putting the LOOKUP function into an array formula works: {=SUM(LOOKUP(grades, scoringarray))} With the VLOOKUP function this does not work (only gets the score for the first grade). Google Spreadsheets does not appear to have the LO...
You can achieve your goal in Google Sheets using `INDEX` and `MATCH` functions combined with `ARRAYFORMULA` to effectively replicate the behavior you're looking for. Here's how to set it up: Assuming: - Your grades are in a range (let's say `A1:A10`). - Your scoring array (containing grades and corresponding scores) i...
658
[ { "from": "human", "value": "Effectively I want to give numeric scores to alphabetic grades and sum them. In Excel, putting the LOOKUP function into an array formula works:\n{=SUM(LOOKUP(grades, scoringarray))}\n\nWith the VLOOKUP function this does not work (only gets the score for the first grade). Google...
I'm running MAMP 1.7.2 on a Mac and I'd like to install the extension php_gd2. How do I do this? I know that on Windows using WAMP I'd simply select the php_gd2 entry in the extensions menu to activate it. How is it done when using MAMP? I know that I can do it using MacPorts but I'd prefer not to make any changes t...
To enable the `php_gd2` extension in MAMP 1.7.2 on your Mac, you'll need to modify the `php.ini` file used by MAMP. Here's a step-by-step guide on how to do it: 1. **Open MAMP**: Start MAMP if it is not already running. 2. **Locate the php.ini File**: - Go to the MAMP installation directory, typically found at `/A...
296
[ { "from": "human", "value": "I'm running MAMP 1.7.2 on a Mac and I'd like to install the extension php_gd2. How do I do this? I know that on Windows using WAMP I'd simply select the php_gd2 entry in the extensions menu to activate it. How is it done when using MAMP? I know that I can do it using MacPorts...
I'm developing an Eclipse plug-in, based on a bunch of core Eclipse plug-ins like SWT, JDT, GEF and others. I need my plug-in to be compatible with Eclipse 3.3, since many potential customers are still using it. However, personally I like the new features in Eclipse 3.4 and would like to use it for my development. Thi...
Developing an Eclipse plug-in for an older version while using a newer version of the IDE can be a bit tricky, but it is certainly possible. Here are some tips to help you achieve compatibility with Eclipse 3.3 while developing in Eclipse 3.4: ### 1. Set Up the Eclipse 3.3 Runtime Environment: You can set up a separat...
17
[ { "from": "human", "value": "I'm developing an Eclipse plug-in, based on a bunch of core Eclipse plug-ins like SWT, JDT, GEF and others. \nI need my plug-in to be compatible with Eclipse 3.3, since many potential customers are still using it. However, personally I like the new features in Eclipse 3.4 and wo...
I'm trying to find a way to list the (static) dependency requirements of a jar file, in terms of which symbols are required at run time. I can see that the methods exported by classes can be listed using "javap", but there doesn't seem to be an opposite facility to list the 'imports'. Is it possible to do this? This wo...
To analyze the static dependencies of a JAR file and see which classes and methods it imports, you can use a few tools and techniques available in the Java ecosystem. Here are some commonly used options: 1. **javap**: As you've mentioned, `javap` can show you the methods and fields of classes, but it does not show you...
279
[ { "from": "human", "value": "I'm trying to find a way to list the (static) dependency requirements of a jar file, in terms of which symbols are required at run time.\nI can see that the methods exported by classes can be listed using \"javap\", but there doesn't seem to be an opposite facility to list the '...
In your applications, what's a "long time" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours? and on which database?
The duration for which a transaction should remain open before committing or rolling back can vary significantly based on the database system, the nature of the application, and the specific use case. However, in general: 1. **Seconds**: Most applications and databases aim to keep transactions open for a matter of sec...
734
[ { "from": "human", "value": "In your applications, what's a \"long time\" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours?\nand on which database?\n" }, { "from": "gpt", "value": "The duration for which a transaction should remain open before committing o...
Server Management Studio tends to be a bit un-intuitive when it comes to managing Extended Properties, so can anyone recommend a decent tool that improves the situation. One thing I would like to do is to have templates that I can apply objects, thus standardising the nomenclature and content of the properties applied ...
Managing Extended Properties in SQL Server can indeed be a bit cumbersome with SQL Server Management Studio (SSMS). If you’re looking for tools that can simplify this process and help standardize your approach to managing Extended Properties, here are a few options you might consider: 1. **dbForge Studio for SQL Serve...
352
[ { "from": "human", "value": "Server Management Studio tends to be a bit un-intuitive when it comes to managing Extended Properties, so can anyone recommend a decent tool that improves the situation.\nOne thing I would like to do is to have templates that I can apply objects, thus standardising the nomenclat...
What does the expression "Turing Complete" mean? Can you give a simple explanation, without going into too many theoretical details?
Sure! The term "Turing Complete" refers to a system (like a programming language or a computational model) that can perform any calculation that can be done by a Turing machine, given enough time and resources. In simpler terms, if a programming language is Turing Complete, it means you can use it to solve any problem ...
2,856
[ { "from": "human", "value": "What does the expression \"Turing Complete\" mean? \nCan you give a simple explanation, without going into too many theoretical details?\n" }, { "from": "gpt", "value": "Sure! The term \"Turing Complete\" refers to a system (like a programming language or a computati...
And why would I use one over the other in my code?
It seems like you're referring to two options or choices in programming, but it's not clear what specific options you have in mind. In software development, developers often have to choose between various approaches, libraries, frameworks, data structures, algorithms, or even programming languages. Here are a few fact...
1,628
[ { "from": "human", "value": "And why would I use one over the other in my code?\n" }, { "from": "gpt", "value": "It seems like you're referring to two options or choices in programming, but it's not clear what specific options you have in mind. In software development, developers often have to c...
I need to find a bottleneck and need to accurately as possible measure time. Is the following code snippet the best way to measure the performance? DateTime startTime = DateTime.Now; // Some execution process DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime);
The code snippet you provided is a straightforward way to measure the time taken by a process in C#. However, while it works for many purposes, it might not be the most accurate method for performance measurement, especially if the execution time is very short. Here are some considerations and alternative approaches ...
957
[ { "from": "human", "value": "I need to find a bottleneck and need to accurately as possible measure time.\nIs the following code snippet the best way to measure the performance?\nDateTime startTime = DateTime.Now;\n\n// Some execution process\n\nDateTime endTime = DateTime.Now;\nTimeSpan totalTimeTaken = en...
I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this?
To set up a document root in a Visual Web Developer Express project so that you can use paths like `/css/style.css` instead of relative paths, you need to adjust your project settings and possibly the way you reference your resources. Here’s how to do it: ### Steps to Set the Document Root 1. **Set Up Your Project St...
319
[ { "from": "human", "value": "I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like \"/css/style.css' instead of \"css/style.css\". How would I accomplish this?\n" }, { "from": "gpt", "v...
A MySQL query is running significantly slower since adding a group_concat clause. Currently, this query looks as follows: select ... group_concat(distinct category.name) .... from page where left outer join page_category on page.id = page_category.page_id left outer join category on page_category.category_id = categ...
When adding a `GROUP_CONCAT` clause to your SQL query, you may encounter performance issues, especially if there are a lot of entries in the tables involved in the joins. There are several strategies you can use to improve the performance of your query. Here are a few suggestions: 1. **Check Indexes**: Ensure that app...
54
[ { "from": "human", "value": "A MySQL query is running significantly slower since adding a group_concat clause. Currently, this query looks as follows:\nselect ... group_concat(distinct category.name) .... from page where \nleft outer join page_category on page.id = page_category.page_id \nleft outer join c...
How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if (a1.Length != a2.Length) return false; for (int i=0; i<a1.Length; i++) if (a1[i]!=a2[i]) return false; return true; } But I'm looking for either a BCL function or some highly op...
If you're looking for a highly optimized way to compare two byte arrays in C#, the .NET BCL (Base Class Library) provides a few options you can utilize. One of the fastest ways to compare two byte arrays is to use the `Span<T>` or `Memory<T>` types available in .NET Core and .NET 5/6+, which allow for efficient memory ...
876
[ { "from": "human", "value": "How can I do this fast?\nSure I can do this:\nstatic bool ByteArrayCompare(byte[] a1, byte[] a2)\n{\n if (a1.Length != a2.Length)\n return false;\n\n for (int i=0; i<a1.Length; i++)\n if (a1[i]!=a2[i])\n return false;\n\n return true;\n}\n\nBut ...
What is the configuration setting for modifying the default homepage in a Grails application to no longer be appName/index.gsp? Of course you can set that page to be a redirect but there must be a better way.
In a Grails application, to change the default homepage URL (which is typically `appName/index.gsp`), you can modify the `UrlMappings.groovy` file in your Grails application. This file allows you to define custom URL mappings for your application, including the root URL. Here's how to do it: 1. Open the `grails-app/c...
1,055
[ { "from": "human", "value": "What is the configuration setting for modifying the default homepage in a Grails application to no longer be appName/index.gsp? Of course you can set that page to be a redirect but there must be a better way.\n" }, { "from": "gpt", "value": "In a Grails application, ...
I've written a database generation script in SQL and want to execute it in my Adobe AIR application: Create Table tRole ( roleID integer Primary Key ,roleName varchar(40) ); Create Table tFile ( fileID integer Primary Key ,fileName varchar(50) ,fileDescription varchar(500) ,thumbnailID integer ...
In SQL, the standard way to separate multiple queries is to use semicolons (`;`). However, when executing SQL in Adobe AIR using the `SQLStatement` class, you can only run one SQL statement at a time. The `SQLStatement` does not support executing multiple statements in a single call. To work around this limitation, y...
441
[ { "from": "human", "value": "I've written a database generation script in SQL and want to execute it in my Adobe AIR application:\nCreate Table tRole (\n roleID integer Primary Key\n ,roleName varchar(40)\n);\nCreate Table tFile (\n fileID integer Primary Key\n ,fileName varchar(50)\n ,fileDe...
Does anyone know of a FOSS Python lib for generating Identicons? I've looked, but so far I haven't had much luck.
Yes, there are a few free and open-source (FOSS) Python libraries that you can use to generate Identicons. Here are some options you can consider: 1. **Identicon**: - **Library**: `identicon` - **Installation**: You can install it via pip: ```bash pip install identicon ``` - **Usage**: ```...
1,239
[ { "from": "human", "value": "Does anyone know of a FOSS Python lib for generating Identicons? I've looked, but so far I haven't had much luck.\n" }, { "from": "gpt", "value": "Yes, there are a few free and open-source (FOSS) Python libraries that you can use to generate Identicons. Here are some...
I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ... I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor. []'s André Casteliano PS: I'm using Visio...
Yes, you can open multiple diagrams in separate windows using Microsoft Visio 2007, allowing you to arrange them across your monitors. Here’s how you can do it: 1. **Open the First Diagram**: Start Visio and open your first diagram as you normally would. 2. **Open a Second Instance of Visio**: Instead of opening the ...
1,637
[ { "from": "human", "value": "I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ...\nI'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor....
I've got a group of inter-related classes that are all overridden together to create a particular implementation. I'm wondering if it is a good idea to enclose the interrelated subclasses in a namespace. For example purposes, consider the following namespaces and classes: namespace Protocol { public abstract class Me...
Using namespaces effectively in your code can help organize related classes and enhance readability. Your current design clearly distinguishes between different protocols while maintaining a hierarchy that reflects the relationships between the base and derived classes. However, there are a few considerations and best ...
1,072
[ { "from": "human", "value": "I've got a group of inter-related classes that are all overridden together to create a particular implementation. I'm wondering if it is a good idea to enclose the interrelated subclasses in a namespace.\nFor example purposes, consider the following namespaces and classes:\nname...
It happens to me all the time. I accidentally version a file, I do not want to be versioned (i.e. developer/machine specific config-files). If I commit this file, I will mess up the paths on all the other developer machines - they will be unhappy. If I do delete the file from versioning, it will be deleted from the oth...
Yes, you can unversion a file in Git without deleting it from the working directory or from other developers' machines. The process involves removing the file from version control while keeping it on disk and then adding it to your `.gitignore` file so it won't be tracked in the future. Here’s how to do it: 1. **Remov...
596
[ { "from": "human", "value": "It happens to me all the time. I accidentally version a file, I do not want to be versioned (i.e. developer/machine specific config-files).\nIf I commit this file, I will mess up the paths on all the other developer machines - they will be unhappy.\nIf I do delete the file from ...
I'm using the ASP.NET Login Controls and Forms Authentication for membership/credentials for an ASP.NET web application. And I'm using a site map for site navigation. I have ASP.NET TreeView and Menu navigation controls populated using a SiteMapDataSource. But off-limits administrator-only pages are visible to non-ad...
The `role` attribute in the ASP.NET sitemap structure primarily addresses the presentation aspect of your navigation controls. When you assign a `role` to a sitemap node, it determines which users will see that particular node based on their roles, allowing you to restrict visibility in the navigation menu or TreeView ...
318
[ { "from": "human", "value": "I'm using the ASP.NET Login Controls and Forms Authentication for membership/credentials for an ASP.NET web application. And I'm using a site map for site navigation.\nI have ASP.NET TreeView and Menu navigation controls populated using a SiteMapDataSource. But off-limits admi...
Is there a simple way in .NET to quickly get the current protocol, host, and port? For example, if I'm on the following URL: http://www.mywebsite.com:80/pages/page1.aspx I need to return: http://www.mywebsite.com:80 I know I can use Request.Url.AbsoluteUri to get the complete URL, and I know I can use Request.Url.Autho...
In .NET, particularly in ASP.NET, you can easily obtain the current protocol, host, and port from the `HttpRequest` object without manually parsing the URL string. Here's how you can achieve this in a simple manner: 1. Use the `Request.Url.Scheme` property to get the protocol (http or https). 2. Use the `Request.Url...
1,321
[ { "from": "human", "value": "Is there a simple way in .NET to quickly get the current protocol, host, and port? For example, if I'm on the following URL:\nhttp://www.mywebsite.com:80/pages/page1.aspx\nI need to return:\nhttp://www.mywebsite.com:80\nI know I can use Request.Url.AbsoluteUri to get the complet...