instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm getting odd results from a MySQL SELECT query involving a LEFT JOIN, and I can't understand whether my understanding of LEFT JOIN is wrong or whether I'm seeing a genuinely odd behavior. I have a two tables with a many-to-one relationship: For every record in table 1 there are 0 or more records in table 2. I want t...
Your understanding of `LEFT JOIN` is correct: it should return all records from the left table (in your case, the `Dates` table) and match them with records from the right table (`Slots`). When there are no matches found, it will still return the records from the left table with `NULL` values for the columns from the r...
24,100
[ { "from": "human", "value": "I'm getting odd results from a MySQL SELECT query involving a LEFT JOIN, and I can't understand whether my understanding of LEFT JOIN is wrong or whether I'm seeing a genuinely odd behavior.\nI have a two tables with a many-to-one relationship: For every record in table 1 there ...
Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs with substantial database and numeric processing. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user would be Sr Software Engineer with 5-10 ...
When comparing JProfiler and YourKit for general-purpose profiling and heap analysis, especially in the context of standalone command-line applications and web applications as you've described, both tools have their strengths and can be suitable depending on your specific needs. Here's a breakdown of features, strength...
24,149
[ { "from": "human", "value": "Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs with substantial database and numeric processing. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user...
I had a look in the reference doc, and Spring seems to have pretty good support for sending mail. However, I need to login to a mail account, read the messages, and download any attachments. Is downloading mail attachments supported by the Spring mail API? I know you can do this with the Java Mail API, but in the past ...
As of my last knowledge update in October 2023, Spring Mail (part of the Spring Framework) primarily focuses on sending emails rather than retrieving them. For reading emails and downloading attachments, you would typically use the JavaMail API directly. While Spring does have some support for sending emails with atta...
21,489
[ { "from": "human", "value": "I had a look in the reference doc, and Spring seems to have pretty good support for sending mail. However, I need to login to a mail account, read the messages, and download any attachments. Is downloading mail attachments supported by the Spring mail API?\nI know you can do thi...
I'm using SharpZipLib version 0.85.5 to unzip files. My code has been working nicely for a couple of months until I found a ZIP file that it doesn't like. ICSharpCode.SharpZipLib.Zip.ZipException: End of extra data at ICSharpCode.SharpZipLib.Zip.ZipExtraData.ReadCheck(Int32 length) in C:\C#\SharpZLib\Zip\ZipEx...
The error you are encountering, `ICSharpCode.SharpZipLib.Zip.ZipException: End of extra data`, suggests that the `SharpZipLib` library is having trouble processing the extra data fields in the ZIP file you are trying to unzip. This can happen if the ZIP file has non-standard or improperly formatted extra fields. Here'...
21,645
[ { "from": "human", "value": "I'm using SharpZipLib version 0.85.5 to unzip files. My code has been working nicely for a couple of months until I found a ZIP file that it doesn't like.\nICSharpCode.SharpZipLib.Zip.ZipException: End of extra data \n at ICSharpCode.SharpZipLib.Zip.ZipExtraData.ReadCheck...
I am using a satellite assembly to hold all the localization resources in a C# application. What I need to do is create a menu in the GUI with all the available languages that exists for the application. Is there any way to get information dynamically?
Yes, you can dynamically retrieve information about the available languages for your C# application that uses satellite assemblies for localization. Satellite assemblies are usually organized in a specific folder structure based on culture identifiers, so you can programmatically discover which cultures are available. ...
24,052
[ { "from": "human", "value": "I am using a satellite assembly to hold all the localization resources in a C# application.\nWhat I need to do is create a menu in the GUI with all the available languages that exists for the application. Is there any way to get information dynamically?\n" }, { "from": "...
I have a quite old templating system written on top of ERB. It relies on ERB templates stored in database. Those are read and rendered. When I want to pass data from one template to another I use the :locals parameter to Rails render method. For setting default variables of those variables in some templates I use the d...
It sounds like you're facing some quirks with the `defined?` method and how local variables work in Ruby, especially with respect to ERB templates. Let's address your questions and suggest a more reliable approach for setting default values. ### 1. Issues with `defined?` The `defined?` method in Ruby is meant to chec...
24,568
[ { "from": "human", "value": "I have a quite old templating system written on top of ERB. It relies on ERB templates stored in database. Those are read and rendered. When I want to pass data from one template to another I use the :locals parameter to Rails render method. For setting default variables of thos...
I'm working on moving a client/server application created with C# and WinForms into the SOA/WPF/Silverlight world. One of the big hurdles is the design of the UI. My current UI is MDI driven and users rely heavily on child windows, having many open at the same time and toggling back and forth between them. What might ...
Transitioning from an MDI (Multiple Document Interface) application to a WPF (Windows Presentation Foundation) application requires a rethinking of how the user interface is structured, especially since WPF does not natively support MDI. Here are some alternative approaches you can consider to recreate the functionalit...
20,487
[ { "from": "human", "value": "I'm working on moving a client/server application created with C# and WinForms into the SOA/WPF/Silverlight world. One of the big hurdles is the design of the UI. My current UI is MDI driven and users rely heavily on child windows, having many open at the same time and toggling ...
I have a generic class in C# with 2 constructors: public Houses(params T[] InitialiseElements) {} public Houses(int Num, T DefaultValue) {} Constructing an object using int as the generic type and passing in two ints as arguments causes the 'incorrect' constructor to be called (from my point of view). E.g. Houses<int>...
In C#, when you define a constructor with the `params` keyword, it allows the method to accept a variable number of arguments. However, if you pass in multiple values of the same type that also match another constructor's signature (in this case, the `int` parameters), the compiler will prefer that constructor over the...
21,222
[ { "from": "human", "value": "I have a generic class in C# with 2 constructors:\npublic Houses(params T[] InitialiseElements)\n{}\npublic Houses(int Num, T DefaultValue)\n{}\n\nConstructing an object using int as the generic type and passing in two ints as arguments causes the 'incorrect' constructor to be c...
I need to index a whole lot of webpages, what good webcrawler utilities are there? I'm preferably after something that .NET can talk to, but that's not a showstopper. What I really need is something that I can give a site url to & it will follow every link and store the content for indexing.
There are several web crawling utilities and libraries you can use to index webpages. Here are a few options, especially focusing on .NET-compatible solutions, as well as some general-purpose tools that can be integrated with .NET: ### .NET-Compatible Libraries 1. **HtmlAgilityPack**: - Although not a full-fledged...
21,458
[ { "from": "human", "value": "I need to index a whole lot of webpages, what good webcrawler utilities are there? I'm preferably after something that .NET can talk to, but that's not a showstopper.\nWhat I really need is something that I can give a site url to & it will follow every link and store the conten...
I am writing a search application specifically for music playlists. The genre and file format differs from playlist to playlist, and sometimes within the playlist there are differences too. There is also a concept of "synonymous" tags (e.g. urban would cover both hiphop and r&b, but not the other way around). Below is...
Your project sounds exciting and definitely involves some complex querying and indexing needs. Let's break down your questions and concerns regarding the design choices and potential technologies to use for your music playlist search application. ### Database Design Your proposed relational database design is a good ...
17,787
[ { "from": "human", "value": "I am writing a search application specifically for music playlists.\nThe genre and file format differs from playlist to playlist, and sometimes within the playlist there are differences too. There is also a concept of \"synonymous\" tags (e.g. urban would cover both hiphop and ...
All of my users are a short walk down the hall, and all of my programs run on workstations on the same LAN. Some years ago, I had the staff write the log files for all of their programs to a shared folder hierarchy, naming each log file after the machine name in a sub-directory named after the app. But this arrangement...
Given your requirements, you have several options that could help centralize your logging while addressing the issues you've encountered. Here are a few solutions you might consider: ### 1. **Centralized Logging with a Logging Framework** Using a centralized logging framework like **Serilog**, **NLog**, or **log4net**...
21,760
[ { "from": "human", "value": "All of my users are a short walk down the hall, and all of my programs run on workstations on the same LAN. Some years ago, I had the staff write the log files for all of their programs to a shared folder hierarchy, naming each log file after the machine name in a sub-directory ...
In my eternal saga to insert 1.4 million rows of data from a SQL script, I've written a basic WinForms app that takes each line of the script and executes it individually. However, because the original script contained SET IDENTITY_INSERT [Table] OFF and SET is a session-wide command, this setting is getting lost on e...
When using `SET IDENTITY_INSERT [Table] OFF`, you're enabling or disabling the ability to insert explicit values into an identity column for a specific table and for the current session only. Since you're executing each line of your SQL script individually, the context in which `SET IDENTITY_INSERT` was set is lost bet...
24,129
[ { "from": "human", "value": "In my eternal saga to insert 1.4 million rows of data from a SQL script, I've written a basic WinForms app that takes each line of the script and executes it individually.\nHowever, because the original script contained\nSET IDENTITY_INSERT [Table] OFF\n\nand SET is a session-wi...
Suppose we have the following code: ExpressionHelper.GetRouteValuesFromExpression<AccountController>(ax => ax.MyAction("a", "b")); (from ASP.NET MVC Futures assembly). Method is reasonably fast - it executes 10k iterations in 150ms. Now, we change code to this: string a = "a"; string b = "b"; ExpressionHelper.GetRoute...
The issue you are encountering is primarily due to the fact that by capturing the variables `a` and `b`, you are forcing the expression to create a closure, which significantly impacts performance due to the overhead of the additional delegate and the need to compile the closure every time it's invoked. Instead of com...
24,804
[ { "from": "human", "value": "Suppose we have the following code:\nExpressionHelper.GetRouteValuesFromExpression<AccountController>(ax => ax.MyAction(\"a\", \"b\"));\n\n(from ASP.NET MVC Futures assembly). Method is reasonably fast - it executes 10k iterations in 150ms.\nNow, we change code to this:\nstring ...
I'm evaluating Visual Studio productivity addons for my development team, which includes some folks who are very new to C# and some folks who are very experienced. We don't use VB.NET. I personally like ReSharper, but before I suggest something that I personally like, I would like some opinions for and reasoning behind...
Choosing a productivity addon for Visual Studio can significantly impact your team's workflow and efficiency, especially when you have a mix of experience levels within your development team. Here’s a comparative overview of ReSharper, CodeRush, and Visual Assist, along with some thoughts on running multiple addons. #...
23,203
[ { "from": "human", "value": "I'm evaluating Visual Studio productivity addons for my development team, which includes some folks who are very new to C# and some folks who are very experienced. We don't use VB.NET. I personally like ReSharper, but before I suggest something that I personally like, I would li...
Given the following inheritance tree, what would be the best way of implementing it in a way that works? abstract class Foo<T> : IEnumerable<T> { public abstract Bar CreateBar(); } class Bar<T> : Foo<T> { // Bar's provide a proxy interface to Foo's and limit access nicely. // The general public shouldn't b...
To implement the given inheritance structure while keeping the constructor of `Bar` protected and allowing subclasses of `Foo` to create `Bar` instances, you can use the following approach: 1. **Make the `CreateBar` method in `Foo` abstract**, and define the return type as `Bar<T>`. This forces derived classes to impl...
24,106
[ { "from": "human", "value": "Given the following inheritance tree, what would be the best way of implementing it in a way that works?\nabstract class Foo<T> : IEnumerable<T>\n{\n public abstract Bar CreateBar();\n}\n\nclass Bar<T> : Foo<T>\n{\n // Bar's provide a proxy interface to Foo's and limit acc...
I would like to know if somebody often uses metrics to validate its code/design. As example, I think I will use: number of lines per method (< 20) number of variables per method (< 7) number of paremeters per method (< 8) number of methods per class (< 20) number of field per class (< 20) inheritance tree depth (< 6)....
Using metrics to validate code and design can be an effective way to maintain code quality and ensure that your code adheres to best practices. The metrics you've mentioned are common in software engineering and can help identify potential issues such as complexity, maintainability, and readability. ### Advantages of ...
17,513
[ { "from": "human", "value": "I would like to know if somebody often uses metrics to validate its code/design.\nAs example, I think I will use:\n\nnumber of lines per method (< 20)\nnumber of variables per method (< 7)\nnumber of paremeters per method (< 8)\nnumber of methods per class (< 20)\nnumber of fiel...
As far as I can understand, when I new up a Linq to SQL class, it is the equivalent of new'ing up a SqlConnection object. Suppose I have an object with two methods: Delete() and SubmitChanges(). Would it be wise of me to new up the Linq to SQL class in each of the methods, or would a private variable holding the Linq t...
Your refactored code for managing `Comment` objects using LINQ to SQL has made some notable improvements over the original. Here are the key changes and the rationale behind them: 1. **Single DataContext Instance**: The primary change is that you are now maintaining a single instance of `Madtastic.DataContext` across ...
20,557
[ { "from": "human", "value": "As far as I can understand, when I new up a Linq to SQL class, it is the equivalent of new'ing up a SqlConnection object.\nSuppose I have an object with two methods: Delete() and SubmitChanges(). Would it be wise of me to new up the Linq to SQL class in each of the methods, or w...
I have used Photoshop CS2's "Save for Web" feature to create a table of images for my site layout. This HTML appears fine in a web browser, however when imported into Visual Studio and viewed in the site designer, the metrics are wrong and there are horizontal gaps between images (table cells). The output from Photosho...
It sounds like you're encountering some common issues with table rendering and image alignment in the Visual Studio Designer compared to how they appear in a web browser. Here are a few suggestions to help you troubleshoot and resolve the discrepancies: 1. **HTML Structure**: Ensure your HTML structure is correctly se...
21,986
[ { "from": "human", "value": "I have used Photoshop CS2's \"Save for Web\" feature to create a table of images for my site layout.\nThis HTML appears fine in a web browser, however when imported into Visual Studio and viewed in the site designer, the metrics are wrong and there are horizontal gaps between im...
I have the need to build lots of sites that are very similar, but not exactly the same, using ASP.NET 2.0. I'm trying to find the best way to make generating these sites quick and easy. The sites will be used to collect information about a user, and there will be multiple steps for each site. The sites will all collect...
Your scenario presents a common challenge when dealing with similar yet distinct web applications. Here are some strategies to improve upon your design, reduce code duplication, and facilitate maintainability while still catering to the unique requirements of each site: ### 1. **Use a Modular Architecture:** - **Sh...
21,882
[ { "from": "human", "value": "I have the need to build lots of sites that are very similar, but not exactly the same, using ASP.NET 2.0.\nI'm trying to find the best way to make generating these sites quick and easy.\nThe sites will be used to collect information about a user, and there will be multiple step...
So you've created a ruby library. How do you create and publish your rubygem? And what common pitfalls and gotchas are there pertaining to creating and publishing rubygems?
Creating and publishing a Ruby gem involves several steps, from setting up your gem structure to uploading it to RubyGems.org. Here’s a comprehensive guide on how to do it, along with common pitfalls and gotchas to be aware of: ### Steps to Create and Publish a Ruby Gem 1. **Setup Your Development Environment**: -...
12,864
[ { "from": "human", "value": "So you've created a ruby library.\nHow do you create and publish your rubygem? And what common pitfalls and gotchas are there pertaining to creating and publishing rubygems?\n" }, { "from": "gpt", "value": "Creating and publishing a Ruby gem involves several steps, f...
I look for a tool/framework to make automatic acceptance-testing. The interface to create new tests should be so easy, that a non-programmer (customer, boss) will be able to add specifications for which will be tested automatically. It should be some way to execute the tests from command-line, to include a run of the t...
For your requirements regarding automatic acceptance testing, especially with an emphasis on ease of use for non-programmers, I recommend **Cucumber**. Here’s a detailed explanation of why Cucumber stands out, along with its features that align well with your needs: ### Overview of Cucumber Cucumber is an open-source...
24,481
[ { "from": "human", "value": "I look for a tool/framework to make automatic acceptance-testing. The interface to create new tests should be so easy, that a non-programmer (customer, boss) will be able to add specifications for which will be tested automatically.\nIt should be some way to execute the tests fr...
What security best-practices would you strongly recommend in maintaining a Linux server? (i.e. bring up a firewall, disable unnecessary services, beware of suid executables, and so on.) Also: is there a definitive reference on Selinux? EDIT: Yes, I'm planning to put the machine on the Internet, with at least openvpn, s...
Maintaining a secure Linux server, especially one exposed to the Internet, requires a combination of hardening practices, continuous monitoring, and adherence to best practices. Below are some strong recommendations for securing your Linux server: ### Security Best Practices for Linux Servers 1. **Keep the System Upd...
19,458
[ { "from": "human", "value": "What security best-practices would you strongly recommend in maintaining a Linux server? (i.e. bring up a firewall, disable unnecessary services, beware of suid executables, and so on.)\nAlso: is there a definitive reference on Selinux?\nEDIT: Yes, I'm planning to put the machin...
How do you create an application shortcut (.lnk file) in C# or using the .NET framework? The result would be a .lnk file to the specified application or URL.
Creating a shortcut (.lnk file) in C# can be accomplished using the Windows Script Host Object Model, which provides access to the functionality required to create a shortcut. Here’s how you can do this in a .NET application. First, you need to add a reference to the Windows Script Host Object Model (WScript.Shell). Y...
23,493
[ { "from": "human", "value": "How do you create an application shortcut (.lnk file) in C# or using the .NET framework?\nThe result would be a .lnk file to the specified application or URL.\n" }, { "from": "gpt", "value": "Creating a shortcut (.lnk file) in C# can be accomplished using the Windows...
I'm experimenting with generics and I'm trying to create structure similar to Dataset class. I have following code public struct Column<T> { T value; T originalValue; public bool HasChanges { get { return !value.Equals(originalValue); } } public void AcceptChanges() { origi...
It seems like you're exploring a few advanced concepts in C#, specifically the use of generics, interfaces, and the implications of using structs versus classes. Your goal to make the `Record` class more flexible when adding new columns is certainly a common requirement, and the approach you're considering with interfa...
22,941
[ { "from": "human", "value": "I'm experimenting with generics and I'm trying to create structure similar to Dataset class.\nI have following code\npublic struct Column<T>\n{\n T value;\n T originalValue;\n\n public bool HasChanges\n {\n get { return !value.Equals(originalValue); }\n }\n...
Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL. I would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of which provides an interface to commonly used, persistent objects (stored in...
Creating a custom storage service for your Django application that does not rely on SQL and instead communicates with other services through an inter-process communication (IPC) mechanism is certainly possible. However, whether it makes sense to do so largely depends on your specific use case, requirements, and the tra...
20,872
[ { "from": "human", "value": "Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL.\nI would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of which provides an interface to co...
I've added a custom soap header <MyApp:FOO> element to the <soap:Header> element and the requirments states that i must sign this element , how would one do that? <MyApp:FOO> contains a number of things (username, preferences, etc) that identifies a user on higher level. I've succesfully used a policy file and now a po...
To sign a custom SOAP header element like `<MyApp:FOO>`, you need to add the appropriate signing logic to your existing `FOOClientOutFilter` class. This involves identifying the `<MyApp:FOO>` element with a `wsu:Id` attribute, and then applying an `XmlSignature` to it. Here are the steps you should follow: 1. **Add ...
22,332
[ { "from": "human", "value": "I've added a custom soap header <MyApp:FOO> element to the <soap:Header> element and the requirments states that i must sign this element , how would one do that?\n<MyApp:FOO> contains a number of things (username, preferences, etc) that identifies a user on higher level.\nI've ...
I have a maven POM file for a web service. For one of the dependencies I have to specify several exclusions for jar files that are already kept at a higher-level in the web-application server (accessible to all web-applications, not just this particular one). One example of such exclusion is the JAR containing my JDBC ...
To handle the situation where you need to exclude certain transitive dependencies from your WAR file while still making them available for your tests, you can indeed utilize different scopes for the same dependency. Here’s how you can do it in your `pom.xml`: 1. **Declare the main dependency with exclusions** and se...
23,605
[ { "from": "human", "value": "I have a maven POM file for a web service. For one of the dependencies I have to specify several exclusions for jar files that are already kept at a higher-level in the web-application server (accessible to all web-applications, not just this particular one). One example of such...
I am responsible for a small development team and we deal mainly with database development. We are currently using MS Visual Source Safe as our source control system, but it has its limitations and we are seriously thinking about changing. What system would you choose?
Moving away from Microsoft Visual SourceSafe (VSS) is a wise decision, given its limitations and the fact that it is no longer actively supported by Microsoft. There are several modern source control systems that you can consider for your development team, especially for database development. Here are a few popular opt...
21,848
[ { "from": "human", "value": "I am responsible for a small development team and we deal mainly with database development. We are currently using MS Visual Source Safe as our source control system, but it has its limitations and we are seriously thinking about changing. What system would you choose?\n" },...
Quite simple really: var req:URLRequest=new URLRequest(); req.url="http://somesite.com"; var header:URLRequestHeader=new URLRequestHeader("my-bespoke-header","1"); req.requestHeaders.push(header); req.method=URLRequestMethod.GET; stream.load(req); Yet, if I inspect the traffic with WireShark, the my-bespoke-header is ...
When working with the `URLRequest` in ActionScript (specifically in Flash), custom headers can indeed have issues when you're trying to send them with a GET request. The behavior you're experiencing is known and has to do with the way browsers and Flash handle HTTP requests. Here are some points to consider: 1. **GET...
22,482
[ { "from": "human", "value": "Quite simple really:\nvar req:URLRequest=new URLRequest();\nreq.url=\"http://somesite.com\";\nvar header:URLRequestHeader=new URLRequestHeader(\"my-bespoke-header\",\"1\");\nreq.requestHeaders.push(header);\nreq.method=URLRequestMethod.GET;\nstream.load(req);\n\nYet, if I inspec...
As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project. I have the following criterias: complete code listings (working, hackable code) beautiful code (highly readable, simple but e...
It's great to hear that you're eager to dive into Python! Here are some resources that fit your criteria of having complete, beautiful, and beginner-friendly code: ### Websites: 1. **Python.org - Beginner's Guide**: - [BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide) - This page offers resources, tu...
23,126
[ { "from": "human", "value": "As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project.\nI have the following criterias:\n\ncomplete code listings (working, hackable code)\n...
I have a system which generates a large number of XML documents every day (of the order of 1 million) and I would like to be able to store and index these so that I can, for example, search for all documents with a certain field set to a given value. I understand that there are fundamentally two types of XML database, ...
When choosing a database solution for storing and indexing a large number of XML documents (around 1 million per day), it’s essential to consider several factors, including performance, scalability, search capabilities, ease of use, and your specific use case requirements. Here’s an overview of both types of databases ...
22,284
[ { "from": "human", "value": "I have a system which generates a large number of XML documents every day (of the order of 1 million) and I would like to be able to store and index these so that I can, for example, search for all documents with a certain field set to a given value.\nI understand that there are...
I am generating doxygen documentation for my (fairly small) project on each build. I did the following to accomplish this: Added the index.html, which doxygen generates, to the project Specified a Custom Build Step for this file (not the whole project) Command line: doxygen ../doc/Doxyfile Outputs: ..doc/html/index....
The issue you're experiencing with Visual Studio requiring you to build your project twice is likely due to the way dependencies are tracked and how Doxygen generates its documentation. When you run Doxygen as a custom build step, the output files are generated, but Visual Studio doesn't necessarily recognize that thes...
25,225
[ { "from": "human", "value": "I am generating doxygen documentation for my (fairly small) project on each build.\nI did the following to accomplish this:\n\nAdded the index.html, which doxygen generates, to the project\nSpecified a Custom Build Step for this file (not the whole project)\n\n\nCommand line: do...
My class is implementing a super-class method which which returns List<JComponent>. The list being returned is read-only: public abstract class SuperClass { public abstract List<JComponent> getComponents(); } In my class, I want to return a field which is declared as List - i.e. a sub-list: public class SubClass ...
You are correct that returning a `List<JButton>` as a `List<JComponent>` generates a compilation error because `List<JButton>` is not a subtype of `List<JComponent>`, even if the list is read-only. The compiler enforces type safety and does not take read-only semantics into consideration when determining type compatibi...
23,314
[ { "from": "human", "value": "My class is implementing a super-class method which which returns List<JComponent>. The list being returned is read-only:\npublic abstract class SuperClass {\n public abstract List<JComponent> getComponents();\n}\n\nIn my class, I want to return a field which is declared as ...
I have two different ways of displaying items in a WPF application. The first uses a WrapPanel and the second a vertical StackPanel. I can switch between the two ways of displaying my items by switching the host panel between the two types. This does work but you get an instance change in layout. Instead I want the ch...
Animating layout changes between two different types of panels in WPF, such as a `WrapPanel` and a `StackPanel`, can indeed be a challenge since they manage their child layouts differently. However, you can achieve a smooth transition between the two layouts without needing to resort to a `Canvas` and manual positionin...
21,430
[ { "from": "human", "value": "I have two different ways of displaying items in a WPF application. The first uses a WrapPanel and the second a vertical StackPanel. I can switch between the two ways of displaying my items by switching the host panel between the two types. This does work but you get an instance...
Are there any unit testing solutions for Flex? or actionscript 3? If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?
Yes, there are several unit testing solutions available for Adobe Flex and ActionScript 3. These tools can help you perform unit tests, functional tests, and some have UI testing capabilities as well. Below are some of the prominent options: ### 1. **FlexUnit** - **Description:** FlexUnit is the most widely used unit ...
20,760
[ { "from": "human", "value": "Are there any unit testing solutions for Flex? or actionscript 3?\nIf so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?\n" }, { "from": "gpt", "value": "Yes, there are several uni...
I need to serialize a huge amount of data (around 2gigs) of small objects into a single file in order to be processed later by another Java process. Performance is kind of important. Can anyone suggest a good method to achieve this?
Serializing a large amount of data efficiently in Java can be achieved through several methods. Here are some approaches you can consider, each with its pros and cons: ### 1. Java Native Serialization Java provides a built-in serialization mechanism using `ObjectOutputStream`. However, this method is not the most eff...
23,357
[ { "from": "human", "value": "I need to serialize a huge amount of data (around 2gigs) of small objects into a single file in order to be processed later by another Java process. Performance is kind of important. Can anyone suggest a good method to achieve this?\n" }, { "from": "gpt", "value": "S...
I am trying to place a big number in a C++ variable. The number is 600851475143 I tried unsigned long long int but got an error saying it the constant was too big. I then tried a bigInt library called BigInt -> http://mattmccutchen.net/bigint/ The problem is I can't compile the code as I get many errors regarding the ...
To use the BigInt library you mentioned, you need to ensure that you are correctly linking the library and that you are using its API properly. Here are the steps to fix your code and help you compile it correctly. 1. **Ensure that the library is available**: Make sure that you have the BigInt library files correctly ...
24,245
[ { "from": "human", "value": "I am trying to place a big number in a C++ variable. The number is 600851475143\nI tried unsigned long long int but got an error saying it the constant was too big. \nI then tried a bigInt library called BigInt -> http://mattmccutchen.net/bigint/\nThe problem is I can't compile ...
My application uses measurement instruments that are connected to the PC. I want to make it possible to use similar instruments from different vendors. So I defined an interface: interface IMeasurementInterface { void Initialize(); void Close(); } So far so good. Before a measurement I need t...
Using an `object` type in the `Setup` method of your `IMeasurementInterface` interface is a common approach for accommodating different parameter structures when you have different instruments from different vendors. However, there are some important considerations and potential alternatives that could make your implem...
24,216
[ { "from": "human", "value": "My application uses measurement instruments that are connected to the PC. I want to make it possible to use similar instruments from different vendors. \nSo I defined an interface: \ninterface IMeasurementInterface\n {\n void Initialize();\n void Close();\n }...
Ok, so I'm looking for a bit of architecture guidance, my team is getting a chance to re-cast certain decisions with a new feature that we're building, and I wanted to see what SO thought :-) There are of course certain things that we're not changing, so the solution would have to fit in this model. Namely, that we've...
Designing a maintainable system for role-based access control (RBAC) within an ASP.NET application requires a systematic approach. Here are some strategies to help reduce the use of ad-hoc if statements scattered throughout your codebase and centralize the authorization logic: ### 1. Centralized Authorization Manageme...
19,933
[ { "from": "human", "value": "Ok, so I'm looking for a bit of architecture guidance, my team is getting a chance to re-cast certain decisions with a new feature that we're building, and I wanted to see what SO thought :-) There are of course certain things that we're not changing, so the solution would have...
I have seen this link: Implementing Mutual Exclusion in JavaScript. On the other hand, I have read that there are no threads in javascript, but what exactly does that mean? When events occur, where in the code can they interrupt? And if there are no threads in JS, do I need to use mutexes in JS or not? Specifically, I...
JavaScript, particularly in its most common execution environment (the web browser), operates on a single-threaded event loop model. This means that JavaScript code is executed sequentially, and there is only one main thread for executing that code. Let’s break down your questions and concerns: ### 1. **What does it m...
20,955
[ { "from": "human", "value": "I have seen this link: Implementing Mutual Exclusion in JavaScript.\nOn the other hand, I have read that there are no threads in javascript, but what exactly does that mean? \nWhen events occur, where in the code can they interrupt?\nAnd if there are no threads in JS, do I need ...
Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate? I also believe the question, detail, and response is much better than the referenced question. I've been a C++ programmer for quite a while but I'm new to Java and new to Eclipse....
It sounds like you’re facing a common issue when seeking help in forums or Q&A platforms where questions can be marked as duplicates. Here are a few points to consider regarding your situation: 1. **Duplicate Marking**: Questions can be marked as duplicates for a variety of reasons, often based on the community's view...
22,820
[ { "from": "human", "value": "Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate? I also believe the question, detail, and response is much better than the referenced question.\nI've been a C++ programmer for quite a whi...
Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application's JVM did not terminate. The thread dump showed that there are a couple of non-daemon threads, notably Swing's EDT, AWT and a couple of websart related threads. The a...
The behavior you're observing with your Java Web Start application not terminating after all windows are closed is a common issue that can arise when using Web Start. Here are some insights into your questions: ### Why does Web Start leave zombie JVMs? 1. **Java Web Start Lifecycle**: Web Start applications have a sl...
20,058
[ { "from": "human", "value": "Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application's JVM did not terminate. The thread dump showed that there are a couple of non-daemon threads, notably Swing's EDT, AWT and a ...
I am working with some tables where I want the C# class to have a different property name than the underlying table column. However, when I use the Translate method to read the results, the properties that don't match the source name never get populated. Even when I use Linq to generate the SQL. For instance, my table ...
It seems that you're encountering an issue with property mapping between your C# class and the database table when using LINQ to SQL. This is a common situation when the property names in your C# class do not directly match the column names in your SQL database. ### Issues in Your C# Class Based on the code you provi...
23,151
[ { "from": "human", "value": "I am working with some tables where I want the C# class to have a different property name than the underlying table column. However, when I use the Translate method to read the results, the properties that don't match the source name never get populated. Even when I use Linq to ...
I could use some help trying to track down an intermittent error that I've been having with our ASP.Net project for quite some time. Intermittently when building the solution, the build will fail with the error "/: Build (web): Object reference not set to an instance of an object." The error has no associated file, lin...
Intermittent errors like the one you’re experiencing can be particularly challenging to debug. Since the error message is generic and lacks specific information, here are some systematic approaches you can take to narrow down the source of the issue: ### 1. **Check Build Configuration and Clean the Solution** - Ensure...
21,372
[ { "from": "human", "value": "I could use some help trying to track down an intermittent error that I've been having with our ASP.Net project for quite some time.\nIntermittently when building the solution, the build will fail with the error \"/: Build (web): Object reference not set to an instance of an obj...
The documentation available on the boost website is... limited. From what I've been able to read, the general consensus is that it is simply difficult to find good documentation on the boost::asio library. Is this really the case? If so, why? Notes: I have already found the (non-boost) Asio website - and the document...
You're right that the documentation for Boost.Asio can sometimes be perceived as limited or challenging to navigate, particularly for newcomers. Here are a few reasons why this might be the case and some suggestions to help you find the information you need: ### Reasons for Limited Perceived Documentation 1. **Comple...
25,349
[ { "from": "human", "value": "The documentation available on the boost website is... limited.\nFrom what I've been able to read, the general consensus is that it is simply difficult to find good documentation on the boost::asio library.\nIs this really the case? If so, why?\nNotes:\n\nI have already found t...
Despite my most convincing cries to the contrary, I was recently forced to implement a horizontal drop-down navigation system, so I opted for the friendliest one I could find - Son of Suckerfish. I tested in various browsers on my machine and all appeared to be fine. However, some (but not all!) IE7 users are experien...
Debugging issues like the one you're facing with your horizontal drop-down navigation in Internet Explorer 7 can be quite challenging, especially when you can't replicate the issue on your own setup. Here are some steps you can take to troubleshoot and potentially resolve the problems you're encountering: ### Sub Menu...
23,311
[ { "from": "human", "value": "Despite my most convincing cries to the contrary, I was recently forced to implement a horizontal drop-down navigation system, so I opted for the friendliest one I could find - Son of Suckerfish.\nI tested in various browsers on my machine and all appeared to be fine. However, ...
Any gotchas I should be aware of? Can I store it in a text field, or do I need to use a blob? (I'm not overly familiar with either pickle or sqlite, so I wanted to make sure I'm barking up the right tree with some of my high-level design ideas.)
When using `pickle` to serialize Python objects and store them in a SQLite database, there are several considerations and "gotchas" to be aware of. Here are the key points: ### 1. Pickle Storage Format - **Binary Data**: The output of `pickle` is binary, so it is more appropriate to store it in a BLOB field in SQLite....
23,555
[ { "from": "human", "value": "Any gotchas I should be aware of? Can I store it in a text field, or do I need to use a blob?\n(I'm not overly familiar with either pickle or sqlite, so I wanted to make sure I'm barking up the right tree with some of my high-level design ideas.)\n" }, { "from": "gpt", ...
I'm running Fedora 9 x86_64 and am more or less a Linux newbie (not using it, but installing and such). The error occurs in the second stage of the bootstrap (i.e. "./bootstrap_stage2"). It does a whole lot fo stuff and then these errors start happening: Fatal error: exception Out_of_memory make[8]: *** [odoc_html.cmo]...
It looks like you're encountering an "Out_of_memory" error during the build process for Godi, which is a package manager for OCaml. Here are several steps you can take to troubleshoot and potentially resolve the issue: 1. **Check Swap Space**: While you mentioned that you have sufficient RAM, it's worth checking if yo...
24,159
[ { "from": "human", "value": "I'm running Fedora 9 x86_64 and am more or less a Linux newbie (not using it, but installing and such). The error occurs in the second stage of the bootstrap (i.e. \"./bootstrap_stage2\").\nIt does a whole lot fo stuff and then these errors start happening:\nFatal error: excepti...
I added some simple WatiN tests to our app today to check that a cookie value is stored correctly. The tests pass locally on all machines in the team. However, when CruiseControl runs the tests on our Build server these new tests fail on the line containing browser.GetCookie(url, cookieName) The error given in the Crui...
When faced with intermittent issues such as yours, where tests pass locally but fail on a build server, there are a few potential areas to investigate. Here are some steps and considerations that may help you diagnose and resolve the issue with the WatiN tests: 1. **Environment Consistency**: - Ensure that the envi...
23,905
[ { "from": "human", "value": "I added some simple WatiN tests to our app today to check that a cookie value is stored correctly.\nThe tests pass locally on all machines in the team. However, when CruiseControl runs the tests on our Build server these new tests fail on the line containing\nbrowser.GetCookie(u...
I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awful, particularly with larger (i.e., custom) objects; the more EI calls ...
Using `ExternalInterface` to pass data between your Windows app and a Flex application does come with some performance considerations, especially with larger custom objects. Here are some best practices and strategies that you might find helpful to improve performance: 1. **Minimize Object Size**: As you already suspe...
24,883
[ { "from": "human", "value": "I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awful, particularly with larger (...
If we are writing about power-wise option - is using a console-based application in C#(.NET) better than having Windows GUI and what's the real difference expept few libraries loaded in operational memory? The issue is about text comparisons and working with strings, connecting to Internet, gathering data, working wit...
When considering whether to use a console-based application versus a Windows GUI application in C# (.NET) for tasks involving text comparisons, string manipulation, connecting to the internet, gathering data, and working with databases, there are a few factors to keep in mind. While the decision may not significantly i...
23,077
[ { "from": "human", "value": "If we are writing about power-wise option - is using a console-based application in C#(.NET) better than having Windows GUI and what's the real difference expept few libraries loaded in operational memory?\nThe issue is about text comparisons and working with strings, connectin...
Is it possible to secure only the Login.aspx page (and the postback) and not the whole site in IIS? We are looking to do this specifically with a SharePoint site running Forms Based Authentication against our Active Directory. Links to this will be helpful. This is what we have done so far: 1. Setup SharePoint to use...
Securing only the `Login.aspx` page in IIS while allowing the rest of a SharePoint site to remain unencrypted can be a bit tricky, especially in the context of Forms-Based Authentication (FBA). Below are some steps and considerations to achieve this, along with guidance on redirecting users from HTTPS back to HTTP afte...
21,104
[ { "from": "human", "value": "\nIs it possible to secure only the Login.aspx page (and the postback) and not the whole site in IIS?\nWe are looking to do this specifically with a SharePoint site running Forms Based Authentication against our Active Directory.\nLinks to this will be helpful.\n\nThis is what w...
We have an auto-complete list that's populated when an you send an email to someone, which is all well and good until the list gets really big you need to type more and more of an address to get to the one you want, which goes against the purpose of auto-complete I was thinking that some logic should be added so that t...
Your proposal for scoring email contacts based on recency and frequency is a good starting point for improving the auto-complete functionality. Here are some suggestions and considerations for your scoring system: ### Proposed Scoring Logic 1. **Recency Points**: - Same day: 5 points - Last 3 days: 4 points ...
21,777
[ { "from": "human", "value": "We have an auto-complete list that's populated when an you send an email to someone, which is all well and good until the list gets really big you need to type more and more of an address to get to the one you want, which goes against the purpose of auto-complete\nI was thinking...
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of...
Building a Lifestreaming app with extensive data pulling, data mining, and machine learning requires careful consideration of the hosting environment and architecture. Here are some factors to consider when deciding between Google App Engine (GAE) and a Django application hosted on a co-location server: ### Google App...
23,116
[ { "from": "human", "value": "I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be movi...
We have consumed a third party web service and are trying to invoke it from an ASP.NET web application. However when I instantiate the web service the following System.InvalidOperationException exception is thrown: Method 'ABC.XYZ' can not be reflected. System.InvalidOperationException: Method 'ABC.XYZ' can not b...
The `System.InvalidOperationException` that you're encountering is caused by a naming conflict between the XML element that is being used in the web service and a method or type in the proxy class generated by Visual Studio. This usually happens when the web service defines an XML element with the same name as a method...
24,525
[ { "from": "human", "value": "We have consumed a third party web service and are trying to invoke it from an ASP.NET web application.\nHowever when I instantiate the web service the following System.InvalidOperationException exception is thrown:\n\nMethod 'ABC.XYZ' can not be reflected.\n System.InvalidOpe...
Compared to Simple memory access Disk access Memory access on another computer(on the same network) Disk access on another computer(on the same network) in C++ on windows.
When comparing various types of data access in C++ on a Windows operating system, you can categorize them based on performance, latency, and usage scenarios. Here is an overview of each category in relation to memory access and disk access, both locally and over a network: ### 1. Simple Memory Access - **Description**...
14,108
[ { "from": "human", "value": "Compared to \n\nSimple memory access\nDisk access\nMemory access on another computer(on the same network)\nDisk access on another computer(on the same network)\n\nin C++ on windows.\n" }, { "from": "gpt", "value": "When comparing various types of data access in C++ o...
I am application developer and don't know much about virtual machine(VM). however, our application is resided on a VM. frequent patch need be apply to fix/update this application. For diaster recovery, It was suggest to backup every thing on the server. so, once server is restored, no application need be re-installed ...
Your concern about backing up a Virtual Machine (VM) and the risks associated with exposing backups to unauthorized access is quite valid. Here are some points to consider and suggestions for handling backups and disaster recovery for your application: ### Backup Strategies for VMs 1. **Snapshot Backups:** - Use V...
23,574
[ { "from": "human", "value": "I am application developer and don't know much about virtual machine(VM). \nhowever, our application is resided on a VM. frequent patch need be apply to fix/update this application. For diaster recovery, It was suggest to backup every thing on the server. so, once server is rest...
After looking at another question on SO (Using NaN in C++) I became curious about std::numeric_limits<double>::signaling_NaN(). I could not get signaling_NaN to throw an exception. I thought perhaps by signaling it really meant a signal so I tried catching SIGFPE but nope... Here is my code: double my_nan = numeric_lim...
The behavior you're observing with `std::numeric_limits<double>::signaling_NaN()` is expected. In C++, a signaling NaN (sNaN) is designed to signal certain conditions when used in arithmetic operations. However, whether or not those conditions actually generate signals or exceptions depends on the floating-point enviro...
23,993
[ { "from": "human", "value": "After looking at another question on SO (Using NaN in C++) I became curious about std::numeric_limits<double>::signaling_NaN().\nI could not get signaling_NaN to throw an exception. I thought perhaps by signaling it really meant a signal so I tried catching SIGFPE but nope...\nH...
Most, if not all architecture documents I've seen (and developed) have been presented as a series of views (Logical, Physical, Use-case etc). Is this the preferred layout? What other styles are there?
The use of views in architectural documents is a well-established practice in software and systems architecture. Organizing architecture documents into views—such as Logical, Physical, Use-case, Deployment, and others—helps stakeholders understand different aspects of the system without being overwhelmed by complexity....
17,444
[ { "from": "human", "value": "Most, if not all architecture documents I've seen (and developed) have been presented as a series of views (Logical, Physical, Use-case etc). Is this the preferred layout? What other styles are there?\n" }, { "from": "gpt", "value": "The use of views in architectur...
I was wondering what would be the best strategy to implement a badges system using asp.net mvc. The one that stackoverflow has is pretty interesting. What do you suggest? I guess I need to clarify the question a bit. The problem would be the different criteria for earning every badges. How do make that logic extensible...
Implementing a badge system in an ASP.NET MVC application can be a rewarding feature, engaging users by incentivizing certain behaviors or achievements. The extensibility of badge criteria is crucial to accommodate future changes or new badge types without tightly coupling the logic. Here’s a strategic approach to desi...
20,506
[ { "from": "human", "value": "I was wondering what would be the best strategy to implement a badges system using asp.net mvc. The one that stackoverflow has is pretty interesting. What do you suggest?\nI guess I need to clarify the question a bit. The problem would be the different criteria for earning every...
I've been arguing with some friends on the university, and we can't get to a point to which is the framework with more scalability for web applications (and still very fast). One calls for jsp, the other one for ruby other for php and so on. Could i ask you to clarify us on what as more scalability potential? Tks, hope...
When it comes to web application frameworks and their scalability, it's important to note that scalability is not solely determined by the framework itself; it is also heavily influenced by factors such as architecture, database design, hosting environment, and the specific use case of the application. Below is a compa...
21,964
[ { "from": "human", "value": "I've been arguing with some friends on the university, and we can't get to a point to which is the framework with more scalability for web applications (and still very fast).\nOne calls for jsp, the other one for ruby other for php and so on. Could i ask you to clarify us on wha...
I am working on an ASP site hosted using SUN One (used to be called Chillisoft) server. I am having trouble loading in an XML file, the code I am using is below dim directory set directory = Server.CreateObject("MSXML2.DOMDocument") if(directory.load(Server.MapPath("directory.xml"))) then Response.Write("Loaded")...
It's great that you're working on an ASP site and utilizing XML with it. Your code seems to be structured correctly for loading an XML file, but if you're encountering issues, there are a few things you can check and modify. ### Check the Following: 1. **File Location**: Ensure that the `directory.xml` file is indeed...
23,837
[ { "from": "human", "value": "I am working on an ASP site hosted using SUN One (used to be called Chillisoft) server. I am having trouble loading in an XML file, the code I am using is below\ndim directory\nset directory = Server.CreateObject(\"MSXML2.DOMDocument\")\n\nif(directory.load(Server.MapPath(\"dire...
Following the development of Ruby very closely I learned that detailed character encoding is implemented in Ruby 1.9. My question for now is: How may Ruby be used at the moment to talk to a database that stores all data in UTF8? Background: I am involved in a new project where Ruby/RoR is at least an option. But the pr...
Ruby, especially with Ruby on Rails (RoR), has excellent support for UTF-8 encoding, which is particularly useful for handling internationalized character sets. If you're working on a project that requires storing and managing data in UTF-8 in a database, here are some steps and considerations: ### 1. Database Configu...
21,155
[ { "from": "human", "value": "Following the development of Ruby very closely I learned that detailed character encoding is implemented in Ruby 1.9. My question for now is: How may Ruby be used at the moment to talk to a database that stores all data in UTF8?\nBackground: I am involved in a new project where ...
I've been recently asked to learn some MATLAB basics for a class. What does make it so cool for researchers and people that works in university? I saw it's cool to work with matrices and plotting things... (things that can be done easily in Python using some libraries). Writing a function or parsing a file is just pain...
It's great that you're exploring MATLAB, especially in the context of your university coursework. Here’s a breakdown of what makes MATLAB appealing to researchers and its potential advantages over Python for specific tasks: ### 1. **Matrix and Numerical Computation:** - MATLAB (short for MATrix LABoratory) is speci...
22,493
[ { "from": "human", "value": "I've been recently asked to learn some MATLAB basics for a class.\nWhat does make it so cool for researchers and people that works in university?\nI saw it's cool to work with matrices and plotting things... (things that can be done easily in Python using some libraries).\nWriti...
Is there a recommended way to upgrade Quartz in JBoss 4.2.x? JBoss bundles quartz 1.5.2, but I have encountered issues (QUARTZ-399, QUARTZ-520) that I want to avoid. I would not want to patch quartz.jar in JBoss just to resolve the errors, but instead provide a new quartz.jar (plus associated configuration artifacts). ...
Upgrading Quartz in JBoss 4.2.x can be a bit tricky due to the way JBoss manages classloading. As you correctly pointed out, simply adding a newer version of `quartz.jar` to your EAR file won't work, because JBoss will prioritize the older version that's located in its server-level library (`server/default/lib`). Her...
20,074
[ { "from": "human", "value": "Is there a recommended way to upgrade Quartz in JBoss 4.2.x?\nJBoss bundles quartz 1.5.2, but I have encountered issues (QUARTZ-399, QUARTZ-520) that I want to avoid.\nI would not want to patch quartz.jar in JBoss just to resolve the errors, but instead provide a new quartz.jar ...
I frequently need to debug .NET binaries on test machines (by test-machine, I mean that the machine doesn't have Visual Studio installed on it, it's frequently re-imaged, It's not the same machine that I do my development on, etc). I love the Visual Studio debugger, but it's not practical for me to install visual stud...
For debugging .NET binaries on test machines without Visual Studio, you have a few options that can help you effectively debug managed applications with a smaller footprint and faster setup. Here are some tools to consider: 1. **WinDbg with SOS Debugging Extension**: - **WinDbg** is a lightweight debugging tool tha...
23,530
[ { "from": "human", "value": "I frequently need to debug .NET binaries on test machines (by test-machine, I mean that the machine doesn't have Visual Studio installed on it, it's frequently re-imaged, It's not the same machine that I do my development on, etc). \nI love the Visual Studio debugger, but it's n...
I have (simplified for the example) a table with the following data Row Start Finish ID Amount --- --------- ---------- -- ------ 1 2008-10-01 2008-10-02 01 10 2 2008-10-02 2008-10-03 02 20 3 2008-10-03 2008-10-04 01 38 4 2008-10-04 2008-10-05 01 23 5 2008-10-...
To achieve the aggregation of amounts for contiguous rows with the same ID in T-SQL, you can use a combination of common table expressions (CTEs) and window functions. Below is a SQL script that shows how to achieve the desired transformation, followed by the final count and sum grouped by the unique ID's. ### Step 1:...
24,615
[ { "from": "human", "value": "I have (simplified for the example) a table with the following data\nRow Start Finish ID Amount\n--- --------- ---------- -- ------\n 1 2008-10-01 2008-10-02 01 10\n 2 2008-10-02 2008-10-03 02 20\n 3 2008-10-03 2008-10-04 01 38\n 4 2...
Question: Should I write my application to directly access a database Image Repository or write a middleware piece to handle document requests. Background: I have a custom Document Imaging and Workflow application that currently stores about 15 million documents/document images (90%+ single page, group 4 tiffs, the r...
Given your context and objectives, there are several considerations to weigh when deciding whether to access the database directly or implement a middleware layer. Here’s a breakdown of the advantages and disadvantages of both approaches based on your requirements: ### Direct Database Access #### Advantages: 1. **Sim...
24,076
[ { "from": "human", "value": "Question: \nShould I write my application to directly access a database Image Repository or write a middleware piece to handle document requests.\nBackground:\nI have a custom Document Imaging and Workflow application that currently stores about 15 million documents/document im...
I'd like to calculate the age of the messages in an Exchange mailbox to make sure they sit there for at least a minute before our program (C++, MAPI) processes them. This way the spam filter we use should have enough time to do its job. Because the time on the PC where our program runs might be different from the time ...
To effectively determine the age of messages in an Exchange mailbox using MAPI without modifying any items, you can leverage the `PR_INTERNET_CPID` property to ensure you're working with the correct server time. However, since you specifically mentioned the need for server time, here is a more elegant solution without ...
17,369
[ { "from": "human", "value": "I'd like to calculate the age of the messages in an Exchange mailbox to make sure they sit there for at least a minute before our program (C++, MAPI) processes them. This way the spam filter we use should have enough time to do its job.\nBecause the time on the PC where our prog...
I have a HTML select list with quite a few (1000+) names. I have a javascript in place which will select the first matching name if someone starts typing. This matching looks at the start of the item: var optionsLength = dropdownlist.options.length; for (var n=0; n < optionsLength; n++) { var optionText = drop...
You can achieve this functionality with pure JavaScript by modifying your existing code to check if the typed substring exists anywhere in the option text (not just at the start). Then, you can update the selected index based on the matching options. Here's a complete solution for your requirement: ```html <!DOCTYPE h...
20,432
[ { "from": "human", "value": "I have a HTML select list with quite a few (1000+) names. I have a javascript in place which will select the first matching name if someone starts typing. This matching looks at the start of the item: \nvar optionsLength = dropdownlist.options.length;\n for (var n=0; n < option...
Okay, I am sure this is simple but it is driving me nuts. I recently went to work on a program where I have had to step back in time a bit and use Redhat 9. When I'm typing on the command line from a standard xterm running KornShell (ksh), and I reach the end of the line the screen slides to the right (cutting off the ...
It sounds like you're experiencing a problem with line wrapping in your KornShell (ksh) terminal session on Redhat 9. This behavior can often be controlled by the terminal's settings or by the shell itself. Here are a few suggestions to help you enable line wrapping: 1. **Check Terminal Settings**: - Sometimes, the...
21,282
[ { "from": "human", "value": "Okay, I am sure this is simple but it is driving me nuts. I recently went to work on a program where I have had to step back in time a bit and use Redhat 9. When I'm typing on the command line from a standard xterm running KornShell (ksh), and I reach the end of the line the scr...
I am asking this out of a curiosity. Basically my question is when you have a database which needs a row entry to have things which act like flags, what is the best practice? A good example of this would be the badges on stack overflow, or the operating system field in bugzilla. Any subset of the flags may be set for a...
The problem of managing a dynamic set of flags in a database is common, and there are several approaches that can be taken, each with its own pros and cons. The right choice depends on factors such as the number of potential flags, how often flags change, and how you intend to query the data. Here are some commonly use...
21,640
[ { "from": "human", "value": "I am asking this out of a curiosity. Basically my question is when you have a database which needs a row entry to have things which act like flags, what is the best practice? A good example of this would be the badges on stack overflow, or the operating system field in bugzilla....
I'm not much of a coder, but I need to write a simple preg_replace statement in PHP that will help me with a WordPress plugin. Basically, I need some code that will search for a string, pull out the video ID, and return the embed code with the video id inserted into it. In other words, I'm searching for this: [you...
Certainly! Below is a `preg_replace` statement in PHP that accomplishes what you're looking for. It searches for a specific string format (your YouTube URL) and replaces it with the desired embed code while extracting the `VIDEO_ID_HERE`. Here is the PHP code: ```php $pattern = '/\[youtube=http:\/\/www\.youtube\.com\...
23,769
[ { "from": "human", "value": "I'm not much of a coder, but I need to write a simple preg_replace statement in PHP that will help me with a WordPress plugin. Basically, I need some code that will search for a string, pull out the video ID, and return the embed code with the video id inserted into it. \nIn o...
I'm reading this C++ open source code and I came to a constructor but I don't get it ( basically because I don't know C++ :P ) I understand C and Java very well. TransparentObject::TransparentObject( int w, int x, int y, int z ) : _someMethod( 0 ), _someOtherMethod( 0 ), _someOtherOtherMethod( 0 ), ...
You're on the right track with your understanding, but let's clarify a few points about C++ constructors, initialization, and the syntax. 1. **Constructor Definition**: ```cpp TransparentObject::TransparentObject(int w, int x, int y, int z) : ``` This line is defining a constructor for the `TransparentObj...
23,048
[ { "from": "human", "value": "I'm reading this C++ open source code and I came to a constructor but I don't get it ( basically because I don't know C++ :P ) \nI understand C and Java very well.\n TransparentObject::TransparentObject( int w, int x, int y, int z ) : \n _someMethod( 0 ),\n _someOtherMet...
I've started to use constructs like these: class DictObj(object): def __init__(self): self.d = {} def __getattr__(self, m): return self.d.get(m, None) def __setattr__(self, m, v): super.__setattr__(self, m, v) Update: based on this thread, I've revised the DictObj implementation to:...
Your constructs are quite interesting and can be useful in certain scenarios. However, let's discuss both the `dotdict` and `AutoEnum` classes to see if there are any improvements or potential issues. ### `dotdict` 1. **Using Inheritance from `dict`:** Your implementation of `dotdict` inherits from `dict`, which a...
24,592
[ { "from": "human", "value": "I've started to use constructs like these:\nclass DictObj(object):\n def __init__(self):\n self.d = {}\n def __getattr__(self, m):\n return self.d.get(m, None)\n def __setattr__(self, m, v):\n super.__setattr__(self, m, v)\n\nUpdate: based on this t...
How long can I expect a client/server TCP connection to last in the wild? I want it to stay permanently connected, but things happen, so the client will have to reconnect. At what point do I say that there's a problem in the code rather than there's a problem with some external equipment?
The lifespan of a client/server TCP connection can vary significantly based on several factors, including network stability, the reliability of the client and server applications, and various external conditions. Here's a breakdown of considerations that can help you understand how to manage long-lived TCP connections ...
14,053
[ { "from": "human", "value": "How long can I expect a client/server TCP connection to last in the wild?\nI want it to stay permanently connected, but things happen, so the client will have to reconnect. At what point do I say that there's a problem in the code rather than there's a problem with some externa...
What is the best way to determine how many window handles an application is using? Is there a tool or a WMI performance counter that I could use? I would like to run up an app and watch a counter of some sort and see that the number of window handles is increasing. for (int i=0; i < 1000; i++) { System.Threading....
To determine how many window handles an application is using, you can utilize a few different approaches: ### 1. **Performance Monitor (PerfMon)** You can use Windows Performance Monitor (PerfMon) to track the handle count of a process: 1. Open Performance Monitor (you can search for it in the Start menu). 2. Click ...
20,215
[ { "from": "human", "value": "What is the best way to determine how many window handles an application is using? Is there a tool or a WMI performance counter that I could use?\nI would like to run up an app and watch a counter of some sort and see that the number of window handles is increasing. \nfor (int ...
What parts of a Grails application need to be stored in source-control? Some obvious parts that are needed: grails-app directory test directory web-app directory Now we reach questions like: If we use a Grails plug-in (like gldapo), do we need to check in that plugin? Do Grails plugins install in the Grails direc...
When setting up a Grails application for source control, it's important to include essential files and directories while excluding those that can be generated or downloaded later. Here’s a breakdown of what you should include: ### Key Directories and Files to Include in Source Control: 1. **grails-app directory**: ...
23,091
[ { "from": "human", "value": "What parts of a Grails application need to be stored in source-control? Some obvious parts that are needed:\n\ngrails-app directory\ntest directory\nweb-app directory\n\nNow we reach questions like:\n\nIf we use a Grails plug-in (like gldapo), do we need to check in that plugin...
Given this algorithm, I would like to know if there exists an iterative version. Also, I want to know if the iterative version can be faster. This some kind of pseudo-python... the algorithm returns a reference to root of the tree make_tree(array a) if len(a) == 0 return None; node = pick a random point fr...
The algorithm you provided is a recursive algorithm to construct a tree (possibly a binary tree) based on distances calculated from points in an array. It does so by selecting a random point as a node and then dividing the remaining points based on their distances to this node. ### Iterative Version To create an iter...
24,075
[ { "from": "human", "value": "Given this algorithm, I would like to know if there exists an iterative version. Also, I want to know if the iterative version can be faster.\nThis some kind of pseudo-python...\nthe algorithm returns a reference to root of the tree\nmake_tree(array a)\n if len(a) == 0\n ...
Is it possible to create Eclipse plugins that auto-discover eachother? I am developing a set of plugins that need to operate in two primary situations: individually in concert with each other. When run individually, the plugins should "just work" but when in concert, they will be sharing some of the same model conten...
Yes, Eclipse provides mechanisms that can facilitate the auto-discovery of plugins and allow them to interact with each other. Here are some approaches you can use to implement this functionality in your Eclipse plugins: ### 1. **Eclipse Extension Points and Extensions** Eclipse's extension mechanism is designed for ...
21,235
[ { "from": "human", "value": "Is it possible to create Eclipse plugins that auto-discover eachother?\nI am developing a set of plugins that need to operate in two primary situations:\n\nindividually\nin concert with each other.\n\nWhen run individually, the plugins should \"just work\" but when in concert, t...
I am working on a legacy ASP application. I am attempting to insert a value (40.33) into a field in SQL Server 2000 that happens to be a float type. Every place I can see (via some logging) in the application is sending 40.33 to the Stored Procedure. When I run SQL Profiler against the database while the call is happ...
What you're experiencing is a common characteristic of the `float` datatype in SQL Server (and many other programming languages). The `float` data type is used to represent approximate numeric values using floating point representation, which can lead to some unexpected behavior when it comes to precision and represent...
25,366
[ { "from": "human", "value": "I am working on a legacy ASP application. I am attempting to insert a value (40.33) into a field in SQL Server 2000 that happens to be a float type. Every place I can see (via some logging) in the application is sending 40.33 to the Stored Procedure. When I run SQL Profiler ag...
How, in Java, to quickly (or generically) convert one class that implements an interface into another class that implements the same interface? I mean, if they're a POJO one class setters should take the other class getters as arguments. Is there a Pattern for this situation?
To achieve the conversion of one class that implements an interface to another class that implements the same interface in Java, you can use a common design pattern known as the **Adapter Pattern** or you can create a **Mapper**. Below is an example of how you can implement this using a Mapper approach, which is often ...
24,002
[ { "from": "human", "value": "How, in Java, to quickly (or generically) convert one class that implements an interface into another class that implements the same interface?\nI mean, if they're a POJO one class setters should take the other class getters as arguments.\nIs there a Pattern for this situation?\...
I am troubleshooting an issue with IIS6 where all sites bound to ip addresses other than the default give an error message "network location cannot be reached" when trying to start any of these sites. The nic has all the ip addresses configured. When I do a httpcfg query iplisten, I see only the default ip address. Wh...
Troubleshooting IIS6 issues, especially with site bindings and IP addresses, can be tricky. Let's address your questions one by one. ### 1. Why are those websites refusing to start? The error message "network location cannot be reached" suggests that IIS cannot bind to the IP addresses you have assigned to those site...
19,589
[ { "from": "human", "value": "I am troubleshooting an issue with IIS6 where all sites bound to ip addresses other than the default give an error message \"network location cannot be reached\" when trying to start any of these sites.\nThe nic has all the ip addresses configured.\nWhen I do a httpcfg query ipl...
I've been using Pydev/Eclipse to develop Google App Engine (GAE) applications but I've been unable to get the response/request objects from WebOb to have auto-completion. I used a widely recommended tutorial to get everything configured; auto-completion is working for everything else I've run into. As an example: if I ...
It sounds like you've done a lot of the right things to set up your Pydev/Eclipse environment for Google App Engine development, but you're still having issues with auto-completion for the `response` and `request` objects from the WebOb library. Here are some steps you can take to troubleshoot and potentially fix the i...
20,790
[ { "from": "human", "value": "I've been using Pydev/Eclipse to develop Google App Engine (GAE) applications but I've been unable to get the response/request objects from WebOb to have auto-completion. I used a widely recommended tutorial to get everything configured; auto-completion is working for everything...
I'm wondering about the practical use of #undef in C. I'm working through K&R, and am up to the preprocessor. Most of this was material I (more or less) understood, but something on page 90 (second edition) stuck out at me: Names may be undefined with #undef, usually to ensure that a routine is really a function, ...
The use of `#undef` to ensure that a function is not being shadowed by a macro definition is not extremely common in everyday programming, but it is a valid and sometimes prudent practice, particularly in library development or large codebases. Let's explore this further: ### Why Use `#undef`? 1. **Avoiding Name Clas...
21,878
[ { "from": "human", "value": "I'm wondering about the practical use of #undef in C. I'm working through K&R, and am up to the preprocessor. Most of this was material I (more or less) understood, but something on page 90 (second edition) stuck out at me:\n\nNames may be undefined with #undef,\n usually to en...
I have a range of Win32 VCL applications developed with C++Builder from BCB5 onwards, and want to port them to ECB2009 or whatever it's now called. Some of my applications use the old TNT/TMS unicode components, so I have a good mix of AnsiStrings and WideStrings throughout the code. The new version introduces UnicodeS...
Migrating from older versions of C++Builder (like BCB5) to a newer version (like C++Builder 2009) involves careful handling of string types, especially with the introduction of `UnicodeString`. To help ensure backward compatibility while making your code more Unicode-friendly, here are some guidelines you can follow: ...
22,396
[ { "from": "human", "value": "I have a range of Win32 VCL applications developed with C++Builder from BCB5 onwards, and want to port them to ECB2009 or whatever it's now called.\nSome of my applications use the old TNT/TMS unicode components, so I have a good mix of AnsiStrings and WideStrings throughout the...
Is it possible to have a MySQLi prepared statement within the fetch() call of a previous statement? If not, what's the best way around it? Example code: if($stmt = $link->prepare("SELECT item FROM data WHERE id = ?")) { $stmt->bind_param("i", $id); $stmt->execute(); $stmt->bind_result($item); while( $st...
In your provided code snippet, you are attempting to execute a second prepared statement (`$stmt2`) within the `while` loop of the `fetch()` call for the first statement (`$stmt`). This is perfectly fine in MySQLi as long as you are managing your resources properly and following best practices. However, there are a co...
11,739
[ { "from": "human", "value": "Is it possible to have a MySQLi prepared statement within the fetch() call of a previous statement? If not, what's the best way around it?\nExample code:\nif($stmt = $link->prepare(\"SELECT item FROM data WHERE id = ?\")) {\n $stmt->bind_param(\"i\", $id);\n $stmt->execute...
What would be the best method to implement extra functionality in a database layer that uses Linq-to-SQL? Currently I'm looking at implementing functions for adding information based on presets and similar tasks? Inserts, updates and deletes requires access to the DataContext and in the Table classes you don't have acc...
To implement extra functionality in a database layer using LINQ to SQL while maintaining a clean architecture, you can leverage a combination of partial classes, repository patterns, and possibly service layers. This allows you to encapsulate complex operations in a way that is reusable across your applications without...
23,779
[ { "from": "human", "value": "What would be the best method to implement extra functionality in a database layer that uses Linq-to-SQL? Currently I'm looking at implementing functions for adding information based on presets and similar tasks?\nInserts, updates and deletes requires access to the DataContext a...
I am making a strong effort to discipline my projects and create a Vision/Scope document at the onset. Included in this are the use case diagrams. Just listing out the use cases has really helped me fully see all the requirements that the customer is asking for, and it has opened up dialog. I am wondering about how d...
Creating a Vision/Scope document and defining use cases are excellent steps in managing your projects and ensuring clear communication with stakeholders. When it comes to the level of detail in use cases, it's important to strike a balance between capturing necessary requirements and avoiding overwhelming detail that c...
25,059
[ { "from": "human", "value": "I am making a strong effort to discipline my projects and create a Vision/Scope document at the onset. Included in this are the use case diagrams. Just listing out the use cases has really helped me fully see all the requirements that the customer is asking for, and it has ope...
I'm writing a scheduler or sorts. It's basically a table with a list of exes (like "C:\a.exe") and a console app that looks at the records in the table every minute or so and runs the tasks that haven't been run yet. I run the tasks like this: System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInf...
To determine if a particular task failed when running it as a separate process using the `System.Diagnostics.Process` class, you'll want to handle the process's exit code and any potential exceptions that occur when the process is run. Here's a step-by-step approach to achieving this: 1. **Start the Process**: Start...
21,506
[ { "from": "human", "value": "I'm writing a scheduler or sorts. It's basically a table with a list of exes (like \"C:\\a.exe\") and a console app that looks at the records in the table every minute or so and runs the tasks that haven't been run yet.\nI run the tasks like this:\nSystem.Diagnostics.Process p ...
Apache just fails to start with NO error message when we try to reboot it after enabling the code for the ssl module. NOTE: I was able to use OpenSSL to generate a request and have a legit wildcard certificate in place and referenced in the httpd.conf
When Apache fails to start without any error message after enabling the SSL module and configuring your certificates, it can be a bit frustrating. Here are some steps you can take to troubleshoot the issue: 1. **Check Apache Error Logs**: The first thing you should do is check the Apache error logs. They are usually l...
24,292
[ { "from": "human", "value": "Apache just fails to start with NO error message when we try to reboot it after enabling the code for the ssl module.\nNOTE: I was able to use OpenSSL to generate a request and have a legit wildcard certificate in place and referenced in the httpd.conf\n" }, { "from": "g...
Can somebody give me a complete and working example of calling the AllocateAndInitializeSid function from C# code? I found this: BOOL WINAPI AllocateAndInitializeSid( __in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, __in BYTE nSubAuthorityCount, __in DWORD dwSubAuthority0, __in DWORD dwSubAuthorit...
To call the `AllocateAndInitializeSid` function from C#, you can use Platform Invocation Services (P/Invoke) to define the method signature and call it from your managed code. The key is to understand how to marshal the data types involved, particularly `PSID_IDENTIFIER_AUTHORITY` and `PSID`. Here's how you can set th...
19,961
[ { "from": "human", "value": "Can somebody give me a complete and working example of calling the AllocateAndInitializeSid function from C# code?\nI found this: \nBOOL WINAPI AllocateAndInitializeSid(\n __in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,\n __in BYTE nSubAuthorityCount,\n __in DWORD...
I many times have to work with directories containing hundreds of thousands of files, doing text matching, replacing and so on. If I go the standard route of, say grep foo * I get the too many files error message, so I end up doing for i in *; do grep foo $i; done or find ../path/ | xargs -I{} grep foo "{}" But thes...
You're correct that the limitation you're encountering with `grep` is due to the maximum length of the command line arguments that the shell can handle. When there are too many files, it can exceed this limit, resulting in errors when you try to use `*` or other methods that expand to many arguments. Here are several...
19,501
[ { "from": "human", "value": "I many times have to work with directories containing hundreds of thousands of files, doing text matching, replacing and so on. If I go the standard route of, say\ngrep foo *\n\nI get the too many files error message, so I end up doing\nfor i in *; do grep foo $i; done\n\nor\nfi...
Okay I know I asked about this before, and the answer was basically cache data that doesn't change often. Well what does one do when at least 99.9% of the data changes? In my project the only tables that doesn't get updated or won't get updated frequently would be the member profile info (name/address, and settings) So...
When dealing with data that changes frequently—like in your case where 99.9% of the data is updated often—you can still implement effective caching strategies to improve performance while ensuring that users see the most current data. Here are several approaches you can consider: ### 1. **Cache with Expiration/TTL (Ti...
22,734
[ { "from": "human", "value": "Okay I know I asked about this before, and the answer was basically cache data that doesn't change often.\nWell what does one do when at least 99.9% of the data changes?\nIn my project the only tables that doesn't get updated or won't get updated frequently would be the member p...
In the Apple documentation for NSRunLoop there is sample code demonstrating suspending execution while waiting for a flag to be set by something else. BOOL shouldKeepRunning = YES; // global NSRunLoop *theRL = [NSRunLoop currentRunLoop]; while (shouldKeepRunning && [theRL runMode:NSDefaultRunLoopMode beforeDate:...
The behavior you are observing with the original code is likely due to the way the `NSRunLoop` and the `runMode:beforeDate:` method function. When you use `beforeDate:[NSDate distantFuture]`, the run loop will run indefinitely until the `shouldKeepRunning` flag becomes `NO`. However, if there are no events to process, ...
20,021
[ { "from": "human", "value": "In the Apple documentation for NSRunLoop there is sample code demonstrating suspending execution while waiting for a flag to be set by something else.\nBOOL shouldKeepRunning = YES; // global\nNSRunLoop *theRL = [NSRunLoop currentRunLoop];\nwhile (shouldKeepRunning && [th...
I currently have an application which needs to have an awareness of which monitor the cursor is located when running in a multi-monitor configuration.
To determine which monitor the cursor is located on in a multi-monitor configuration, you can use different approaches based on the programming environment you're working in. Below are examples for popular programming environments: ### For Windows (C# with Windows Forms) You can utilize the `System.Windows.Forms.Curs...
23,194
[ { "from": "human", "value": "I currently have an application which needs to have an awareness of which monitor the cursor is located when running in a multi-monitor configuration. \n" }, { "from": "gpt", "value": "To determine which monitor the cursor is located on in a multi-monitor configurat...
I'm hosting my first WCF service in IIS. I have two methods, 1 to set a string variable on the WCF Service, and the other to retrieve it. The interface used is: [OperationContract] string ReturnText(); [OperationContract] void SetText(string s); BasicHttpBinding is used. Stepping through the service with the debugger...
The behavior you're experiencing with your WCF service is expected due to the default instancing behavior of WCF services. When you host a WCF service in IIS with BasicHttpBinding, the service instance is created for each request unless you explicitly configure it otherwise. ### The Problem By default, WCF uses **Per-...
24,248
[ { "from": "human", "value": "I'm hosting my first WCF service in IIS. I have two methods, 1 to set a string variable on the WCF Service, and the other to retrieve it. The interface used is:\n[OperationContract]\nstring ReturnText();\n\n[OperationContract]\nvoid SetText(string s);\n\nBasicHttpBinding is used...
I'm new to ruby and I'm playing around with the IRB. I found that I can list methods of an object using the ".methods" method, and that self.methods sort of give me what I want (similar to Python's dir(builtins)?), but how can I find the methods of a library/module I've loaded via include and require? irb(main):036:0* ...
In Ruby, if you want to see the methods of a module or library you've loaded using `require` or `include`, you can directly call the `methods` method on that module or library. Here’s how you can do that: 1. **Using the Module Name**: If you know the name of the module, you can call `ModuleName.methods` or `ModuleNam...
22,542
[ { "from": "human", "value": "I'm new to ruby and I'm playing around with the IRB.\nI found that I can list methods of an object using the \".methods\" method, and that self.methods sort of give me what I want (similar to Python's dir(builtins)?), but how can I find the methods of a library/module I've loade...
If I develop a desktop app using C#, and later want to turn it into a webapp but don't want to use ASP.NET, what are my options? I did a bit of searching and it looks like there doesn't appear to be a good solution to integrate C# code with any scripting language other than running it as a web service and making SOAP ...
If you're looking to convert a C# desktop application into a web application but want to avoid using ASP.NET, you still have several viable options. Here are a few alternatives: ### 1. **Blazor** Blazor is a framework by Microsoft that allows you to build interactive web applications using C# instead of JavaScript. Wi...
24,102
[ { "from": "human", "value": "If I develop a desktop app using C#, and later want to turn it into a webapp but don't want to use ASP.NET, what are my options? \nI did a bit of searching and it looks like there doesn't appear to be a good solution to integrate C# code with any scripting language other than ru...
I'd like to write some small applications for Windows and OSX. Portable is good. For instance, the simple TclKit solution for TCL would work well if I could stand to look at Tcl for any length of time. I'm considering using Javascript + extensions -- I really like Javascript -- seems to me there should be some way to ...
You're on the right track by considering JavaScript as a language for building portable applications. While Tcl and TclKit provide a straightforward method for creating portable applications, JavaScript also has several options for developing cross-platform applications. Here are a few suggestions for leveraging JavaSc...
22,122
[ { "from": "human", "value": "I'd like to write some small applications for Windows and OSX. \nPortable is good. For instance, the simple TclKit solution for TCL would work well if I could stand to look at Tcl for any length of time.\nI'm considering using Javascript + extensions -- I really like Javascript ...