instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
This is probably a no brainer but... I've just opened a solution in VS2008 and for some reason the compiler doesn't recognised previously compiled errors. I hit build and I get 100s of errors : Name 'IIf' is not declared. Name 'IsNumeric' is not declared. Name HttpUtility is not declared etc.. Think this must be some...
It sounds like you are dealing with a situation where Visual Studio 2008 is not properly recognizing the necessary references and namespaces that were included in your colleague's environment. Here are some steps you can take to resolve the issue: ### 1. **Check Project References** Make sure that all necessary refere...
41,183
[ { "from": "human", "value": "This is probably a no brainer but... \nI've just opened a solution in VS2008 and for some reason the compiler doesn't recognised previously compiled errors.\nI hit build and I get 100s of errors :\nName 'IIf' is not declared.\nName 'IsNumeric' is not declared.\nName HttpUtility...
Hi im developing an winform application using mvc pattern, If i have a windows form as a view with a button in it, and i want to show another view(winform) on click of button in the first form. In this case whether the view should should notify the button click to the controller and the contoller will instantiate the ...
When implementing the MVC pattern in a WinForms application, the separation of concerns is key. The decision on where to handle the button click can affect how cleanly your application adheres to the MVC principles. Here's a breakdown of your options: ### Option 1: View Notifying the Controller In this approach, the ...
42,724
[ { "from": "human", "value": "Hi im developing an winform application using mvc pattern,\nIf i have a windows form as a view with a button in it, and i want to show another view(winform) on click of button in the first form. \nIn this case whether the view should should notify the button click to the control...
Given the following class, what is your opinion on the best way to handle create/edit where Attributes.Count can be any number. public class Product { public int Id {get;set;} public string Name {get;set;} public IList<Attribute> Attributes {get;set;} } public class Attribute { public string Name {get;set;} ...
When dealing with a dynamic list of attributes for a `Product` in a web application, it's important to create a user-friendly interface that allows users to add, edit, and delete attributes efficiently. Below is a structured approach to handle both the UI and the Action Method: ### UI Considerations 1. **Form Structu...
38,273
[ { "from": "human", "value": "Given the following class, what is your opinion on the best way to handle create/edit where Attributes.Count can be any number.\npublic class Product {\n public int Id {get;set;}\n public string Name {get;set;}\n public IList<Attribute> Attributes {get;set;}\n}\n\npublic cla...
What are the lesser-known but useful features of the Haskell programming language. (I understand the language itself is lesser-known, but work with me. Even explanations of the simple things in Haskell, like defining the Fibonacci sequence with one line of code, will get upvoted by me.) Try to limit answers to the Ha...
**Lazy Evaluation** Haskell employs lazy evaluation, meaning that it does not evaluate expressions until their values are needed. This allows for the creation of infinite data structures and leads to increased efficiency in some cases. For example, you can define an infinite list of Fibonacci numbers like this: ```h...
30,834
[ { "from": "human", "value": "What are the lesser-known but useful features of the Haskell programming language. (I understand the language itself is lesser-known, but work with me. Even explanations of the simple things in Haskell, like defining the Fibonacci sequence with one line of code, will get upvoted...
I'm still working on groking the F# thing - trying to work out how to 'think' in F# rather than just translating from other languages I know. I've recently been thinking about the cases where you don't have a 1:1 map between before and after. Cases where List.map falls down. One example of this is moving averages, wher...
Your implementation of a moving average in F# using a FIFO (First-In, First-Out) queue is quite interesting and demonstrates some functional programming principles. Here are a few thoughts about your approach and potential improvements: ### Code Review and Suggestions: 1. **Queue Implementation**: - Your `Fifo` ty...
37,273
[ { "from": "human", "value": "I'm still working on groking the F# thing - trying to work out how to 'think' in F# rather than just translating from other languages I know.\nI've recently been thinking about the cases where you don't have a 1:1 map between before and after. Cases where List.map falls down.\nO...
Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL? Especially in the context of writing and reading from/to a PHP script. Over time I have used and seen several approaches: tinyint, varchar fields containing the values 0/1, varchar fiel...
In MySQL, since there isn't a dedicated boolean data type, the most common practice is indeed to use `TINYINT`. This choice aligns well with your observations and preferences, and there are several reasons why `TINYINT` is often considered the most optimal for representing boolean values. ### Recommended Approach: `TI...
40,377
[ { "from": "human", "value": "Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL?\nEspecially in the context of writing and reading from/to a PHP script.\nOver time I have used and seen several approaches:\n\ntinyint, varchar f...
What's the best way to get a list of users that are assigned to a SharePoint portal?
To get a list of users assigned to a SharePoint portal, you can follow these methods depending on your permissions and the specific SharePoint environment (SharePoint Online or SharePoint Server): ### For SharePoint Online #### 1. **Using SharePoint Admin Center** - Navigate to the SharePoint Admin Center. - Go...
43,536
[ { "from": "human", "value": "What's the best way to get a list of users that are assigned to a SharePoint portal?\n" }, { "from": "gpt", "value": "To get a list of users assigned to a SharePoint portal, you can follow these methods depending on your permissions and the specific SharePoint enviro...
I have a code sample that gets a SEL from the current object, SEL callback = @selector(mymethod:parameter2); And I have a method like -(void)mymethod:(id)v1 parameter2;(NSString*)v2 { } Now I need to move mymethod to another object, say myDelegate. I have tried: SEL callback = @selector(myDelegate, mymethod:parame...
The syntax you are using to create a selector for a method in a different object is incorrect. In Objective-C, you can only use `@selector()` with the method signature itself, not with an object reference. To call a method defined in another object (like `myDelegate`), you need to create the selector using just the me...
43,127
[ { "from": "human", "value": "I have a code sample that gets a SEL from the current object, \nSEL callback = @selector(mymethod:parameter2);\n\nAnd I have a method like \n -(void)mymethod:(id)v1 parameter2;(NSString*)v2 {\n}\n\nNow I need to move mymethod to another object, say myDelegate.\nI have tried:\nSE...
How can I enable Emacs key bindings in Microsoft Visual C# 2008 Express Edition?
To enable Emacs key bindings in Microsoft Visual C# 2008 Express Edition, you can use a plugin called "Visual Studio Emacs Key Bindings". However, please note that support for older versions of Visual Studio, such as 2008, may be limited, and you might not find an official Emacs key bindings plugin for that version. He...
42,549
[ { "from": "human", "value": "How can I enable Emacs key bindings in Microsoft Visual C# 2008 Express Edition?\n" }, { "from": "gpt", "value": "To enable Emacs key bindings in Microsoft Visual C# 2008 Express Edition, you can use a plugin called \"Visual Studio Emacs Key Bindings\". However, plea...
Do you have idea how many sucessful projects used Velocity framework for developing their UI ?.The reason I am asking is Velocity is replaced in most of the cases by JSP tags, but in our product we still use Velocity frmaework.
While I don’t have specific statistics on the number of successful projects that have used the Apache Velocity framework for UI development, I can provide some insights based on its history and usage trends. ### Overview of Apache Velocity Apache Velocity is a Java-based template engine that provides a simple way to c...
43,525
[ { "from": "human", "value": "Do you have idea how many sucessful projects used Velocity framework for developing their UI ?.The reason I am asking is Velocity is replaced in most of the cases by JSP tags, but in our product we still use Velocity frmaework.\n" }, { "from": "gpt", "value": "While ...
I'm working on a localized application which I develop in SharpDevelop. Based on a tutorial I ran into an error: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: I created the ressource file using Project | Add | New item respective "Empty ressource file"...
To address the error you're encountering with your localized application in SharpDevelop, let's clarify how to manage resource files and cultures in .NET. ### Key Steps to Create and Use Resource Files in .NET 1. **Create Resource Files**: Instead of using "Empty Resource File," you need to create `.resx` files speci...
38,534
[ { "from": "human", "value": "I'm working on a localized application which I develop in SharpDevelop. Based on a tutorial I ran into an error:\n\nCould not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: \n\nI created the ressource file using Project | Add...
I have a style for an items control that binds to an image in the target, it only appears if the target also binds to the image and I have no idea why.. can anyone shed any light on it for me? A simplified version of my style: <Style x:Key="testStyle" TargetType="ItemsControl"> <Setter Property="Control.Template">...
The issue you're experiencing is related to the way WPF data binding works in relation to the `ItemsControl` and its `ItemsPresenter`. When you set a style for the `ItemsControl` and define a `ControlTemplate`, any bindings defined in that template will look for properties in the `DataContext` of the `ItemsControl`. ...
41,983
[ { "from": "human", "value": "I have a style for an items control that binds to an image in the target, it only appears if the target also binds to the image and I have no idea why.. can anyone shed any light on it for me?\nA simplified version of my style:\n<Style x:Key=\"testStyle\" TargetType=\"ItemsCont...
Nothing to add
That's perfectly fine! If you have any questions or if there's anything specific you'd like to discuss, just let me know. I'm here to help!
47,514
[ { "from": "human", "value": "Nothing to add\n" }, { "from": "gpt", "value": "That's perfectly fine! If you have any questions or if there's anything specific you'd like to discuss, just let me know. I'm here to help!" } ]
Greetings, My company uses Peoplesoft for its financials and HR. Our implementation is on Oracle databases. Setting global_names = TRUE forces you to name your database link the same as the target. My question is does anyone know the ramification of setting global_names to false in the init.ora parameter file? Mor...
Setting `GLOBAL_NAMES` to `TRUE` or `FALSE` in your Oracle database environment can have significant implications for how database links function and how database connectivity is managed. ### Implications of Setting `GLOBAL_NAMES = TRUE` 1. **Name Matching Requirement**: With `GLOBAL_NAMES` set to `TRUE`, any databas...
41,653
[ { "from": "human", "value": "Greetings,\nMy company uses Peoplesoft for its financials and HR. Our implementation is on Oracle databases. Setting global_names = TRUE forces you to name your database link the same as the target. My question is does anyone know the ramification of setting global_names to f...
Why does this code: class A { public: explicit A(int x) {} }; class B: public A { }; int main(void) { B *b = new B(5); delete b; } Result in these errors: main.cpp: In function ‘int main()’: main.cpp:13: error: no matching function for call to ‘B::B(int)’ main.cpp:8: note: candidates are: B::B(...
In C++, constructors are not inherited by default. When you derive class `B` from class `A`, the constructor of `A` (even though it is public) is not automatically inherited by `B`. This is why you are seeing the error when you attempt to instantiate an object of type `B` with an integer argument. Your class `A` has a...
43,953
[ { "from": "human", "value": "Why does this code:\nclass A\n{\n public: \n explicit A(int x) {}\n};\n\nclass B: public A\n{\n};\n\nint main(void)\n{\n B *b = new B(5);\n delete b;\n}\n\nResult in these errors:\n\nmain.cpp: In function ‘int main()’:\nmain.cpp:13: error: no matching function fo...
Why is it not advisable to use JavaScript in JSP? One rationale that I can think of is turning off the feature in browser would stop the code from executing. Is there any other reason behind this?
Using JavaScript in JSP (JavaServer Pages) can be a common practice, but there are several reasons why one might be cautious or consider the implications of doing so. Here are some of the reasons beyond the concern of users disabling JavaScript in their browsers: 1. **Separation of Concerns**: Mixing JavaScript direct...
43,011
[ { "from": "human", "value": "Why is it not advisable to use JavaScript in JSP? One rationale that I can think of is turning off the feature in browser would stop the code from executing. Is there any other reason behind this?\n" }, { "from": "gpt", "value": "Using JavaScript in JSP (JavaServer P...
Suppose that I have a Java class with a static method, like so: class A { static void foo() { // Which class invoked me? } } And suppose further that class A has an arbitrary number of subclasses: class B extends A { } class C extends A { } class D extends A { } ... Now consider the following me...
In Java, static methods belong to the class rather than to instances of the class. Therefore, when you invoke a static method like `A.foo()`, `B.foo()`, `C.foo()`, or `D.foo()`, it is always associated with the class itself, not with the class's instance. This means that `foo()` does not have a built-in reference to th...
41,311
[ { "from": "human", "value": "Suppose that I have a Java class with a static method, like so:\n\nclass A\n{\n static void foo()\n {\n // Which class invoked me?\n }\n}\n\nAnd suppose further that class A has an arbitrary number of subclasses:\n\nclass B extends A { }\nclass C extends A { }\nc...
I have an nmake-based project which in turn calls the asp compiler, which can throw an error, which nmake seems to recognize: NMAKE : fatal error U1077: 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe' : return code '0x1' However, when I call nmake from within a batch file, the environment variable ...
The behavior you are experiencing with `nmake` and the `ERRORLEVEL` variable is a common point of confusion. The issue arises because `nmake` does not propagate the exit codes from the commands it runs in the way you might expect when executed from a batch file. Instead, it captures the exit code of the command it runs...
42,608
[ { "from": "human", "value": "I have an nmake-based project which in turn calls the asp compiler, which can throw an error, which nmake seems to recognize:\nNMAKE : fatal error U1077: 'C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_compiler.exe' : return code '0x1'\n\nHowever, when I call nmake fr...
I have Datalist that is inside an updatepanel and it is in panel in modalpopupextender; I can list items as I wanted. I am also putting 2 buttons for Delete and AddBelow. Here is the markup: <asp:DataList ID="SpeedDialsDL" runat="server"> <ItemTemplate> <table id="speedDialValueEdito...
The error you're encountering is related to ASP.NET's event validation mechanism, which is designed to prevent certain types of security vulnerabilities. When you disable event validation, it is generally not recommended because it can introduce security risks. Instead, there are a few things you can check to resolve t...
40,481
[ { "from": "human", "value": "I have Datalist that is inside an updatepanel and it is in panel in modalpopupextender;\nI can list items as I wanted. I am also putting 2 buttons for Delete and AddBelow. Here is the markup:\n<asp:DataList ID=\"SpeedDialsDL\" runat=\"server\">\n <ItemTemplate>\n ...
I got a problem at my blog. I got visits from kind bots who leave "nice" comments to my blog posts :( I'm wondering if there is a smarter way to keep them out, besides using the captcha modules. My problem with the captcha modules is that I thinks they are anoying to the user :( I don't know if it's any help to anyon...
Dealing with bot-generated comments can indeed be a challenge, especially when you want to maintain a good user experience. Here are some strategies to mitigate this issue without resorting to captchas: 1. **Comment Moderation**: - Implement a moderation system where comments from new users or users with no prior c...
42,757
[ { "from": "human", "value": "I got a problem at my blog. I got visits from kind bots who leave \"nice\" comments to my blog posts :( \nI'm wondering if there is a smarter way to keep them out, besides using the captcha modules.\nMy problem with the captcha modules is that I thinks they are anoying to the us...
I am working on a design spec for a new application that will be heavily workflow driven. Before I re-invent the wheel, is there a decent lightweight workflow engine that plugs into ASP.NET already around? Basically, I'm looking for something that handles moving through a defined set of workflow pages while handling st...
It sounds like you're looking to create a lightweight workflow engine tailored for your ASP.NET application that can manage navigation through defined workflow pages while also handling state management. Given that you're working with .NET 2.0 and are not looking for something as complex as Windows Workflow Foundation ...
40,916
[ { "from": "human", "value": "I am working on a design spec for a new application that will be heavily workflow driven.\nBefore I re-invent the wheel, is there a decent lightweight workflow engine that plugs into ASP.NET already around?\nBasically, I'm looking for something that handles moving through a defi...
The Flex 3 docs are fairly basic. Can someone post a more complete example that uses the control's events? I'm still trying to get my head around ActionScript events.
Certainly! Below is a more comprehensive example that demonstrates how to use Flex 3 controls and handle their events using ActionScript. This example will create a simple application with a button, a text input, and a label. When the button is clicked, it will take the text input value and display it in the label. ##...
40,436
[ { "from": "human", "value": "The Flex 3 docs are fairly basic. Can someone post a more complete example that uses the control's events? I'm still trying to get my head around ActionScript events.\n" }, { "from": "gpt", "value": "Certainly! Below is a more comprehensive example that demonstrates ...
I'm looking for a free JavaScript obfuscator. Would compression be enough? What tools would you recommend? Of course, I don't need military-style obfuscation, I need a simple way to prevent kiddies from stealing my javascript by looking at the source or by using something simple such as unescape(). Thanks, Tom
Hi Tom, If you're looking to obfuscate your JavaScript code to deter casual users from easily accessing or understanding it, there are several tools available that can help you achieve this without requiring military-grade security. While compression can make your code less readable, it won't provide true obfuscation....
42,073
[ { "from": "human", "value": "I'm looking for a free JavaScript obfuscator. Would compression be enough? What tools would you recommend? Of course, I don't need military-style obfuscation, I need a simple way to prevent kiddies from stealing my javascript by looking at the source or by using something simple...
In my JSF/Facelets app, here's a simplified version of part of my form: <h:form id="myform"> <h:inputSecret value="#{createNewPassword.newPassword1}" id="newPassword1" /> <h:message class="error" for="newPassword1" /> <h:inputSecret value="#{createNewPassword.newPassword2}" id="newPassword2" /> <h:message class...
To achieve your requirement of displaying error messages for specific input fields in a JSF application while utilizing the `h:message` tag, you need to ensure that you're using the correct IDs when adding messages to the `FacesContext`. In your case, you've added a message with the key `"newPassword"` in the `contin...
41,241
[ { "from": "human", "value": "In my JSF/Facelets app, here's a simplified version of part of my form:\n<h:form id=\"myform\">\n <h:inputSecret value=\"#{createNewPassword.newPassword1}\" id=\"newPassword1\" />\n <h:message class=\"error\" for=\"newPassword1\" />\n <h:inputSecret value=\"#{createNewPasswor...
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to translate to Delphi Prism XNA Tutorial 1 "Displaying a 3D Model on the Screen" (http://msdn.microsoft.com/en-us/library/bb197293.aspx). Project compiles fine, but I cannot load a model. It looks like there is a new "contentproj" type in XNA that ...
In Delphi Prism (now known as Embarcadero's Oxygene), the XNA content pipeline is not directly accessible as it is in C#. The `contentproj` format you're referring to is specifically tailored for use with XNA in Visual Studio, and it is not natively compatible with Delphi Prism. However, you can still use 3D models in...
39,557
[ { "from": "human", "value": "I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to translate to Delphi Prism XNA Tutorial 1 \"Displaying a 3D Model on the Screen\" (http://msdn.microsoft.com/en-us/library/bb197293.aspx). \nProject compiles fine, but I cannot load a model. It looks like th...
Do you put unit tests in the same project for convenience or do you put them in a separate assembly? If you put them in a separate assembly like we do, we end up with a number of extra projects in the solution. It's great for unit testing while coding but how do you release the application without all of these extra a...
The choice between placing unit tests in the same project or in a separate assembly depends on several factors, including project complexity, team practices, and organizational standards. Here are some considerations for both approaches: ### Placing Unit Tests in the Same Project **Advantages:** 1. **Convenience:** Ea...
43,339
[ { "from": "human", "value": "Do you put unit tests in the same project for convenience or do you put them in a separate assembly?\nIf you put them in a separate assembly like we do, we end up with a number of extra projects in the solution. It's great for unit testing while coding but how do you release th...
How do I hide the prev/today/next navigation in jQuery DatePicker? I'm happy with just the Month and Year drop down boxes. Also how do I disable the animations? @tvanfosson - I already tried hideIfNoPrevNext but that only works if you don't have a date range that spans two months. The duration option did the trick at ...
To hide the prev/today/next navigation buttons in jQuery DatePicker and only show the month and year dropdowns, you can use the `beforeShow` callback to manipulate the DatePicker's HTML before it gets displayed. This way, you can remove the navigation buttons. Here's how you can do that: ```javascript $(function() {...
42,590
[ { "from": "human", "value": "How do I hide the prev/today/next navigation in jQuery DatePicker?\nI'm happy with just the Month and Year drop down boxes.\nAlso how do I disable the animations?\n@tvanfosson - I already tried hideIfNoPrevNext but that only works if you don't have a date range that spans two mo...
I want to override the bad default tabbing scheme in emacs so that it will work like most other editors (eclipse, notepad++). I want to set it so that regardless of mode, tab will insert a tab, and pressing enter will keep me at my current tab depth. I tried this, but it does nothing: (global-set-key (kbd "TAB") 'tab-t...
To customize Emacs so that pressing `TAB` inserts a tab character and pressing `RET` (Enter) keeps you at the current indentation level, you can configure it as follows. Here’s how to do this step by step: 1. **Insert a Tab Character with `TAB`:** You need to redefine the `TAB` key to insert a tab character instead of...
41,836
[ { "from": "human", "value": "I want to override the bad default tabbing scheme in emacs so that it will work like most other editors (eclipse, notepad++). I want to set it so that regardless of mode, tab will insert a tab, and pressing enter will keep me at my current tab depth.\nI tried this, but it does n...
So regular expressions seem to match on the longest possible match. For instance: public static void main(String[] args) { String s = "ClarkRalphKentGuyGreenGardnerClarkSupermanKent"; Pattern p = Pattern.compile("Clark.*Kent", Pattern.CASE_INSENSITIVE); Matcher myMatcher = p.matcher(s); int i = 1; ...
To achieve your goal of matching substrings from "Clark" to "Kent" without overlapping occurrences of "Kent", you can use a regular expression that includes a negative lookahead assertion to ensure that "Kent" does not occur within the match. Here's how you can modify your regex to achieve this: ```java import java....
43,136
[ { "from": "human", "value": "So regular expressions seem to match on the longest possible match. For instance:\npublic static void main(String[] args) {\n String s = \"ClarkRalphKentGuyGreenGardnerClarkSupermanKent\";\n Pattern p = Pattern.compile(\"Clark.*Kent\", Pattern.CASE_INSENSITIVE);\n Matc...
I'm loading an html snippet using $("#TemplateDump").load("Themes/default.template", function() { processTemplate() }) The html i am loading contains <div> `hello ##name##, your age is ##age##. your page is <a href="##website##">here</a> </div> I need to replace the ## placeholders with "joe","112" and "www.whateve...
You can certainly use jQuery to replace placeholders in the loaded HTML snippet. While there are no built-in jQuery methods for placeholder replacement, you can create a simple function to achieve this without relying on straight JavaScript `.replace()`. Here’s one way to do it using jQuery: ```javascript $("#Templa...
43,773
[ { "from": "human", "value": "I'm loading an html snippet using \n$(\"#TemplateDump\").load(\"Themes/default.template\", function() { processTemplate() })\n\nThe html i am loading contains\n<div>\n`hello ##name##, your age is ##age##. \nyour page is <a href=\"##website##\">here</a>\n</div>\n\nI need to repla...
I am using XmlSerializer to write and read an object to xml in C#. I currently use the attributes XmlElement and XmlIgnore to manipulate the serialization of the object. If my xml file is missing an xml element that I require, my object still deserializes (xml -> object) just fine. How do I indicate (preferably via ...
The `XmlSerializer` in C# does not have built-in support for marking XML elements as required directly via attributes. However, you can implement this behavior by manually checking for the presence of required elements after deserialization. ### Step 1: Custom Class with Deserialization Checks You can create a custo...
39,184
[ { "from": "human", "value": "I am using XmlSerializer to write and read an object to xml in C#. I currently use the attributes XmlElement and XmlIgnore to manipulate the serialization of the object.\nIf my xml file is missing an xml element that I require, my object still deserializes (xml -> object) just ...
I'm using the following code to retrieve a message from the database and then write it out to a html page: Dim strDSN, cnn, cmd strDSN = "Driver={SQL Server};" & "Server=(local)\sql2k5;" & ... set cnn = Server.CreateObject("ADODB.Connection") cnn.ConnectionString = strDSN cnn.CursorLocation = adUseClient cnn.Open set ...
The issue you're encountering where the message is displayed as "???????" typically indicates a problem with character encoding. In your case, it seems like the database contains Unicode characters (like Cyrillic letters), but your application is not properly handling them when retrieving and displaying the data. Here...
42,042
[ { "from": "human", "value": "I'm using the following code to retrieve a message from the database and then write it out to a html page: \nDim strDSN, cnn, cmd\nstrDSN = \"Driver={SQL Server};\" & \"Server=(local)\\sql2k5;\" & ...\nset cnn = Server.CreateObject(\"ADODB.Connection\")\ncnn.ConnectionString = s...
I have an application that prints by generating text files with embedded printer codes, then basically just copies the file to the printer to print. I need to take that print file and convert it to an image - just as if it was printed then scanned. My first thought was to setup a printer with a postscript printer driv...
Converting a print file directly to an image in the way you've described can be a bit tricky, but there are several approaches you can take. Here's a step-by-step guide you could follow: ### Option 1: Using Ghostscript 1. **Set up your printer**: - Make sure you have a printer configured with a PostScript driver t...
42,665
[ { "from": "human", "value": "I have an application that prints by generating text files with embedded printer codes, then basically just copies the file to the printer to print. I need to take that print file and convert it to an image - just as if it was printed then scanned.\nMy first thought was to setu...
I have a SUM array formula that has multiple nested IF statements, making it very inefficient. My formula spans over 500 rows, but here is a simple version of it: {=SUM(IF(IF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17>0, IF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17,0))} As you can see, the first half of the formula checks where the ...
To improve the efficiency of your SUM formula without duplicating the IF statements and while still calculating the desired sum correctly, you can leverage a combination of `MAX` and array operations. From your original formula, it looks like you want to compare two sets of values and subtract a third set, but only w...
41,631
[ { "from": "human", "value": "I have a SUM array formula that has multiple nested IF statements, making it very inefficient. My formula spans over 500 rows, but here is a simple version of it:\n{=SUM(IF(IF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17>0,\nIF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17,0))}\n\nAs you can see, th...
Does anyone know if its possible to create a new property on an existing Entity Type which is based on 2 other properties concatenated together? E.g. My Person Entity Type has these fields "ID", "Forename", "Surname", "DOB" I want to create a new field called "Fullname" which is Forenames + " " + Surname So i end up ...
In Entity Framework, if you want to create a new computed property based on other properties of an existing entity type (like your `Person` entity), you have a few options. However, it’s important to note that you cannot directly add a computed property to an entity type in the model as a part of the conceptual model; ...
40,742
[ { "from": "human", "value": "Does anyone know if its possible to create a new property on an existing Entity Type which is based on 2 other properties concatenated together?\nE.g. My Person Entity Type has these fields \"ID\", \"Forename\", \"Surname\", \"DOB\"\nI want to create a new field called \"Fullnam...
I have a work laptop that was purchased new, but it came without the CD. It has XP Pro, but it did not come with IIS installed. This looked to be a good approach: http://ezinearticles.com/?Guide---How-To-Install-IIS-on-Windows-XP-SP2-Without-CD&id=416853 However, I wanted to check here to see if there were alternative ...
If you're looking to install IIS (Internet Information Services) on Windows XP Pro and you don't have the installation CD, there are a few approaches you could consider: ### 1. Install from Windows Features: If your copy of Windows XP Pro includes the necessary files, you may be able to enable IIS directly through the...
41,865
[ { "from": "human", "value": "I have a work laptop that was purchased new, but it came without the CD. It has XP Pro, but it did not come with IIS installed. This looked to be a good approach:\nhttp://ezinearticles.com/?Guide---How-To-Install-IIS-on-Windows-XP-SP2-Without-CD&id=416853\nHowever, I wanted to c...
I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException: Collection was modified; enumeration operation may not execute. private Hashtable htSettings_m = new Hashtable(); htSettings_m.Add("SizeWidth", "728"); htSettings_m.Add("SizeHeight", "450"); string sKey = ""; string sValu...
The `InvalidOperationException` you are encountering occurs because you are modifying the `Hashtable` (`htSettings_m`) while it is being enumerated in the `foreach` loop. In C#, modifying a collection while iterating over it is not allowed because it invalidates the enumerator. To avoid this error, you can use one of ...
41,648
[ { "from": "human", "value": "I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.\nprivate Hashtable htSettings_m = new Hashtable();\nhtSettings_m.Add(\"SizeWidth\", \"728\");\nhtSettings_m.Add(\"Si...
I've got the following settings in my postgres conf: log_destination = 'stderr' redirect_stderr = on log_directory = '/tmp/psqlog' log_statement = 'all' And yet no logs are logged. What am I missing here? There is reference on the internet to a variable called "logging_collector", but when I try and set that, postgres ...
It seems like you're trying to configure PostgreSQL to log statements to a file, but you’re encountering some issues. Here are a few things to consider: 1. **logging_collector**: This setting controls whether PostgreSQL captures its log output in a log file or not. In your case, since you're attempting to log to `stde...
40,828
[ { "from": "human", "value": "I've got the following settings in my postgres conf:\nlog_destination = 'stderr'\nredirect_stderr = on\nlog_directory = '/tmp/psqlog'\nlog_statement = 'all'\nAnd yet no logs are logged. What am I missing here? There is reference on the internet to a variable called \"logging_col...
How do you open a path in explorer by code in c++. I googled and couldn't find any thing but systems commands to do this, however, i dont want it to block or show the console window.
To open a path in Windows Explorer using C++ without blocking or showing a console window, you can use the Windows API. Specifically, you can use the `ShellExecute` function to launch Windows Explorer with the desired path. Here's a simple example demonstrating how to do this: ```cpp #include <windows.h> void OpenPa...
43,634
[ { "from": "human", "value": "How do you open a path in explorer by code in c++. I googled and couldn't find any thing but systems commands to do this, however, i dont want it to block or show the console window.\n" }, { "from": "gpt", "value": "To open a path in Windows Explorer using C++ withou...
I am trying to localize strings created by Apache Beehive and netui default pager. I'd like to translate language of this output. Page 1 of 3 First / Previous Next / Last My .jsp code looks something like this <netui-data:dataGrid name="searchResultsGrid" dataSource="pageInput.someData"> <netui-data:header> ...
To localize strings in an Apache Beehive application using the NetUI pager, you'll need to provide message properties files that contain the translations for the keys associated with pagination. The process involves a few steps: ### Step 1: Define Message Properties Files You will need to create a `.properties` file ...
38,162
[ { "from": "human", "value": "I am trying to localize strings created by Apache Beehive and netui default pager. \nI'd like to translate language of this output.\nPage 1 of 3 First / Previous Next / Last\n\nMy .jsp code looks something like this\n<netui-data:dataGrid name=\"searchResultsGrid\" dataSource=...
I have a first dialog with a simple button on it and while clicking the button, a second dialog is created using CDialog::Create(IDD,this). I would like the parent to be notified when the second dialog is destroyed but without adding any code to the second dialog i.e., without adding a m_pParent->Notify() line in OnDes...
To accomplish the task of notifying the parent dialog when a second modeless dialog is destroyed, without modifying the second dialog, you can use message reflection or the parent dialog's message handling to intercept messages related to the second dialog. Since you are looking for a generic solution that doesn't in...
40,351
[ { "from": "human", "value": "I have a first dialog with a simple button on it and while clicking the button, a second dialog is created using CDialog::Create(IDD,this). I would like the parent to be notified when the second dialog is destroyed but without adding any code to the second dialog i.e., without a...
Following up from this question: How can I unlock a file that is locked by a process in .NET, how do I programmatically get a list of files that are locked in a particular folder and its subfolders? I'm using Windows 2003, .NET 3.5, C# 3.0. Update: some background... basically we're archiving closed websites on a share...
To identify and list files that are currently locked by any processes in a specific directory and its subdirectories in a Windows environment using C# (particularly .NET 3.5), you can use a combination of `DirectoryInfo`, `FileInfo`, and the `FileStream` class to check for locked files. However, detecting a locked file...
40,540
[ { "from": "human", "value": "Following up from this question: How can I unlock a file that is locked by a process in .NET, how do I programmatically get a list of files that are locked in a particular folder and its subfolders?\nI'm using Windows 2003, .NET 3.5, C# 3.0.\nUpdate: some background... basically...
Suppose I have a .NET assembly, A, which uses reflection to load assemblies B and C (also .NET). These two assemblies both implement a number of large interfaces (the same for both). When a method is called in A it tries to make B do the work. However, B is unreliable and might throw exceptions. Now A has two modes, on...
To reduce the amount of boilerplate code required to implement error handling for methods in assembly B while still allowing you to switch between assemblies B and C based on the error handling strategy, you can employ a few techniques, including higher-order functions, a decorator pattern, or using a dynamic proxy pat...
40,641
[ { "from": "human", "value": "Suppose I have a .NET assembly, A, which uses reflection to load assemblies B and C (also .NET). These two assemblies both implement a number of large interfaces (the same for both). When a method is called in A it tries to make B do the work. However, B is unreliable and might ...
Just wondering if any of you guys know of any web-based/browser-based employee scheduling software/tools? Currently doing it all in Excel, but it just isnt intelligent enough... any product suggestions? Needs to handle multiple employees time over weeks and months... to schedule in work short-term and long-term, allow...
There are several web-based employee scheduling tools that can help you manage your agency's workforce effectively. Here are some popular options that might meet your needs: 1. **When I Work**: This tool is user-friendly and allows you to schedule employees, track time, and manage availability. It also offers features...
43,785
[ { "from": "human", "value": "Just wondering if any of you guys know of any web-based/browser-based employee scheduling software/tools? \nCurrently doing it all in Excel, but it just isnt intelligent enough... any product suggestions?\nNeeds to handle multiple employees time over weeks and months... to sched...
We have a fairly complex web application (.NET 3.5) that need to be launched from a CD-ROM (or DVD, or from an USB key). I'm thinking of using Cassini and SqlCe for the database (we use LinqToSql for data access, so I think it's the only choice without rewriting the entire data access classes). Is anyone ever done som...
Launching a web application from removable media like CD-ROM, DVD, or USB key is certainly a unique challenge, especially when working with an older framework like .NET 3.5. Using Cassini (the built-in ASP.NET web server) and SQL Server Compact Edition (SQL CE) is a reasonable approach, given the constraints. Here are ...
40,253
[ { "from": "human", "value": "We have a fairly complex web application (.NET 3.5) that need to be launched from a CD-ROM (or DVD, or from an USB key). \nI'm thinking of using Cassini and SqlCe for the database (we use LinqToSql for data access, so I think it's the only choice without rewriting the entire dat...
I need to add localization to the exceptions thrown by my application as a lot are ApplicationExceptions and handled and logged to an error report. Ideally I want to create a new Exception, imheriting from ApplicationException that I can pass the resource key as well as arguments to, so that the exception messsage can...
To create a localized exception in VB.NET, you can inherit from `ApplicationException`, but since you want to set the message dynamically based on resource keys and arguments, one way to do this is by overriding the constructor that accepts a message. Although you can't set the `Message` property directly (as it's read...
43,705
[ { "from": "human", "value": "I need to add localization to the exceptions thrown by my application as a lot are ApplicationExceptions and handled and logged to an error report. Ideally I want to create a new Exception, imheriting from ApplicationException that I can pass the resource key as well as argumen...
I'm using SQL Server 2005 and the the Dynamic Management View sys.dm_db_missing_index_details. It continues to tell me that Table1 really needs an index on ColumnX and ColumnY, but that index already exists! I've even dropped and re-created it a couple times to no avail. More specifics: The view lists Column1 under equ...
It seems you are encountering a common issue with SQL Server's dynamic management views (DMVs) that report missing indexes. Here are several things to check and consider: 1. **Index Definition**: You have created an index on `Column1` (as the equality column) and `Column2` (as the inequality column), which is correct ...
37,436
[ { "from": "human", "value": "I'm using SQL Server 2005 and the the Dynamic Management View sys.dm_db_missing_index_details. It continues to tell me that Table1 really needs an index on ColumnX and ColumnY, but that index already exists! I've even dropped and re-created it a couple times to no avail.\nMore s...
The scenario: we have a web system that automatically generates office 2003 excel files "on the fly" (using the 2003 XML file format, not the binary format.) These files do get kept on the web server for various things. Now, we're in a situation where the client would really like us to take the xls files generated by ...
To accomplish the task of merging multiple Excel files generated in the Excel 2003 XML format, you can use the Open XML SDK, which provides a way to manipulate Office documents programmatically. However, since you're working with .NET Framework 2.0, using a library that supports the older framework will be necessary, a...
40,430
[ { "from": "human", "value": "The scenario: we have a web system that automatically generates office 2003 excel files \"on the fly\" (using the 2003 XML file format, not the binary format.) These files do get kept on the web server for various things.\nNow, we're in a situation where the client would really...
Here's the scenario I have a Grid with some TextBlock controls, each in a separate cell in the grid. Logically I want to be able to set the Visibility on them bound to a property in my ViewModel. But since they're each in a separate cell in the grid, I have to set each TextBlock's Visibility property. Is there a way of...
In WPF (Windows Presentation Foundation), if you want to set properties like `Visibility` for multiple controls (like `TextBlock`s) in a `Grid` while they are in separate cells, you can use a combination of data binding and a common property in your ViewModel. However, there's no built-in "non-visual group" that automa...
40,241
[ { "from": "human", "value": "Here's the scenario\nI have a Grid with some TextBlock controls, each in a separate cell in the grid. Logically I want to be able to set the Visibility on them bound to a property in my ViewModel. But since they're each in a separate cell in the grid, I have to set each TextBloc...
I've got some code that will generically get all Controls in a form and put them in a list. Here's some of the code: private List<Control> GetControlList(Form parentForm) { List<Control> controlList = new List<Control>(); AddControlsToList(parentForm.Controls, controlList); ...
To extend your `GetControlList` method to also include items from `MenuStrip`, `ToolStrip`, and `StatusStrip`, you will need to handle these specific control types separately since they do not expose a `Controls` property in the same way as other containers like `Panel` or `GroupBox`. Instead, you can use `Items` for `...
41,628
[ { "from": "human", "value": "I've got some code that will generically get all Controls in a form and put them in a list. Here's some of the code:\n private List<Control> GetControlList(Form parentForm)\n {\n List<Control> controlList = new List<Control>();\n AddControlsTo...
What are the best ways of developing a subscription type website that provides lesson content (like Lynda.com)? How do you protect the content from download (audio and video)? What's the best way to handle passwords? Can the user have a login name and password, and then also have an additional password that changes on ...
Developing a subscription-based website that provides lesson content, similar to platforms like Lynda.com, involves several steps and considerations. Below are best practices and suggestions for various aspects of such a site, including content protection, password management, and strategies to minimize unauthorized sh...
41,156
[ { "from": "human", "value": "What are the best ways of developing a subscription type website that provides lesson content (like Lynda.com)?\nHow do you protect the content from download (audio and video)?\nWhat's the best way to handle passwords?\nCan the user have a login name and password, and then also ...
I'm looking for an algorithm to determine ratings or tags for items when my own input is giving the user random sets of these items and letting them tell me which ratings or tags are within that set. For example, they might say if a set of images contains any "good" photos and out of several random sets and I then want...
Yes, your approach makes sense and resembles a form of active learning combined with a collaborative filtering framework. You're looking to build a system that learns from user input to classify items (e.g., images) into categories (e.g., "good" or "bad"). This process involves leveraging user feedback to refine and ad...
42,041
[ { "from": "human", "value": "I'm looking for an algorithm to determine ratings or tags for items when my own input is giving the user random sets of these items and letting them tell me which ratings or tags are within that set. For example, they might say if a set of images contains any \"good\" photos and...
I'm working with a GridView that uses a SqlDataSource element that looks like this: <asp:SqlDataSource ID="InventoryDB" runat="server" ConnectionString="<%$ ConnectionStrings:InventoryConnectionString %>" SelectCommand="SELECT [Server], [Customer] FROM [Website] WHERE [Owner] = 'someOwner'"> ...
To achieve the functionality you want, you'll need to set the `SelectCommand` property of the `SqlDataSource` dynamically in your code-behind rather than using data-binding syntax directly in the `SelectCommand` property. The `<%# ... %>` syntax is typically used for data-binding expressions, which are evaluated during...
43,661
[ { "from": "human", "value": "I'm working with a GridView that uses a SqlDataSource element that looks like this:\n <asp:SqlDataSource ID=\"InventoryDB\" runat=\"server\" ConnectionString=\"<%$ ConnectionStrings:InventoryConnectionString %>\"\n SelectCommand=\"SELECT [Server], [Customer] FR...
What's the best type 4 Oracle JDBC driver? What I want: Stable, few bugs and quick fixes Should warn about the usual JDBC pitfalls (connection leaks, etc) Must support CLOB [EDIT] My main issues with the "free" Oracle Type 4 driver are: I spent two weeks hunting down a cursor leak in the CLOB support code (closing t...
When it comes to choosing a Type 4 JDBC driver for Oracle that aligns with your requirements—stability, fewer bugs, quick fixes, CLOB support, and better overall functionality than the free Oracle driver—there are a few options you might want to consider: 1. **Oracle JDBC Thin Driver (Commercial Version)**: While you ...
40,980
[ { "from": "human", "value": "What's the best type 4 Oracle JDBC driver?\nWhat I want:\n\nStable, few bugs and quick fixes\nShould warn about the usual JDBC pitfalls (connection leaks, etc)\nMust support CLOB\n\n[EDIT] My main issues with the \"free\" Oracle Type 4 driver are:\n\nI spent two weeks hunting do...
Does any one worked with ABBYY FineReader Engine 9.0 API? There are almost no resources available on internet. The only thing is the developer reference help file installed along with it. But that is not sufficient enough.
Working with ABBYY FineReader Engine 9.0 API can indeed be challenging, especially given the limited resources available online. Here are some general tips and steps that might help you get started with the API: 1. **Installation and Setup**: - Make sure that you have ABBYY FineReader Engine 9.0 installed properly ...
42,201
[ { "from": "human", "value": "Does any one worked with ABBYY FineReader Engine 9.0 API? There are almost no resources available on internet. The only thing is the developer reference help file installed along with it. But that is not sufficient enough.\n" }, { "from": "gpt", "value": "Working wit...
how will i define the function 'simplify' using primitive recursion? simplify :: Expr -> Expr ... simplify Simplify an expression using basic arithmetic, e.g. simplify (Plus (Var "x") (Const 0)) = Var "x"
To define the `simplify` function using primitive recursion in Haskell, we first need to establish what an `Expr` might look like. For example, we could represent expressions as a sum of constants, variables, and operations. Here's a basic representation of arithmetic expressions: ```haskell data Expr = Const Int ...
38,905
[ { "from": "human", "value": "how will i define the function 'simplify' using primitive recursion?\nsimplify :: Expr -> Expr\n ... \nsimplify \nSimplify an expression using basic arithmetic, e.g. \n simplify (Plus (Var \"x\") (Const 0)) = Var \"x\" \n" }, { "from": "gpt", "value": "To def...
I have data in XHTML and plain text in SQL Server 2005. I need to generate a Word 2003 document from this data. I was thinking of using Word XML 2003 to do this. Are there any good tools to generate Word XML 2003?
Yes, generating a Word 2003 document using Word XML (also known as Office XML) can be a feasible approach. Here are a few tools and libraries that you might find helpful for creating Word XML documents: 1. **Microsoft Office Interop**: If you have Microsoft Word installed on your server, you can use the Office Interop...
40,067
[ { "from": "human", "value": "I have data in XHTML and plain text in SQL Server 2005. I need to generate a Word 2003 document from this data. I was thinking of using Word XML 2003 to do this. Are there any good tools to generate Word XML 2003? \n" }, { "from": "gpt", "value": "Yes, generating a W...
I'm trying to display the contents of an ordered array in something like a JTextField. for (int i=0; i<array.length; i++) { this.textField.setText(array[i]); } This won't work for two reasons. The first minor reason: if the array length is 4 then jtextfield is getting it's value reset 4 times rather than appending...
You're correct that simply setting the text of a `JTextField` in a loop will overwrite its contents on each iteration. To display all the elements of the array in a single `JTextField`, you'll need to concatenate the elements into a single string and then set that string as the text of the `JTextField`. Additionally, ...
41,589
[ { "from": "human", "value": "I'm trying to display the contents of an ordered array in something like a JTextField.\nfor (int i=0; i<array.length; i++) {\n this.textField.setText(array[i]);\n}\n\nThis won't work for two reasons. The first minor reason: if the array length is 4 then jtextfield is getting ...
I have defined a personalizable property on a web part and I would like to modify its value from JavaScript. Is it possible?
Modifying a personalizable property of a web part directly from JavaScript is not typically supported due to the way web parts and personalization are designed in environments like SharePoint. Personalizable properties are generally intended to be modified through the web part's user interface or server-side code. How...
43,407
[ { "from": "human", "value": "I have defined a personalizable property on a web part and I would like to modify its value from JavaScript. Is it possible?\n" }, { "from": "gpt", "value": "Modifying a personalizable property of a web part directly from JavaScript is not typically supported due to ...
Given say 11/13/2008 - 12/11/2008 as the value posted back in TextBox, what would be the best way to parse out the start and end date using C#? I know I could use: DateTime startDate = Convert.ToDateTime(TextBoxDateRange.Text.Substring(0, 10)); DateTime endDate = Convert.ToDateTime(TextBoxDateRange.Text.Substring(13, 1...
Yes, there is a more efficient and cleaner way to parse the date range string in C#. Instead of manually using `Substring` to extract the start and end dates, you can split the string based on the delimiter, which in this case is " - ". This method is more maintainable and reduces the chances of errors when the format ...
43,226
[ { "from": "human", "value": "Given say 11/13/2008 - 12/11/2008 as the value posted back in TextBox, what would be the best way to parse out the start and end date using C#?\nI know I could use:\nDateTime startDate = Convert.ToDateTime(TextBoxDateRange.Text.Substring(0, 10));\nDateTime endDate = Convert.ToDa...
There is a simple C++ method to use pattern matching on strings? The code should sound like this: if (regexpcmp("l?nole*[0-9]", "linoleum1")) { //we have a match! } else { //no match }
In C++, you can use the `<regex>` library to perform regular expression matching. The `std::regex` class and the `std::regex_match` or `std::regex_search` functions can be employed for this purpose. However, the specific `regexpcmp` function you're referring to is not a standard part of the C++ library. Here's an exam...
43,269
[ { "from": "human", "value": "There is a simple C++ method to use pattern matching on strings? The code should sound like this:\nif (regexpcmp(\"l?nole*[0-9]\", \"linoleum1\")) {\n //we have a match!\n} else {\n //no match \n}\n\n" }, { "from": "gpt", "value": "In C++, you can use the `<regex>...
I want to design a web page with a banner and an iframe. I hope the iframe can fill all the remaining page height and be resized automatically as the browser is resizing. Is it possible to get it done without writing JavaScript code, only with CSS? I tried to set height:100% on iframe, the result is quite close but the...
To achieve a layout where the iframe fills the remaining height of the page while the banner stays fixed at the top without using JavaScript, you can leverage CSS Flexbox. This method allows for a clean separation of the banner and iframe, with the iframe automatically adjusting its size based on the height of the brow...
42,198
[ { "from": "human", "value": "I want to design a web page with a banner and an iframe. I hope the iframe can fill all the remaining page height and be resized automatically as the browser is resizing. Is it possible to get it done without writing JavaScript code, only with CSS?\nI tried to set height:100% on...
I have a (varchar) field Foo which can only be specified if (bit) Bar is not true. I would like the textbox in which Foo is displayed to be disabled when Bar is true -- essentially, FooBox.Enabled = !isBar. I'm trying to do something like FooBox.DataBindings.Add(new Binding("Enabled", source, "!isBar")); but of cour...
Yes, you're on the right track with wanting to control the `Enabled` state of `FooBox` based on the value of `Bar`, but the data binding doesn't support direct expressions for boolean negation or comparison out of the box. Instead, you can achieve your desired functionality by using an event handler or a custom binding...
42,085
[ { "from": "human", "value": "I have a (varchar) field Foo which can only be specified if (bit) Bar is not true. I would like the textbox in which Foo is displayed to be disabled when Bar is true -- essentially, FooBox.Enabled = !isBar. I'm trying to do something like\nFooBox.DataBindings.Add(new Binding(\...
I don't know how to use both of them. So a sample code with pros and cons is perfect. Which one is preferred? Why?
It seems like you're asking for a comparison between two unspecified technologies or programming languages. To provide you with the best information, I'll assume you might be interested in comparing two popular programming languages: **Python** and **JavaScript**. If you're referring to something else, please specify, ...
39,358
[ { "from": "human", "value": "I don't know how to use both of them. So a sample code with pros and cons is perfect. Which one is preferred? Why?\n" }, { "from": "gpt", "value": "It seems like you're asking for a comparison between two unspecified technologies or programming languages. To provide ...
I'm finding myself writing a bunch of related functions dealing with different nouns (clusters, sql servers, servers in general, files, etc.) and put each of these groups of functions in separate files (say cluster_utils.ps1, for example). I want to be able to "import" some of these libraries in my profile and others ...
Your approach to managing script imports in PowerShell is a good start, especially for someone who has only been using PowerShell for a month. It's a common practice to modularize your code into separate files for better organization and reusability. Here are a few suggestions and best practices that you might conside...
39,415
[ { "from": "human", "value": "I'm finding myself writing a bunch of related functions dealing with different nouns (clusters, sql servers, servers in general, files, etc.) and put each of these groups of functions in separate files (say cluster_utils.ps1, for example). I want to be able to \"import\" some o...
I have a ContextMenuStrip that contains a submenu of dynamically generated ToolStripMenuItems. There are up to 80 sub menu items. Pressing the first letter of a desired menu item selects it correctly, but if the item happens to be out of the visible range (in a range handled by the scroll arrows), it isn't displayed ...
It looks like you're facing a challenge with navigating a `ContextMenuStrip` that has a large number of submenu items. Here are some suggestions for handling this situation: ### Option A: Scroll the ToolStrip Sub Menu If you want to scroll the submenu so that the selected item is visible, you can implement a custom l...
40,271
[ { "from": "human", "value": "I have a ContextMenuStrip that contains a submenu of dynamically generated ToolStripMenuItems. There are up to 80 sub menu items. Pressing the first letter of a desired menu item selects it correctly, but if the item happens to be out of the visible range (in a range handled b...
i want something like this the user enter a website link i need check the link if the link doesn't start with 'http://' I want to append 'http://' to the link . how can I do that in PHP ?
You can achieve this by using a simple PHP script. The script will take a user input for a website link, check if it starts with `http://` or `https://`, and if not, it will prepend `http://` to the link. Here's a sample code snippet to demonstrate how this can be done: ```php <?php // Function to ensure the link star...
42,617
[ { "from": "human", "value": "i want something like this\n\nthe user enter a website link\ni need check the link if the link\ndoesn't start with 'http://' I want\nto append 'http://' to the link .\n\nhow can I do that in PHP ? \n" }, { "from": "gpt", "value": "You can achieve this by using a simp...
When writing CUDA applications, you can either work at the driver level or at the runtime level as illustrated on this image (The libraries are CUFFT and CUBLAS for advanced math): (source: tomshw.it) I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased com...
You're correct in identifying the trade-offs between the CUDA Driver API (low-level) and the CUDA Runtime API (high-level) when writing CUDA applications. Let's delve into the concrete differences, advantages, and disadvantages of each, and specifically address your concern regarding CUDA.NET interop with C#. ### Conc...
37,343
[ { "from": "human", "value": "When writing CUDA applications, you can either work at the driver level or at the runtime level as illustrated on this image (The libraries are CUFFT and CUBLAS for advanced math):\n\n(source: tomshw.it) \nI assume the tradeoff between the two are increased performance for the l...
There are Hibernate tools for mapping files to ddl generation; ddl to mapping files and so on, but I can't find any command line tools for simple DDL generation from JPA annotated classes. Does anyone know an easy way to do this? (Not using Ant or Maven workarounds)
If you want to generate DDL (Data Definition Language) scripts from JPA annotated classes without using build tools like Maven or Ant, you can leverage the Hibernate ORM’s capabilities directly from a standalone Java application. Here's a simple way to do it: ### Step-by-Step Instructions 1. **Add Hibernate Dependenc...
40,794
[ { "from": "human", "value": "There are Hibernate tools for mapping files to ddl generation; ddl to mapping files and so on, but I can't find any command line tools for simple DDL generation from JPA annotated classes.\nDoes anyone know an easy way to do this? (Not using Ant or Maven workarounds)\n" }, {...
I've written some C# code that checks whether a device is present on any SerialPort by issuing a command on the port and listening for a reply. When I just set the port speed, open the port, get the serial stream and start processing, it works 100% of the time. However, some of our devices work at different speeds and ...
It sounds like you've encountered a classic concurrency issue in your application, particularly related to the way asynchronous I/O operations are handled by the underlying driver in kernel mode. Let's summarize and provide some guidance on how to approach this problem safely. ### Key Takeaways: 1. **Avoid Concurrent ...
38,458
[ { "from": "human", "value": "I've written some C# code that checks whether a device is present on any SerialPort by issuing a command on the port and listening for a reply. When I just set the port speed, open the port, get the serial stream and start processing, it works 100% of the time. However, some of ...
In the NodeMouseClick event I'm trying to load some objects from the Node.Tag. Before I do so I check e.Node.IsSelected. When run regularly IsSelected is false....if I stick a break point around there and check e.node.Isselected, the value changes on me and becomes true. Why?
The behavior you're observing with the `NodeMouseClick` event and the `IsSelected` property can be attributed to the sequence of events that occur in the user interface when a mouse click event is processed. In particular, here's what's likely happening: 1. **Event Sequence**: When a mouse click occurs on a node, seve...
42,154
[ { "from": "human", "value": "In the NodeMouseClick event I'm trying to load some objects from the Node.Tag. Before I do so I check e.Node.IsSelected. When run regularly IsSelected is false....if I stick a break point around there and check e.node.Isselected, the value changes on me and becomes true. Why?...
I've used UPX before to reduce the size of my Windows executables, but I must admit that I am naive to any negative side effects this could have. What's the downside to all of this packing/unpacking? Are there scenarios in which anyone would recommend NOT UPX-ing an executable (e.g. when writing a DLL, Windows Service,...
Using UPX (Ultimate Packer for eXecutables) can certainly help reduce the size of your executables, but there are potential downsides and scenarios in which you might want to avoid using it. Here are some considerations: ### Downsides of Using UPX 1. **Performance Overhead**: - When an UPX-compressed executable is...
42,449
[ { "from": "human", "value": "I've used UPX before to reduce the size of my Windows executables, but I must admit that I am naive to any negative side effects this could have. What's the downside to all of this packing/unpacking?\nAre there scenarios in which anyone would recommend NOT UPX-ing an executable ...
Has anyone seen this before - and can anything be done about it? This link is to a PNG screen shot of a list display in IE - if you look closely, the line height of each element is getting a little bigger for each successive item. The web site look is entirely controlled by CSS. Screen Shot It's not a huge deal, but ...
It sounds like you are experiencing some rendering issues specifically in Internet Explorer. This kind of problem can sometimes occur due to differences in how browsers interpret CSS properties. Here are a few potential reasons and solutions to address the line height and spacing issues you described: ### 1. **CSS Res...
41,088
[ { "from": "human", "value": "Has anyone seen this before - and can anything be done about it? This link is to a PNG screen shot of a list display in IE - if you look closely, the line height of each element is getting a little bigger for each successive item. The web site look is entirely controlled by CS...
Maybe someone found a workaround for the following problem: It seems as if AXIS 1.4 adds an <exceptionName> and a <hostname> element to each custom fault element. In the WSDL the fault is defined to only consist of a custom fault message systemMessage. This is the answer returned from my service. Never mind about the e...
The behavior you're experiencing with Apache Axis 1.4, where additional elements like `<exceptionName>` and `<hostname>` are being added to the SOAP fault response, can indeed be frustrating, especially when it doesn't conform to your WSDL specifications. This behavior is largely due to how Axis handles fault reportin...
42,128
[ { "from": "human", "value": "Maybe someone found a workaround for the following problem:\nIt seems as if AXIS 1.4 adds an <exceptionName> and a <hostname> element to each custom fault element. In the WSDL the fault is defined to only consist of a custom fault message systemMessage.\nThis is the answer retur...
Where is the best place to add a method to the integer class in Rails? I'd like to add a to_meters and to_miles methods.
In Rails, if you want to add custom methods like `to_meters` and `to_miles` to the Integer class, the best place to do this is in an initializer file. This allows you to extend the core classes without directly modifying the framework's internal code. Here's how you can do it: 1. **Create an initializer file**: You c...
33,721
[ { "from": "human", "value": "Where is the best place to add a method to the integer class in Rails?\nI'd like to add a to_meters and to_miles methods.\n" }, { "from": "gpt", "value": "In Rails, if you want to add custom methods like `to_meters` and `to_miles` to the Integer class, the best place...
I am trying to understand the process of declaration and assignment of a primitive type at the back stage. int i; i = 3; For 1), on the memory stack, it assigns a space for storing an int type value named i For 2), it assigns the value 3 to the space preserved above Is there a memory address there? From my impressi...
You are correct in your understanding that both stack and heap memory have associated memory addresses, and that both primitives (like `int`) and references (to objects) have memory addresses. Let's clarify the concepts involved in your questions: ### Stack vs. Heap Memory 1. **Stack Memory**: - When you declare a...
42,854
[ { "from": "human", "value": "I am trying to understand the process of declaration and assignment of a primitive type at the back stage.\n\nint i;\ni = 3;\n\nFor 1), on the memory stack, it assigns a space for storing an int type value named i\nFor 2), it assigns the value 3 to the space preserved above\nI...
I'm working on writing a kernel, and I have a few friends working with me on the project. We've been using DJGPP to compile the project for a while, but we're having some cross-platform compatibility issues with compiling this way that have left my main Partnet on the project unable to compile on Windows XP. (DJGPP's G...
Given your requirements for a Windows-based GCC distribution that supports NASM syntax, doesn't rely on external DLLs, and can function across multiple Windows versions, here are a few options and recommendations: ### 1. **Cygwin** Cygwin provides a large collection of GNU and Open Source tools which provide functiona...
41,430
[ { "from": "human", "value": "I'm working on writing a kernel, and I have a few friends working with me on the project. We've been using DJGPP to compile the project for a while, but we're having some cross-platform compatibility issues with compiling this way that have left my main Partnet on the project un...
I need my database to be secure in case of the hard drive being stolen. I have not seen many databases (even mainstream ones) claiming to support encryption. Do you guys know of any databases that support encryption? If I'm using a database that doesn't support encryption, is it a bad idea to encrypt data natively (...
Securing a database, especially in the context of a stolen hard drive, is crucial, and there are several approaches you can take to achieve encryption. Here are some options and considerations for ensuring the security of your database: ### Databases that Support Encryption 1. **MySQL / MariaDB**: - Support for da...
39,549
[ { "from": "human", "value": "I need my database to be secure in case of the hard drive being stolen.\nI have not seen many databases (even mainstream ones) claiming to support encryption. \n\nDo you guys know of any databases that support encryption?\nIf I'm using a database that doesn't support encryption...
I'm implementing an audit log on a database, so everything has a CreatedAt and a RemovedAt column. Now I want to be able to list all revisions of an object graph but the best way I can think of for this is to use unions. I need to get every unique CreatedAt and RemovedAt id. If I'm getting a list of countries with prov...
Using `UNION` to gather all `CreatedAt` and `RemovedAt` timestamps can indeed lead to complex queries, especially as your object graph grows in complexity. Moreover, performance can be a concern due to multiple scans over the same tables. A potential improvement is to simplify your query structure and reduce redundancy...
41,230
[ { "from": "human", "value": "I'm implementing an audit log on a database, so everything has a CreatedAt and a RemovedAt column. Now I want to be able to list all revisions of an object graph but the best way I can think of for this is to use unions. I need to get every unique CreatedAt and RemovedAt id.\nIf...
At the moment it seems that most webapps store their user-data centrally. I would like to see a movement towards giving the user total access and ownership of their own personal information and data; ultimately allowing the user to choose where their data is stored. As an example - with an application like facebook, ...
The idea of users having total ownership and control over their personal data is not only compelling but is gaining traction in various sectors. Here are some points to consider about the feasibility and implications of such a model: ### 1. **User Ownership and Control** - **Self-Publishing**: Enabling users to hos...
40,723
[ { "from": "human", "value": "At the moment it seems that most webapps store their user-data centrally. \nI would like to see a movement towards giving the user total access and ownership of their own personal information and data; ultimately allowing the user to choose where their data is stored.\nAs an ex...
I am using a query like this on my postgres database: SELECT TableA.id FROM TableA , TableB WHERE TableA.id = 100; Each TableA.id is unique (it's an autoincrement), I am getting more than 1 result. Am I missing something in here?
The query you provided seems to be using a Cartesian product (cross join) between `TableA` and `TableB` due to the way you've written it. In a Cartesian product, every row from `TableA` is combined with every row from `TableB`, which is likely the reason you are getting multiple results. To correct this, you should sp...
42,812
[ { "from": "human", "value": "I am using a query like this on my postgres database:\nSELECT TableA.id FROM TableA , TableB WHERE TableA.id = 100;\n\nEach TableA.id is unique (it's an autoincrement), I am getting more than 1 result. Am I missing something in here?\n" }, { "from": "gpt", "value": "...
I'm in need of a distributed file system that must scale to very large sizes (about 100TB realistic max). Filesizes are mostly in the 10-1500KB range, though some files may peak at about 250MB. I very much like the thought of systems like GFS with built-in redundancy for backup which would - statistically - render file...
It sounds like you're looking for a robust distributed file system that meets your specific requirements for scalability, redundancy, versioning, and ease of management. While you have already reviewed several options, here are a few additional systems to consider that may align with your needs: 1. **Ceph**: - **Op...
39,020
[ { "from": "human", "value": "I'm in need of a distributed file system that must scale to very large sizes (about 100TB realistic max). Filesizes are mostly in the 10-1500KB range, though some files may peak at about 250MB.\nI very much like the thought of systems like GFS with built-in redundancy for backup...
I'd like to display records from our database in a listview - but retrieves can take a long time. I can use RetrieveVirtualItem to tell me when a new ListViewItem is needed, add a dummy item, and start a retrieve; but what do I do with the record when the database returns it? I can't update the ListView's Items colle...
In Virtual Mode, a `ListView` allows you to efficiently manage large datasets without loading all items into memory at once. When using `RetrieveVirtualItem`, you handle the event to retrieve items on demand. You are correct that you cannot directly update the `ListView`'s `Items` collection while it's in Virtual Mode....
42,366
[ { "from": "human", "value": "I'd like to display records from our database in a listview - but retrieves can take a long time. I can use RetrieveVirtualItem to tell me when a new ListViewItem is needed, add a dummy item, and start a retrieve; but what do I do with the record when the database returns it? ...
I have a JFrame that contains a "display" JPanel with JTextField and a "control" JPanel with buttons that should access the contents of the display JPanel. I think my problem is related on how to use the observer pattern, which in principle I understand. You need to place listeners and update messages, but I don't have...
To achieve communication between the "display" JPanel (which contains the `JTextField`) and the "control" JPanel (which contains the buttons), you can implement the Observer pattern effectively by following these steps: 1. **Create a Data Model**: This class holds the data and notifies observers when changes occur. In...
38,360
[ { "from": "human", "value": "I have a JFrame that contains a \"display\" JPanel with JTextField and a \"control\" JPanel with buttons that should access the contents of the display JPanel. I think my problem is related on how to use the observer pattern, which in principle I understand. You need to place li...
I use the Autocomplete extender feature to get the list of suggestions from my database. There is no scroll bar for this control, so I have added a scroll bar in a panel (MS .net 2.0) which i attach to my autocomplete extender.Now the issue is with the srcoll bar. like this <asp:Panel ID="autocompleteDropDownPanel" ru...
The issue you're encountering is likely due to the behavior of the `AutocompleteExtender` in ASP.NET when integrated with custom controls like a `Panel`. When you interact with the scroll bar, the mouse events might cause the autocomplete suggestions to lose focus and thus disappear. Here are a few potential solutions ...
40,518
[ { "from": "human", "value": "I use the Autocomplete extender feature to get the list of suggestions from my database. There is no scroll bar for this control, so I have added a scroll bar in a panel (MS .net 2.0) which i attach to my autocomplete extender.Now the issue is with the srcoll bar.\nlike this \n<...
In a ASP.NET application that I am writing I need to use connections to a specific server (something like a DB but... different). The connections are quite expensive to establish (a few seconds, literally) so I'm trying to write a pool to improve scalability. Everything is pretty simple, up to one point - recycling ol...
To effectively implement a connection pooling mechanism in your ASP.NET application while managing the cleanup of old connections, you can utilize a background task that runs on a Timer. This approach will allow you to periodically check and clean up the connections without blocking the application from terminating, pr...
38,559
[ { "from": "human", "value": "In a ASP.NET application that I am writing I need to use connections to a specific server (something like a DB but... different). The connections are quite expensive to establish (a few seconds, literally) so I'm trying to write a pool to improve scalability. \nEverything is pre...
We have very strange problem, one of our applications is continually querying server by using .net remoting, and every 100 seconds the application stops querying for a short duration and then resumes the operation. The problem is on a client and not on the server because applications actually queries several servers in...
The issue you're experiencing with your .NET Remoting application could be caused by several potential factors. Since the application stops querying every 100 seconds and then resumes, it suggests that there may be a recurring event, timeout, or throttling mechanism that is affecting the client's ability to make remote...
39,565
[ { "from": "human", "value": "We have very strange problem, one of our applications is continually querying server by using .net remoting, and every 100 seconds the application stops querying for a short duration and then resumes the operation. The problem is on a client and not on the server because applica...
I have a question on best pactices. When is the best time to dispatch a call back to the UI when using a helper loading method like the two below? Button1 uses the Dispatcher when returned and Button2 allows the helper loading class to encapsulate the call on the Dispatcher. I tend to favor the Button2. private void...
Your question pertains to the best practices regarding the usage of the dispatcher in asynchronous programming in a UI context, such as WPF. The difference between the two approaches you've outlined—`Button1_Click` and `Button2_Click`—is how the dispatching of the UI update is handled. ### Analysis of Both Approaches ...
41,134
[ { "from": "human", "value": "I have a question on best pactices. When is the best time to dispatch a call back to the UI when using a helper loading method like the two below? Button1 uses the Dispatcher when returned and Button2 allows the helper loading class to encapsulate the call on the Dispatcher. ...
When the program runs, there is a series of ListView forms. We populated one of them with items (as strings) and we check whether the state of selection has changed. Once it's changed, we grab the text of the selected item using FocusedItem.Text. The first time works just fine but when another selection is made, the se...
When working with a `ListView` in a Windows Forms application, issues with selection changes and retrieving the selected item's text can arise due to how event handling and selection states are managed. Here are some suggestions to address the problem you're facing without clearing and repopulating the ListView: 1. **...
42,392
[ { "from": "human", "value": "When the program runs, there is a series of ListView forms. We populated one of them with items (as strings) and we check whether the state of selection has changed. Once it's changed, we grab the text of the selected item using FocusedItem.Text. The first time works just fine b...
Suppose I want to create a set of observers based on type. That is to say, when they are notified of an event, they are told the type of one of the arguments and then decides whether or not to act based on if it can operate on that type. Are there any simple ways to do this? I figured this would be fairly simple to d...
To achieve the behavior you're looking for without resorting to a lot of casting and without creating a separate `Subject` for each type, you can leverage covariance and contravariance in C#. Specifically, you can work with interfaces and use a common base interface to allow different types of observers to register wit...
40,800
[ { "from": "human", "value": "Suppose I want to create a set of observers based on type. That is to say, when they are notified of an event, they are told the type of one of the arguments and then decides whether or not to act based on if it can operate on that type.\nAre there any simple ways to do this? ...
In the past I wrote most of my unit tests using C# even when the actual software development was in another .NET language (VB.NET, C++.NET etc.) but I could use VB to get the same results. I guess the only reason I use C# is because most of the examples in the internet are written in C#. I you use unit tests as part of...
When it comes to unit testing in the .NET ecosystem, many developers prefer using C# for several reasons, even if their projects are written in other .NET languages like VB.NET or C++. Here are some factors influencing this preference: 1. **Community and Resources**: C# has a larger community and more resources availa...
42,147
[ { "from": "human", "value": "In the past I wrote most of my unit tests using C# even when the actual software development was in another .NET language (VB.NET, C++.NET etc.) but I could use VB to get the same results. I guess the only reason I use C# is because most of the examples in the internet are writt...
I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name"). What is the most effective way of removing/deleting a folder/directory that is not empty?
When you attempt to delete a folder that is not empty using `os.remove()`, it raises an error because `os.remove()` is only designed to delete files, not directories. To delete a directory that contains files or other directories, you can use `os.rmdir()` if the directory is empty, or `shutil.rmtree()` for non-empty di...
43,352
[ { "from": "human", "value": "I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove(\"/folder_name\"). \nWhat is the most effective way of removing/deleting a folder/directory that is not empty?\n" }, { "fro...
I am reading log files but not all lines want to be processed straight away. I am using a queue / buffer to store the lines while they wait to be processed. This queue is regularly scanned for particular lines - when they are found, they are removed from the queue (they can be anywhere in it). When there isn't a partic...
In your scenario, you're dealing with a queue that has specific requirements for adding, removing, and processing log lines. Here are some considerations and possible collections to improve your performance: ### 1. **LinkedList** - **Description**: `LinkedList` implements the `Deque` interface, allowing for inserti...
40,385
[ { "from": "human", "value": "I am reading log files but not all lines want to be processed straight away. I am using a queue / buffer to store the lines while they wait to be processed.\nThis queue is regularly scanned for particular lines - when they are found, they are removed from the queue (they can be ...
I was wondering what people thought about the decision to support Entity Framework over LINQ-to-SQL? I have an application I'm developing originally in LINQ-to-SQL. I found it the perfect solution for our application. While attempting to port to Entity Framework I was surprised how rough it was. IMHO, not even clos...
Your experience with the transition from LINQ to SQL to Entity Framework (EF) resonates with many developers who faced similar challenges during that period. When Entity Framework was initially released, it was indeed seen as a more complex and less intuitive option compared to LINQ to SQL, especially for developers wh...
43,067
[ { "from": "human", "value": "I was wondering what people thought about the decision to support Entity Framework over LINQ-to-SQL? I have an application I'm developing originally in LINQ-to-SQL. I found it the perfect solution for our application. \nWhile attempting to port to Entity Framework I was surpri...
Does anyone know of any C container libraries? I am looking for something which gives standard implementations of linked lists, arrays, hash tables etc, much in the same way as the C++ STL does. Key concerns are: Client code should be able to create containers for multiple different data types without modifying the li...
Yes, there are several C libraries that provide data structures similar to the C++ Standard Template Library (STL). Here are a few that you might find useful for your needs: 1. **glib**: - Part of the GTK+ project, glib provides a comprehensive set of data structures and utilities, including linked lists, arrays, ...
37,548
[ { "from": "human", "value": "Does anyone know of any C container libraries? I am looking for something which gives standard implementations of linked lists, arrays, hash tables etc, much in the same way as the C++ STL does. Key concerns are:\n\nClient code should be able to create containers for multiple di...
When trying to serialize a type (a generic List<T> which T is a class marked with XmlRootAttribute) into XML using XmlSerializer, a FileNotFoundException is thrown (sometimes) and serialization fails. It seems that XmlSerializer tries to create a temporary file with a random file name in the Temp folder of user under w...
Yes, the issue you're experiencing with `XmlSerializer` throwing a `FileNotFoundException` can occur under specific circumstances, particularly when the XML serialization process creates temporary files that it requires for reflection purposes. Here are a few common causes and workarounds you might consider: ### Commo...
41,154
[ { "from": "human", "value": "When trying to serialize a type (a generic List<T> which T is a class marked with XmlRootAttribute) into XML using XmlSerializer, a FileNotFoundException is thrown (sometimes) and serialization fails.\nIt seems that XmlSerializer tries to create a temporary file with a random fi...
What are the expert debugging hints for your favourite language, you think everyone should use? As an example, I'll provide my C++ debugging hints, that between them help me shake out most of the bugs I come across, in this often hard-to-debug language. C++ Increase the warning level of your compiler to maximum, then ...
Here are some expert debugging hints for Python that can help you track down and fix bugs effectively in this dynamic language: ### Python Debugging Tips 1. **Leverage Built-in Debugging Tools**: - Use `pdb` (Python Debugger) to step through your code interactively. You can set breakpoints, inspect variables, and...
41,751
[ { "from": "human", "value": "What are the expert debugging hints for your favourite language, you think everyone should use?\nAs an example, I'll provide my C++ debugging hints, that between them help me shake out most of the bugs I come across, in this often hard-to-debug language.\nC++\n\nIncrease the war...
Most ASP.NET hosts give you a single website in IIS. Then, they let you set subfolders as applications. Are there any shared ASP.NET 3.5 hosts that give you multiple websites with a single account? I have several low traffic websites that don't use much bandwidth.
Yes, there are shared ASP.NET hosts that allow you to host multiple websites under a single account. While many hosting providers limit users to one primary website (with the ability to add sub-applications), some offer plans that include support for multiple domains or websites. Here are a few hosting providers that t...
44,019
[ { "from": "human", "value": "Most ASP.NET hosts give you a single website in IIS. Then, they let you set subfolders as applications. Are there any shared ASP.NET 3.5 hosts that give you multiple websites with a single account?\nI have several low traffic websites that don't use much bandwidth.\n" }, {...
I have a java application that is connected to a view on a remote Oracle db. Does anyone know of a way in Java to monitor this table for changes? I.e. if there are inserts of updates etc I would need to react.
Monitoring a remote Oracle database for changes in a view using Java can be achieved through various techniques. Below are some common approaches you might consider: ### 1. Database Triggers and Polling 1. **Database Triggers**: Create triggers on the underlying tables of the view that log changes (INSERT, UPDATE, DEL...
42,772
[ { "from": "human", "value": "I have a java application that is connected to a view on a remote Oracle db. \nDoes anyone know of a way in Java to monitor this table for changes? I.e. if there are inserts of updates etc I would need to react.\n" }, { "from": "gpt", "value": "Monitoring a remote Or...
What is java.awt.Component.getName() used for? It always seems to be null in the applications I build with NetBeans. I'm thinking of storing some help text per component in it -- I don't want to use the tooltip, I have another panel where I'll show the help text.
The `java.awt.Component.getName()` method in Java is intended to provide a name for the component, which can be useful for identifying the component programmatically. By default, when you create a component and do not explicitly set a name, the `getName()` method will return `null`. This is often why you find it return...
42,068
[ { "from": "human", "value": "What is java.awt.Component.getName() used for? It always seems to be null in the applications I build with NetBeans. I'm thinking of storing some help text per component in it -- I don't want to use the tooltip, I have another panel where I'll show the help text.\n" }, { ...