instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Let's share Java based web application architectures!
There are lots of different architectures for web applications which are to be implemented using Java. The answers to this question may serve as a library of various web application designs with their pros and cons. While I realize that the answers will be subjectiv... | ## Overview of the Architecture
Let's explore a microservices architecture for a Java-based web application, leveraging Spring Boot and Spring Cloud technologies. This architecture emphasizes modularity, scalability, and maintainability through a decentralized approach.
### Major Technologies
- **Spring Boot**: For ra... | 44,497 | [
{
"from": "human",
"value": "Let's share Java based web application architectures!\nThere are lots of different architectures for web applications which are to be implemented using Java. The answers to this question may serve as a library of various web application designs with their pros and cons. While I ... |
I want to add "share this on Facebook" to a page. I've got this working just fine using this URL format:
http://www.facebook.com/sharer.php?u=my.url.here
but the problem is, that's designed specifically to be a popup window, so
the page looks weird at full browser size
the buttons are a long way from the fields
after ... | Facebook provides a specific URL for sharing content, but it is indeed designed to be used in a popup window or dialog, which results in the issues you've mentioned when used in a full browser window.
To create a more seamless sharing experience without the popup behavior, you can utilize the Facebook Share Dialog. Th... | 48,032 | [
{
"from": "human",
"value": "I want to add \"share this on Facebook\" to a page. I've got this working just fine using this URL format:\nhttp://www.facebook.com/sharer.php?u=my.url.here\nbut the problem is, that's designed specifically to be a popup window, so\n\nthe page looks weird at full browser size\nt... |
if i have a function A,which can apply a certain rule on a given matrix to generate a another matrix which i call it the next state of the origin matrix,also the function can determine the the final state of the matrix by given times N(apply the rule on origin,and apply the rule on the next state of the origin matrix a... | To determine the period of a matrix transformation function `functionA`, you can use an iterative approach. The basic idea is to apply the transformation repeatedly until you return to the original matrix. Here's a step-by-step breakdown of how to implement `functionB`.
### Steps to Implement `functionB`
1. **Initial... | 45,197 | [
{
"from": "human",
"value": "if i have a function A,which can apply a certain rule on a given matrix to generate a another matrix which i call it the next state of the origin matrix,also the function can determine the the final state of the matrix by given times N(apply the rule on origin,and apply the rule... |
Is it possible to use any chart modules with wxpython? And are there any good ones out there?
I'm thinking of the likes of PyCha (http://www.lorenzogil.com/projects/pycha/) or any equivalent. Many modules seem to require PyCairo, but I can't figure out if I can use those with my wxpython app.
My app has a notebook pane... | Yes, it is definitely possible to use chart modules with wxPython, and there are several good options available. You can create dynamic charts that update based on user input, and here are a few libraries that are commonly used:
1. **Matplotlib**:
- Matplotlib is one of the most popular plotting libraries in Python... | 48,822 | [
{
"from": "human",
"value": "Is it possible to use any chart modules with wxpython? And are there any good ones out there?\nI'm thinking of the likes of PyCha (http://www.lorenzogil.com/projects/pycha/) or any equivalent. Many modules seem to require PyCairo, but I can't figure out if I can use those with m... |
The question is this, why do I need to add an "import" directive on my Site.Master file to get Intellisense when the html helpers work without it.
Using a simple C# string extension method without a namespace == no problem. However, I wanted to put this extension in a namespace to be a good programmer.
If I wrap it in ... | Your experience with needing to add the `Import` directive in your `Site.Master` file to get IntelliSense for your extension method is a common point of confusion in ASP.NET Web Forms or ASP.NET MVC projects, especially when working with custom namespaces and extension methods. Here’s a breakdown of what’s happening an... | 49,082 | [
{
"from": "human",
"value": "The question is this, why do I need to add an \"import\" directive on my Site.Master file to get Intellisense when the html helpers work without it.\nUsing a simple C# string extension method without a namespace == no problem. However, I wanted to put this extension in a namespa... |
A common mistake when configuring the compilation/linking/etc. settings in VC++ 2008 is to set them in Release but not Debug (or vice versa) rather than setting them for "All Configurations". Any suggestions on how to avoid this kind of mistake?
Some beginnings of ideas that I have:
Find a way to make VC++ go to the "... | Avoiding inconsistencies between Release and Debug configurations in VC++ 2008 can be crucial for ensuring that your application builds and runs correctly in both modes. Here are some suggestions to help mitigate the chances of such mistakes:
### 1. Use a Common Property Sheet
- **Create a Property Sheet**: Use a prop... | 48,712 | [
{
"from": "human",
"value": "A common mistake when configuring the compilation/linking/etc. settings in VC++ 2008 is to set them in Release but not Debug (or vice versa) rather than setting them for \"All Configurations\". Any suggestions on how to avoid this kind of mistake?\nSome beginnings of ideas that ... |
When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to work fine. But when I specify a username and password of another account (a member of Users), nothing seems to happen. The same code works fine with Calc.exe or IE. This is weird. Any ideas?
Here is the code:
System.Diagnost... | The issue you are encountering when trying to start Firefox using different user credentials through `Process.Start` and `ProcessStartInfo` could be related to how Firefox handles user sessions and profiles. When you run Firefox with a different user, it might not be able to access the user profile correctly, which can... | 49,272 | [
{
"from": "human",
"value": "When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to work fine. But when I specify a username and password of another account (a member of Users), nothing seems to happen. The same code works fine with Calc.exe or IE. This is weird. Any... |
So I have an object graph, let's just say it's an order. You have the order class, line item class, tracking number class, payment class. You get the idea.
Now the business requirement is any user can change the order, but order changes must be approved by the manager. Until the manger approves nothing changes. Manager... | Handling a scenario where changes to an object (in your case, an order) require approval can be quite complex, especially when dealing with a rich object graph. Below are some best practices you might consider to effectively implement this requirement using C# and NHibernate.
### 1. Use a **Draft/Proposed State** Patt... | 46,435 | [
{
"from": "human",
"value": "So I have an object graph, let's just say it's an order. You have the order class, line item class, tracking number class, payment class. You get the idea.\nNow the business requirement is any user can change the order, but order changes must be approved by the manager. Until th... |
I want to use git to allow me to work on several features in a module I'm writing concurrently. I'm currently using SVN, with only one workspace, so I just have the workspace on my PYTHONPATH. I'm realizing this is less than ideal, so I was wondering if anyone could suggest a more 'proper' way of doing this.
Let me ela... | It's great that you're transitioning from SVN to Git! Git's branching capabilities can really enhance your workflow, especially when working on multiple features simultaneously. Here are some strategies to set up your development environment effectively:
### 1. **Use Git Branches**
This is probably the most straightf... | 49,949 | [
{
"from": "human",
"value": "I want to use git to allow me to work on several features in a module I'm writing concurrently. I'm currently using SVN, with only one workspace, so I just have the workspace on my PYTHONPATH. I'm realizing this is less than ideal, so I was wondering if anyone could suggest a mo... |
I want to build a secure web-service betweeen a Java producer and a Java consumer. I want to authenticate using Active Directory using the domain accounts that the producer and consumer are running under.
Could you give me an example of this?
(ie: AD trusted automated alternative to manual keystores.)
| To build a secure web service in Java that authenticates using Active Directory (AD) accounts, you can leverage the Java Authentication and Authorization Service (JAAS) along with the Kerberos protocol. This method allows you to use the domain accounts of the Java producer and consumer without the need for manual keyst... | 43,967 | [
{
"from": "human",
"value": "I want to build a secure web-service betweeen a Java producer and a Java consumer. I want to authenticate using Active Directory using the domain accounts that the producer and consumer are running under. \nCould you give me an example of this? \n(ie: AD trusted automated altern... |
In the same way that you can use JSON in javascript? At least the static properties?
Or maybe even for hash-table streaming?
Is it oversimplistic about hoping to find something like
Object.Serialize(stream) where stream is a file, overrideable with your choice of other likely candidate targets, using some default for... | In C#, you can achieve similar serialization and deserialization of objects as you would with JSON in JavaScript, although the approach and specific APIs are different. In C#, you have a few options for serialization formats including JSON and XML.
### Serialization Options
1. **JSON Serialization**:
- You can use... | 47,467 | [
{
"from": "human",
"value": "In the same way that you can use JSON in javascript? At least the static properties?\nOr maybe even for hash-table streaming?\nIs it oversimplistic about hoping to find something like \nObject.Serialize(stream) where stream is a file, overrideable with your choice of other like... |
suppose that I have this RDBM table (Entity-attribute-value_model):
col1: entityID
col2: attributeName
col3: value
and I want to use HBase due to scaling issues.
I know that the only way to access Hbase table is using a primary key (cursor). you can get a cursor for a specific key, and iterate the rows one-by-one .
T... | Your approach to using HBase by creating one main data table (DATA) with `entityID` as the primary key and two additional index tables for `attributeName` and `value` is a reasonable strategy. This design leverages HBase's strengths while accommodating your querying needs. Here’s a more detailed explanation of why it w... | 49,437 | [
{
"from": "human",
"value": "suppose that I have this RDBM table (Entity-attribute-value_model):\ncol1: entityID\ncol2: attributeName\ncol3: value\n\nand I want to use HBase due to scaling issues.\nI know that the only way to access Hbase table is using a primary key (cursor). you can get a cursor for a spe... |
So I'm a newbie to TDD, and I successfully created a nice little sample app using the MVP pattern. The major problem to my current solution is that its blocking the UI thread, So I was trying to setup the Presenter to use the SynchronizationContext.Current, but when I run my tests the SynchronizationContext.Current is... | The issue you're experiencing with `SynchronizationContext.Current` being null in your unit tests is due to the fact that in many test environments (like unit test runners), the default synchronization context is not set, which means that trying to access it will return null.
In a typical UI application (like a WinFo... | 47,165 | [
{
"from": "human",
"value": "So I'm a newbie to TDD, and I successfully created a nice little sample app using the MVP pattern. The major problem to my current solution is that its blocking the UI thread, So I was trying to setup the Presenter to use the SynchronizationContext.Current, but when I run my te... |
Right now we just use something like this
stopWatch.Start();
try
{
method();
}
finally
{
stopWatch.Stop();
}
Which works fine for synchronous methods, but some are executing asynchronously, so the time is skewed when multiple t... | If you want to measure the execution time of a method in a way that accounts only for the time the current thread is actually executing that method (and ignore time spent while other threads are running), you can use a combination of `Stopwatch` and `Thread.CurrentThread` to account for the execution context. However, ... | 48,392 | [
{
"from": "human",
"value": "Right now we just use something like this\n stopWatch.Start(); \n try\n {\n method();\n }\n finally\n {\n stopWatch.Stop();\n }\n\nWhich works fine for synchronous methods, but some are executing a... |
I am looking into building an authentication in my ASP.NET application with the following requirements.
A user has exactly one Role (i.e. Admin, SalesManager, Sales, ....)
A role has a set of permissions to CRUD access a subset of existing objects. I.e.
"Sales has CREAD, READ, WRITE permission on object type "Products... | Your requirements for an authentication system in your ASP.NET application, involving roles and permissions with a hierarchy, are solid and represent a common use case in many applications. Below are some suggestions and implementation ideas for achieving your requirements using ASP.NET and SQL Server.
### Database De... | 46,980 | [
{
"from": "human",
"value": "I am looking into building an authentication in my ASP.NET application with the following requirements.\n\nA user has exactly one Role (i.e. Admin, SalesManager, Sales, ....)\nA role has a set of permissions to CRUD access a subset of existing objects. I.e.\n\"Sales has CREAD, R... |
I have a strange encounter when creating a GridView using SELECT..WHERE..<field> IN (value1, val2...).
In the "Configure datasource" tab, if i hard code the values SELECT .... WHERE field1 in ('AAA', 'BBB', 'CCC'), the system works well.
However, if I define a new parameter and pass in a concatenated string of values u... | The behavior you're encountering is not uncommon when working with SQL and variables, particularly when using `IN` clauses with concatenated strings. Here are a few points to consider that might help you troubleshoot and resolve the issue:
1. **Parameter Type**: Ensure that the parameter you are passing (e.g., from @S... | 49,471 | [
{
"from": "human",
"value": "I have a strange encounter when creating a GridView using SELECT..WHERE..<field> IN (value1, val2...).\nIn the \"Configure datasource\" tab, if i hard code the values SELECT .... WHERE field1 in ('AAA', 'BBB', 'CCC'), the system works well.\nHowever, if I define a new parameter ... |
I have a WCF Service that should not enter the faulted state. If there's an exception, it should be logged and the service should continue uninterrupted. The service has a one-way operation contract and is reading messages from an MSMQ.
My problems are twofold:
The service appears to be swallowing
an exception/fault s... | To ensure that your WCF service does not enter a faulted state when an exception occurs, and to enable proper logging of those exceptions, you'll want to handle exceptions explicitly within your service implementation. Here's a step-by-step guide on how to achieve this:
### 1. Exception Handling in WCF Service
Wrap y... | 40,892 | [
{
"from": "human",
"value": "I have a WCF Service that should not enter the faulted state. If there's an exception, it should be logged and the service should continue uninterrupted. The service has a one-way operation contract and is reading messages from an MSMQ.\nMy problems are twofold:\n\nThe service a... |
I'm designing an interface to display sets of data. I'm interested in organizing the information in a customized format using DIVs and SPANs to identify where specific data will be (not in the typical row-by-row format tables provide) but still having the flexibility of sorting and organizing the data that most JS libr... | Yes, you can achieve a flexible and custom layout using DIVs and SPANs for displaying your data while still leveraging JavaScript libraries for sorting and organizing the data on the client side. Here’s a general approach on how to implement this using PHP for the backend and jQuery for the frontend.
### 1. Data Struc... | 49,036 | [
{
"from": "human",
"value": "I'm designing an interface to display sets of data. I'm interested in organizing the information in a customized format using DIVs and SPANs to identify where specific data will be (not in the typical row-by-row format tables provide) but still having the flexibility of sorting ... |
When using tables in a CSS-based layout, I've noticed if I have a table with 4 columns (2 on the side are small for spacing, 2 in the middle are for content), when I type content in one of the two middle columns, it will stay at the top, which is perfect.
However, if I type content in the other middle column, and press... | To achieve a layout where the content in two middle columns of a table stays aligned at the top regardless of the height of the content in either column, you can use CSS for table properties or modify your HTML structure a bit. Below are a few approaches you can try:
### 1. CSS: Use `vertical-align: top;`
Make sure t... | 44,263 | [
{
"from": "human",
"value": "When using tables in a CSS-based layout, I've noticed if I have a table with 4 columns (2 on the side are small for spacing, 2 in the middle are for content), when I type content in one of the two middle columns, it will stay at the top, which is perfect.\nHowever, if I type con... |
I have a repository with a bunch of folders, and I want certain developers to only get two or three of those folders when they do a checkout on the repository. How can I make the folders not show by default, and then add them only as I want to grant access.
I'm using VisualSVN for the SVN server, and what I have done ... | To achieve the desired access control in VisualSVN for your SVN repository, you can use the built-in access control mechanisms provided by VisualSVN Server. However, you’ll need to ensure that the structure and permissions are set up correctly so that developers can check out only the folders they have access to while ... | 48,824 | [
{
"from": "human",
"value": "I have a repository with a bunch of folders, and I want certain developers to only get two or three of those folders when they do a checkout on the repository. How can I make the folders not show by default, and then add them only as I want to grant access.\nI'm using VisualSVN... |
I have been working on standardizing the source control structure for our Team Foundation Server rollout for the new year. I have started by using the Microsoft Team Foundation Server Branching Guidance documentation available on CodePlex.
I was hoping to get some feedback and answers to a few of the specific question... | Your proposed structure for Team Foundation Server (TFS) source control looks well thought-out and provides a clear organization that should facilitate both development and release processes. Here’s my feedback on the questions you raised and some additional considerations:
### Team Build
1. **Where should the build d... | 47,556 | [
{
"from": "human",
"value": "I have been working on standardizing the source control structure for our Team Foundation Server rollout for the new year. I have started by using the Microsoft Team Foundation Server Branching Guidance documentation available on CodePlex.\nI was hoping to get some feedback and... |
I need to create a wpf treeviewlist to look something like this:
AAAA
BBBB
....CCCC
....DDDD
.......EEEE
FFFFF
(where the dots above are indents)
I need to do this from vb.net (2008) code.
I've spent an embarrassingly long amount of time trying to figure this out, and so far all I’ve got is:
vb.net:
Dim tvi1, tvi... | Creating a hierarchical structure in a WPF TreeView can be achieved by properly organizing the `TreeViewItem` objects. In your case, you want to create a tree structure with indented nodes. Here's how you can do it in VB.NET:
1. You need to create parent nodes (`TreeViewItem`) and add child nodes as needed.
2. Child n... | 49,629 | [
{
"from": "human",
"value": "I need to create a wpf treeviewlist to look something like this:\nAAAA\n\nBBBB\n\n....CCCC\n\n....DDDD\n\n.......EEEE\n\nFFFFF\n\n(where the dots above are indents)\nI need to do this from vb.net (2008) code.\nI've spent an embarrassingly long amount of time trying to figure thi... |
I read somewhere that one should never use error conditions as normal program flow. Makes excellent sense to me... But
C# application sitting on top of a MySQL db. I need to parse a string value into two parts, an ID, and a value. (The original data come from a Devonian database), then validate the value against a look... | You're correct that using exceptions for control flow is generally not a good practice, as it can lead to code that's harder to understand, maintain, and optimize. Instead, you should aim to handle your lookup in a more predictable way. Here’s how you can refactor your code to improve it:
1. **Modify the Product Looku... | 48,235 | [
{
"from": "human",
"value": "I read somewhere that one should never use error conditions as normal program flow. Makes excellent sense to me... But\nC# application sitting on top of a MySQL db. I need to parse a string value into two parts, an ID, and a value. (The original data come from a Devonian databas... |
I've read a lot about the pros and cons of sizing with either relative or absolute font sizes. Fixed sizes don't zoom in IE6 but that's not much of an issue these days. Accessibility is important, but I assume that all good accessibility software is built to deal with these issues?
I guess it mainly comes down to wheth... | When it comes to choosing between relative and absolute font sizes in web design, both approaches have their advantages and disadvantages. Here are some considerations and tips to help you decide which approach might be best for your project:
### Relative Font Sizes
**Pros:**
1. **Scalability:** Relative units like `... | 44,999 | [
{
"from": "human",
"value": "I've read a lot about the pros and cons of sizing with either relative or absolute font sizes. Fixed sizes don't zoom in IE6 but that's not much of an issue these days. Accessibility is important, but I assume that all good accessibility software is built to deal with these issu... |
I use a basic Post to send data to a Django server.
The data consists of a base64 encoded 640*380 PNG image dynamically created by the flex
component.
<mx:HTTPService id="formSend" showBusyCursor="true"
useProxy="false" url="http://127.0.0.1/form/"
method="POST" result="formSentConfirmation(event)" fault="... | Yes, you're correct that the way you're currently sending the image data will likely cause issues in a real-world scenario, especially if the base64 encoded image exceeds the typical limits for URL-encoded POST data (which is often around 200 KB).
When you send the image data as part of a standard POST request with p... | 45,444 | [
{
"from": "human",
"value": "I use a basic Post to send data to a Django server.\nThe data consists of a base64 encoded 640*380 PNG image dynamically created by the flex\ncomponent.\n<mx:HTTPService id=\"formSend\" showBusyCursor=\"true\" \n useProxy=\"false\" url=\"http://127.0.0.1/form/\" \n method=... |
So I have an application that is based heavily on the QT API which using the QPlugin system. It's fairly simple to use, you define a class which inherit from an Interface and when the plugin is loaded you get an instance of that class. In the end it'll boil down to a dlopen/dlsym or LoadLibrary/GetProcAddress, whatever... | The situation you're facing with loading plugins in a Qt application, especially when it comes to sharing data and functions between the main application and the plugins, is quite common. You've already explored a good starting point, but I understand that maintaining a structure that holds all necessary pointers can b... | 45,345 | [
{
"from": "human",
"value": "So I have an application that is based heavily on the QT API which using the QPlugin system. It's fairly simple to use, you define a class which inherit from an Interface and when the plugin is loaded you get an instance of that class. In the end it'll boil down to a dlopen/dlsy... |
I have a simple C++ program that reads stdin using scanf and returns results to stdout using printf:
#include <iostream>
using namespace std;
int main()
{
int n, x;
int f=0, s=0, t=0;
scanf("%d",&n); scanf("%d",&x);
for(int index=0; index<n; index++)
{
scanf("%d",&f);
scanf("%d",... | It looks like you're encountering an issue with line endings and formatting when outputting to a text file using `printf`. The extra spaces appearing at the end of each line might be related to the way the terminal handles output or how certain text editors display newline characters.
In your case, when using `printf`... | 43,882 | [
{
"from": "human",
"value": "I have a simple C++ program that reads stdin using scanf and returns results to stdout using printf:\n\n#include <iostream>\nusing namespace std;\n\nint main()\n{\n int n, x;\n int f=0, s=0, t=0;\n\n scanf(\"%d\",&n); scanf(\"%d\",&x);\n\n for(int index=0; index<n; i... |
I have many sites that use the same root category of the Main Site. Each product that is added is added to the site it was added to (wow.) and also the Main Site. However, I would like categories on a per site basis to only appear if there are products on that site.
If I have:
Category1
Category2
Category3
But Site1 o... | To achieve your goal of displaying categories based on product presence on a per-site basis in Magento, you'll need to implement some custom functionality. Here’s a general approach you can take, keeping in mind that you're familiar with the Magento technology stack:
### Step 1: Create a Custom Module
Creating a cust... | 46,619 | [
{
"from": "human",
"value": "I have many sites that use the same root category of the Main Site. Each product that is added is added to the site it was added to (wow.) and also the Main Site. However, I would like categories on a per site basis to only appear if there are products on that site.\nIf I have:\... |
I've seen statements to the effect that it is possible, even commonplace, to reference an immediate custom action from a .wxs file, and to have that custom action schedule subsequent (deferred) custom actions. What I don't know is what the code looks like that does this. Anyone?
| Yes, you can reference an immediate custom action from a WiX (.wxs) file that can then schedule a deferred custom action. In WiX, immediate custom actions run during the InstallExecuteSequence, while deferred custom actions can be executed with elevated privileges during installation.
Here is an example of how to achi... | 49,716 | [
{
"from": "human",
"value": "I've seen statements to the effect that it is possible, even commonplace, to reference an immediate custom action from a .wxs file, and to have that custom action schedule subsequent (deferred) custom actions. What I don't know is what the code looks like that does this. Anyon... |
We have to let go 3 of our software test contractors due to budget constraints, in the middle of a project that had adopted agile development practices. The management attitude is to throw equal number of full time bodies to compensate for this. Does agile development allow for this disruption? I would like to know if ... | Navigating personnel changes in an agile environment can be challenging, especially mid-project. Agile methodologies emphasize collaboration, communication, and team stability, which can be disrupted when team members are removed or replaced. Here are some points to consider regarding your situation:
### Agile Princip... | 45,380 | [
{
"from": "human",
"value": "We have to let go 3 of our software test contractors due to budget constraints, in the middle of a project that had adopted agile development practices. The management attitude is to throw equal number of full time bodies to compensate for this. Does agile development allow for ... |
Background: Customer X has a CCK-based Content Type (vendorxxentry) and is using Views2 to generate a listing of all the vendorxxentry nodes in a simple table.
One of the fields in vendorxxentry is called "vendorxxattitude", which appears as one of the following enumerated possible values:
happy
sleepy
dopey
grumpy
... | To achieve the substitution of text values with corresponding images in specific Views without breaking the ability to sort columns, you can use the following methods:
### Method 1: Views Field Override with Custom Text Format
1. **Create a Custom Module**:
- Create a custom module to implement hook_views_pre_rend... | 47,291 | [
{
"from": "human",
"value": "Background: Customer X has a CCK-based Content Type (vendorxxentry) and is using Views2 to generate a listing of all the vendorxxentry nodes in a simple table. \nOne of the fields in vendorxxentry is called \"vendorxxattitude\", which appears as one of the following enumerated p... |
I've been benchmarking the performance of a framework I'm writing in Perl and I'm getting a 50% decrease in requests per second over our existing codebase (some hit is understandable, because we're going from procedural spaghetti code to an OOP MVC framework).
The application is running under mod_perl, and I've added M... | It's great to hear that you're making significant progress with your performance optimizations! The fact that moving the configuration loading to the startup phase led to such an impressive increase in requests per second indicates that you're on the right track.
To address your concern about repeating the `Config::G... | 47,700 | [
{
"from": "human",
"value": "I've been benchmarking the performance of a framework I'm writing in Perl and I'm getting a 50% decrease in requests per second over our existing codebase (some hit is understandable, because we're going from procedural spaghetti code to an OOP MVC framework).\nThe application i... |
I've been working with ASP.NET MVC for the last few weeks, learning as I go, from tutorials and mostly trial and error.
I'm sorta groping in the dark, since I have no other experience with MVC frameworks and I'm just moving ahead blindly trying to figure things out as I move along.
So, I'm looking for better, more ... | It's great that you're diving into ASP.NET MVC! There are several resources available that can help you deepen your understanding of the framework and the MVC architecture. Here are some recommendations:
### Online Documentation and Tutorials
1. **Official Microsoft Documentation**: The ASP.NET Core documentation on t... | 49,407 | [
{
"from": "human",
"value": "I've been working with ASP.NET MVC for the last few weeks, learning as I go, from tutorials and mostly trial and error. \nI'm sorta groping in the dark, since I have no other experience with MVC frameworks and I'm just moving ahead blindly trying to figure things out as I move ... |
I've read through some of the post on here about closures and currying but I feel like I didn't find the answer. So what's the differences and possibly the similarities of closures and currying? Thanks for the help :)
| Closures and currying are both important concepts in functional programming, but they serve different purposes and have distinct characteristics. Let's break down each concept and then compare them.
### Closures
**Definition**: A closure is a function that captures the lexical scope in which it was created. This mean... | 47,519 | [
{
"from": "human",
"value": "I've read through some of the post on here about closures and currying but I feel like I didn't find the answer. So what's the differences and possibly the similarities of closures and currying? Thanks for the help :)\n"
},
{
"from": "gpt",
"value": "Closures and c... |
I'm not a Notes programmer, however, for my sins, have been working on some Notes features for an in-house project recently. I need to enable/disable editing of a field depending on circumstances. It seems to me to be a fairly standard feature, I need, but I can't find any information on how to do this anywhere.
In for... | In Lotus Notes and Domino, especially in version 7.0.3, enabling and disabling fields based on conditions is typically done using the field properties rather than programmatic control. Here's a step-by-step guide to achieve what you're looking for:
### Enable/Disable Field Editing in Lotus Notes
1. **Open the Form in... | 49,866 | [
{
"from": "human",
"value": "I'm not a Notes programmer, however, for my sins, have been working on some Notes features for an in-house project recently. I need to enable/disable editing of a field depending on circumstances. It seems to me to be a fairly standard feature, I need, but I can't find any infor... |
I have to read a COM port and the data should be displayed inside the TextArea dynamically (data will come every minute), which I have created inside JPanel.
| To read data from a COM port in Java and display it dynamically in a `JTextArea` inside a `JPanel`, you can use the Java Communication API (javax.comm) or a library like RXTX or jSerialComm. Below, I'll provide an example using jSerialComm, which is easier to use and more actively maintained than javax.comm or RXTX.
#... | 43,897 | [
{
"from": "human",
"value": "I have to read a COM port and the data should be displayed inside the TextArea dynamically (data will come every minute), which I have created inside JPanel.\n"
},
{
"from": "gpt",
"value": "To read data from a COM port in Java and display it dynamically in a `JTextA... |
Method chaining is the only way I know to build fluent interfaces.
Here's an example in C#:
John john = new JohnBuilder()
.AddSmartCode("c#")
.WithfluentInterface("Please")
.ButHow("Dunno");
Assert.IsNotNull(john);
[Test]
public void Should_Assign_Due_Date_With_7DayTermsVia_Invoice_Builder()
{
... | Fluent interfaces are a design pattern that allows for a more readable and expressive way of building objects, often through method chaining, as you mentioned in your C# examples. However, there are other techniques and variations used to create fluent interfaces across different programming languages and platforms. He... | 46,211 | [
{
"from": "human",
"value": "Method chaining is the only way I know to build fluent interfaces.\nHere's an example in C#:\nJohn john = new JohnBuilder()\n .AddSmartCode(\"c#\")\n .WithfluentInterface(\"Please\")\n .ButHow(\"Dunno\");\n\nAssert.IsNotNull(john);\n\n [Test]\n public void Should_As... |
using the Code Snippet for sending email in VB.Net I have successfully sent an email from my local machine, but when I Upload it to my server I get a message that the email failed. We have a national relay server that is running SMTP and I am pointed at that server in both instances. The only differance that jump out... | If you're using a relay server to send emails, you typically do not need to run an SMTP server on your web server. The relay server should handle the sending of emails, and your code looks correct for that purpose. However, there are several potential reasons why the email may fail to send from the server while it work... | 49,125 | [
{
"from": "human",
"value": "using the Code Snippet for sending email in VB.Net I have successfully sent an email from my local machine, but when I Upload it to my server I get a message that the email failed. We have a national relay server that is running SMTP and I am pointed at that server in both inst... |
Is there a tool that will take you java beans (pojos) and automatically make them a form for a webpage?
To be more clear I have a bunch of Jaxb objects that I want to be able to display in a form without having to code a bunch of html. Is there a tool that will read the jaxb objects and generate the editable form for ... | Yes, there are several tools and libraries that can help you generate web forms from Java objects (like JAXB objects) without manually coding a lot of HTML. Below are some approaches you can consider:
### 1. **JavaServer Faces (JSF)**
JSF is a component-based web framework for Java that can easily bind your POJOs (li... | 47,719 | [
{
"from": "human",
"value": "Is there a tool that will take you java beans (pojos) and automatically make them a form for a webpage?\nTo be more clear I have a bunch of Jaxb objects that I want to be able to display in a form without having to code a bunch of html. Is there a tool that will read the jaxb o... |
I'm looking into the feasibility of adding a function to my Rails-based intranet site that allows users to upload files.
Two purposes:
My users are widely distributed geographically and linking to documents on the shared network storage doesn't always work (different addresses, DNS entries and stuff outside my control ... | You're facing a common challenge when dealing with file uploads in a Rails application, particularly in a constrained server environment where local file writes are not permitted. Fortunately, there are approaches that you can use to upload and process files in memory without relying on local file saves. Here are some ... | 45,362 | [
{
"from": "human",
"value": "I'm looking into the feasibility of adding a function to my Rails-based intranet site that allows users to upload files.\nTwo purposes:\nMy users are widely distributed geographically and linking to documents on the shared network storage doesn't always work (different addresses... |
I have two Sharepoint lists:
- Assignments
- Activities
The activities list has a lookup field to the assignments list as activities (e.g. monthly review of X) are related to an assignment.
My question is, how would I display other fields from Assignments in a view of Activities using standard Sharepoint 2007 (we h... | In SharePoint 2007, achieving a combined view of data from two lists using standard functionality (without using SharePoint Designer or Visual Studio) can be somewhat limited. However, you can still accomplish your goal by following these steps to set up a custom view on your Activities list that displays fields from t... | 47,452 | [
{
"from": "human",
"value": "I have two Sharepoint lists:\n- Assignments\n - Activities\nThe activities list has a lookup field to the assignments list as activities (e.g. monthly review of X) are related to an assignment. \nMy question is, how would I display other fields from Assignments in a view of Ac... |
I have a bunch of pretty large CSV (comma separated values) files and I want to analyze them. SQL queries are ideal for this. So far I have been using MS Access to import the CSV files and execute queries on them. However, in addition to having a very bad SQL editor and having stupid arbitrary rules about when a query/... | If you're looking for a better way to analyze large CSV files using SQL without the limitations of MS Access, there are several free tools and options you can consider:
1. **SQLite**:
- SQLite is a lightweight, serverless SQL database that can handle large datasets efficiently.
- You can easily import CSV file... | 49,506 | [
{
"from": "human",
"value": "I have a bunch of pretty large CSV (comma separated values) files and I want to analyze them. SQL queries are ideal for this. So far I have been using MS Access to import the CSV files and execute queries on them. However, in addition to having a very bad SQL editor and having s... |
I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005).
If I look up the properties of say C:\Windows\notepad.exe, the Version tab gives "File version: 5.1.2600.2180". I would like to get these cool numbers in the version of my dll's too, not version 1.... | Automatically incrementing the version number of your projects in Visual Studio 2005 can be a bit tricky since it doesn't have built-in support for automatic versioning like later versions do. However, there are a few workarounds you can implement. Here's a general approach you can take:
### Using a Pre-Build Event
1... | 47,485 | [
{
"from": "human",
"value": "I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005). \nIf I look up the properties of say C:\\Windows\\notepad.exe, the Version tab gives \"File version: 5.1.2600.2180\". I would like to get these cool numbers ... |
I'm writing a Java game and I want to implement a power meter for how hard you are going to shoot something.
I need to write a function that takes a int between 0 - 100, and based on how high that number is, it will return a color between Green (0 on the power scale) and Red (100 on the power scale).
Similar to how v... | It looks like you're on the right track by using the HSV/HSB color space for smoothly transitioning colors. The idea of using hue to represent colors between green and red is a good approach.
In the HSV color space, hues are generally represented as angles on a color wheel, with the following relevant positions:
- Red... | 46,127 | [
{
"from": "human",
"value": "I'm writing a Java game and I want to implement a power meter for how hard you are going to shoot something. \nI need to write a function that takes a int between 0 - 100, and based on how high that number is, it will return a color between Green (0 on the power scale) and Red ... |
Suppose I have code like this:
template<class T, T initial_t> class Bar {
// something
}
And then try to use it like this:
Bar<Foo*, NULL> foo_and_bar_whatever_it_means_;
GCC bails out with error (on the above line):
could not convert template argument
'0' to 'Foo*'
I found this thread: http://gcc.gnu.org/ml/gc... | The issue you're encountering arises from the fact that `NULL` in C++ is typically defined as `0` or `((void*)0)`. This means that when you're trying to pass `NULL` as the second template argument for `Bar`, the compiler interprets `0` as an integer, which cannot be converted to the type `Foo*`.
To work around this is... | 42,284 | [
{
"from": "human",
"value": "Suppose I have code like this:\ntemplate<class T, T initial_t> class Bar {\n // something\n}\n\nAnd then try to use it like this:\nBar<Foo*, NULL> foo_and_bar_whatever_it_means_;\n\nGCC bails out with error (on the above line):\n\ncould not convert template argument\n '0' to '... |
I'm a developer who had handed to him the admin duties for our IIS server. I'm reasonably familiar with IIS in terms of setting up web sites, virtual directories, and such and such, but I figure if I'm going to be administrator the server entirely, I better get up to speed.
Any recommendations for IIS books, especially... | As a developer transitioning into IIS server administration, you will find it helpful to focus on books that explain both the fundamentals of IIS and its advanced features, while also considering your programming background. Here are some recommended books that can help you build your knowledge in this area:
1. **"IIS... | 47,151 | [
{
"from": "human",
"value": "I'm a developer who had handed to him the admin duties for our IIS server. I'm reasonably familiar with IIS in terms of setting up web sites, virtual directories, and such and such, but I figure if I'm going to be administrator the server entirely, I better get up to speed.\nAny... |
I have a Perl application someone else wrote and I'm trying to make it run on my local machine. But I keep getting an error in one of the modules, which appears to be based on a missing module somewhere. What are some good tools or practices to track this thing down?
| Troubleshooting missing module errors in a Perl application can indeed be a bit challenging, especially if you're working with someone else's code. Here are several tools and practices that can help you track down the issue:
### 1. **Check Error Messages:**
- Carefully read the error message you are getting. Perl o... | 48,175 | [
{
"from": "human",
"value": "I have a Perl application someone else wrote and I'm trying to make it run on my local machine. But I keep getting an error in one of the modules, which appears to be based on a missing module somewhere. What are some good tools or practices to track this thing down?\n"
},
{... |
This is something that has bugged me for some time. I learnt Haskell before I learnt Python, so I've always been fond of thinking of many computations as a mapping onto a list. This is beautifully expressed by a list comprehension (I'm giving the pythonic version here):
result = [ f(x) for x in list ]
In many cases th... | You've highlighted a common pattern when working with list transformations in Python. Both of the methods you've shown are valid, and the choice between them often comes down to readability, complexity of the operations involved, and personal preference. Let’s discuss the advantages and disadvantages of each approach a... | 46,800 | [
{
"from": "human",
"value": "This is something that has bugged me for some time. I learnt Haskell before I learnt Python, so I've always been fond of thinking of many computations as a mapping onto a list. This is beautifully expressed by a list comprehension (I'm giving the pythonic version here):\nresult ... |
I am trying to layout a header for a web site and I would like to have 4 containers in the header for dropping various user controls into.
The 4 containers need to be positioned top left, top right, bottom left and bottom right inside the main the header container.
So far I can acheive this, the bit I can't do is that ... | To achieve the layout you want, with the bottom left and bottom right containers aligned at the bottom of their respective containers within the header, we can use a combination of CSS `position` and `flexbox` properties. However, since you need to ensure compatibility with IE7, we will avoid using flexbox. Instead, we... | 49,803 | [
{
"from": "human",
"value": "I am trying to layout a header for a web site and I would like to have 4 containers in the header for dropping various user controls into.\nThe 4 containers need to be positioned top left, top right, bottom left and bottom right inside the main the header container.\nSo far I ca... |
How would you test this scenario?
I've just started looking into NHibernate and having my first bash at TDD. So far I've really enjoyed it and have been using fluent-Nhibernate for my mapping of the classes.
However I seem to be hitting a dead end when it comes to using the VerifyTheMappings method on PersistenceSpecif... | The issue you are encountering is indeed a common problem when using NHibernate and the `PersistenceSpecification<T>` for testing entity mappings, particularly when dealing with collection properties. The `PersistenceSpecification` is checking that the mapped property is of the expected type, which is causing the error... | 44,503 | [
{
"from": "human",
"value": "How would you test this scenario?\nI've just started looking into NHibernate and having my first bash at TDD. So far I've really enjoyed it and have been using fluent-Nhibernate for my mapping of the classes.\nHowever I seem to be hitting a dead end when it comes to using the Ve... |
I am using C# .Net 2.0 to write a webservices client. The server's soap implementation is tested and is pretty solid. gSoap/C++ applications had no problem reading the responses. However the .Net implementation complains "There is an error in XML document" while calling one of the methods. Similar responses recieved fr... | Certainly! You can create a custom `SoapExtension` in .NET to intercept the SOAP message before the deserialization process occurs. This way, you can manipulate or even bypass the default deserialization if necessary. Below is a guide on how to do this in .NET 2.0.
### Step 1: Create a Custom SoapExtension
You will n... | 47,773 | [
{
"from": "human",
"value": "I am using C# .Net 2.0 to write a webservices client. The server's soap implementation is tested and is pretty solid. gSoap/C++ applications had no problem reading the responses. However the .Net implementation complains \"There is an error in XML document\" while calling one of... |
I have a method fetchObjects(String) that is expected to return an array of Contract business objects. The className parameter tells me what kind of business objects I should return (of course this doesn't make sense in this construed case because I already said I will return Contracts, but it's basically the situation... | In your case, the goal is to create a type-safe way of converting a `Set<?>` to an array of a specific type determined at runtime using reflection. Your approach using a generic `toArray` method is almost correct, but the problem arises because of the type bounds on your method signatures.
To solve the issue, you need... | 47,409 | [
{
"from": "human",
"value": "I have a method fetchObjects(String) that is expected to return an array of Contract business objects. The className parameter tells me what kind of business objects I should return (of course this doesn't make sense in this construed case because I already said I will return Co... |
I have an ASP .NET application that connects to an Oracle or a SQL Server database. An installer has been developed to install a fresh database to an existing SQL Server using sql commands such as "restore database..." which simply restores a ".bak" file which we keep under source control.
I'm very new to Oracle and ou... | Creating an installer for an Oracle database that aligns with best practices can involve several different approaches, depending on your specific requirements, the environment, and the needs of system administrators. Here are some recommended strategies for creating an "Oracle Database Installer":
### 1. **Choose the ... | 48,562 | [
{
"from": "human",
"value": "I have an ASP .NET application that connects to an Oracle or a SQL Server database. An installer has been developed to install a fresh database to an existing SQL Server using sql commands such as \"restore database...\" which simply restores a \".bak\" file which we keep under ... |
I have been tasked with creating a program that will generate an amortization schedule. I have only done a bit of research so far, but I need to calculate out payments, interest per payment and principal per payment. Can any one point me in the right direction to figure this out? While I will be writing this in RPG, I ... | To create an amortization schedule, you'll need to calculate the total payment amount, the interest portion of each payment, and the principal portion for each period. Below, I’ll guide you through the necessary calculations and provide you with a general approach, which you can implement in RPG or any other programmin... | 46,732 | [
{
"from": "human",
"value": "I have been tasked with creating a program that will generate an amortization schedule. I have only done a bit of research so far, but I need to calculate out payments, interest per payment and principal per payment. Can any one point me in the right direction to figure this out... |
If I wanted to work using dates and time going millions of years into the past/future how would I do it in C/C++/C#?
For example say I was working on an algorithm to see if a comet was going to hit the earth? Are there commercial or open source libraries that do this?
Most DateTime values only work for a few years. Un... | Working with dates and times over millions of years, especially in scientific contexts like tracking celestial bodies, requires careful handling of date and time representations due to the limitations of standard libraries. Here's how you could approach this in C, C++, and C#:
### General Strategies
1. **Custom Time ... | 46,342 | [
{
"from": "human",
"value": "If I wanted to work using dates and time going millions of years into the past/future how would I do it in C/C++/C#? \nFor example say I was working on an algorithm to see if a comet was going to hit the earth? Are there commercial or open source libraries that do this?\nMost Da... |
How do I load a dropdown list in asp.net and c#?
| Loading a dropdown list in ASP.NET can be accomplished using various methods. Below is a simple example of how to populate a dropdown list using ASP.NET Web Forms (C#). We'll assume you want to load data from a data source (like a database) into the dropdown list when the page loads.
### Example Steps:
1. **Create an... | 46,873 | [
{
"from": "human",
"value": "How do I load a dropdown list in asp.net and c#?\n"
},
{
"from": "gpt",
"value": "Loading a dropdown list in ASP.NET can be accomplished using various methods. Below is a simple example of how to populate a dropdown list using ASP.NET Web Forms (C#). We'll assume you... |
There are many ways to check programs for memory leaks. You end up with that list of pointers to leaked memory blocks, but is there a good way to find out more information for each block? For example: if I know that the object was a string, the actual string value could make finding the leak a lot easier.
Is there a ba... | Detecting memory leaks and gathering information about the leaked objects can be a challenging task, especially in C++ where the language does not provide built-in garbage collection or automatic memory tracking. However, there are ways to extract additional information about memory allocations, including using Run-Tim... | 46,677 | [
{
"from": "human",
"value": "There are many ways to check programs for memory leaks. You end up with that list of pointers to leaked memory blocks, but is there a good way to find out more information for each block? For example: if I know that the object was a string, the actual string value could make fin... |
I have a multi-module maven project with an installer sub-project. The installer will be distributed as an executable JAR. It will setup the DB and extract the WAR file to the app server. I would like to use maven to assemble this jar like so:
/META-INF/MANIFEST.MF
/com/example/installer/Installer.class
/com/examp... | To create an executable JAR for your multi-module Maven project that includes both your `Installer` class and the `server.war` file, you can use the `maven-jar-plugin` and `maven-assembly-plugin` or `maven-shade-plugin`. Below are the steps to configure your `pom.xml` to achieve the desired structure.
### Step 1: Set ... | 49,281 | [
{
"from": "human",
"value": "I have a multi-module maven project with an installer sub-project. The installer will be distributed as an executable JAR. It will setup the DB and extract the WAR file to the app server. I would like to use maven to assemble this jar like so:\n\n/META-INF/MANIFEST.MF\n /com/ex... |
i have a sub with this signature
Public Sub Save(ByVal obj As IPta)
now i want the create a instance of Generic.PtaDao(of T) with the type of obj, which could be anything that inherits from my base class Pta
how can i do that?
i already found a c# example
Declare a generic type instance dynamically
but i dont understa... | In Visual Basic .NET, you can create instances of generic types dynamically using reflection. Below is an example of how you can achieve this in your `Save` method by leveraging the `Type` class and reflection.
### Step-by-Step Implementation
1. **Determine the Type of `obj`:** First, you'll get the actual type of th... | 48,536 | [
{
"from": "human",
"value": "i have a sub with this signature\nPublic Sub Save(ByVal obj As IPta)\n\nnow i want the create a instance of Generic.PtaDao(of T) with the type of obj, which could be anything that inherits from my base class Pta\nhow can i do that?\ni already found a c# example\nDeclare a generi... |
Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM?
Keep in mind that I purposely keeping this question generic, but if there are any advant... | When considering why one might choose Groovy over Jython or JRuby, there are several factors to consider. Here's a summary of the advantages Groovy offers, particularly in the context of integration and usage within the JVM ecosystem:
1. **Seamless Java Integration**: Groovy is designed to work very closely with Java.... | 43,948 | [
{
"from": "human",
"value": "Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM? \nKeep in mind that I purposely keeping this que... |
I have a large number of 2D points and I want to quickly get those that lie in a certain rectangle.
Let's say a '.' is any point and 'X' is a point I want to find inside a rectangle which has 'T' as TopLeft and 'B' as BottomRight points:
. . . . . .
. T-----+ .
. | X X | .
. +-----B .
. . . . . .
I have tried a std::s... | If you're dealing with a dynamic set of 2D points and you need to frequently query which points lie within a user-defined rectangle, it sounds like a spatial data structure would be a suitable solution. Here are a few approaches that you could consider:
### 1. Use a Quadtree
A quadtree is a tree data structure that is... | 43,929 | [
{
"from": "human",
"value": "I have a large number of 2D points and I want to quickly get those that lie in a certain rectangle.\nLet's say a '.' is any point and 'X' is a point I want to find inside a rectangle which has 'T' as TopLeft and 'B' as BottomRight points:\n. . . . . .\n. T-----+ .\n. | X X | .\n... |
I'm not really sure how to title this question but basically I have an interface like this:
public interface IFoo
{
string ToCMD();
}
a couple of absract classes which implement IFoo like:
public abstract class Foo : IFoo
{
public abstract string ToCMD();
}
public abstract class Bar : IFoo
{
public abstrac... | Your approach to using interfaces and abstract classes in C# is a common and valid pattern for achieving flexibility and type safety. Let's break down the advantages and possible improvements to your design.
### Advantages:
1. **Type Safety**: By using a generic `Store<T>` with constraints, you ensure that only certai... | 47,818 | [
{
"from": "human",
"value": "I'm not really sure how to title this question but basically I have an interface like this:\npublic interface IFoo\n{\n string ToCMD();\n}\n\na couple of absract classes which implement IFoo like:\npublic abstract class Foo : IFoo\n{\n public abstract string ToCMD();\n}\n\n... |
I'm new to C# and .Net in general so this may be a naive thing to ask. But anyway, consider this C# code:
class A {
public int Data {get; set;}
}
class B {
public A Aval {get; set;}
}
The B.Aval property above is returning a reference to its internal A object. As a former C++ programmer, I find this dangerous... | Your concerns about exposing internal object references in C# are valid, especially considering your background in C++. In C#, the design choice to expose properties as direct references is indeed common, and there are both pros and cons to this approach. Let’s explore the reasoning behind it, as well as some alternati... | 41,137 | [
{
"from": "human",
"value": "I'm new to C# and .Net in general so this may be a naive thing to ask. But anyway, consider this C# code:\nclass A {\n public int Data {get; set;}\n}\n\nclass B {\n public A Aval {get; set;}\n}\n\nThe B.Aval property above is returning a reference to its internal A object.... |
--Edit with more bgnd information--
A (black box) COM object returns me a string.
A 2nd COM object expects this same string as byte[] as input and returns a byte[] with the processed data.
This will be fed to a browser as downloadable, non-human-readable file that will be loaded in a client side stand-alone application... | The issue you're facing is related to how you're converting the string to a byte array. When using `BinaryFormatter.Serialize()`, you're serializing the string into a binary format that includes metadata, type information, and other overhead, which can lead to the introduction of extra, non-readable characters. These c... | 49,120 | [
{
"from": "human",
"value": "--Edit with more bgnd information--\nA (black box) COM object returns me a string.\nA 2nd COM object expects this same string as byte[] as input and returns a byte[] with the processed data.\nThis will be fed to a browser as downloadable, non-human-readable file that will be loa... |
How can I get the (physical) installed path of a DLL that is (may be) registered in GAC? This DLL is a control that may be hosted in things other than a .Net app (including IDEs other than VS...).
When I use System.Reflection.Assembly.GetExecutingAssembly().Location, it gives path of GAC folder in winnt\system32 - or i... | To determine the physical installation path of a DLL that might be registered in the Global Assembly Cache (GAC), especially when working in scenarios where the assembly may not be hosted solely in a .NET application (like IDEs), you need to consider a few approaches to find the correct location.
### 1. **Reflection a... | 48,826 | [
{
"from": "human",
"value": "How can I get the (physical) installed path of a DLL that is (may be) registered in GAC? This DLL is a control that may be hosted in things other than a .Net app (including IDEs other than VS...).\nWhen I use System.Reflection.Assembly.GetExecutingAssembly().Location, it gives p... |
Just noticed that the style of the navigation menu on windows.com is just what i need for my website. I'm wondering how to create that kind of drop down list that has multiple columns. When the mouse hover on each item, the column gives a preview of that item. Thank you.
| Creating a multi-column dropdown menu similar to what you might find on a website like windows.com involves a combination of HTML and CSS, along with a little JavaScript for interactivity if necessary. Below is a simple example to help you get started.
### HTML Structure
```html
<!DOCTYPE html>
<html lang="en">
<head... | 43,419 | [
{
"from": "human",
"value": "Just noticed that the style of the navigation menu on windows.com is just what i need for my website. I'm wondering how to create that kind of drop down list that has multiple columns. When the mouse hover on each item, the column gives a preview of that item. Thank you. \n"
}... |
As I understand it, Crystal Reports can use EntityFramework, is the correct?
I'd rather use Entity Framework instead using datasets.
How would I do this?
| Yes, you are correct that Crystal Reports can work with data sourced from Entity Framework, although it traditionally works better with datasets. If you'd like to use Entity Framework to directly supply data to Crystal Reports, you typically need to follow these steps:
### 1. Create Your Entity Framework Model
First,... | 49,550 | [
{
"from": "human",
"value": "As I understand it, Crystal Reports can use EntityFramework, is the correct? \nI'd rather use Entity Framework instead using datasets. \nHow would I do this?\n"
},
{
"from": "gpt",
"value": "Yes, you are correct that Crystal Reports can work with data sourced from En... |
I have recently been exploring Apache Ofbiz and was impressed by its ability to customize most areas of the application: UI, workflow, entities.
Is there any similar (not necessarily an ERP system) application developed in C#/.Net which offers a similar level of customization?
I am looking for examples of applications... | Certainly! If you're looking for customizable applications developed in C#/.NET that allow for extensive personalization in terms of UI, workflow, and entity models, here are some noteworthy frameworks and platforms to consider:
### 1. **Umbraco**
- **Overview**: Umbraco is an open-source CMS built on the .NET framewo... | 49,999 | [
{
"from": "human",
"value": "I have recently been exploring Apache Ofbiz and was impressed by its ability to customize most areas of the application: UI, workflow, entities.\nIs there any similar (not necessarily an ERP system) application developed in C#/.Net which offers a similar level of customization?... |
We have created a VSTO addin for Outlook Meetings.
As part of this we trap on the SendEvent of the message on the FormRegionShowing event:
_apptEvents.Send += new Microsoft.Office.Interop.Outlook.ItemEvents_SendEventHandler(_apptEvents_Send);
The method _apptEvents_Send then tests on a couple of properties and exits w... | The issue of duplicate emails being sent in Outlook when using a VSTO add-in can be quite challenging to diagnose due to the variability of user environments and configurations. Here are some potential causes and troubleshooting steps that you can consider:
### 1. Multiple Instances of the Event Handler
Ensure that th... | 47,400 | [
{
"from": "human",
"value": "We have created a VSTO addin for Outlook Meetings.\nAs part of this we trap on the SendEvent of the message on the FormRegionShowing event:\n_apptEvents.Send += new Microsoft.Office.Interop.Outlook.ItemEvents_SendEventHandler(_apptEvents_Send);\n\nThe method _apptEvents_Send the... |
Can someone explain to me why my code:
string messageBody = "abc\n" + stringFromDatabaseProcedure;
where valueFromDatabaseProcedure is not a value from the SQL database entered as
'line1\nline2'
results in the string:
"abc\nline1\\nline2"
This has resulted in me scratching my head somewhat.
I am using ASP.NET 1.1.
... | The issue you are experiencing with string concatenation in ASP.NET 1.1 may stem from how the `stringFromDatabaseProcedure` is being retrieved and how line breaks are represented in the different environments.
Let's break down what could be happening:
1. **Value Retrieval**: When you retrieve a string from your datab... | 48,048 | [
{
"from": "human",
"value": "Can someone explain to me why my code:\nstring messageBody = \"abc\\n\" + stringFromDatabaseProcedure;\n\nwhere valueFromDatabaseProcedure is not a value from the SQL database entered as \n'line1\\nline2'\n\nresults in the string:\n\"abc\\nline1\\\\nline2\"\n\nThis has resulted ... |
For the life of me I can't figure out how I'm supposed to set the UITextField to display the text vertically (landscape mode) instead of horizontally (portrait mode). The keyboard shows up properly, but when the keys are pressed the text is entered in the wrong orientation.
Here is the screenshot for the window
And her... | To display text vertically in a `UITextField`, you will need to rotate the text display using a transformation, as `UITextField` doesn't directly support vertical text orientation.
Here's how you can achieve that:
1. **Transform the `UITextField`:** Apply a rotation transform to the `UITextField` to rotate it 90 deg... | 45,994 | [
{
"from": "human",
"value": "For the life of me I can't figure out how I'm supposed to set the UITextField to display the text vertically (landscape mode) instead of horizontally (portrait mode). The keyboard shows up properly, but when the keys are pressed the text is entered in the wrong orientation.\nHer... |
I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc.
For example, something like
<p>
<ul>
<li>Foo
becomes
<p>
<ul>
<li>... | Sanitizing HTML and closing open tags with the correct nesting order can be a bit tricky, but it can be accomplished using a stack-based approach. The idea is to keep track of the tags that are opened and then close them in the reverse order when reaching the end of the input.
Here’s a simple implementation in Python ... | 47,848 | [
{
"from": "human",
"value": "I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc.\nFor example, something like\n<p>\n <... |
A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a decent answer as to why it was limited to 32 bit files sizes, so I wrote my own using native OS API.
So, my question then: Is there a way to handle f... | In standard C++, the `std::ifstream` and `std::ofstream` classes should theoretically be able to handle files larger than 4GB, but the actual limitations depend on the implementation of the Standard Library you are using. In the case of the Visual Studio 2008 STL (which is based on the C++98 standard), there are limita... | 49,033 | [
{
"from": "human",
"value": "A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a decent answer as to why it was limited to 32 bit files sizes, so I wrote my own using native OS API.\nSo, my... |
I have a web application that I'm working on for work and its not very Firefox friendly (design was made 2 years before I started with the company). There are some CSS issues that I am having problems with and I can't use a CSS Reset because the page design is pretty much set in stone and it would cause more work then ... | It's understandable that you want to make your web application more Firefox-friendly, especially when dealing with legacy code. While there is no official list of default CSS values for Internet Explorer (IE) compared to other browsers like Firefox, I can provide you with a general approach to tackle this issue.
Here ... | 47,904 | [
{
"from": "human",
"value": "I have a web application that I'm working on for work and its not very Firefox friendly (design was made 2 years before I started with the company). There are some CSS issues that I am having problems with and I can't use a CSS Reset because the page design is pretty much set in... |
We're doing a lot of large, but straightforward forms for a fairly big project (about 600 users using it throughout the day - that's big for me at least ;-) ).
The forms have a lot of question/answer type sections, so it's natural for some people to type a sentence, while others type a novel. How beneficial would it b... | Setting character limits on form fields can have several benefits, especially in a project involving numerous users and varied response lengths. Here are some considerations regarding the implementation of character limits:
### Benefits of Character Limits
1. **Encourages Brevity**: Character limits can encourage use... | 41,212 | [
{
"from": "human",
"value": "We're doing a lot of large, but straightforward forms for a fairly big project (about 600 users using it throughout the day - that's big for me at least ;-) ).\nThe forms have a lot of question/answer type sections, so it's natural for some people to type a sentence, while other... |
I am developing a web app. which will generate a random link pointing to an image on my server. something like -http://dummy.com/Images/Image1.jpg?id=19234
Here this link can then be used by anybody on their site, now I just want to know how many sites are using my links, without anybody clicking on those links.
Can It... | To track how many external sites are using your image links without requiring a click (i.e., tracking link usage), you would typically look at HTTP referrer data. However, this will be limited by several factors, including how browsers and users handle referer headers due to privacy settings and ad blockers.
To implem... | 48,205 | [
{
"from": "human",
"value": "I am developing a web app. which will generate a random link pointing to an image on my server. something like -http://dummy.com/Images/Image1.jpg?id=19234\nHere this link can then be used by anybody on their site, now I just want to know how many sites are using my links, witho... |
Assuming I am not running server side scripting of any kind, how can I set and get a cookie from within VBA code?
| Setting and getting cookies in VBA (Visual Basic for Applications) without server-side scripting can be a bit tricky since VBA itself doesn't have built-in functions for handling HTTP cookies like JavaScript does in a web environment. However, you can manage cookies using the Internet Explorer (IE) COM object in VBA. B... | 48,234 | [
{
"from": "human",
"value": "Assuming I am not running server side scripting of any kind, how can I set and get a cookie from within VBA code? \n"
},
{
"from": "gpt",
"value": "Setting and getting cookies in VBA (Visual Basic for Applications) without server-side scripting can be a bit tricky si... |
I a have a multithread application (MIDAS) that makes uses of windows messages to communicate with itself.
MAIN FORM
The main form receives windows messages sent by the RDM
LogData(‘DataToLog’)
Because windows messages are used they have the following attributes
Received messages are Indivisible
Received messages ar... | To replace Windows messages for inter-thread communication in your application, you can consider using thread-safe data structures or synchronization mechanisms that can provide more control and efficiency, especially for a Windows service scenario. Here are a few alternative approaches:
### 1. **Using a Thread-Safe Q... | 44,723 | [
{
"from": "human",
"value": "I a have a multithread application (MIDAS) that makes uses of windows messages to communicate with itself.\nMAIN FORM\nThe main form receives windows messages sent by the RDM\nLogData(‘DataToLog’) \nBecause windows messages are used they have the following attributes \n\nReceive... |
I'm building a photo gallery and what I would like to do is make it so that as the user rolls over an image (let's say for the purposes of this question it's a picture of an apple), all the other images of apples on the page also show their "over" state.
Any and all help would be greatly appreciated, and thank you for... | To achieve the effect you desire for your photo gallery, you can use a combination of HTML, CSS, and JavaScript. The goal is to add an event listener to each image so that when one is hovered over, all other images of the same category (in this case, apples) also show their "over" state.
Here's a simple way to impleme... | 48,276 | [
{
"from": "human",
"value": "I'm building a photo gallery and what I would like to do is make it so that as the user rolls over an image (let's say for the purposes of this question it's a picture of an apple), all the other images of apples on the page also show their \"over\" state. \nAny and all help wou... |
I am trying to compile a labview CIN using visual studio 2003.
I have followed the tutorial located here to the letter, but am getting the following error:
Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
Does anyone know what is causing this? I tried this link found at an ex... | The error message you're encountering, "Project : error PRJ0019: A tool returned an error code from 'Performing Custom Build Step,'" is fairly generic and indicates that something went wrong during the build process. Here are a few potential causes and solutions:
1. **Check the Custom Build Step**: Ensure that the com... | 43,364 | [
{
"from": "human",
"value": "I am trying to compile a labview CIN using visual studio 2003.\nI have followed the tutorial located here to the letter, but am getting the following error:\n\nProject : error PRJ0019: A tool returned an error code from \"Performing Custom Build Step\"\n\nDoes anyone know what i... |
We use a customized installation of SugarCRM and I need to make a change to the "Convert Lead to Contact" form. On the form, only "last name" is marked as required, but if the user does not enter a salutation or first name, Sugar will throw an SQL error on the insert (because salutation and first name are required fiel... | In SugarCRM 5.1, to make the "First Name" and "Salutation" fields required when converting a Lead to a Contact, you'll need to ensure that the validation occurs on the front-end form and that the fields are properly recognized as required during the conversion process. Here are the steps you can take to achieve this:
... | 47,552 | [
{
"from": "human",
"value": "We use a customized installation of SugarCRM and I need to make a change to the \"Convert Lead to Contact\" form. On the form, only \"last name\" is marked as required, but if the user does not enter a salutation or first name, Sugar will throw an SQL error on the insert (becaus... |
I was thinking about how to create a program that would only be valid for X period of time, (within a C# app).
What I was thinking was that you would have the current date as a constant inside the program and it would check to see if it is X days older than that. Naturally I do not want to store the date, or the X out... | In C#, you can utilize a build step to embed a compilation-time constant that reflects the current date. This way, you can achieve your goal of making the program valid for a specific period based on its compile date without hardcoding it into the source code directly. One method of doing this is by using a pre-build e... | 47,668 | [
{
"from": "human",
"value": "I was thinking about how to create a program that would only be valid for X period of time, (within a C# app).\nWhat I was thinking was that you would have the current date as a constant inside the program and it would check to see if it is X days older than that. Naturally I d... |
There are a few questions on SO already regarding LINQ pivots and while a couple of them outline my exact problem, I can't successfully translate them to a working solution. I feel that this is mostly due to a join in my tables.
So for the benefit of all the LINQ junkies out there who love a problem, here's another pu... | To convert your SQL stored procedure into a LINQ query, we need to follow the same logic you have in your SQL, which involves joining the `Tasks` and `TimeEntries` tables, filtering based on date ranges and timesheet ID, and then grouping by task name while calculating the sum of minutes spent on each day of the week.
... | 44,379 | [
{
"from": "human",
"value": "There are a few questions on SO already regarding LINQ pivots and while a couple of them outline my exact problem, I can't successfully translate them to a working solution. I feel that this is mostly due to a join in my tables.\nSo for the benefit of all the LINQ junkies out t... |
I'm sure you've all seen them. Line of Business UIs that have logic such as: "When ComboA is selected, query for values based on that selection, and populate Textbox B", or "When ButtonC is pressed, disable Textboxes C and D", and on and on ... it gets particularly bad when you can have multiple permutations of the lo... | Redesigning a complex line of business UI can indeed be challenging, especially when dealing with intricate interactions and dependencies between various UI elements. Here’s a structured approach to redesign the interface, focusing on improving usability, maintainability, and clarity.
### 1. **Understanding the User N... | 48,884 | [
{
"from": "human",
"value": "I'm sure you've all seen them. Line of Business UIs that have logic such as: \"When ComboA is selected, query for values based on that selection, and populate Textbox B\", or \"When ButtonC is pressed, disable Textboxes C and D\", and on and on ... it gets particularly bad when... |
I'm having trouble capturing this data:
<tr>
<td><span class="bodytext"><b>Contact:</b><b></b></span><span style='font-size:10.0pt;font-family:Verdana;
mso-bidi-font-family:Arial'><b> </b>
<span class="bodytext">John Doe</span>
</span></td>
... | To extract the text between "Contact:" and "Phone:" while ignoring the HTML tags, you can use a combination of regular expressions and string manipulation in PHP. Below, I provide a solution that captures the required data and also explain the syntax for non-matching groups in PHP regex.
### PHP Code Example
Here's a... | 47,950 | [
{
"from": "human",
"value": "I'm having trouble capturing this data:\n <tr>\n <td><span class=\"bodytext\"><b>Contact:</b><b></b></span><span style='font-size:10.0pt;font-family:Verdana;\n mso-bidi-font-family:Arial'><b> </b> \n <span class=\"bodytext\">John... |
Having recently introduced an overload of a method the application started to fail.
Finally tracking it down, the new method is being called where I did not expect it to be.
We had
setValue( const std::wstring& name, const std::wstring& value );
std::wstring avalue( func() );
setValue( L"string", avalue );
std::wstrin... | The issue you're experiencing is indeed due to the fact that the empty string literal `L""` can be implicitly converted to both `std::wstring` and `bool`. This can lead to ambiguous calls when you have overloaded functions, especially in C++ where implicit conversions can sometimes yield unexpected behavior.
### Possi... | 42,835 | [
{
"from": "human",
"value": "Having recently introduced an overload of a method the application started to fail.\nFinally tracking it down, the new method is being called where I did not expect it to be.\nWe had\nsetValue( const std::wstring& name, const std::wstring& value );\n\nstd::wstring avalue( func()... |
What are some ways to write object-oriented code in C? Especially with regard to polymorphism.
See also this Stack Overflow question Object-orientation in C.
| C is not inherently an object-oriented programming (OOP) language like C++ or Java, but you can implement object-oriented principles, including polymorphism, using C's features. Here are some ways to achieve OOP-like structures and behavior in C:
### 1. Use `struct` to Define Classes
In C, you can define a `struct` t... | 45,915 | [
{
"from": "human",
"value": "What are some ways to write object-oriented code in C? Especially with regard to polymorphism.\n\nSee also this Stack Overflow question Object-orientation in C.\n"
},
{
"from": "gpt",
"value": "C is not inherently an object-oriented programming (OOP) language like C+... |
I've been using the Rome API to parse data from an XML feed pretty successfully so for, but have run in to a bit of a snag.
Given the following snippet of XML:
<entry> <id>uniqueId</id> <updated>2008-11-05T01:32:35Z</updated> <mm:status xmlns:mm="http://contentprovider.com" available="true"/> <title>T... | To access the custom metadata tag `<mm:status>` in an XML feed while using the Rome API, you'll need to dig a little deeper than the standard methods provided by the `SyndEntryImpl` class. Since `mm:status` is a custom namespace element, it won't be directly accessible through the usual getters like `getTitle()`, `getP... | 49,357 | [
{
"from": "human",
"value": "I've been using the Rome API to parse data from an XML feed pretty successfully so for, but have run in to a bit of a snag. \nGiven the following snippet of XML:\n<entry> <id>uniqueId</id> <updated>2008-11-05T01:32:35Z</updated> <mm:status xmlns:mm=\"http://contentprovi... |
I've got a css menu like this:
<ul>
<li><a>Item1</a></li>
<li><a>Item Two</a></li>
<li><a>Item C</a></li>
<li><a>A Rather Long Menu Item Down Here</a></li>
</ul>
I want to create this:
|-----------------------------------|
| Item1 |
|-----------------------------------|
| Item Two ... | To achieve a menu where all items have the same width as the widest item without manually setting a fixed width, you can use a combination of CSS and a little bit of JavaScript. Since you're targeting IE6, there are some constraints to consider, but a straightforward solution using JavaScript to dynamically set the wid... | 48,521 | [
{
"from": "human",
"value": "I've got a css menu like this:\n<ul>\n <li><a>Item1</a></li>\n <li><a>Item Two</a></li>\n <li><a>Item C</a></li>\n <li><a>A Rather Long Menu Item Down Here</a></li>\n</ul>\n\nI want to create this:\n\n|-----------------------------------|\n| Item1 ... |
As a newbie I'm trying to implement a sorting function in C++, using the list-class.
However, running the code I get the error that the list iterator is not incrementable... However it seems very unlikely as it should be incrementable!
code:
void shuffle (list<int> &list1)
{
list<int> smaller;
list<int> large... | It looks like you're trying to implement a sorting function using a recursive approach, but there are a few issues in your code that may cause problems. Specifically, the way you're handling the list while iterating over it is causing the iterator to become invalid, which leads to the error you're encountering.
Here’... | 49,439 | [
{
"from": "human",
"value": "As a newbie I'm trying to implement a sorting function in C++, using the list-class. \nHowever, running the code I get the error that the list iterator is not incrementable... However it seems very unlikely as it should be incrementable!\ncode: \nvoid shuffle (list<int> &list1)\... |
I was wondering if InnoDB would be the best way to format the table? The table contains one field, primary key, and the table will get 816k rows a day (est.). This will get very large very quick! I'm working on a file storage way (would this be faster)? The table is going to store ID numbers of Twitter Ids that have al... | When it comes to choosing a storage engine for a table that will experience high write volumes (like your expected 816,000 rows per day), InnoDB is generally a good choice. Here are some factors to consider:
### Advantages of InnoDB:
1. **ACID Compliance**: InnoDB supports transactions, providing a reliable way to han... | 45,456 | [
{
"from": "human",
"value": "I was wondering if InnoDB would be the best way to format the table? The table contains one field, primary key, and the table will get 816k rows a day (est.). This will get very large very quick! I'm working on a file storage way (would this be faster)? The table is going to sto... |
I'm about to be forced to write a script to download some number of files under Windows XP. The machines the script will be run at are all behind a proxy, and the proxy settings are entered into the IE configuration.
What came to my mind was either to somehow call IE from the command line, and using its configuration d... | You can achieve your goal by using `wget` with the proxy settings configured in Internet Explorer (IE). Below are steps and methods to retrieve those settings and apply them to `wget`.
### Option 1: Use `wget` with Proxy Settings
1. **Retrieve Proxy Settings from IE**: Internet Explorer stores its proxy settings in t... | 45,519 | [
{
"from": "human",
"value": "I'm about to be forced to write a script to download some number of files under Windows XP. The machines the script will be run at are all behind a proxy, and the proxy settings are entered into the IE configuration.\nWhat came to my mind was either to somehow call IE from the c... |
I am writing a addressbook module for my software right now. I have the database set up so far that it supports a very flexible address-book configuration.
I can create n-entries for every type I want. Type means here data like 'email', 'address', 'telephone' etc.
I have a table named 'contact_profiles'.
This only has ... | To achieve the desired transformation of your data from a row-based structure to a column-based structure in SQL, you can indeed use a view along with conditional aggregation. However, the exact approach may vary depending on the database system you're using (e.g., MySQL, PostgreSQL, SQL Server, etc.). Below is an exam... | 46,366 | [
{
"from": "human",
"value": "I am writing a addressbook module for my software right now. I have the database set up so far that it supports a very flexible address-book configuration.\nI can create n-entries for every type I want. Type means here data like 'email', 'address', 'telephone' etc.\nI have a tab... |
I have a .NET DLL and application. The DLL is written in C++/CLI and it's "mixed", i.e., partially managed code and partially native.
I have two goals:
1. Obfuscate all the managed code so it can't be disassembled
2. Obfuscate the public methods/classes of the mixed DLL so no one can use the DLL in their own applicat... | When working with mixed assemblies in C++/CLI, obfuscation can indeed be quite tricky, especially if you're looking for specific functionalities like supporting both managed and native components. Given your constraints and experiences so far, here are some suggestions for other obfuscators and methods to consider:
1.... | 49,415 | [
{
"from": "human",
"value": "I have a .NET DLL and application. The DLL is written in C++/CLI and it's \"mixed\", i.e., partially managed code and partially native. \nI have two goals:\n1. Obfuscate all the managed code so it can't be disassembled\n2. Obfuscate the public methods/classes of the mixed DLL s... |
I accidentally moved a very important and large folder from the root project into a sub-folder. Now when I try to move the folder back, it gives me an error message "Cannot create a file when that file already exists." How do I move things back?
Additional Information: I am also under SVN and now it wants to start a ... | It sounds like you're experiencing a bit of a mess due to the move operation within SVN (Subversion). When dealing with version control systems like SVN, simply moving files around using file explorers can lead to issues because the version control system doesn't recognize these changes unless you specifically inform i... | 42,169 | [
{
"from": "human",
"value": "I accidentally moved a very important and large folder from the root project into a sub-folder. Now when I try to move the folder back, it gives me an error message \"Cannot create a file when that file already exists.\" How do I move things back?\nAdditional Information: I am... |
I need to connect to an Exchange mailbox in a Python script, without using any profile setup on the local machine (including using Outlook). If I use win32com to create a MAPI.Session I could logon (with the Logon() method) with an existing profile, but I want to just provide a username & password.
Is this possible? ... | Connecting to an Exchange mailbox without using an existing profile or Outlook setup can be tricky since the `win32com` approach typically relies on MAPI profiles. However, you can connect to an Exchange mailbox using the `exchangelib` library, which allows direct authentication via username and password. Unfortunately... | 47,908 | [
{
"from": "human",
"value": "I need to connect to an Exchange mailbox in a Python script, without using any profile setup on the local machine (including using Outlook). If I use win32com to create a MAPI.Session I could logon (with the Logon() method) with an existing profile, but I want to just provide a... |
I have a rails app that accepts file uploads and I wanted to know the best way to have common storage between servers. Since we have a number of windows applications we have used samba in the past, but as we build pure linux apps I would like to do this the best possible way.
We are expecting large amounts of data, so... | To achieve common storage between servers for your Rails application while considering scalability and performance, here are several strategies you can implement:
### 1. **Network File System (NFS)**
NFS is a widely used protocol for sharing files across a network, particularly in a Linux environment. It's relatively ... | 48,390 | [
{
"from": "human",
"value": "I have a rails app that accepts file uploads and I wanted to know the best way to have common storage between servers. Since we have a number of windows applications we have used samba in the past, but as we build pure linux apps I would like to do this the best possible way.\n... |
I have pretty much finished my first working Symbian application, but in my hastened learning have paid little attention to memory management and pushing to and cleaning up the stack?
Could somebody please point me in the direction of some of the best practises to use here, and maybe some of the best leak detection/mem... | Welcome to the world of Symbian development! Memory management is indeed crucial in Symbian due to its constrained environment. Here are some best practices and tips for memory management, particularly with respect to the Cleanup Stack, and some suggestions for memory leak detection tools.
### Best Practices for Memor... | 42,174 | [
{
"from": "human",
"value": "I have pretty much finished my first working Symbian application, but in my hastened learning have paid little attention to memory management and pushing to and cleaning up the stack?\nCould somebody please point me in the direction of some of the best practises to use here, and... |
I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed in when it's run standalone (the first script runs periodically, a... | Certainly! In Perl, there are multiple ways to execute another script, and the choice of method largely depends on what you want to achieve, especially when you want to capture output. Here are some common ways to execute another Perl script and their characteristics:
### 1. Using `system()`
The `system()` function is... | 45,128 | [
{
"from": "human",
"value": "I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed in when it's run standalo... |
What are best tools available for Data Capturing from Scanned Images? Doesn't matter they are free or paid. They should be able to convert scanned images to data (text, image, tables etc.). Most importantly they should have API to integrate with .NET 2.0 for automation.
Edit: The input data will generally be Text, Ima... | There are several tools available for data capturing from scanned images that can extract text, images, and tables. Below are some of the best options, both free and paid, that also provide APIs for integration with .NET applications, including .NET 2.0 for automation:
### 1. **Tesseract OCR**
- **Type:** Free and ... | 47,280 | [
{
"from": "human",
"value": "What are best tools available for Data Capturing from Scanned Images? Doesn't matter they are free or paid. They should be able to convert scanned images to data (text, image, tables etc.). Most importantly they should have API to integrate with .NET 2.0 for automation.\n\nEdit:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.