instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
There are a couple of different ways to remove HTML tags from an NSString in Cocoa. One way is to render the string into an NSAttributedString and then grab the rendered text. Another way is to use NSXMLDocument's -objectByApplyingXSLTString method to apply an XSLT transform that does it. Unfortunately, the iPhone does...
To remove HTML tags from an NSString in Cocoa on iOS, you can utilize the `HTML` framework provided in iOS, or leverage libraries that can handle HTML parsing more gracefully than regular expressions. Since you mentioned that you want to avoid regex and NSScanner due to their limitations, a better approach would be to ...
43,162
[ { "from": "human", "value": "There are a couple of different ways to remove HTML tags from an NSString in Cocoa.\nOne way is to render the string into an NSAttributedString and then grab the rendered text.\nAnother way is to use NSXMLDocument's -objectByApplyingXSLTString method to apply an XSLT transform t...
I'm trying to pass a null value for the first parameter in the code below, but MySQL complains that Incorrect number of arguments for PROCEDURE myProc; expected 2, got 1 When I manually call the procedure with the first argument as null, it works, but when EmptyAsNullStartsWith(employeeNumberText.Text) returns null,...
The issue you're encountering is due to the way you're trying to add a null value as a parameter to the stored procedure in your database command. Specifically, if you're using the `DbCommand` object and trying to add a parameter that has a null value, you need to ensure that the parameter itself can be set to null in ...
40,976
[ { "from": "human", "value": "I'm trying to pass a null value for the first parameter in the code below, but MySQL complains that \n\nIncorrect number of arguments for PROCEDURE myProc; expected 2, got 1\n\nWhen I manually call the procedure with the first argument as null, it works, but when EmptyAsNullStar...
I'm helping a typical small company that started with a couple of outsourced systems (google apps, svn/trac). added an internal jabber server (ejabber for mostly iChat clients). subscribes to a couple of webservices (e.g. highrisehq). and has a vpn service provided by a pfsense freebsd firewall. And the net result of a...
You're correct in identifying that a unified login system can significantly simplify user management and authentication for a small company. There are several options that can help integrate various services like LDAP, RADIUS, VPN, chat services, and more into a single sign-on (SSO) solution. Below are some potential s...
38,081
[ { "from": "human", "value": "I'm helping a typical small company that started with a couple of outsourced systems (google apps, svn/trac). added an internal jabber server (ejabber for mostly iChat clients). subscribes to a couple of webservices (e.g. highrisehq). and has a vpn service provided by a pfsense ...
I'm starting a personal project, so I have at the moment complete architectural/design control. I'm just planning out the structure at this point. My goal is some sort of web forum, chat thing. The difference is it should update live, new posts growing on client views soon after they've hit the server. I think to us...
It sounds like you have a great project in mind! To achieve live updates for your forum while minimizing bandwidth usage, you might consider using WebSockets instead of AJAX polling. Here's a breakdown of your options and a suggested approach: ### 1. **WebSockets** WebSockets provide a full-duplex communication channe...
42,706
[ { "from": "human", "value": "I'm starting a personal project, so I have at the moment complete architectural/design control. I'm just planning out the structure at this point. My goal is some sort of web forum, chat thing. The difference is it should update live, new posts growing on client views soon af...
Is there a way to prematurely abort a transaction? Say, I have sent a command to the database which runs five minutes and after four, I want to abort it. Does JDBC define a way to send a "stop whatever you are doing on this connection" signal to the DB?
In JDBC, there isn't a built-in method specifically designed to send a "stop whatever you are doing" signal to the database. However, there are some strategies that you can implement to achieve similar functionality: 1. **Statement Cancellation**: JDBC provides a mechanism to cancel a currently executing statement. Yo...
40,592
[ { "from": "human", "value": "Is there a way to prematurely abort a transaction? Say, I have sent a command to the database which runs five minutes and after four, I want to abort it.\nDoes JDBC define a way to send a \"stop whatever you are doing on this connection\" signal to the DB?\n" }, { "from"...
I'm implementing unit tests for a family of functions that all share a number of invariants. For example, calling the function with two matrices produce a matrix of known shape. I would like to write unit tests to test the entire family of functions for this property, without having to write an individual test case for...
You can achieve this in Python's `unittest` framework by dynamically generating test methods for each function in your `all_functions` list. The key is to use the `setattr` function to add test methods to your `Test_the_functions` class during the `setUp` method. This way, each function will have its own test, and you ...
43,281
[ { "from": "human", "value": "I'm implementing unit tests for a family of functions that all share a number of invariants. For example, calling the function with two matrices produce a matrix of known shape.\nI would like to write unit tests to test the entire family of functions for this property, without h...
I am creating a form in HTML that will be printed, with fields that need to be written in by the recipient. Basically what I want is a single line that stretches from the end of the field label to the side of the page. Here's how I'm doing it right now: <table width="100%"> <tr> <td width="1%"> ...
Yes, you can achieve the same effect without using a table by utilizing simple HTML and CSS. You can use a `div` or `label` for the label and then create a line using a `border` on another `div` or `input` field that stretches across the page. Here's a simplified example using `div` elements: ```html <!DOCTYPE html> <...
42,816
[ { "from": "human", "value": "I am creating a form in HTML that will be printed, with fields that need to be written in by the recipient. Basically what I want is a single line that stretches from the end of the field label to the side of the page. Here's how I'm doing it right now:\n<table width=\"100%\">\n...
I'm working with some number crunching code that, by its nature, is floating-point intensive and and just plain slow. It's research code, so it can be tailored to one architecture, and is running on a Core 2 Quad box. My understanding is that, for the Pentium 4/Netburst architecture, Intel severely stripped down the ...
The Intel Core 2 architecture does not have a stripped-down x87 FPU. In fact, it retains the x87 FPU while also having strong support for SIMD (Single Instruction, Multiple Data) through the SSE (Streaming SIMD Extensions) instruction set. In terms of performance, the Core 2 architecture is well-optimized for both x87 ...
43,070
[ { "from": "human", "value": "I'm working with some number crunching code that, by its nature, is floating-point intensive and and just plain slow. It's research code, so it can be tailored to one architecture, and is running on a Core 2 Quad box. My understanding is that, for the Pentium 4/Netburst archit...
I am getting the following error and could use some help resolving it. Anyone have any ideas? The message with To 'http://localhost:60078/BidService.svc/Query' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree. ...
The error message you're encountering, "AddressFilter mismatch at the EndpointDispatcher," typically indicates that the address being used by the client to send requests does not match the address that the service is listening on. In your case, you have defined a service using `basicHttpBinding`, while your client is u...
40,692
[ { "from": "human", "value": "I am getting the following error and could use some help resolving it. Anyone have any ideas?\nThe message with To 'http://localhost:60078/BidService.svc/Query' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sende...
It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does not recognize. What is the behavior supposed to be if I use a new HTML 5 tag in a future version of Firefox but use the D...
You've raised a number of interesting points regarding the relationship between HTML5 and XHTML 1.0, especially in light of browser support for new HTML5 features like the `<video>` and `<audio>` tags. ### Behavior of New HTML5 Tags in XHTML 1.0 1. **Using HTML5 Tags in XHTML 1.0**: If you use an HTML5 tag, like `...
38,903
[ { "from": "human", "value": "It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does not recognize. What is the behavior supposed to be if I use a new HTML 5 tag in ...
I'm a little bit stuck with a asp.net project that i'm doing! I have got a class that is called from the code behind and many of its function have no return type ie, being void. How does one do exception handling then??? Also, if the function within the class does have a return type of, for instance, a dataset how woul...
When handling exceptions in a method, especially in a class where methods might not have a return type (void), you can take several approaches to signal that an exception has occurred. ### 1. Using Exception Handling If your method is void, you can choose to just throw the exception further up the call stack to be han...
39,784
[ { "from": "human", "value": "I'm a little bit stuck with a asp.net project that i'm doing! I have got a class that is called from the code behind and many of its function have no return type ie, being void. How does one do exception handling then??? Also, if the function within the class does have a return ...
We use Incredibuild here to compile our code in a distributed fashion. I was wondering if there are any open source (or free) alternatives to use on a home network? Failing that, are there any other simple solutions with good integration with Visual Studio out there? EDIT: I should say that I am quite happy to get my ...
There are several open-source and free alternatives to Incredibuild for distributed compilation that you can set up on a home network. Here are some options you can consider: ### Open Source Alternatives 1. **distcc**: - **Description**: `distcc` is a program that distributes the compilation of C/C++ code across s...
39,514
[ { "from": "human", "value": "We use Incredibuild here to compile our code in a distributed fashion. I was wondering if there are any open source (or free) alternatives to use on a home network? \nFailing that, are there any other simple solutions with good integration with Visual Studio out there?\nEDIT: I ...
When a user logs in to my site I want a css styled button to appear (this could be anything really, i.e. some special news text item etc), how can you do this via masterpages in asp.net? Or is there some other way you do this?
In ASP.NET, particularly when using Web Forms with Master Pages, you can control the visibility of UI elements (like a CSS-styled button or a text item) based on user login status. Below, I’ll guide you through how to do this step-by-step. ### Step 1: Set Up Your Master Page First, you need a Master Page that will ho...
39,339
[ { "from": "human", "value": "When a user logs in to my site I want a css styled button to appear (this could be anything really, i.e. some special news text item etc), how can you do this via masterpages in asp.net? Or is there some other way you do this?\n" }, { "from": "gpt", "value": "In ASP....
I am very interested in learning a Ruby on Rails / Django type web technology but am currently using Windows Server 2008 (for .Net web applications.) I have read that RoR is not very performant on Windows. Would it be unadvisable to create run a beta web application in RoR on a Windows Web server as far as performance...
Running a Ruby on Rails (RoR) application on a Windows server can certainly be done, but there are some factors to consider when it comes to performance, stability, and developer experience. ### Ruby on Rails on Windows 1. **Performance**: Ruby on Rails is generally not as performant on Windows compared to Unix-based ...
38,373
[ { "from": "human", "value": "I am very interested in learning a Ruby on Rails / Django type web technology but am currently using Windows Server 2008 (for .Net web applications.) I have read that RoR is not very performant on Windows.\n\nWould it be unadvisable to create run a beta web application in RoR on...
PHP has a var_dump() function which outputs the internal contents of an object, showing an object's type and content. For example: class Person { private $firstName; private $lastName; public function __construct($firstName, $lastName) { $this->firstName = $firstName; $this->lastName = $lastName; } } ...
In Java, you can achieve a similar output as PHP's `var_dump()` by overriding the `toString()` method in your class to provide a detailed representation of the object's state. However, Java does not have a built-in function like `var_dump()`, so you'll typically implement this method yourself. Here's how you can creat...
41,776
[ { "from": "human", "value": "PHP has a var_dump() function which outputs the internal contents of an object, showing an object's type and content.\nFor example:\nclass Person {\n private $firstName;\n private $lastName;\n\n public function __construct($firstName, $lastName) {\n $this->firstName = $fir...
We are looking at a standard way of configuring the various "endpoints" of our application. Our application is a distributed system with Windows Desktop applications, Windows Server "services" and databases. We currently configure each piece using XML files. This is getting a little out of hands as we work with larger ...
It sounds like you're looking for a centralized configuration management solution that can efficiently manage settings for a distributed system while enabling notifications for updates. There are several Microsoft technologies and third-party tools you can consider to achieve this. Here are a few options: ### Microsof...
42,363
[ { "from": "human", "value": "We are looking at a standard way of configuring the various \"endpoints\" of our application. Our application is a distributed system with Windows Desktop applications, Windows Server \"services\" and databases.\nWe currently configure each piece using XML files. This is getting...
The singleton is explained here: http://en.wikipedia.org/wiki/Singleton_pattern#PHP_5. I want to use the singleton class as a superclass, and extend it in other classes that are supposed to be singletons. The problem is, the superclass makes an instance of itself, not the subclass. Any idea how I can make the Superclas...
To implement a Singleton pattern in PHP that allows subclasses to be instantiated correctly, you can utilize a static method in the `Singleton` class to ensure that the correct subclass is instantiated. The trick is to utilize `static` keyword in PHP, which refers to the class context where the method was called rather...
42,057
[ { "from": "human", "value": "The singleton is explained here:\nhttp://en.wikipedia.org/wiki/Singleton_pattern#PHP_5.\nI want to use the singleton class as a superclass, and extend it in other classes that are supposed to be singletons. The problem is, the superclass makes an instance of itself, not the subc...
I have a linux box with a bank of modems and need to create demand-dial (outbound) PPP connections to a very large set of remote machines. Since I have far more remotes than local modems, I'd like to launch one or more instances of pppd in demand mode, but not allocate a particular modem until a connection is requeste...
Setting up dynamic allocation of modems for outbound demand-dial PPP connections can be challenging but is achievable with a combination of scripts and configuration options. Below are steps and ideas on how you might implement this with `pppd`: ### Step 1: Create a Script to Get Available Modems You can create a scr...
41,936
[ { "from": "human", "value": "I have a linux box with a bank of modems and need to create demand-dial (outbound) PPP connections to a very large set of remote machines. Since I have far more remotes than local modems, I'd like to launch one or more instances of pppd in demand mode, but not allocate a partic...
I've created a windows forms control, which is hosted in a web page viewable with Internet Explorer. My control reads from a com port and it writes to the event log. Both of these operations by default fail when the framework requests proper permissions. This web application will always be running in the intranet zon...
When you create a Windows Forms control that runs in a web page (especially when using ActiveX or similar technologies) and accesses system resources like COM ports or the event log, you run into security limitations that are put in place by the .NET Framework and the browser. Since your application is running in the i...
41,960
[ { "from": "human", "value": "I've created a windows forms control, which is hosted in a web page viewable with Internet Explorer.\nMy control reads from a com port and it writes to the event log. Both of these operations by default fail when the framework requests proper permissions. This web application ...
I have the following regex expression to match html links: <a\s*href=['|"](http:\/\/(.*?)\S['|"]> it kind of works. Except not really. Because it grabs everything after the < a href... and just keeps going. I want to exclude the quote characters from that last \S match. Is there any way of doing that? EDIT: This would...
To adjust your regex so that it matches only the URL part and stops at the closing quote, you can modify the last part of your regex. Currently, the use of `\S` matches any non-whitespace character, which can inadvertently grab everything until the end of the line or string, including unwanted characters. Here's a rev...
43,933
[ { "from": "human", "value": "I have the following regex expression to match html links:\n<a\\s*href=['|\"](http:\\/\\/(.*?)\\S['|\"]>\n\nit kind of works. Except not really. Because it grabs everything after the < a href...\nand just keeps going. I want to exclude the quote characters from that last \\S mat...
I need to be able to determine when ContainsFocus changes on a Control (specifically a windows form). Overriding OnGotFocus is not the answer. When I bring the form to the foreground, ContainsFocus is true and Focused is false. So is there an OnGotFocus equivalent for ContainsFocus? Or any other way?
In Windows Forms, the `ContainsFocus` property reflects whether the control or any of its child controls currently has focus, and it can change due to various interactions in the UI. Since `OnGotFocus` only applies to the control itself and doesn't account for child controls, you'll need to implement a different approa...
42,006
[ { "from": "human", "value": "I need to be able to determine when ContainsFocus changes on a Control (specifically a windows form). Overriding OnGotFocus is not the answer. When I bring the form to the foreground, ContainsFocus is true and Focused is false. So is there an OnGotFocus equivalent for ContainsFo...
I'm in the middle of building a pretty big site using asp.net (forms if it's of any interest), and I'm wondering if i need a logging framework such as log4net. I've used such frameworks before, but i don't see how i could put it to any use in this type of project. usually i think logging is needed for customer delivere...
Using a logging framework like log4net in an ASP.NET Forms application can be beneficial, even if you are not currently planning to deliver the application to customers. Here are several reasons why implementing logging could be valuable for your project: 1. **Error Tracking**: Even during development, errors can aris...
43,729
[ { "from": "human", "value": "I'm in the middle of building a pretty big site using asp.net (forms if it's of any interest), and I'm wondering if i need a logging framework such as log4net.\nI've used such frameworks before, but i don't see how i could put it to any use in this type of project.\nusually i th...
Would anyone happen to know how to convert type LPTSTR to char * in C++?
In C++, `LPTSTR` is a pointer type that can point to either a narrow (ANSI) or wide (Unicode) string, depending on whether `UNICODE` is defined. To convert `LPTSTR` to `char*`, you'll need to handle both cases properly. ### If `UNICODE` is defined When `UNICODE` is defined, `LPTSTR` corresponds to `LPWSTR`, which is ...
43,789
[ { "from": "human", "value": "Would anyone happen to know how to convert type LPTSTR to char * in C++?\n" }, { "from": "gpt", "value": "In C++, `LPTSTR` is a pointer type that can point to either a narrow (ANSI) or wide (Unicode) string, depending on whether `UNICODE` is defined. To convert `LPTS...
I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the configure.in, but without success. I thought I could use AC_PROG_CXX to set the c...
To avoid repeating the `AM_CXXFLAGS` in each `Makefile.am` in your project, you can define these flags in the top-level `Makefile.am` or in the `configure.ac` file, and then use `include` or other mechanisms to propagate these settings to subdirectories. Here's how you can do it: ### Step 1: Set CXXFLAGS in the Top-L...
38,636
[ { "from": "human", "value": "I have a project with several sources directories : \nsrc/A\n /B\n /C\n\nIn each, the Makefile.am contains \nAM_CXXFLAGS = -fPIC -Wall -Wextra\n\nHow can avoid repeating this in each source folder ? \nI tried to modifiy src/Makefile.am and the configure.in, but without succe...
Core Animation allows for custom animations by implementing the actionForKey method in your CALayer based class: - (id<CAAction>)actionForKey:(NSString *)key { // Custom animations return [super actionForKey:key]; } I can then create an animation and return it for the onOrderIn action (i.e. when the layer is a...
It looks like you're implementing a custom animation for the `onOrderOut` action, but it's being ignored in favor of the default fade-out animation. One common issue with custom animations in Core Animation is that some actions have specific defaults that may not be overridden unless they are explicitly defined or conf...
41,234
[ { "from": "human", "value": "Core Animation allows for custom animations by implementing the actionForKey method in your CALayer based class:\n- (id<CAAction>)actionForKey:(NSString *)key {\n // Custom animations\n return [super actionForKey:key];\n}\n\nI can then create an animation and return it for...
I've a problem building up a ComponentOne TreeView in Silverlight (C1TreeView) with a C1HierarchicalDataTemplate. In detail the Tree only shows 2 levels (H1 and H2), although 3 levels are defined through HierarchicalDataTemplates like: <c1:C1HierarchicalDataTemplate x:Key="H3Template"> <TextBlock FontWeight=...
Based on the provided snippets, there are several potential reasons why your `C1TreeView` is only displaying 2 levels instead of the expected 3. Let's review some possibilities and check if adjustments are needed: 1. **Hierarchy Structure:** Make sure that your data classes (`H1`, `H2`, `H3`) are set up correctly. Eac...
40,706
[ { "from": "human", "value": "I've a problem building up a ComponentOne TreeView in Silverlight (C1TreeView) with a C1HierarchicalDataTemplate. In detail the Tree only shows 2 levels (H1 and H2), although 3 levels are defined through HierarchicalDataTemplates like:\n<c1:C1HierarchicalDataTemplate x:Key=\"H3...
For example, if I make a query like between(1,4,X)? I would expect something like X=2, X=3. Is this possible?
Yes, you can achieve that functionality in Prolog using the `between/3` predicate, which generates integers between two specified bounds. The query `between(1, 4, X)` will bind `X` to each integer from 1 to 4 sequentially. However, if you specifically want to generate values like `X = 2` and `X = 3` only, you can use a...
40,386
[ { "from": "human", "value": "For example, if I make a query like between(1,4,X)? I would expect something like X=2, X=3. Is this possible?\n" }, { "from": "gpt", "value": "Yes, you can achieve that functionality in Prolog using the `between/3` predicate, which generates integers between two spec...
I have code that lets me select a single item in arange: COleVariant vItems = cstrAddr; hr = AutoWrap( DISPATCH_PROPERTYGET, &vCell, irange, L"Item", 2, ...
It looks like you're working with an automation interface to interact with Excel, and you're trying to select an entire range of cells. Given that the `Item` property is typically used to access individual items in a collection, when you want to select an entire range, you typically wouldn't use `Item` directly. Here'...
40,408
[ { "from": "human", "value": "I have code that lets me select a single item in arange:\n COleVariant vItems = cstrAddr;\n hr = AutoWrap(\n DISPATCH_PROPERTYGET, \n &vCell, \n irange, \n L...
Why does this leak in Perl ? $ perl -MDevel::LeakTrace::Fast -e 'our @a=(1);our @b=(1)' leaked SV(0x0x84e053c) from -e line 1 $ perl -v This is perl, v5.8.0 built for i386-linux-thread-multi [...] $ uname -a Linux ant1 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 EDT 2004 i686 i686 i386 GNU/Linux Thanks!
The leak you are observing with the Perl code you provided is likely a result of how Perl handles the declaration of variables, especially global variables in your case. Let's break down what might be happening. 1. **Global Variables**: In Perl, when you declare a variable with `our`, it creates a package variable (gl...
42,083
[ { "from": "human", "value": "Why does this leak in Perl ?\n$ perl -MDevel::LeakTrace::Fast -e 'our @a=(1);our @b=(1)'\nleaked SV(0x0x84e053c) from -e line 1\n\n$ perl -v\nThis is perl, v5.8.0 built for i386-linux-thread-multi\n[...]\n\n$ uname -a\nLinux ant1 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 EDT 20...
Using strictly SQL (no PHP or anything else), is it possible to create a table and insert default data into that table only if that table doesn't exist?
In standard SQL, you cannot directly create a table and insert data into it conditionally (only if the table doesn't exist) in a single SQL statement. However, you can achieve this behavior using a combination of statements, specifically using conditional logic. Most relational database systems provide a way to check ...
41,046
[ { "from": "human", "value": "Using strictly SQL (no PHP or anything else), is it possible to create a table and insert default data into that table only if that table doesn't exist?\n" }, { "from": "gpt", "value": "In standard SQL, you cannot directly create a table and insert data into it condi...
I have some question: How to make a role based web application? Such as in forum sites, there is many user types, admin, moderator etc... is the roles of these user types stored in database or web.config? And when a user login to our site, how to control this users roles? In short I want to learn about authorization an...
Creating a role-based web application involves several steps, including user authentication and authorization. Below is a structured approach that outlines the key concepts and steps to implement this functionality. ### Key Concepts 1. **Authentication**: This is the process of verifying the identity of a user. It en...
31,467
[ { "from": "human", "value": "I have some question:\nHow to make a role based web application? Such as in forum sites, there is many user types, admin, moderator etc... is the roles of these user types stored in database or web.config? And when a user login to our site, how to control this users roles? In sh...
I am doing some simple sanity validation on various types. The current test I'm working on is checking to make sure their properties are populated. In this case, populated is defined as not null, having a length greater than zero (if a string), or not equal to 0 (if an integer). The "tricky" part of this test is that s...
You're correct that using a large if statement with a series of logical conditions can lead to inefficiencies, especially with reflection, as you've observed. There are several alternative approaches that can be used to filter properties more efficiently and in a more readable way. Here’s a clean and efficient way to h...
41,176
[ { "from": "human", "value": "I am doing some simple sanity validation on various types. The current test I'm working on is checking to make sure their properties are populated. In this case, populated is defined as not null, having a length greater than zero (if a string), or not equal to 0 (if an integer)....
Is there a way to quickly list which sites are on which IP address in IIS 7? If I remember correctly you could sort a view of domains by IP in IIS 6 which was a big help to me in seeing which IPs I had available.
In IIS 7, you can use the command line or PowerShell to list the sites and their corresponding IP addresses, as there isn't a built-in feature in the IIS Manager interface that allows you to sort sites by IP address like in IIS 6. Here are a couple of methods you can use: ### Method 1: Using Command Line with `appcmd`...
41,738
[ { "from": "human", "value": "Is there a way to quickly list which sites are on which IP address in IIS 7? \nIf I remember correctly you could sort a view of domains by IP in IIS 6 which was a big help to me in seeing which IPs I had available.\n" }, { "from": "gpt", "value": "In IIS 7, you can ...
i have a frame that instantiates another frame but i don't want to use the close(x) button on the instantiated frame., so i created a button. how do i code that this button can be used to close the instantiated frame without quitting the JVM.
To close an instantiated frame using a button in Java Swing, you can define an ActionListener for the button that will dispose of the instantiated frame. The `dispose()` method of a `JFrame` object will close the frame without terminating the JVM. Below is an example of how you can achieve this. ### Example Code: ```...
42,516
[ { "from": "human", "value": "i have a frame that instantiates another frame but i don't want to use the close(x) button on the instantiated frame., so i created a button. how do i code that this button can be used to close the instantiated frame without quitting the JVM.\n" }, { "from": "gpt", "...
I am hoping to dynamically update a ModelForm's inline Meta class from my view. Although this code seems to update the exclude list in the Meta class, the output from as_p(), as_ul(), etc does not reflect the updated Meta exclude. I assume then that the html is generated when the ModelForm is created not when the as_*(...
You're correct that the HTML output from methods like `as_p()`, `as_ul()`, etc., is generated when the form is instantiated. This means that dynamically modifying the `Meta` class won't impact the existing form instance, as those attributes have already been set when the form was created. Here’s a more appropriate wa...
41,845
[ { "from": "human", "value": "I am hoping to dynamically update a ModelForm's inline Meta class from my view. Although this code seems to update the exclude list in the Meta class, the output from as_p(), as_ul(), etc does not reflect the updated Meta exclude.\nI assume then that the html is generated when t...
how do I retrieve the byte array stored in an integer column in my database? Do I first case it as int, then as byte[] ? byte[] permissions = (byte) Convert.ToInt(dr["myField"]); ?
Retrieving a byte array stored in an integer column in a database involves understanding what you mean by "stored in an integer column." If you're actually storing raw binary data as an integer (which is unusual), it could be an integer representing a particular value, but if you want to extract the byte representation...
41,391
[ { "from": "human", "value": "how do I retrieve the byte array stored in an integer column in my database?\nDo I first case it as int, then as byte[] ?\nbyte[] permissions = (byte) Convert.ToInt(dr[\"myField\"]);\n?\n" }, { "from": "gpt", "value": "Retrieving a byte array stored in an integer col...
Using MySQL, I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id = 5; My Output: shopping fishing coding but instead I just want 1 row, 1 col: Expected Output: shopping, fishing, coding The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a ...
In MySQL, you can achieve the desired output by using the `GROUP_CONCAT` function. This function concatenates values from multiple rows into a single string, which is exactly what you are looking for. You can modify your query as follows: ```sql SELECT GROUP_CONCAT(hobbies SEPARATOR ', ') AS hobbies FROM peoples_hobb...
41,918
[ { "from": "human", "value": "Using MySQL, I can do something like:\nSELECT hobbies FROM peoples_hobbies WHERE person_id = 5;\n\nMy Output:\nshopping\nfishing\ncoding\n\nbut instead I just want 1 row, 1 col:\nExpected Output:\nshopping, fishing, coding\n\nThe reason is that I'm selecting multiple values from...
I wish to find all rows in a table where one column is a substring of another column. In other words, suppose I have a table (called people) with two columns: firstname and lastname, and I want to find all people like "rob robinowitz" and "jill bajillion". Is there a way to do something like "select * from people where...
Yes, you can achieve this in SQL by using a correlated subquery or a self-join. However, most SQL databases do not allow the use of a column from the same row in the `LIKE` clause directly in the same `SELECT` statement. Instead, you will need to use string concatenation and `LIKE` properly. Here's a solution that wor...
44,142
[ { "from": "human", "value": "I wish to find all rows in a table where one column is a substring of another column.\nIn other words, suppose I have a table (called people) with two columns: firstname and lastname, and I want to find all people like \"rob robinowitz\" and \"jill bajillion\".\nIs there a way t...
I have a textbox and a link button. When I write some text, select some of it and then click the link button, the selected text from textbox must be show with a message box. How can I do it? When I click the submit button for the textbox below, the message box must show Lorem ipsum. Because "Lorem ipsum" is selected i...
To achieve the behavior you desire, where selected text remains selected even when interacting with other elements on the page, you can use JavaScript to manage the selection. Below is a simple example that demonstrates this functionality: 1. Create a textbox for entering text. 2. Create a link button (or button) to t...
41,158
[ { "from": "human", "value": "I have a textbox and a link button.\nWhen I write some text, select some of it and then click the link button, the selected text from textbox must be show with a message box.\nHow can I do it?\n\nWhen I click the submit button for the textbox below, the message box must show Lor...
Is it possible to change the scrollbar color in emacs? (Note: Not XEmacs) If it matters, I'm running emacs 22 on Ubuntu 8.10.
In Emacs 22, changing the scrollbar color directly through configuration options is not supported, as the customization options for scrollbars were quite limited at that time. However, you can adjust the scrollbar color by modifying the Emacs theme or using some workarounds. If you want to change the scrollbar color, ...
43,972
[ { "from": "human", "value": "Is it possible to change the scrollbar color in emacs? (Note: Not XEmacs)\nIf it matters, I'm running emacs 22 on Ubuntu 8.10.\n" }, { "from": "gpt", "value": "In Emacs 22, changing the scrollbar color directly through configuration options is not supported, as the c...
We have a page of search results which the user can hit in several ways. 90% of the ways will set up a 'Search Criteria' session object, which the results page will use to retrieve the search results. When the session object isn't found, we will typically show the user an 'invalid search' message, and give them a link...
When it comes to handling session expiration in web applications, there are a few key points to consider regarding how browsers handle session cookies and the consistency of this behavior across different browsers. ### Session Cookies and Expiration 1. **Behavior of Session Cookies**: - Session cookies, which are ...
40,328
[ { "from": "human", "value": "We have a page of search results which the user can hit in several ways. 90% of the ways will set up a 'Search Criteria' session object, which the results page will use to retrieve the search results.\nWhen the session object isn't found, we will typically show the user an 'inv...
what are advantages & disadvantages of connected & disconnected Architecture (database) over one another in asp.net ?
In ASP.NET development, both connected and disconnected architectures are used for data access, each with its own set of advantages and disadvantages. Here’s a breakdown of each architecture: ### Connected Architecture #### Advantages: 1. **Real-time Data Access**: Connected architecture provides real-time access to ...
41,573
[ { "from": "human", "value": "what are advantages & disadvantages of connected & disconnected Architecture (database) over one another in asp.net ?\n" }, { "from": "gpt", "value": "In ASP.NET development, both connected and disconnected architectures are used for data access, each with its own ...
As the title suggests, I am having trouble maintaining my code on postback. I have a bunch of jQuery code in the Head section and this works fine until a postback occurs after which it ceases to function! How can I fix this? Does the head not get read on postback, and is there a way in which I can force this to happen...
When a postback occurs in a web application, the entire page is typically re-rendered on the server and sent back to the browser. This means that any JavaScript or jQuery code defined in the `<head>` section will not automatically run again after the postback unless explicitly handled. Here are a few strategies you ca...
38,066
[ { "from": "human", "value": "As the title suggests, I am having trouble maintaining my code on postback. I have a bunch of jQuery code in the Head section and this works fine until a postback occurs after which it ceases to function! \nHow can I fix this? Does the head not get read on postback, and is there...
I have a mysql database filled up and running on a Windows computer, is there any tool to transfer the database to another computer (running Ubuntu)? Else I'll just write a script to take all the data base into SQL and insert it on the other computer. Just trying to save some time :) Thank you all.
Transferring a MySQL database from a Windows computer to an Ubuntu system can be done efficiently using several methods. Here are some popular tools and methods you can use: ### 1. **Using `mysqldump`**: The simplest method is to use the `mysqldump` utility that comes with MySQL. You can create a dump file on the Win...
41,073
[ { "from": "human", "value": "I have a mysql database filled up and running on a Windows computer, is there any tool to transfer the database to another computer (running Ubuntu)?\nElse I'll just write a script to take all the data base into SQL and insert it on the other computer. Just trying to save some t...
Using DTS I'm dynamically creating an access database. After the file is created (which works at this point) I'm having the DTS package post it via HTTP to another site. (This HTTP is just how it has to be done -- part of the spec.) But when the package posts the file, the posted version comes out as a 0 byte file. The...
To ensure that your Access database file is closed properly before you attempt to post it via HTTP in your DTS package, you need to explicitly close the connection to the Access database after you've completed all operations on it. Here are the steps you can take to manage the connection and ensure that the Access file...
41,377
[ { "from": "human", "value": "Using DTS I'm dynamically creating an access database. After the file is created (which works at this point) I'm having the DTS package post it via HTTP to another site. (This HTTP is just how it has to be done -- part of the spec.)\nBut when the package posts the file, the post...
I recently upgraded to Eclipse Ganymede from Europa and now I'm finding that when I'm editing JSP files the IDE crawls when editing HTML attributes (but not JSP attributes). Has anyone experienced this, or have any suggestions? Also if you can point me to a better place to ask Eclipse related questions, do tell. Thanks...
It sounds like you're encountering performance issues with Eclipse Ganymede when editing JSP files, particularly with HTML attributes. This is a known issue that can sometimes arise with certain versions of Eclipse and their handling of JSP files. Here are a few suggestions that may help improve the performance: 1. *...
42,259
[ { "from": "human", "value": "I recently upgraded to Eclipse Ganymede from Europa and now I'm finding that when I'm editing JSP files the IDE crawls when editing HTML attributes (but not JSP attributes).\nHas anyone experienced this, or have any suggestions?\nAlso if you can point me to a better place to ask...
I have the following code that I need to run over a matrix with over 20000 rows. It takes several minutes to run and the datenum and str2double functions appear to be the bottlenecks. Since no calculation depends on previous ones is there a way to break the loop into multiple parts and have them execute in parallel? An...
To optimize your code and run it in parallel, you can utilize MATLAB's Parallel Computing Toolbox. This can help distribute the workload across multiple cores on your CPU, especially since your calculations for each row of the matrix are independent of one another. Here's how you can modify your code to use `parfor`, ...
42,598
[ { "from": "human", "value": "I have the following code that I need to run over a matrix with over 20000 rows. It takes several minutes to run and the datenum and str2double functions appear to be the bottlenecks. Since no calculation depends on previous ones is there a way to break the loop into multiple pa...
I'm trying to implement a stateful web service in PHP using the SOAP extension. (Yes I know that web services are supposed to be stateless; all I really care to persist is some form of a session ID so I don't need to authenticate with every call to the service). PHP.net's API documentation is somewhat lacking on this,...
It looks like you're on the right track with your SOAP web service in PHP, but there are a few details that can affect the session management and the persistence of your class variables. Let’s go through the necessary steps to ensure the stateful behavior you’re expecting. ### Key Points: 1. **Session Management**: E...
41,216
[ { "from": "human", "value": "I'm trying to implement a stateful web service in PHP using the SOAP extension. (Yes I know that web services are supposed to be stateless; all I really care to persist is some form of a session ID so I don't need to authenticate with every call to the service). PHP.net's API d...
Wondering if my approach is ok or could be improved: Public Class Company private _id as Integer private _name as String private _location as String Public Function LoadMultipleByLocation(Byval searchStr as String) as List(Of Company) 'sql etc here to build the list End Function End Classs Thoughts o...
Your approach for creating the `Company` class in VB.NET has some good foundational elements, but there are a few areas where you might improve or clarify your implementation. Here are some suggestions: ### 1. Naming Conventions - It's generally a good practice to use PascalCase for public members and methods. In your...
41,280
[ { "from": "human", "value": "Wondering if my approach is ok or could be improved:\nPublic Class Company \n private _id as Integer\n private _name as String\n private _location as String\n\n Public Function LoadMultipleByLocation(Byval searchStr as String) as List(Of Company)\n 'sql etc here to buil...
This seems like a very simple and a very common problem. The simplest example I can think of is this: The form has five checkboxes with a "check all/check none" checkbox above them. When a user selects checking all checkboxes, I toggle the states of the "children" - obviously I don't want to fire the check events of al...
You're correct that handling the check/uncheck events for a group of checkboxes can become tricky, especially when you want to avoid firing events for each individual checkbox during a bulk action (like checking all or unchecking all). While there may not be a built-in "suspend" feature in most UI frameworks, there are...
41,083
[ { "from": "human", "value": "This seems like a very simple and a very common problem. The simplest example I can think of is this:\nThe form has five checkboxes with a \"check all/check none\" checkbox above them. When a user selects checking all checkboxes, I toggle the states of the \"children\" - obvious...
Context: I have a WPF App that uses certain unmanaged DLLs in the D:\WordAutomation\MyApp_Source\Executables\MyApp folder. I can double click the exe and everything runs. Next I have a Word 2007 code-behind project, that references relevant managed DLLs in the above folder and tries to do the same thing.. bring up ...
The issue you are facing with the `FileNotFoundException` when trying to load unmanaged DLLs from a Word 2007 VSTO project is a common challenge when working with unmanaged code in managed environments, especially when dealing with COM Interop and Office add-ins. Here are some steps and considerations that can help yo...
38,121
[ { "from": "human", "value": "Context: \n\nI have a WPF App that uses certain unmanaged DLLs in the D:\\WordAutomation\\MyApp_Source\\Executables\\MyApp folder. I can double click the exe and everything runs.\nNext I have a Word 2007 code-behind project, that references relevant managed DLLs in the above f...
Please suggest a good MVC framework for Winforms.
For Windows Forms (WinForms) applications, a commonly used design pattern is the Model-View-Controller (MVC) pattern. While WinForms is not inherently built for MVC, you can implement the pattern using various frameworks and libraries. Here are a few suggestions that can help you achieve an MVC-like architecture in Win...
43,884
[ { "from": "human", "value": "Please suggest a good MVC framework for Winforms.\n" }, { "from": "gpt", "value": "For Windows Forms (WinForms) applications, a commonly used design pattern is the Model-View-Controller (MVC) pattern. While WinForms is not inherently built for MVC, you can implement ...
We have this set of data that we need to get the average of a column. a select avg(x) from y does the trick. However we need a more accurate figure. I figured that there must be a way of filtering records that has either too high or too low values(spikes) so that we can exclude them in calculating the average.
To calculate a more accurate average by excluding outliers (spikes) in your data set, you can employ a method to filter out values that fall outside of a certain range. A common technique is to use the interquartile range (IQR) to identify and exclude outliers. Here's how you can do this: 1. **Calculate the Quartiles:...
43,397
[ { "from": "human", "value": "We have this set of data that we need to get the average of a column. a select avg(x) from y does the trick. However we need a more accurate figure.\nI figured that there must be a way of filtering records that has either too high or too low values(spikes) so that we can exclude...
What I am trying to do is so simple but I am having a hard time making it work. I saw some posts along the same lines but I still have questions. I have a MenuItem object called mnuA. All I want is set the icon property programatically in C#. I have tried the following a) mnuA.Icon = new BitmapImage{UriSource = new Uri...
It sounds like you are trying to set the icon for a `MenuItem` in WPF (Windows Presentation Foundation) and are encountering issues with displaying the actual image instead of the class name or file path. In WPF, the `Icon` property on a `MenuItem` expects a `DrawingImage`, but typically, you need to use an `Image` co...
43,465
[ { "from": "human", "value": "What I am trying to do is so simple but I am having a hard time making it work. I saw some posts along the same lines but I still have questions.\nI have a MenuItem object called mnuA. All I want is set the icon property programatically in C#. I have tried the following\na) mnuA...
I'm currently writing an app for a Windows Mobile 5.0 app and it seems to possess some firewall-esqe feature where I need to permit the running of any deployed executable. Is there some kind of registry key I can use to turn this off during development as it's frustrating having to babysit the device.
Windows Mobile 5.0 does have security features that can restrict the execution of applications, especially those that are deployed to the device. Unfortunately, the ability to modify these settings through the registry is limited, and there is no direct registry key specifically designed to turn off these execution res...
41,124
[ { "from": "human", "value": "I'm currently writing an app for a Windows Mobile 5.0 app and it seems to possess some firewall-esqe feature where I need to permit the running of any deployed executable. Is there some kind of registry key I can use to turn this off during development as it's frustrating having...
I'm planning software that's an OLAP application at its heart (it helps analyse metering data) and is going to have some kind of star schema for its database, because the stored values will be looked at from different angles (time, source, type etc.) and the requests will be asking for aggregated data along these dimen...
Designing an OLAP application with a star schema and considering performance optimizations like bitmap indexing can certainly present challenges, especially when targeting multiple database engines, including those that do not support bitmap indices, such as MySQL. ### Understanding Bitmap Indexes Bitmap indexes are p...
40,143
[ { "from": "human", "value": "I'm planning software that's an OLAP application at its heart (it helps analyse metering data) and is going to have some kind of star schema for its database, because the stored values will be looked at from different angles (time, source, type etc.) and the requests will be ask...
I have designed a simple windows service in .NET 2.0. I am trying to deploy it on my local machine. I have switched to design view, and setup ServiceInstaller and ServiceProcessInstaller objects. There is a Project Installer. I have also wrapped the Windows Service into a .NET setup project and install it, leaving an ....
When installing a Windows Service using `installutil`, it can be tricky if you're not doing it in the right context or if there are issues with your command line usage. Here are some steps to help you troubleshoot the installation process: ### Steps to Install Windows Service Using InstallUtil 1. **Open the Visual St...
38,716
[ { "from": "human", "value": "I have designed a simple windows service in .NET 2.0.\nI am trying to deploy it on my local machine. I have switched to design view, and setup ServiceInstaller and ServiceProcessInstaller objects. There is a Project Installer. I have also wrapped the Windows Service into a .NET ...
I need a byte buffer class in Java for single-threaded use. I should be able to insert data at the back of the buffer and read data at the front, with an amortized cost of O(1). The buffer should resize when it's full, rather than throw an exception or something. I could write one myself, but I'd be very surprised if t...
In Java, a suitable option for your requirements can be found in the `ArrayDeque` class, which is part of the Java Collections Framework. The `ArrayDeque` class is designed to be a resizable-array implementation of the `Deque` interface, and it allows for the insertion of elements at both ends of the deque (at the back...
43,826
[ { "from": "human", "value": "I need a byte buffer class in Java for single-threaded use. I should be able to insert data at the back of the buffer and read data at the front, with an amortized cost of O(1). The buffer should resize when it's full, rather than throw an exception or something.\nI could write ...
Im sure this will be a simple one but have a project that started as a test. When it was created it was saved as "Project2.dpr" Now the test is no longer a 'test', i would like to change the projects name to something more meaningful. whats the best way to do this? Any issues with just changing the file name and the P...
Changing the name of a Delphi project can be straightforward, but there are several steps you should follow to ensure that everything works correctly after the change. Here’s a guide on how to properly rename your Delphi project: 1. **Rename the `.dpr` file**: - Close Delphi if it is open. - Rename your project ...
42,825
[ { "from": "human", "value": "Im sure this will be a simple one but have a project that started as a test.\nWhen it was created it was saved as \"Project2.dpr\"\nNow the test is no longer a 'test', i would like to change the projects name to something more meaningful. \nwhats the best way to do this?\nAny is...
We wish to provide people to be able to add some logic to their accounts(say, given a few arguments, how to compute a particular result). So, essentially, this would be tantamount to writing simple business rules with support for conditionals and expressions. However, the challenge is to provide them a simple online ed...
Creating a user-friendly visual editor for non-programmers to construct business rules and logic can be a challenging task, but there are several tools and languages designed to help with this kind of functionality. Here are some suggestions that may meet your requirements: 1. **Node-RED**: - **Description**: Node-...
40,463
[ { "from": "human", "value": "We wish to provide people to be able to add some logic to their accounts(say, given a few arguments, how to compute a particular result). So, essentially, this would be tantamount to writing simple business rules with support for conditionals and expressions. However, the challe...
I have a relatively powerful dev workstation - 8 cores and 3 Gig of Ram. However, Visual Studio 2008 does not seem to take full advantage, especially during large builds. Are there any tweaks to be performed on XP VM settings etc to increase performance? I remember back in the bad old days that out of the box windows ...
To optimize the performance of Visual Studio 2008 on a Windows XP VM, especially regarding large builds, you can make several tweaks to both the virtual machine settings and Windows itself. Here are some suggestions: ### VM Configuration 1. **Allocate More Resources**: - **Increase RAM**: Make sure your VM has eno...
40,940
[ { "from": "human", "value": "I have a relatively powerful dev workstation - 8 cores and 3 Gig of Ram. However, Visual Studio 2008 does not seem to take full advantage, especially during large builds. \nAre there any tweaks to be performed on XP VM settings etc to increase performance? I remember back in the...
I want to be notified when a specified directory has any changes in its files or subdirectories. I realize the function with the following simple code segment: UINT myThreadFunc(LPVOID pParam) { int changeCount = 0; while(true) { HANDLE changeHandle = FindFirstChangeNotification(L"C:\\", TRUE, FILE_NOTIFY_CH...
In the code snippet you've provided, you're using the `FindFirstChangeNotification` and `WaitForSingleObject` functions to monitor changes in a specified directory. However, this approach does not give you detailed information about the changes, such as the action type or the filenames affected by the change. To achie...
40,808
[ { "from": "human", "value": "I want to be notified when a specified directory has any changes in its files or subdirectories. I realize the function with the following simple code segment:\nUINT myThreadFunc(LPVOID pParam)\n{\n int changeCount = 0;\n\n while(true)\n {\n HANDLE changeHandle = FindFirst...
I'm working on an application that makes asynchronous calls to the WebService. I added a proxy class to make asynchronous calls. The code compiles and runs properly, however whenever I try to double-click the proxy class in solution explorer (Visual Studio 2008) I am presented with a page To prevent possible data loss ...
The issue you're encountering, where Visual Studio is showing an error about the `WebServiceBindingAttribute` despite your proxy class already having it defined, can sometimes be a bit misleading. Here are a few potential reasons and suggestions to resolve or work around this problem: 1. **Incorrect Designer Configura...
43,318
[ { "from": "human", "value": "I'm working on an application that makes asynchronous calls to the WebService.\nI added a proxy class to make asynchronous calls. The code compiles and runs properly, however whenever I try to double-click the proxy class in solution explorer (Visual Studio 2008) I am presented ...
Has anyone found any documentation or research about what data is transfered to Google Analytics when it's added to a site. The main thing I'm wondering about is post data, but the details of exactly what is sent would be useful. I'm considering implementing it on a sites that have a lot of private data on them. I'm wo...
When implementing Google Analytics (GA), it's essential to understand what data is collected and transmitted to Google, especially when handling sensitive or private information. Here are key points regarding data collection by Google Analytics, particularly in relation to POST data and the nature of the information tr...
42,557
[ { "from": "human", "value": "Has anyone found any documentation or research about what data is transfered to Google Analytics when it's added to a site. The main thing I'm wondering about is post data, but the details of exactly what is sent would be useful.\nI'm considering implementing it on a sites that ...
I implementing a EventQueue and get notified when AWTEvents are send. I wait till instances of FocusEvent are send to the dispatchEvent methode. The FocusEvent by itself does not have a methode to ask if the focus of the component is gained or lost. The methode paramString returns a String in which the information is p...
To determine whether a `FocusEvent` indicates that focus has been gained or lost, you can use the `getID()` method of the `FocusEvent` class. The `getID()` method returns an integer that represents the event type, which you can compare against the predefined constants `FocusEvent.FOCUS_GAINED` and `FocusEvent.FOCUS_LOS...
42,765
[ { "from": "human", "value": "I implementing a EventQueue and get notified when AWTEvents are send.\nI wait till instances of FocusEvent are send to the dispatchEvent methode.\nThe FocusEvent by itself does not have a methode to ask if the focus of the component is gained or lost.\nThe methode paramString re...
I am looking at the pricing of various cloud computing platforms, particularly Amazon's EC2, and a lot of the quotes are based on a unit called an Instance-Hour. I am trying to get a handle on the exact definition of an instance-hour to better compare the costs of continuing to host a web-application versus putting it...
An **Instance-Hour** is a unit of measure used by cloud providers, including Amazon Web Services (AWS) for their Elastic Compute Cloud (EC2) service, to charge for the use of virtual machine instances. Here's a breakdown of your questions: ### (1) Definition and Relation to Windows Performance Counters An Instance-Ho...
41,258
[ { "from": "human", "value": "I am looking at the pricing of various cloud computing platforms, particularly Amazon's EC2, and a lot of the quotes are based on a unit called an Instance-Hour. \nI am trying to get a handle on the exact definition of an instance-hour to better compare the costs of continuing t...
I'm trying to serve dynamically generated xml pages from a web server, and provide a custom, static, xslt from the same web server, that will offload the processing into the client web browser. Until recently, I had this working fine in Firefox 2, 3, IE5, 6 and Chrome. Recently, though, something has changed, and Firef...
It sounds like you're dealing with a common issue related to how browsers handle XML and XSLT processing instructions, especially in the context of dynamic content generation. Here are some steps and considerations to help troubleshoot and potentially resolve the issue with Firefox 3: ### 1. Content-Type Header Ensure...
43,353
[ { "from": "human", "value": "I'm trying to serve dynamically generated xml pages from a web server, and provide a custom, static, xslt from the same web server, that will offload the processing into the client web browser.\nUntil recently, I had this working fine in Firefox 2, 3, IE5, 6 and Chrome. Recently...
I am using Powershell PSeventing plugin but have had no luck so far finding an event that triggers when an event log is full. I am looking everywhere MSDN .net events I know it has to do with maximum event log size but I can't find that trigger and I'm not sure how to get PSeventing to make thing happen. Can anyone h...
In PowerShell, the PSEventing module allows you to create and manage event subscriptions, but as of my last knowledge update in October 2023, there is no direct Windows Event Log event specifically triggered when an event log is full. Instead, you can monitor for certain changes to the event log that may indicate that ...
42,185
[ { "from": "human", "value": "I am using Powershell PSeventing plugin but have had no luck so far finding an event that triggers when an event log is full. I am looking everywhere MSDN .net events I know it has to do with maximum event log size but I can't find that trigger and I'm not sure how to get PSeve...
I'm using the jQuery UI sortables plugin to allow re-ordering of some list items. Inside each list item, I've got a couple of radio buttons which allow the item to be enabled or disabled. When the item is dragged, both radio buttons get deselected, which doesn't seem like it should be happening. Is this correct behav...
The behavior you're observing, where radio buttons inside sortable elements become deselected when dragging the item, is a known issue with certain versions of jQuery and jQuery UI. This happens because the `sortable` plugin creates a "placeholder" element while dragging, and sometimes, the focus/selection context can ...
34,003
[ { "from": "human", "value": "I'm using the jQuery UI sortables plugin to allow re-ordering of some list items. Inside each list item, I've got a couple of radio buttons which allow the item to be enabled or disabled.\nWhen the item is dragged, both radio buttons get deselected, which doesn't seem like it s...
How can i draw a dotted line in .NET/WinForms/GDI+? Pen p = new Pen (Color.Black) gives me only solid line pen. I am trying to have a dotted (or dashed) lines; can't seem to be able to google it up successfully. Will much appreciate any help on this one.
In .NET WinForms using GDI+, you can create a dotted or dashed line by setting the `DashStyle` property of the `Pen` class. Here's how you can do it: 1. Create a `Pen` object and set its `DashStyle` property to `DashStyle.Dot` for a dotted line or `DashStyle.Dash` for a dashed line. 2. Use this pen to draw on your Gra...
43,109
[ { "from": "human", "value": "How can i draw a dotted line in .NET/WinForms/GDI+?\nPen p = new Pen (Color.Black) \n\ngives me only solid line pen. \nI am trying to have a dotted (or dashed) lines; can't seem to be able to google it up successfully.\nWill much appreciate any help on this one.\n" }, { ...
I usually, almost without thinking anymore, use forward declarations so that I won't have to include headers. Something along this example: //----------------------- // foo.h //----------------------- class foo { foo(); ~foo(); }; //----------------------- // bar.h //----------------------- class foo; // forwa...
In C++, when you want to use an object of a class type rather than a pointer or reference, you indeed need the full definition of that class. Unfortunately, this makes it impossible to forward declare the class and still instantiate it as a member variable. However, there are a few potential strategies to minimize he...
38,369
[ { "from": "human", "value": "I usually, almost without thinking anymore, use forward declarations so that I won't have to include headers. Something along this example:\n//-----------------------\n// foo.h\n//-----------------------\nclass foo\n{\n foo();\n ~foo();\n};\n\n\n//-----------------------\n//...
We are running Apache (IBM HTTP Server 6.0.2.0) in front of WebSphere 6.0 on linux. We are getting excessive traffic from a specific User-Agent from varying IP addresses. We do not want to block the User-Agent or IP addresses, but would like to slow them down a bit. Best scenario for us would be to use out of the bo...
To manage and slow down traffic from a specific User-Agent in your Apache (IBM HTTP Server) setup without blocking it outright, you can use mod_ratelimit, which allows you to limit the bandwidth for requests. If mod_ratelimit is not available, you can use mod_rewrite and mod_headers to implement a basic throttling solu...
40,541
[ { "from": "human", "value": "We are running Apache (IBM HTTP Server 6.0.2.0) in front of WebSphere 6.0 on linux. We are getting excessive traffic from a specific User-Agent from varying IP addresses. We do not want to block the User-Agent or IP addresses, but would like to slow them down a bit. \nBest sce...
I need to round decimal numbers to six places using JavaScript, but I need to consider legacy browsers so I can't rely on Number.toFixed The big catch with toExponential, toFixed, and toPrecision is that they are fairly modern constructs not supported in Mozilla until Firefox version 1.5 (although IE supported the me...
To provide a way to round decimal numbers to six places for legacy browsers that don't support `Number.prototype.toFixed`, you can extend the `Number` prototype with your own method. You can create a custom method, say `roundToSixPlaces`, that will round the number to six decimal places using `Math.round`. Here's how ...
41,001
[ { "from": "human", "value": "I need to round decimal numbers to six places using JavaScript, but I need to consider legacy browsers so I can't rely on Number.toFixed \n\nThe big catch with toExponential, toFixed, and toPrecision is that they are fairly modern constructs not supported in Mozilla until Firefo...
I'm trying to create a Textmate snippet, but have run into some difficulties. Basically, I want to type in a Name and split it into its parts. Example, Bill Gates: (Bill), (bill), (Gates), (gates), (Bill Gates), (Bill gates), (bill Gates), (bill gates) EDIT** So I most certainly can produce these results quite simply ...
Creating a TextMate snippet that formats a name into various cases can be a bit tricky due to the limitations of TextMate's regular expression capabilities. However, with a little creativity, you can achieve your goal using snippets and some shell commands. Here's how you can set it up: 1. **Create a New Snippet**: O...
40,850
[ { "from": "human", "value": "I'm trying to create a Textmate snippet, but have run into some difficulties. Basically, I want to type in a Name and split it into its parts.\nExample,\nBill Gates: (Bill), (bill), (Gates), (gates), (Bill Gates), (Bill gates), (bill Gates), (bill gates)\nEDIT**\nSo I most cert...
How can I draw something in JPanel that will stay the same and not be repainted, I am doing a traffic simulation program and I want the road to be drawn once because It will not change. Thanks
To draw something in a `JPanel` that will stay the same and not be repainted every time the panel is updated, you can use a combination of techniques. Here's a general approach: 1. **Use a BufferedImage**: Draw your static elements (like the road) onto a `BufferedImage`. Then, in your `paintComponent` method, draw thi...
41,300
[ { "from": "human", "value": "How can I draw something in JPanel that will stay the same and not be repainted, I am doing a traffic simulation program and I want the road to be drawn once because It will not change. \nThanks \n" }, { "from": "gpt", "value": "To draw something in a `JPanel` that w...
Is there a way (in C#) to access the systray? I am not talking about making a notify icon. I want to iterate through the items in the tray (I would guess through the processes but I don't know how to determine what is actually in the tray and what is just a process) and also represent the items with their icons in my o...
Accessing the system tray (notification area) and iterating through its items in C# is not a straightforward task, as the system tray is managed by the operating system, and there is no direct API in the .NET Framework or .NET Core for listing all the tray icons. However, you can achieve this by using P/Invoke (Platfo...
38,531
[ { "from": "human", "value": "Is there a way (in C#) to access the systray?\nI am not talking about making a notify icon.\nI want to iterate through the items in the tray (I would guess through the processes but I don't know how to determine what is actually in the tray and what is just a process) and also r...
I have this bit of code I found on the web at the end of each of my stored procedures: ROLLBACK TRANSACTION PRINT '-----START: ERROR DETAILS-----' PRINT ERROR_NUMBER() PRINT ERROR_SEVERITY() PRINT ERROR_STATE() PRINT ERROR_PROCEDURE() PRINT ERROR_LINE() PR...
The code you provided captures error details when a stored procedure encounters an error and logs them to the `myErrors` table. If the entries are being written to `myErrors` but without the expected error message or severity, there are a few considerations to keep in mind. ### Reasons for Missing Error Details 1. **...
39,926
[ { "from": "human", "value": "I have this bit of code I found on the web at the end of each of my stored procedures:\nROLLBACK TRANSACTION\n\n PRINT '-----START: ERROR DETAILS-----'\n PRINT ERROR_NUMBER()\n PRINT ERROR_SEVERITY()\n PRINT ERROR_STATE()\n PRINT ERROR_PRO...
When I connect my digital camera with my computer, a dialog box containing all the registered programs can be used to get images from the camera will appear. Now I want to add my own program in the list, so that when I click the item of my program, I can use my own program to get images from the digital camera. Thank y...
To add your own program to the list of applications that appear when you connect your digital camera to your computer, you'll need to follow a few steps. The exact steps can vary based on your operating system (Windows, macOS, etc.) and the camera you are using, but here’s a general guide for Windows: ### Adding Your ...
41,263
[ { "from": "human", "value": "When I connect my digital camera with my computer, a dialog box containing all the registered programs can be used to get images from the camera will appear. Now I want to add my own program in the list, so that when I click the item of my program, I can use my own program to ge...
I'm using Linq to entities applying a Table per Type approach. This has been going very well, up to now. I have the following setup: Parent Table Child Table (Inherits from parent) Grand Child Table (Inherits from Child Table) Linking Table (Has Foreign Key Nullable, to Child Table) Here is the database diagram Foll...
It looks like you've encountered a common issue when using the Table per Type (TPT) inheritance mapping strategy in Entity Framework, particularly when dealing with nullable foreign key relationships. When a foreign key is nullable, it can cause ambiguity in mapping because the ORM needs to determine which type of enti...
42,362
[ { "from": "human", "value": "I'm using Linq to entities applying a Table per Type approach. This has been going very well, up to now. I have the following setup:\n\nParent Table\nChild Table (Inherits\nfrom parent)\nGrand Child Table\n(Inherits from Child Table)\nLinking Table (Has Foreign Key Nullable, to ...
I want to discover at run-time ONLY the static Methods of a class, how can I do this? Or, how to differentiate between static and non-static methods.
To discover only the static methods of a class at runtime in Python, you can use the built-in `inspect` module. The `inspect` module provides several useful functions to inspect live objects. Below is an example of how to retrieve the static methods from a class: ### Example Code ```python import inspect class MyCla...
41,469
[ { "from": "human", "value": "I want to discover at run-time ONLY the static Methods of a class, how can I do this?\nOr, how to differentiate between static and non-static methods.\n" }, { "from": "gpt", "value": "To discover only the static methods of a class at runtime in Python, you can use th...
** Dup: What's the difference between X = X++; vs X++;? ** So, even though I know you would never actually do this in code, I'm still curious: public static void main(String[] args) { int index = 0; System.out.println(index); // 0 index++; System.out.println(index); // 1 index = index++; Sys...
The behavior you're observing stems from how the increment operator (`++`) works in Java, especially when combined with assignment. Let's break down the two expressions in question: 1. **`X++`**: This is the post-increment operator. It increments the value of `X` by 1, but it returns the original value of `X` before ...
43,252
[ { "from": "human", "value": "** Dup: What's the difference between X = X++; vs X++;? **\nSo, even though I know you would never actually do this in code, I'm still curious:\npublic static void main(String[] args) {\n int index = 0;\n System.out.println(index); // 0\n index++;\n System.out.prin...
We moved our Visual C++ 2003 solution to Visual 2005 and now we have problems deploying to clean XP machines. Our solution has a DLL project and a command line executable which uses this DLL. Both projects create and embed manifest files. Our installer also copies the VC8 CRT runtimes from the C:\Programme\Microsoft Vi...
The issue you're facing generally relates to the way Visual C++ 2005 applications handle their runtime dependencies through Side-by-Side (SxS) assemblies, particularly for the C Runtime (CRT). When deploying applications built with Visual Studio 2005, it's essential to ensure that the correct runtime components are ins...
39,056
[ { "from": "human", "value": "We moved our Visual C++ 2003 solution to Visual 2005 and now we have problems deploying to clean XP machines.\nOur solution has a DLL project and a command line executable which uses this DLL. Both projects create and embed manifest files.\nOur installer also copies the VC8 CRT ...
I have been banging my head on this one all day. The C++ project I am currently working on has a requirement to display an editable value. The currently selected digit displays the incremented value above and decremented value below for said digit. It is useful to be able to reference the editable value as both a nu...
Your approach of using `boost::format` to convert a float to a string for indexing is a reasonable solution, especially considering the complexities involved with floating-point representation and precision. Here's a breakdown of the considerations and possible alternatives: ### Considerations 1. **Floating Point Rep...
40,434
[ { "from": "human", "value": "I have been banging my head on this one all day. The C++ project I am currently working on has a requirement to display an editable value. The currently selected digit displays the incremented value above and decremented value below for said digit. It is useful to be able to ...
I'm an avid vim user and have started to write some SQL code recently. I like to write my SQL statements in CAPS and sometimes forget to switch CapsLock 'off' and I then quickly wreak havoc on my code before I realise what's happening. I have so far not found any way to tell whether the CapsLock key is on other than lo...
To achieve a visual indication in Vim for the Caps Lock status, you can leverage Vim's ability to run shell commands and adjust the status line or highlight the background color. Below is a simple solution using Vim's scripting capabilities along with an external script to check the Caps Lock status. ### Step 1: Creat...
40,347
[ { "from": "human", "value": "I'm an avid vim user and have started to write some SQL code recently. I like to write my SQL statements in CAPS and sometimes forget to switch CapsLock 'off' and I then quickly wreak havoc on my code before I realise what's happening.\nI have so far not found any way to tell wh...
The build instructions of V8 JavaScript Engine mention only Visual Studio 2005 and 2008. Has anybody been successful with MinGW on Windows XP/Vista?
Building the V8 JavaScript Engine with MinGW on Windows XP or Vista can be challenging, as the official instructions typically target Visual Studio. However, there have been instances where developers have successfully compiled V8 using MinGW, but this is not officially supported, and the process may involve some worka...
40,609
[ { "from": "human", "value": "The build instructions of V8 JavaScript Engine mention only Visual Studio 2005 and 2008. Has anybody been successful with MinGW on Windows XP/Vista?\n" }, { "from": "gpt", "value": "Building the V8 JavaScript Engine with MinGW on Windows XP or Vista can be challengin...
How can I give a general rule that includes all the expressions below? E.g one expression, another one for sub and one for mult. I need to use recursion but i got confused... simplify :: Expr->Expr simplify (Mult (Const 0)(Var"x")) = Const 0 simplify (Mult (Var "x") (Const 0)) = Const 0 simplify (Plus (Const 0) (Va...
To create a general rule in your `simplify` function that includes all the expressions you've provided, we need to identify common patterns in the simplification rules and then construct a recursive function that can handle those cases. The general idea is that we need to check for specific types of expressions and a...
39,299
[ { "from": "human", "value": "How can I give a general rule that includes all the expressions below?\nE.g one expression, another one for sub and one for mult.\nI need to use recursion but i got confused...\nsimplify :: Expr->Expr\n\nsimplify (Mult (Const 0)(Var\"x\"))\n = Const 0 \nsimplify (Mult (Var \"x\"...
I've recently started with Python, and am enjoying the "batteries included" design. I'e already found out I can import time, math, re, urllib, but don't know how to know that something is builtin rather than writing it from scratch. What's included, and where can I get other good quality libraries from?
Welcome to Python! It's great to hear that you're enjoying it so far. ### Built-in Libraries Python comes with a rich standard library, which is often referred to as "batteries included." This library includes a wide array of modules that cover many common programming tasks. Some popular built-in modules include: -...
42,642
[ { "from": "human", "value": "I've recently started with Python, and am enjoying the \"batteries included\" design. I'e already found out I can import time, math, re, urllib, but don't know how to know that something is builtin rather than writing it from scratch.\nWhat's included, and where can I get other ...
What is the best way to build a dynamic Threaded ASP.net radio button list? I am not that familiar with RadioButtonLists and it is my understanding that ASP.net doesn't like the application of individual styling of ListItems.
Building a dynamic `RadioButtonList` in ASP.NET can be accomplished by programmatically creating the list items and applying styles through CSS classes. While it's true that `RadioButtonList` may not support individual styling of `ListItem`s directly, you can customize it using CSS and JavaScript to enhance the appeara...
40,696
[ { "from": "human", "value": "What is the best way to build a dynamic Threaded ASP.net radio button list? I am not that familiar with RadioButtonLists and it is my understanding that ASP.net doesn't like the application of individual styling of ListItems.\n" }, { "from": "gpt", "value": "Buildin...
I'm a little new to the Java 5 annotations and I'm curious if either of these are possible: This annotation would generate a simple getter and setter for you. @attribute private String var = ""; The @NotNull annotation indicates that a variable connot be null so you don't have to write that boilerplate code every time...
In Java, annotations are a powerful feature introduced in Java 5, but they don't directly provide functionality like automatically generating code (such as getters and setters) or enforcing runtime behavior (like enforcing non-nullability) on their own. Let's break down your two ideas: ### 1. Auto-generating Getters a...
42,427
[ { "from": "human", "value": "I'm a little new to the Java 5 annotations and I'm curious if either of these are possible:\nThis annotation would generate a simple getter and setter for you.\n@attribute\nprivate String var = \"\";\n\nThe @NotNull annotation indicates that a variable connot be null so you don'...
I embedded a swf in my html page, but I would like it to swap to another swf when I clicked on a button in html. I used swfobject.js to embed the swf, and I use prototype to write the javascript. I thought I can just do this $('movie').value = 'swf/bhts.swf'; alert($('movie').value); the value did change to swf/bhts.s...
To swap SWF files dynamically, you'll need to use JavaScript to update the SWF object and replace it with the new SWF. However, simply changing the `value` property of the `param` tag will not automatically trigger a reload of the SWF. Instead, you need to update the entire object. Here’s a general approach you can ta...
41,558
[ { "from": "human", "value": "I embedded a swf in my html page, but I would like it to swap to another swf when I clicked on a button in html. I used swfobject.js to embed the swf, and I use prototype to write the javascript. I thought I can just do this\n$('movie').value = 'swf/bhts.swf';\nalert($('movie')....
I am getting the following XML back from a .net service: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> ...
It seems like you're trying to parse a SOAP response using JAXM (Java API for XML Messaging), but you're encountering a null result when trying to get the SOAP envelope. There can be several reasons for this, so let's troubleshoot the issue step by step. ### 1. Ensure Proper Initialization Make sure that the reply obj...
42,505
[ { "from": "human", "value": "I am getting the following XML back from a .net service:\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" \n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n xmlns:xsd=\"htt...
In C# is there a technique using reflection to determine if a method has been added to a class as an extension method? Given an extension method such as the one shown below is it possible to determine that Reverse() has been added to the string class? public static class StringExtensions { public static string Reve...
To determine if an extension method has been added to a class using reflection in C#, you can inspect the assembly containing the extension method and check its signature. However, it's important to note that extension methods are implemented as static methods in a static class, and they are made available to the targe...
42,390
[ { "from": "human", "value": "In C# is there a technique using reflection to determine if a method has been added to a class as an extension method?\nGiven an extension method such as the one shown below is it possible to determine that Reverse() has been added to the string class?\npublic static class Strin...
I installed SQL Server 2008 (SQL Server 2005 was already installed) on my XP box and name the local instance of the database so that it wouldn't clash with SQL Server 2005. Now I want to change the mapping of (local) from SQL Server 2005 to my non-standard named SQL Server 2008 instance. Anybody know how to do this?
To change the mapping of `(local)` from your SQL Server 2005 instance to your non-standard named SQL Server 2008 instance, you need to configure the SQL Server Native Client or SQL Server Configuration Manager. Here's how you can do it: ### Method 1: Using SQL Server Native Client 1. **Open SQL Server Configuration M...
42,159
[ { "from": "human", "value": "I installed SQL Server 2008 (SQL Server 2005 was already installed) on my XP box and name the local instance of the database so that it wouldn't clash with SQL Server 2005.\nNow I want to change the mapping of (local) from SQL Server 2005 to my non-standard named SQL Server 2008...
I have a text file that contains a long list of entries (one on each line). Some of these are duplicates, and I would like to know if it is possible (and if so, how) to remove any duplicates. I am interested in doing this from within vi/vim, if possible.
Yes, it is possible to remove duplicate lines from a text file using `vi` or `vim`. Here’s how you can do it: 1. **Open your file in `vim`:** ```bash vim yourfile.txt ``` 2. **Enter command mode:** Press `Esc` if you are not already in command mode. 3. **Remove duplicates:** You can use the following...
44,210
[ { "from": "human", "value": "I have a text file that contains a long list of entries (one on each line). Some of these are duplicates, and I would like to know if it is possible (and if so, how) to remove any duplicates. I am interested in doing this from within vi/vim, if possible.\n" }, { "from"...
I would like to be able to detect what country a visitor is from on my website, using PHP. Please note that I'm not trying to use this as a security measure or for anything important, just changing the spelling of some words (Americans seems to believe that the word "enrolment" has 2 Ls.... crazy yanks), and perhaps t...
The simplest way to determine the country a visitor is from without installing any libraries is to use their IP address to fetch geolocation data from an external API. There are several public APIs that provide this service, and one of the more popular and easy-to-use options is the `ipinfo.io` API. Here's how you can...
42,571
[ { "from": "human", "value": "I would like to be able to detect what country a visitor is from on my website, using PHP. \nPlease note that I'm not trying to use this as a security measure or for anything important, just changing the spelling of some words (Americans seems to believe that the word \"enrolmen...
I have one big problem with merging - it falls on start with strange message: "Server sent unexpected return value (401 Authorization Required) in responce to PROPFIND request for '/svn/autogroup_projects/.../Data.sln'". Really that folder is not exists in the branch, but we had it in trunc (it modificated separately)....
The error message you're encountering during the merge operation in SVN suggests that there may be an authentication or permissions issue, even though you mentioned that you have access. Here are a few steps to troubleshoot and resolve the issue: 1. **Check Authentication Credentials**: Ensure that your SVN client is ...
40,997
[ { "from": "human", "value": "I have one big problem with merging - it falls on start with strange message: \"Server sent unexpected return value (401 Authorization Required) in responce to PROPFIND request for '/svn/autogroup_projects/.../Data.sln'\".\nReally that folder is not exists in the branch, but we ...
If you know the local path and file name of the file you want the end user to upload (via browser). Then is it possible to pre-set these properties for the HTML file input element (or any upload control)? So when the user clicks 'browse' to select the file to upload, then the dialog has preselected the filename. Btw, a...
In standard web browsers, for security and privacy reasons, you cannot pre-set the value of a file input element (`<input type="file">`). Browsers do not allow scripts to specify a file path or filename due to the risk of exposing the user's file system and allowing unwanted file access. When a user clicks the "Browse...
43,074
[ { "from": "human", "value": "If you know the local path and file name of the file you want the end user to upload (via browser). Then is it possible to pre-set these properties for the HTML file input element (or any upload control)? So when the user clicks 'browse' to select the file to upload, then the di...
DECLARE @p_date DATETIME SET @p_date = CONVERT( DATETIME, '14 AUG 2008 10:45:30',?) SELECT * FROM table1 WHERE column_datetime = @p_date I need to compare date time like: @p_date=14 AUG 2008 10:45:30 column_datetime=14 AUG 2008 10:45:30 How can I do this?
To compare datetime values in SQL Server, you can ensure that both the variable `@p_date` and the column `column_datetime` are of the same datatype and have the same precision. In SQL Server, the default behavior when comparing datetimes is to check both the date and time components. If you want to compare them precise...
40,824
[ { "from": "human", "value": "DECLARE @p_date DATETIME\nSET @p_date = CONVERT( DATETIME, '14 AUG 2008 10:45:30',?)\n\nSELECT *\nFROM table1\nWHERE column_datetime = @p_date\n\nI need to compare date time like:\n@p_date=14 AUG 2008 10:45:30\ncolumn_datetime=14 AUG 2008 10:45:30\n\nHow can I do ...
I include myself in a group of thinkers in this "small" company. In order to gather suggestions and improvement ideas from my development team members, I was put in charge of mounting an Idea/Suggestion Management system. Some of the enjoyable features are: provide user based (possible anonymous) suggestions mechanism...
Yes, there are several tools available that can help you set up an Idea/Suggestion Management system with the features you mentioned. Here are some popular options: 1. **Trello**: While primarily a project management tool, Trello can be adapted for suggestion management. You can create boards for suggestions, enable v...
43,862
[ { "from": "human", "value": "I include myself in a group of thinkers in this \"small\" company. In order to gather suggestions and improvement ideas from my development team members, I was put in charge of mounting an Idea/Suggestion Management system.\nSome of the enjoyable features are:\n\nprovide user ba...
I can't seem to retrieve the AlternateView from System.Net.Mail.AlternateView. I have an application that is pulling email via POP3. I understand how to create an alternate view for sending, but how does one select the alternate view when looking at the email. I've have the received email as a System.Net.MailMessage ...
When you retrieve an email using `System.Net.Mail.MailMessage`, it typically contains multiple alternate views if the email supports different formats, such as HTML and plain text. To extract the plain text content from an email message that has alternate views, you can iterate through the `AlternateViews` collection a...
41,695
[ { "from": "human", "value": "I can't seem to retrieve the AlternateView from System.Net.Mail.AlternateView.\nI have an application that is pulling email via POP3. I understand how to create an alternate view for sending, but how does one select the alternate view when looking at the email. I've have the r...