instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I've looked this up a thousand times, and I always forget it, so, here for eternity: Solaris has a bit of an awkward syntax for tail. How do I do the equivalent of BSD's tail -nN? What I want are the last N lines from tail's input.
In Solaris, the `tail` command does not have the `-n` option like it does in BSD. Instead, you can use the `-` option along with `-n`, but the syntax is slightly different. To get the last N lines using Solaris `tail`, you can use the following command: ```sh tail -N file.txt ``` Here, `N` is the number of lines you...
36,864
[ { "from": "human", "value": "I've looked this up a thousand times, and I always forget it, so, here for eternity:\nSolaris has a bit of an awkward syntax for tail.\nHow do I do the equivalent of BSD's tail -nN?\nWhat I want are the last N lines from tail's input.\n" }, { "from": "gpt", "value": ...
I normally use the following idiom to check if a String can be converted to an integer. public boolean isInteger( String input ) { try { Integer.parseInt( input ); return true; } catch( Exception e ) { return false; } } Is it just me, or does this seem a bit hackish? What's a b...
Your concern about the `isInteger` method is valid. While using a try-catch block for control flow can work, it is generally considered less clean and potentially less performant than other methods, especially in performance-critical applications. Here’s a more efficient approach using regular expressions: ### Using R...
35,410
[ { "from": "human", "value": "I normally use the following idiom to check if a String can be converted to an integer.\npublic boolean isInteger( String input ) {\n try {\n Integer.parseInt( input );\n return true;\n }\n catch( Exception e ) {\n return false;\n }\n}\n\nIs it j...
Based on this question here and using code found here I'm trying to load views that are embedded resources in a separate DLL project, and the original question's author says he has had success doing this - but I can't get it to work as it seems the MVC view engine is intercepting the request and still looking at the fi...
It sounds like you are attempting to use a custom view engine with embedded resources in a separate DLL to serve MVC views and are running into issues with the routing and view location resolution. ### Problem Analysis From your description, the main issue seems to be that the routing system is not appending the actio...
32,772
[ { "from": "human", "value": "Based on this question here and using code found here I'm trying to load views that are embedded resources in a separate DLL project, and the original question's author says he has had success doing this - but I can't get it to work as it seems the MVC view engine is interceptin...
I have a WinForms application (I'm using VB) that can be minimized to the system tray. I used the "hackish" methods described in multiple posts utilizing a NotifyIcon and playing with the Form_Resize event. This all works fine aesthetically, but the resources and memory used are unaffected. I want to be able to minimi...
To minimize resource usage when your WinForms application is minimized to the system tray, you can follow a few strategies that will help release unnecessary resources while still retaining the application's functionality. Below are some techniques you can implement in your VB.NET application: 1. **Hide Controls and U...
29,254
[ { "from": "human", "value": "I have a WinForms application (I'm using VB) that can be minimized to the system tray. I used the \"hackish\" methods described in multiple posts utilizing a NotifyIcon and playing with the Form_Resize event. \nThis all works fine aesthetically, but the resources and memory used...
I have been reading lots of blog posts offering cause and solution to the "Operation Aborted" error in IE. I recently built an application that is getting this error for some of ther users, some of the time. Let me explain in detail. The application is .NET 2.0, ASP .NET and C# web application built in VS 2008. It uses...
The "Operation Aborted" error in Internet Explorer (especially IE7) can be quite frustrating, and it often occurs due to timing issues, JavaScript errors, or issues with rendering when the DOM is manipulated. Since you're seeing this error intermittently and only in IE7 for some users, here are several steps and troubl...
31,972
[ { "from": "human", "value": "I have been reading lots of blog posts offering cause and solution to the \"Operation Aborted\" error in IE. I recently built an application that is getting this error for some of ther users, some of the time.\nLet me explain in detail.\nThe application is .NET 2.0, ASP .NET and...
I am using the ReportViewer control from Visual Studio 2008 in Local Mode with objects as the data source. My classes are mapped to data tables in my database. In the objects, it loads related objects as needed. So it leaves the reference null until you try to use the property, then it tries to load it from the databas...
The `System.Security.SecurityException` you are encountering suggests that the code running your ReportViewer control is being subjected to Code Access Security (CAS) restrictions that are blocking the use of the `SqlClient` classes. This can happen when running the application in environments where the security policy...
32,182
[ { "from": "human", "value": "I am using the ReportViewer control from Visual Studio 2008 in Local Mode with objects as the data source. My classes are mapped to data tables in my database. In the objects, it loads related objects as needed. So it leaves the reference null until you try to use the property, ...
We're developing an EPiServer-based website and trying to deploy our latest build onto a WinXP IIS6 box. When browsing to site, we're getting the following stack trace [ClassFactoryException: ClassFactory not initialized] EPiServer.BaseLibrary.ClassFactory.get_Instance() +123 EPiServer.BaseLibrary.Context.get_Rep...
The `ClassFactory not initialized` error that you are encountering when deploying your EPiServer-based website on IIS 6 on Windows XP is generally associated with issues in the initialization of the EPiServer framework or a problem in the configuration of the application. Here are some steps and checks you can perform...
31,783
[ { "from": "human", "value": "We're developing an EPiServer-based website and trying to deploy our latest build onto a WinXP IIS6 box.\nWhen browsing to site, we're getting the following stack trace\n[ClassFactoryException: ClassFactory not initialized]\n EPiServer.BaseLibrary.ClassFactory.get_Instance() +...
For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do 99.9% of my projects in a single language. I want th...
Creating a new programming language is a significant undertaking that comes with both exciting opportunities and notable challenges. Based on your detailed analysis of your needs and concerns, let’s summarize the potential pros and cons of developing your own language, while also considering some additional factors: #...
30,474
[ { "from": "human", "value": "For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do 99.9% of my ...
I have a simple POJO web service published with Axis2 on Tomcat5.5 I try to consume it with ATL C++ client and it fails. Doing the same with a C# client works. The problem is that ATL client sends soap body which looks like <soap:Body>< xmlns="http://fa.test.com/xsd"></></soap:Body></soap:Envelope> Notice the invali...
The issue you're encountering with the ATL C++ client sending an invalid SOAP body appears to stem from how the SOAP message is being constructed within the ATL client. Specifically, it seems that the `szName` member in the structure used to represent the request is not being populated correctly, resulting in an empty ...
33,475
[ { "from": "human", "value": "I have a simple POJO web service published with Axis2 on Tomcat5.5\nI try to consume it with ATL C++ client and it fails. Doing the same with a C# client works.\nThe problem is that ATL client sends soap body which looks like \n<soap:Body>< xmlns=\"http://fa.test.com/xsd\"></><...
I am connecting to a MySQL database with PHP and the CodeIgniter Framework. I want to store my passwords encrypted in the database and would like to know the best way to do this.
Storing passwords securely in a database is crucial for application security. Using a hashing algorithm is the recommended method for storing passwords instead of encrypting them. Here are the steps to securely hash passwords when using PHP with the CodeIgniter framework: ### Best Practices for Storing Passwords 1. *...
32,973
[ { "from": "human", "value": "I am connecting to a MySQL database with PHP and the CodeIgniter Framework. I want to store my passwords encrypted in the database and would like to know the best way to do this.\n" }, { "from": "gpt", "value": "Storing passwords securely in a database is crucial fo...
The default output from Drupal's Form API is: <input id="edit-submit" class="form-submit" type="submit" value="Save" name="op"/> How do I theme that so I get: <button id="edit-submit" class="form-submit" type="submit"> <span>Save</span> </button> I need the inner span-tag so I can use the sliding doors CSS techniqu...
To achieve your desired output from Drupal's Form API, you can override the rendering of the button element in your theme. Instead of overriding `theme_button()`, you can create a custom theme function in your theme's `template.php` file or a custom module. Here's how to do it: ### Step 1: Create or Modify Your Theme'...
34,312
[ { "from": "human", "value": "The default output from Drupal's Form API is:\n<input id=\"edit-submit\" class=\"form-submit\" type=\"submit\" value=\"Save\" name=\"op\"/>\n\nHow do I theme that so I get:\n<button id=\"edit-submit\" class=\"form-submit\" type=\"submit\">\n <span>Save</span>\n</button>\n\nI ne...
template <class T> void BT<T>::inOrder(void (*inOrderPtr)(T&)) { inOrderPtr(inOrder(this->root)); } template <class T> void BT<T>::inOrder(Node<T>* root) const { if (root->left != NULL) inOrder(root->left); //something here if (root->right != NULL) inOrder(root->right); } Ok I am ...
You're on the right track with your implementation of the `inOrder` traversal for a binary tree using recursion. The key is to use the function pointer effectively within your `inOrder` function to apply the provided function to the nodes' values during the traversal. Here’s how you can modify your code to accomplish t...
31,979
[ { "from": "human", "value": "template <class T>\nvoid BT<T>::inOrder(void (*inOrderPtr)(T&))\n {\n inOrderPtr(inOrder(this->root));\n }\ntemplate <class T>\nvoid BT<T>::inOrder(Node<T>* root) const\n {\n if (root->left != NULL)\n inOrder(root->left);\n //something here\n if (root->righ...
I have seen bind and eval used interchangeably especially in ASP.NET GridViews. What is the difference?
In ASP.NET, particularly when dealing with data-bound controls like GridViews, `DataBind` and `Eval` serve different purposes, although they are often used in conjunction with one another. ### DataBind - **Definition**: The `DataBind` method is used to bind the data source (like a collection of objects or a database r...
33,708
[ { "from": "human", "value": "I have seen bind and eval used interchangeably especially in ASP.NET GridViews. What is the difference?\n" }, { "from": "gpt", "value": "In ASP.NET, particularly when dealing with data-bound controls like GridViews, `DataBind` and `Eval` serve different purposes, alt...
ShellExecute() allows me to perform simple shell tasks, allowing the system to take care of opening or printing files. I want to take a similar approach to sending an email attachment programmatically. I don't want to manipulate Outlook directly, since I don't want to assume which email client the user uses by default....
To accomplish sending an email with an attachment using the default email client in Windows without directly manipulating Outlook or any specific email client, you can use the MAPI (Messaging Application Programming Interface). This allows you to invoke the default mail client with an attachment, much like the "Send To...
31,666
[ { "from": "human", "value": "ShellExecute() allows me to perform simple shell tasks, allowing the system to take care of opening or printing files. I want to take a similar approach to sending an email attachment programmatically.\nI don't want to manipulate Outlook directly, since I don't want to assume wh...
Once I have all the files I require in a particular folder, I would like my python script to zip the folder contents. Is this possible? And how could I go about doing it?
Yes, it is absolutely possible to zip the contents of a folder using Python. You can use the `zipfile` module that comes with Python's standard library to create ZIP archives. Here's a step-by-step guide on how to do this: ### Steps to Zip Folder Contents in Python 1. **Import Required Modules**: You'll need the `zip...
33,915
[ { "from": "human", "value": "Once I have all the files I require in a particular folder, I would like my python script to zip the folder contents. \nIs this possible? \nAnd how could I go about doing it?\n" }, { "from": "gpt", "value": "Yes, it is absolutely possible to zip the contents of a fol...
In C# code can you catch a native exception thrown from deep in some unmanaged library? If so do you need to do anything differently to catch it or does a standard try...catch get it?
In C#, if you are calling unmanaged code (such as a native library written in C or C++) from managed code, you need to be aware that exceptions thrown in the unmanaged code cannot be caught using the standard `try...catch` mechanism in C#. This is because the runtime of unmanaged code does not have knowledge of the man...
30,008
[ { "from": "human", "value": "In C# code can you catch a native exception thrown from deep in some unmanaged library? If so do you need to do anything differently to catch it or does a standard try...catch get it?\n" }, { "from": "gpt", "value": "In C#, if you are calling unmanaged code (such as ...
I am making a program in C# to connect to a webcam and do some image manipulation with it. I have a working application that uses win32 api (avicap32.dll) to connect to the webcam and send messages to it that sends it to the clipboard. The problem is that, while accessible from paint, reading it from the program result...
It looks like you're on the right track with your C# application using the Win32 API for webcam access. However, the issue you're encountering with the clipboard returning null pointers could be due to a couple of reasons, primarily related to the timing of the clipboard operations and how Windows handles clipboard con...
30,292
[ { "from": "human", "value": "I am making a program in C# to connect to a webcam and do some image manipulation with it.\nI have a working application that uses win32 api (avicap32.dll) to connect to the webcam and send messages to it that sends it to the clipboard. The problem is that, while accessible from...
I have to copy quite a lot of files from one folder to another. Currently I am doing it in this way: string[] files = Directory.GetFiles(rootFolder, "*.xml"); foreach (string file in files) { string otherFile = Path.Combine(otherFolder, Path.GetFileName(file)); File.Copy(file, otherFile); } Is that the most ef...
Your current method for copying files works, but there are some optimizations and alternative approaches that you can consider to potentially speed up the process. Here are a few suggestions: ### 1. Use Parallelism If you have many files to copy and your system has multiple CPU cores, you can take advantage of paralle...
34,354
[ { "from": "human", "value": "I have to copy quite a lot of files from one folder to another. Currently I am doing it in this way:\nstring[] files = Directory.GetFiles(rootFolder, \"*.xml\");\nforeach (string file in files)\n{\n string otherFile = Path.Combine(otherFolder, Path.GetFileName(file));\n Fi...
Model Driven Software Development. As I understand it it raises the abstraction level of the design to better reflect the domain the software will attempt to run in. That's alot to say in just one sentence. The communication between the domain experts (customer) and the developers is crucial to make this methodology w...
Model Driven Software Development (MDSD) is indeed a powerful methodology that emphasizes higher abstraction levels in software design, facilitating better communication between domain experts and developers. Here are some insights, tools, and best practices that can help you in your MDSD journey. ### Initial Thrust o...
30,626
[ { "from": "human", "value": "Model Driven Software Development.\nAs I understand it it raises the abstraction level of the design to better reflect the domain the software will attempt to run in. That's alot to say in just one sentence.\nThe communication between the domain experts (customer) and the devel...
I was asked to find a way to monitor changes (modification, renaming, deletion, moving) of files in specific folders on the company's shared file server (simple windows shared directory). I wrote a simple app in C# that uses FileSystemWatcher to monitor these changes and notify a particular email address of them. What ...
To determine the user or computer responsible for file modifications on a shared Windows directory, there are a couple of approaches you can consider: ### 1. Using File Auditing Windows has built-in auditing capabilities that can help you track who made changes to files: **Steps to Enable File Auditing:** 1. **Enable...
35,018
[ { "from": "human", "value": "I was asked to find a way to monitor changes (modification, renaming, deletion, moving) of files in specific folders on the company's shared file server (simple windows shared directory). I wrote a simple app in C# that uses FileSystemWatcher to monitor these changes and notify ...
Possible Duplicate: Watermarked Textbox for Compact Framework Using Visual Studio 2008 SP1, the latest Compact framework and Windows Mobile 5. I need to use DrawString to put a string over a TextBox. But as soon as I draw the string the TextBox Control just over writes it. (I Know because I drew slightly off the edg...
To achieve the desired effect of displaying a hint or watermark text over a TextBox in a Windows Mobile application without being overwritten by the TextBox's repainting, you can consider a few alternative approaches. Here are some suggestions: ### 1. Use a Transparent Overlay Control You can create a separate transp...
34,583
[ { "from": "human", "value": "\nPossible Duplicate:\nWatermarked Textbox for Compact Framework \n\nUsing Visual Studio 2008 SP1, the latest Compact framework and Windows Mobile 5.\nI need to use DrawString to put a string over a TextBox. But as soon as I draw the string the TextBox Control just over writes i...
I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same cmd window, I start getting exceptions: C...
The issue you are encountering is related to the way you are running your JAR file and specifying the classpath. The `java -jar` command behaves differently than specifying the classpath with the `-classpath` option. When you use the `-jar` option, the `-classpath` argument is ignored; instead, it only uses the classpa...
33,913
[ { "from": "human", "value": "I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same ...
I've installed Subversion on Ubuntu following the guide Installation of Subversion on Ubuntu, with Apache, SSL, and BasicAuth.. It works, and I was able commit and create different repositories, but somehow, from time to time (sometimes minutes), when trying to do a commit, I'm forced to reset or recreate my user and p...
The issue you're experiencing with Subversion (SVN) on Ubuntu, where you are repeatedly having to reset your username and password for authentication, could stem from a few different areas. Here are several pointers to help you troubleshoot and resolve the problem: ### 1. Check Apache Configuration - **Authentication ...
33,747
[ { "from": "human", "value": "I've installed Subversion on Ubuntu following the guide Installation of Subversion on Ubuntu, with Apache, SSL, and BasicAuth..\nIt works, and I was able commit and create different repositories, but somehow, from time to time (sometimes minutes), when trying to do a commit, I'm...
I have been using Prism for two days and have successfully added and used existing UserControls on the new Shell. These UserControls contained only pure WPF Controls (buttons, lists etc). I now need to introduce existing UserControls that consists of other UserControls. If my understanding is correct, I believe I need...
Yes, you're on the right track regarding how to work with existing UserControls in a Prism application, especially when those UserControls are composed of other UserControls. In Prism, regions are used to define areas in your view where other views can be injected. If your existing UserControls contain other UserContr...
35,580
[ { "from": "human", "value": "I have been using Prism for two days and have successfully added and used existing UserControls on the new Shell. These UserControls contained only pure WPF Controls (buttons, lists etc).\nI now need to introduce existing UserControls that consists of other UserControls. \nIf my...
What is the difference between private and protected members in C++ classes? I understand from best practice conventions that variables and functions which are not called outside the class should be made private—but looking at my MFC project, MFC seems to favor protected. What's the difference and which should I use?
In C++, the difference between `private` and `protected` members in a class relates to their accessibility from derived classes and outside code. Let's break down the two access specifiers: ### 1. Private Members - **Definition**: Members (variables and functions) declared as `private` can only be accessed by member f...
33,648
[ { "from": "human", "value": "What is the difference between private and protected members in C++ classes?\nI understand from best practice conventions that variables and functions which are not called outside the class should be made private—but looking at my MFC project, MFC seems to favor protected.\nWhat...
I've got a Label with a user-selected directory path. Of course some paths are longer than others. I'm using a Resizer on the control the Label lives in, and would love it if I could have variable eliding of the path. c:\very\long\path\to\a\filename.txt collapsing to c:...\filename.txt or c:\very...\filename.txt. Yo...
To achieve dynamic eliding of a file path in a WPF Label based on its width, you can create a value converter that formats the path depending on how much space is available. You can use a `MultiBinding` with a `Converter` to dynamically change the displayed string based on the width of the Label. Here's a simplified ...
15,309
[ { "from": "human", "value": "I've got a Label with a user-selected directory path. Of course some paths are longer than others. I'm using a Resizer on the control the Label lives in, and would love it if I could have variable eliding of the path.\nc:\\very\\long\\path\\to\\a\\filename.txt collapsing to c:...
vi treats dash - and space   as word separators for commands such as dw and cw. Is there a way to add underscore _ as well? I quite often want to change part of a variable name containing underscores, such as changing src_branch to dest_branch. I end up counting characters and using s (like 3sdest), but it would be muc...
In `vi` and `vim`, the default behavior for word separators indeed treats spaces and dashes as word boundaries, but underscores are treated as part of a word. However, you can customize this behavior by modifying the `iskeyword` option, which defines what characters are considered part of a "word". To make `_` a word ...
35,998
[ { "from": "human", "value": "vi treats dash - and space   as word separators for commands such as dw and cw.\nIs there a way to add underscore _ as well?\nI quite often want to change part of a variable name containing underscores, such as changing src_branch to dest_branch. I end up counting characters and...
I use jquery tree plugin to render hierarchical data. I have coded additional functions which would allow user to interact with this data (like adding/deleting nodes, swapping nodes, etc...) Currently this plugin supports that whenever you want to add any node, you can call following method, $("#browser").treeview({ ...
It sounds like you're experiencing an issue with the rendering of the jQuery treeview plugin after performing direct DOM manipulations like adding, deleting, or swapping nodes. The plugin likely has its own internal state and rendering mechanism that doesn't automatically update when you manipulate the DOM directly. T...
34,314
[ { "from": "human", "value": "I use jquery tree plugin to render hierarchical data. \nI have coded additional functions which would allow user to interact with this data (like adding/deleting nodes, swapping nodes, etc...)\nCurrently this plugin supports that whenever you want to add any node, you can call f...
Is anybody familiar with setting up WCF-nettcp adapters for BTS? When I create a WCF-netTcp adapter for a Receive location, I am unsure how/when BTS will open up port 808 to listen on the address URI specified. It appears to only happen if I restart the entire BizTalk application. If it closes for some reason, I do not...
Setting up WCF-NetTcp adapters in BizTalk can indeed be tricky, especially when it comes to managing ports, metadata exchange (MEX) endpoints, and service publishing. Here's a guide to help you with the setup: ### Opening and Managing the NetTcp Port 1. **Receiving Location Configuration**: - When you create a WCF-...
33,725
[ { "from": "human", "value": "Is anybody familiar with setting up WCF-nettcp adapters for BTS?\nWhen I create a WCF-netTcp adapter for a Receive location, I am unsure how/when BTS will open up port 808 to listen on the address URI specified. It appears to only happen if I restart the entire BizTalk applicati...
I am planning on developing a windows based client app and a platform agnostic server app. The client app basically sends messages to the server app. Client app can send messages in English or in other languages. Should I be using UNICODE for encoding messages in my client app? What is the general practise among applic...
When developing a Windows-based client app and a platform-agnostic server app, particularly when handling messages that may include text in multiple languages, using **Unicode** for encoding your messages is a best practice. Here’s a breakdown of the considerations you should keep in mind: ### 1. Use of Unicode: - **W...
35,265
[ { "from": "human", "value": "I am planning on developing a windows based client app and a platform agnostic server app. The client app basically sends messages to the server app. Client app can send messages in English or in other languages. Should I be using UNICODE for encoding messages in my client app? ...
We have encountered a very strange situation when we deployed an application at a customer site. This application is implemented as a service using C# on .NET 3. The application communicates with a web service that is written using gSOAP. In our .NET application, the classes that wrap the web service were created by pe...
The issue you're encountering is likely related to network permissions, firewall settings, or the way that different accounts handle network communication. Here are some insights and suggestions to help troubleshoot and resolve the issue: 1. **Network Permissions**: - The Local Administrator account may have certa...
33,904
[ { "from": "human", "value": "We have encountered a very strange situation when we deployed an application at a customer site. This application is implemented as a service using C# on .NET 3. The application communicates with a web service that is written using gSOAP. In our .NET application, the classes tha...
The Agile architecture question makes me wonder this. Does it depends of what is being build ? Do applications (I mean single computing program here) have an architecture ? UPDATE: to try to clarify the question, I'll give my opinion on the question: I defined the architecture as the cutting of the system in ...
Your opinion on the definitions of architecture and design is a common perspective in the software engineering community, and it reflects a clear understanding of the concepts. Let’s break down the key points: 1. **Architecture of Applications**: Yes, applications—regardless of their complexity—do have an architecture...
34,313
[ { "from": "human", "value": "The Agile architecture question makes me wonder this. \nDoes it depends of what is being build ? Do applications (I mean single\n computing program here) have an architecture ? \nUPDATE: to try to clarify the question, I'll give my opinion on the question: I defined the a...
Ok, so I want to get a webapp running in tomcat (5.5) to run behind apache 2 (2.2.3 to be precise) serving from the root of the site (i.e. without the context), with static content being served via apache. So if the app is running under "/myapp" on tomcat I want to use apache (plus mod_rewrite) to make it behave as if ...
To achieve your goal of running a web application in Tomcat behind Apache while also serving static content from Apache, you need to properly configure both Apache and Tomcat. Since you are using `mod_jk`, I will suggest a way to rewrite requests properly while ensuring that the static content is served directly by Apa...
32,195
[ { "from": "human", "value": "Ok, so I want to get a webapp running in tomcat (5.5) to run behind apache 2 (2.2.3 to be precise) serving from the root of the site (i.e. without the context), with static content being served via apache.\nSo if the app is running under \"/myapp\" on tomcat I want to use apache...
Have a standard smart client application that we want to autostart when a user logs into their machine on our network. I've tried the following keys: HKLM\Software\Microsoft\Windows\CurrentVersion\Run HKCU\Software\Micrisoft\Windows\CurrentVersion\Run HKCU\Software\Micrisoft\Windows\CurrentVersion\Policy\Explorer\Run ...
If your application is not starting automatically when a user logs into their machine despite being placed in the appropriate registry keys, here are several potential solutions and troubleshooting steps you can try: 1. **Check for Typographical Errors**: Ensure that the paths specified in the registry entries are cor...
32,895
[ { "from": "human", "value": "Have a standard smart client application that we want to autostart when a user logs into their machine on our network. I've tried the following keys:\nHKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\nHKCU\\Software\\Micrisoft\\Windows\\CurrentVersion\\Run\nHKCU\\Softwar...
I am a little confused by the multitude of ways in which you can import modules in Python. import X import X as Y from A import B I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which circumstances and why. Should imports happen at a mo...
Understanding how to import modules in Python is essential for managing code complexity and ensuring good design practices. Here are some practical guidelines for different import styles, their implications, and the best strategies to adopt based on context: ### Import Styles 1. **Basic Import**: ```python imp...
30,387
[ { "from": "human", "value": "I am a little confused by the multitude of ways in which you can import modules in Python. \nimport X\nimport X as Y\nfrom A import B\n\nI have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which circums...
This code: #include <iostream> int main( int, char **argv ) { std::cout << 1.23e45 << std::endl; } prints 1.23e+045 when compiled with MS Visual Studio 2003, and 1.23e+45 on my Linux machine. How can I specify the width of the exponent field (and why is there a difference in the first place)?
The difference you're observing in the output format between MS Visual Studio 2003 and your Linux machine (likely using `g++` or another compiler) arises from differences in the default settings for number formatting in the C++ standard library implementations of these compilers. ### Specifying the Width of the Expone...
34,776
[ { "from": "human", "value": "This code:\n#include <iostream>\nint main( int, char **argv )\n{\nstd::cout << 1.23e45 << std::endl;\n}\n\nprints \n\n1.23e+045\n\nwhen compiled with MS Visual Studio 2003, and\n\n1.23e+45\n\non my Linux machine. \nHow can I specify the width of the exponent field (and why is th...
I have a table called book with, the attrbutes are booked_id, yearmon, and day_01....day_31. Now i need to unpivot the table and transform day_01...day_31 into rows, I have successed in doing that, but the problem is that my yearmon is a format of 200805 and i need to append a day to it based on day_01 or day_02 etc, s...
You can achieve this transformation using SQL Server Integration Services (SSIS) without writing an excessively large query. Below are the steps you can follow to unpivot your `book` table and create a new date column in the required format. The unpivoting process will turn your day columns into rows, and then you can ...
33,733
[ { "from": "human", "value": "I have a table called book with, the attrbutes are booked_id, yearmon, and day_01....day_31. Now i need to unpivot the table and transform day_01...day_31 into rows, I have successed in doing that, but the problem is that my yearmon is a format of 200805 and i need to append a d...
The situation is as follows: A series of remote workstations collect field data and ftp the collected field data to a server through ftp. The data is sent as a CSV file which is stored in a unique directory for each workstation in the FTP server. Each workstation sends a new update every 10 minutes, causing the previou...
In the situation you described, where workstations are uploading CSV files every 10 minutes and those files overwrite previous uploads, you will need a strategy that allows you to capture and store each upload without losing data. Given the constraints of your current hosting environment and available server-side scrip...
33,884
[ { "from": "human", "value": "The situation is as follows:\nA series of remote workstations collect field data and ftp the collected field data to a server through ftp. The data is sent as a CSV file which is stored in a unique directory for each workstation in the FTP server.\nEach workstation sends a new u...
I've noticed there are a few solutions to allow the use of memcached on C# / ASP.NET: memcacheddotnet enyim.com Memcached Client BeIT Which one should I use? It seems like the enyim port has more active development, but I wanted to see what you guys recommend.
When it comes to using Memcached in a C# / ASP.NET application, the choice of library can indeed influence both performance and development experience. Here’s a brief overview of the options you mentioned: 1. **Memcacheddotnet**: This is a simple and lightweight client for Memcached. It has been around for a while and...
35,509
[ { "from": "human", "value": "I've noticed there are a few solutions to allow the use of memcached on C# / ASP.NET:\n\nmemcacheddotnet\nenyim.com Memcached Client\nBeIT\n\nWhich one should I use? It seems like the enyim port has more active development, but I wanted to see what you guys recommend.\n" }, ...
How do I write the CC logo in HTML, is there something like &copy; (which gives ©)? (CC stands for Creative Commons).
In HTML, there isn't a predefined character entity like `&copy;` for the Creative Commons (CC) logo. However, you can use SVG (Scalable Vector Graphics) or an image file to display the CC logo. ### Option 1: Using an SVG You can directly embed the SVG code for the Creative Commons logo. Here’s an example: ```html <!...
33,600
[ { "from": "human", "value": "How do I write the CC logo in HTML, is there something like &copy; (which gives ©)?\n(CC stands for Creative Commons).\n" }, { "from": "gpt", "value": "In HTML, there isn't a predefined character entity like `&copy;` for the Creative Commons (CC) logo. However, you c...
What is the best option for a windows application that uses SQL server authentication? Should I create a single SQL account and manage the users inside the application (using a users table). Or should I create a SQL server account for each user. What is your experience? Thank you!
When designing a Windows application that utilizes SQL Server authentication, you generally have two main approaches: using a single SQL Server account for all users and managing their access within your application, or creating individual SQL Server accounts for each user. Here's a breakdown of both approaches and som...
30,229
[ { "from": "human", "value": "What is the best option for a windows application that uses SQL server authentication? Should I create a single SQL account and manage the users inside the application (using a users table). Or should I create a SQL server account for each user. What is your experience? Thank yo...
I am trying to find out why a Java EE client (stand alone Java program that uses jbossall-client.jar) is failing to connect to a Java EE Server so it would be good to enable logging that occurs from within JBoss AS classes such as org.jnp.interfaces.NamingContext - presume there is a config file I can set up? Just for ...
To enable logging for JBoss (now known as WildFly), including classes like `org.jnp.interfaces.NamingContext`, you typically need to modify the logging configuration. The process can differ slightly depending on the version of JBoss you are using, but generally follows a similar pattern. Below, I'll provide steps to se...
32,702
[ { "from": "human", "value": "I am trying to find out why a Java EE client (stand alone Java program that uses jbossall-client.jar) is failing to connect to a Java EE Server so it would be good to enable logging that occurs from within JBoss AS classes such as org.jnp.interfaces.NamingContext - presume there...
I have the following interface: internal interface IRelativeTo<T> where T : IObject { T getRelativeTo(); void setRelativeTo(T relativeTo); } and a bunch of classes that (should) implement it, such as: public class AdminRateShift : IObject, IRelativeTo<AdminRateShift> { AdminRateShift getRelativeTo(); v...
In C#, when you're dealing with generics and interfaces, you can run into situations where you need to work with different implementations that have similar interfaces but with different type parameters. Given your example, you want to be able to work with all classes implementing `IRelativeTo<T>` where `T` is a subtyp...
33,111
[ { "from": "human", "value": "I have the following interface:\ninternal interface IRelativeTo<T> where T : IObject\n{\n T getRelativeTo();\n void setRelativeTo(T relativeTo);\n}\n\nand a bunch of classes that (should) implement it, such as:\npublic class AdminRateShift : IObject, IRelativeTo<AdminRateS...
I'm using the Lengauer and Tarjan algorithm with path compression to calculate the dominator tree for a graph where there are millions of nodes. The algorithm is quite complex and I have to admit I haven't taken the time to fully understand it, I'm just using it. Now I have a need to calculate the dominator trees of th...
Your use case of calculating dominator trees in a large directed graph, especially one derived from Java heap analysis, certainly presents interesting challenges. Given your desire to compute dominator trees for direct children of a specific node without starting from scratch each time, I think there is an approach tha...
31,236
[ { "from": "human", "value": "I'm using the Lengauer and Tarjan algorithm with path compression to calculate the dominator tree for a graph where there are millions of nodes. The algorithm is quite complex and I have to admit I haven't taken the time to fully understand it, I'm just using it. Now I have a ne...
I would like to use an ajax toolkit/framework like ZK (www.zkoss.org) or GWT. But I don't know whether it's possible to bundle resources in a JAR? Do you know which one support such resource loading?
Both ZK and GWT (Google Web Toolkit) support bundling resources in a JAR file, but they do so in slightly different ways. ### ZK Framework In ZK, you can bundle resources such as CSS, JavaScript, images, and other files in a JAR. Here's how it typically works: 1. **Packaging**: When you create a JAR file for your ZK ...
32,605
[ { "from": "human", "value": "I would like to use an ajax toolkit/framework like ZK (www.zkoss.org) or GWT. But I don't know whether it's possible to bundle resources in a JAR? Do you know which one support such resource loading?\n" }, { "from": "gpt", "value": "Both ZK and GWT (Google Web Toolki...
In db2 a query with a 'with ur' clause allows the query to be an uncommitted read and so does the 'with nolock' clause in mysql. Is there such an option in oracle too... If not why??
In Oracle, there is no direct equivalent to the `WITH UR` clause used in Db2 or the `WITH NOLOCK` option used in MySQL. The reason for this difference lies in Oracle's underlying architecture and its approach to concurrency and consistency. ### Oracle's Concurrency Model Oracle uses a multi-version concurrency contro...
32,185
[ { "from": "human", "value": "In db2 a query with a 'with ur' clause allows the query to be an uncommitted read and so does the 'with nolock' clause in mysql. Is there such an option in oracle too... If not why??\n" }, { "from": "gpt", "value": "In Oracle, there is no direct equivalent to the `WI...
I'm starting to create a proof of concept for an idea I have, and at this point, I need some guidance as to how I should begin. I need to sample the microphone input, and process that signal in real-time (think Auto-Tune, but working live), as opposed to "recording" for a while. What I'm doing is "kind of" a "mic input...
Creating a real-time audio processing application like a microphone input to MIDI converter is an exciting project! Here’s a step-by-step approach to getting started, along with insights on using the WaveIn and DirectSound APIs. ### Step 1: Choose the Right API 1. **WaveIn API**: This API allows you to capture audio f...
32,545
[ { "from": "human", "value": "I'm starting to create a proof of concept for an idea I have, and at this point, I need some guidance as to how I should begin.\nI need to sample the microphone input, and process that signal in real-time (think Auto-Tune, but working live), as opposed to \"recording\" for a whi...
I'm using linq to pull back an object (i.e. customer) that might have a collection of other objects(customer.orders). I would be nice if I can pass this list of customers to the ultragrid and a hierarchical view of customers and thier orders displayed on databind. When I try this, I just get customers. Anyone know h...
To display hierarchical data such as customers and their orders in an UltraGrid from Infragistics, you need to ensure that the UltraGrid is set up to understand that the relationship between customers and their orders is hierarchical. Below are the steps to achieve this using non-dataset objects. ### Steps to Bind Hie...
31,600
[ { "from": "human", "value": "I'm using linq to pull back an object (i.e. customer) that might have a collection of other objects(customer.orders). I would be nice if I can pass this list of customers to the ultragrid and a hierarchical view of customers and thier orders displayed on databind. When I try t...
I have a program that I need to run under *nix and windows. because the program takes file paths from files the issue is what to do about the \ vs / issue. My current thought is to put in a regex that converts the wrong one to the right one depending on what system I'm on. This will have the effect of letting either t...
Your approach of using regex to convert file paths depending on the operating system can work, but it may introduce complexity and potential errors, especially if there are edge cases that your regex doesn't handle properly. Here are some considerations and alternative solutions to handle file paths in a cross-platform...
34,572
[ { "from": "human", "value": "I have a program that I need to run under *nix and windows. because the program takes file paths from files the issue is what to do about the \\ vs / issue. \nMy current thought is to put in a regex that converts the wrong one to the right one depending on what system I'm on. Th...
I tried the example from Rails Cookbook and managed to get it to work. However the text_field_with_auto_complete works only for one value. class Expense < ActiveRecord::Base has_and_belongs_to_many :categories end In the New Expense View rhtml <%= text_field_with_auto_complete :category, :name %> Auto complete work...
To implement a multiple value autocomplete field similar to the tags input in StackOverflow, you'll need to make some adjustments to the way you're using the `text_field_with_auto_complete` and handle the input updates manually. Here's a basic outline of how you can achieve that: ### Step 1: Modify Your View Instead...
34,392
[ { "from": "human", "value": "I tried the example from Rails Cookbook and managed to get it to work. However the text_field_with_auto_complete works only for one value.\nclass Expense < ActiveRecord::Base\n has_and_belongs_to_many :categories\nend\n\nIn the New Expense View rhtml\n<%= text_field_with_auto_c...
I'm looking for the best way to tell if an <mx:Image> has already fired the 'Event.COMPLETE' event. I want to do something if it has shown, or attach an event handler if it hasnt yet. something like : if (newBackground.percentLoaded < 100) or if (newBackground.content != null) i was originally doing newBackground.co...
In your case, to determine whether an `<mx:Image>` has already fired the `Event.COMPLETE` event, you can use a combination of the `percentLoaded` property and an event listener. To avoid potential race conditions and cross-domain issues, you can implement a solution that works even if the image is loaded before you att...
34,556
[ { "from": "human", "value": "I'm looking for the best way to tell if an <mx:Image> has already fired the 'Event.COMPLETE' event. I want to do something if it has shown, or attach an event handler if it hasnt yet.\nsomething like :\nif (newBackground.percentLoaded < 100) \n\nor\nif (newBackground.content != ...
My project uses Java libraries that have their own dependencies (Hadoop, Jetty for example). I end up with different versions of the same dependencies, like ant 1.4.5, 1.4.6. My project may want to use ant 1.4.7. This is a small example, can get more complicated with larger dependencies like HTTP Commons. How do I g...
Managing dependencies in a Java project, especially when dealing with multiple libraries that might rely on different versions of the same dependencies, can indeed become complex. Here are some strategies and tools you can use to resolve dependency conflicts and isolate libraries effectively: ### 1. Use Dependency Man...
30,961
[ { "from": "human", "value": "My project uses Java libraries that have their own dependencies (Hadoop, Jetty for example). I end up with different versions of the same dependencies, like ant 1.4.5, 1.4.6. My project may want to use ant 1.4.7. This is a small example, can get more complicated with larger d...
I have a DateTime object that I need to print in a custom gridlike control. The type of the data I want to print is a date in the format dd-mm-yyyy. This value can be either filled or blank. If it's filled it will be parsed into a DateTime and then printed as the default ToString. For each row, I can use <CellTemplate>...
Yes, you can use the `Eval` method along with a conditional expression to check if the value is an empty string before converting it to a `DateTime`. Instead of directly using `Convert.ToDateTime(Container.Value)`, you can implement a conditional logic that will determine whether to convert the value or return an empty...
36,759
[ { "from": "human", "value": "I have a DateTime object that I need to print in a custom gridlike control.\nThe type of the data I want to print is a date in the format dd-mm-yyyy.\nThis value can be either filled or blank.\nIf it's filled it will be parsed into a DateTime and then printed as the default ToSt...
I have a very simple question. I want to test whether a particular port is currently under use or not. For this, I want to bind a TCP socket to the port, if the connection is refused means the port is in use and if not that mean the port is free. Can someone please tell me how can I write the TCP socket code in C? I am...
To test whether a specific TCP port is in use or free in C on a Solaris platform, you can create a socket and attempt to bind it to the desired port. If the bind operation is successful, it means the port is free; if it fails with an error indicating that the address is already in use, the port is occupied. Here's a s...
29,926
[ { "from": "human", "value": "I have a very simple question. I want to test whether a particular port is currently under use or not. For this, I want to bind a TCP socket to the port, if the connection is refused means the port is in use and if not that mean the port is free.\nCan someone please tell me how ...
Does anyone know if there is an equivalent to .htaccess and .htpassword for IIS ? I am being asked to migrate an app to IIS that uses .htaccess to control access to sets of files in various URLs based on the contents of .htaccess files. I did a google search and didn't turn up anything conclusive. Is there a general a...
In IIS (Internet Information Services), there isn't a direct equivalent to the `.htaccess` and `.htpasswd` files used in Apache. However, IIS provides a different way to achieve similar functionality through its configuration files and built-in features. Here's how you can handle access control and URL rewriting in IIS...
29,964
[ { "from": "human", "value": "Does anyone know if there is an equivalent to .htaccess and .htpassword for IIS ? I am being asked to migrate an app to IIS that uses .htaccess to control access to sets of files in various URLs based on the contents of .htaccess files. \nI did a google search and didn't turn up...
I'm converting my applications to Delphi 2009 and faced an intriguing issue with some calls that need to convert a string (wide) to AnsiString. Here's an example to demonstrate the issue I'm having: var s: PAnsiChar; ... s := PAnsiChar(Application.ExeName); With Delphi 2007 and previous versions, s := PChar(Applic...
In Delphi 2009, the handling of strings has changed significantly due to the introduction of Unicode strings (`UnicodeString`) for the `string` type, while `AnsiString` is still available for backward compatibility. This affects how you convert between string types, especially when dealing with pointers. Your issue ar...
35,032
[ { "from": "human", "value": "I'm converting my applications to Delphi 2009 and faced an intriguing issue with some calls that need to convert a string (wide) to AnsiString.\nHere's an example to demonstrate the issue I'm having:\nvar\n s: PAnsiChar;\n\n...\n\ns := PAnsiChar(Application.ExeName);\n\nWith De...
If you use a GUID as a password for a publicly facing application as a means to gain access to a service, is this security through obscurity? I think the obvious answer is yes, but the level of security seems very high to me since the chances of guessing a GUID is very very low correct? Update The GUID will be stored i...
Using a GUID (Globally Unique Identifier) as a password for a publicly facing application does indeed present some level of security through obscurity. While GUIDs are designed to be unique and the probability of guessing one is extremely low, relying solely on their uniqueness and obscurity can be problematic for seve...
34,710
[ { "from": "human", "value": "If you use a GUID as a password for a publicly facing application as a means to gain access to a service, is this security through obscurity?\nI think the obvious answer is yes, but the level of security seems very high to me since the chances of guessing a GUID is very very low...
I'm interested to know if there's any sites out there that has implemented CardSpace as an alternative authentication. I certainly like to see how different it is from, say, using OpenID.
CardSpace, developed by Microsoft, was designed to provide a more secure way of managing identities online by allowing users to store their personal information in a "virtual wallet" and choose which information to share with websites. However, it didn't gain widespread adoption compared to other authentication systems...
35,729
[ { "from": "human", "value": "I'm interested to know if there's any sites out there that has implemented CardSpace as an alternative authentication. I certainly like to see how different it is from, say, using OpenID.\n" }, { "from": "gpt", "value": "CardSpace, developed by Microsoft, was design...
(This is a question about the UI rather than the technology required to do it) What is the clearest way to display a time for events occurring in different timezones to a user? Does your "average" user understand UTC and timezones? We capture the local time and UTC offset and store it in the database (SQL 2008 DateTime...
Displaying event times across different timezones can be challenging, especially when your users are located in various regions and need to discuss the same events. Given your requirements, here are some clear ways to display time without relying on the user's local timezone: ### Suggestions for Displaying Time 1. **...
32,893
[ { "from": "human", "value": "(This is a question about the UI rather than the technology required to do it)\nWhat is the clearest way to display a time for events occurring in different timezones to a user? Does your \"average\" user understand UTC and timezones?\nWe capture the local time and UTC offset an...
What is a fairly standard way for storing application settings, mainly for windows but also easy to move over to other platforms. There's basically 4 groups of settings I want to have: Global settings, affects all users, and may be moved between machines Global system settings, affects all users, but specific to that ...
When designing a settings storage solution for an application that works across multiple platforms (Windows, macOS, and Linux), you want to balance ease of access, organization, and user-friendliness. Your idea of using files (like INI or XML) rather than the Windows Registry is a good one, especially for compatibility...
32,638
[ { "from": "human", "value": "What is a fairly standard way for storing application settings, mainly for windows but also easy to move over to other platforms.\nThere's basically 4 groups of settings I want to have:\n\nGlobal settings, affects all users, and may be moved between machines\nGlobal system setti...
I'm using the MonthCalendar control and want to programmatically select a date range. When I do so the control doesn't paint properly if Application.EnableVisualStyles() has been called. This is a known issue according to MSDN. Using the MonthCalendar with visual styles enabled will cause a selection range for th...
The issue you're encountering with the `MonthCalendar` control and its rendering of the selection range when `Application.EnableVisualStyles()` is called is indeed a known limitation in Windows Forms. While this can be frustrating, there are a few potential workarounds you might consider: 1. **Custom Painting**: You c...
31,977
[ { "from": "human", "value": "I'm using the MonthCalendar control and want to programmatically select a date range. When I do so the control doesn't paint properly if Application.EnableVisualStyles() has been called. This is a known issue according to MSDN. \n\nUsing the MonthCalendar with visual\n styles e...
How can I set the font used by the FLVPlaybackCaptioning component for subtitles? Using the style property of the textarea does nothing, and using a TextFormat makes the text go blank, even though the font had been embedded.
To set the font used by the `FLVPlaybackCaptioning` component in ActionScript, you typically need to embed the font and then use the `TextFormat` to apply it to your captions. However, since you've encountered an issue where the text goes blank, let's go through the necessary steps to ensure it works correctly. ### St...
32,329
[ { "from": "human", "value": "How can I set the font used by the FLVPlaybackCaptioning component for subtitles? Using the style property of the textarea does nothing, and using a TextFormat makes the text go blank, even though the font had been embedded.\n" }, { "from": "gpt", "value": "To set t...
To summarise the issue: Retrieving strings in Java 1.5 (JDBC) works fine when the DB encoding is Western ISO 8859-2 When switching to an Eastern European ISO (e.g. ISO 8859-5), all the normal JDBC string conversions work, except the ones involving Oracle collections, e.g. nested tables of objects. Instead of proper st...
The issue you're experiencing with JDBC and Oracle collections when using ISO 8859-5 encoding could be attributed to several factors, including character encoding mismatches between your database, your JDBC driver, and your Java application. Here are some steps and suggestions to help you troubleshoot and resolve the p...
32,474
[ { "from": "human", "value": "To summarise the issue:\n\nRetrieving strings in Java 1.5 (JDBC) works fine when the DB encoding is Western ISO 8859-2\nWhen switching to an Eastern European ISO (e.g. ISO 8859-5), all the normal JDBC string conversions work, except the ones involving Oracle collections, e.g. ne...
What good components and packages are available for generating HTML reports based on report definitions? I have a truly horrific project where each report is a dedicated aspx page that builds one fantastically big HTML string, which it then assigns to a 'reportBody' Label control. Standard grids are not a good solutio...
Generating HTML reports can be complex, especially if you're transitioning from a setup like the one you described, with large ASP.NET pages generating HTML strings manually. Fortunately, there are several libraries, components, and reporting engines that can help you create structured and maintainable reports with fea...
34,150
[ { "from": "human", "value": "What good components and packages are available for generating HTML reports based on report definitions? I have a truly horrific project where each report is a dedicated aspx page that builds one fantastically big HTML string, which it then assigns to a 'reportBody' Label contr...
I've seen a lot of discussion on URL Routing, and LOTS of great suggestions... but in the real world, one thing I haven't seen discussed are: Creating Friendly URLs with Spaces and illegal characters Querying the DB Say you're building a Medical site, which has Articles with a Category and optional Subcategory. (1 ...
Handling URL routing, especially with long titles that include spaces and illegal characters, can be tricky. Let's break down your questions into actionable steps and discuss the pros and cons of each approach. ### 1. **Creating Friendly URLs with Spaces and Illegal Characters** #### **Encoding and Normalization** To...
32,888
[ { "from": "human", "value": "I've seen a lot of discussion on URL Routing, and LOTS of great suggestions... but in the real world, one thing I haven't seen discussed are: \n\nCreating Friendly URLs with Spaces and illegal characters \nQuerying the DB\n\nSay you're building a Medical site, which has Articles...
How to format numbers in JavaScript? JavaScript culture sensitive currency formatting
In JavaScript, you can format numbers using the `Intl.NumberFormat` object, which provides a way to format numbers, including currency, in a locale-sensitive manner. This is especially useful for creating applications that need to display numbers in a way that adheres to regional formatting conventions. ### Formatting...
31,612
[ { "from": "human", "value": "How to format numbers in JavaScript?\n\n\nJavaScript culture sensitive currency formatting\n\n" }, { "from": "gpt", "value": "In JavaScript, you can format numbers using the `Intl.NumberFormat` object, which provides a way to format numbers, including currency, in a ...
Problem I've got a collection of IThings and I'd like to create a HierarchicalDataTemplate for a TreeView. The straightforward DataType={x:Type local:IThing} of course doesn't work, probably because the WPF creators didn't want to handle the possible ambiguities. Since this should handle IThings from different sources ...
When working with `IThing` and needing to create a `HierarchicalDataTemplate` for a `TreeView` in WPF, you indeed run into issues with the use of interfaces directly in XAML because XAML doesn't understand how to handle interfaces. Your current solution of using a ViewModel (`IThingViewModel`) that wraps `IThing` is a...
33,029
[ { "from": "human", "value": "Problem\nI've got a collection of IThings and I'd like to create a HierarchicalDataTemplate for a TreeView. The straightforward DataType={x:Type local:IThing} of course doesn't work, probably because the WPF creators didn't want to handle the possible ambiguities.\nSince this sh...
What are the established coding standards for JavaScript?
Established coding standards for JavaScript help ensure that code is consistent, readable, and maintainable. While there isn't a single universally accepted standard, several popular style guides and best practices are widely adopted in the JavaScript community. Here are some key points and well-known style guides: ##...
32,227
[ { "from": "human", "value": "What are the established coding standards for JavaScript?\n" }, { "from": "gpt", "value": "Established coding standards for JavaScript help ensure that code is consistent, readable, and maintainable. While there isn't a single universally accepted standard, several p...
hi i forgot the code which in a sample class you have to add so that it runs automatically? is it wakeup or something? like so: class something { function automaticxxx_something_which_runs when class is created() { } } $s = new something(); -what do i create in the class file so that something runs already after ...
In PHP, to have a method automatically run when an instance of a class is created, you should use the class constructor method. The constructor method is defined using the `__construct()` magic method. Here’s how you can do it: ```php class Something { function __construct() { // This code will run automat...
36,070
[ { "from": "human", "value": "hi i forgot the code which in a sample class you have to add so that it runs automatically?\nis it wakeup or something?\nlike so:\nclass something {\n function automaticxxx_something_which_runs when class is created()\n {\n }\n}\n\n$s = new something(); \n\n-what do i create in ...
Google offers various libraries for interfacing with the Google Data APIs. Currently these do not include Delphi (Win32) support. Has anyone done any work on a Delphi interface to Google Data, or the underlying Atom/AtomPub protocols?
As of my last knowledge update in October 2023, there isn't an official Google-provided Delphi library for interfacing with the Google Data APIs or the underlying Atom/AtomPub protocols. However, there are a few options you might consider for creating a Delphi interface to these APIs: 1. **Third-Party Libraries**: Som...
36,073
[ { "from": "human", "value": "Google offers various libraries for interfacing with the Google Data APIs. Currently these do not include Delphi (Win32) support.\nHas anyone done any work on a Delphi interface to Google Data, or the underlying Atom/AtomPub protocols?\n" }, { "from": "gpt", "value"...
The JUnit framework contains 2 Assert classes (in different packages, obviously) and the methods on each appear to be very similar. Can anybody explain why this is? The classes I'm referring to are: junit.framework.Assert and org.junit.Assert.
The presence of two different `Assert` classes in JUnit, namely `junit.framework.Assert` and `org.junit.Assert`, can be attributed to the evolution of the JUnit framework over time. 1. **JUnit 3 vs. JUnit 4:** - `junit.framework.Assert` is part of JUnit 3, which was the earlier version of the framework. In JUnit 3,...
35,263
[ { "from": "human", "value": "The JUnit framework contains 2 Assert classes (in different packages, obviously) and the methods on each appear to be very similar. Can anybody explain why this is?\nThe classes I'm referring to are: junit.framework.Assert and org.junit.Assert.\n" }, { "from": "gpt", ...
Here's my problem: I have a virtual method defined in a .h file that I want to call in a class that inherits from the base class. Sadly though, the method in the derived class doesn't get called. Is there a better way to implement what I'm trying to do? #ifndef ofxBASE_SND_OBJ #define ofxBASE_SND_OBJ #include "ofConst...
The issue you're encountering arises from how you're passing the base class object to your `createFilter` function. When you pass an object of the base class by value (i.e., `ofxBaseSndObj obj`), it slices the derived class information. In other words, the derived class (`ofxSOBuzz`) is converted into a base class (`of...
33,137
[ { "from": "human", "value": "Here's my problem: I have a virtual method defined in a .h file that I want to call in a class that inherits from the base class. Sadly though, the method in the derived class doesn't get called. Is there a better way to implement what I'm trying to do?\n#ifndef ofxBASE_SND_OBJ\...
I cannot find the translated file after running the solution in BizTalk 2006 Tutorial Lesson 3: Run the EDI-to-XML Solution. It should be placed in the c:\Program Files\Microsoft BizTalk Server 2006 \EDI\Adapter\Getting Started with EDI\Northwind\In folder. The Base EDI adapter picks up the file in c:\Documents and Se...
If you're unable to find the translated EDI file after completing the tutorial in BizTalk 2006, here are several steps you can take to troubleshoot the issue: 1. **Check the Output Location**: Ensure that you are looking in the correct output folder, which should be `C:\Program Files\Microsoft BizTalk Server 2006\EDI\...
34,943
[ { "from": "human", "value": "I cannot find the translated file after running the solution in BizTalk 2006 Tutorial Lesson 3: Run the EDI-to-XML Solution. \nIt should be placed in the c:\\Program Files\\Microsoft BizTalk Server 2006 \\EDI\\Adapter\\Getting Started with EDI\\Northwind\\In folder.\nThe Base ED...
I got some legacy code with that caption spread out as comment almost in every field. Also appearing is "Setter for property xyz". Just out of curiosity, which Java tool generated this stubs?
The comments you're seeing in the legacy code, such as "Setter for property xyz," are typically generated by a Java tool called **Javadoc**. Specifically, these comments are often the result of using automated tools or frameworks that generate boilerplate code for Java classes, particularly for JavaBeans, which use the...
37,214
[ { "from": "human", "value": "I got some legacy code with that caption spread out as comment almost in every field. Also appearing is \"Setter for property xyz\". \nJust out of curiosity, which Java tool generated this stubs?\n" }, { "from": "gpt", "value": "The comments you're seeing in the lega...
I'm trying to compile and run a sample bonjour program apple provides in the BonjourSDK found here: http://developer.apple.com/networking/bonjour/index.html The program is called SimpleChat.java. However, whenever I attempt to compile the program I get this error: "SimpleChat.java:55: package com.apple.dnssd does not e...
The error message you're encountering suggests that the `com.apple.dnssd` package is not available in your classpath. This package is part of the Bonjour SDK for Java, which you need to include when compiling and running the `SimpleChat.java` program. Here's a step-by-step guide on how to resolve this issue: 1. **Dow...
35,260
[ { "from": "human", "value": "I'm trying to compile and run a sample bonjour program apple provides in the BonjourSDK found here:\nhttp://developer.apple.com/networking/bonjour/index.html\nThe program is called SimpleChat.java. However, whenever I attempt to compile the program I get this error:\n\"SimpleCha...
I have an application where every now and then I'm getting a strange error. This is the piece of code: Dim XMLWriter As New System.Xml.XmlTextWriter(Me.Context.Response.OutputStream, Encoding.UTF8) XMLWriter.WriteStartDocument() XMLWriter.WriteStartElement("Status") Message.SerializeToXML(XMLWriter) XMLWriter.WriteEn...
The error you're experiencing (`Object reference not set to an instance of an object`) during the `XMLWriter.Flush()` call is indeed likely related to the state of the `Response.OutputStream`. Given the context of your application (a long-polling server), there are several scenarios that could lead to the `OutputStream...
32,646
[ { "from": "human", "value": "I have an application where every now and then I'm getting a strange error.\nThis is the piece of code:\nDim XMLWriter As New System.Xml.XmlTextWriter(Me.Context.Response.OutputStream, Encoding.UTF8)\nXMLWriter.WriteStartDocument()\nXMLWriter.WriteStartElement(\"Status\")\n\nMes...
What site(s) do you recommend for looking at complimentary colors for site design? It would also be beneficial to enter a hex or RGB value and have the color wheel spit back complimentary colors. Most popular: Kuler Others in alphabetical order: 4096 Color Wheel Allprofitallfree - color-wheel2 Color Wheel v1.2 Javas...
Here are some recommended sites for finding complementary colors for site design, including those that allow you to enter a hex or RGB value: ### Most Popular: 1. **Adobe Color (formerly Kuler)** - A very popular tool for generating color palettes. You can input a hex value and find complementary colors, as well as ex...
28,489
[ { "from": "human", "value": "What site(s) do you recommend for looking at complimentary colors for site design? It would also be beneficial to enter a hex or RGB value and have the color wheel spit back complimentary colors.\nMost popular:\n\nKuler\n\nOthers in alphabetical order:\n\n4096 Color Wheel\nAllpr...
Came across this: http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp And wondering if this is the right solution as I am not that big of a fan of creating a class for every stored procedure or do I use Enterprise Library for ASP.net 2.0 project.
When deciding between using a code generator for ADO.NET or leveraging a library like the Enterprise Library for your ASP.NET 2.0 project, there are several factors to consider: ### 1. **Code Maintenance and Complexity** - **Code Generation**: Automatically generating data access code for each stored procedure can ...
32,868
[ { "from": "human", "value": "Came across this:\nhttp://www.eggheadcafe.com/articles/adonet_source_code_generator.asp\nAnd wondering if this is the right solution as I am not that big of a fan of creating a class for every stored procedure or do I use Enterprise Library for ASP.net 2.0 project.\n" }, { ...
Say I have this simple form: class ContactForm(forms.Form): first_name = forms.CharField(required=True) last_name = forms.CharField(required=True) And I have a default value for one field but not the other. So I set it up like this: default_data = {'first_name','greg'} form1=ContactForm(default_data) However...
In Django forms, if you want to set a default value for a field when initially rendering the form but still enforce validation on that field when the form is submitted, you can pass the `initial` argument to the form instead of `data`. The `initial` argument allows you to specify values that should be prefilled in the ...
35,187
[ { "from": "human", "value": "Say I have this simple form:\nclass ContactForm(forms.Form):\n first_name = forms.CharField(required=True)\n last_name = forms.CharField(required=True)\n\nAnd I have a default value for one field but not the other. So I set it up like this:\ndefault_data = {'first_name','...
Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005? Visual Studio 2005 has already been purchased, the company wants to move away from the Borland/Codegear tools. The application is a single client server executable, utilizing a number of 3rd party UI controls and...
Migrating a Delphi 7 application to .NET can be a complex and challenging process, especially considering the application’s architecture, the involvement of third-party controls, and the existing logic embedded in stored procedures. Here are some steps and considerations that may help you navigate the migration process...
31,397
[ { "from": "human", "value": "Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005? \nVisual Studio 2005 has already been purchased, the company wants to move away from the Borland/Codegear tools.\nThe application is a single client server executable, util...
Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object? If there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )?
In the .NET Framework, there isn't a built-in class specifically designed to throw an event when the current time matches a specified `DateTime` object. However, you can implement this functionality using existing classes and practices. Here are some common approaches: ### 1. Using a Timer While you mentioned a timer...
30,536
[ { "from": "human", "value": "Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object?\nIf there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )?\n" }, { ...
I have a list of strings displayed by a Silverlight ItemsControl. The DataTemplate is a Border control with a TextBlock as its child. How can I access the border control corresponding to an item? For example, I might want to do this to change the background color.
In Silverlight, if you want to access the `Border` control corresponding to a specific item in an `ItemsControl`, you can do so by leveraging the `ItemContainerGenerator` and `VisualTreeHelper` classes. Here’s a general approach you can follow: 1. **Get the Container for the Item**: Use the `ItemContainerGenerator` to...
35,138
[ { "from": "human", "value": "I have a list of strings displayed by a Silverlight ItemsControl. The DataTemplate is a Border control with a TextBlock as its child. How can I access the border control corresponding to an item? For example, I might want to do this to change the background color.\n" }, {...
They are specially annoying when I need to upload to the server a web solution. Is there a way of configuring SVN to create the _svn folders outside my working directory? If not, what is the best way to deal with them when you need to copy only the code? Update: Using "svn export" command is problematic because there a...
SVN (Subversion) does not provide a built-in configuration option to move the `_svn` folders outside of your working directory. The `_svn` directories are part of how SVN manages metadata related to your working copy. However, there are several strategies you can use to handle your situation: ### 1. Use `svn export` w...
31,958
[ { "from": "human", "value": "They are specially annoying when I need to upload to the server a web solution.\nIs there a way of configuring SVN to create the _svn folders outside my working directory?\nIf not, what is the best way to deal with them when you need to copy only the code?\nUpdate: Using \"svn e...
I have a command line Ruby app I'm developing and I want to allow a user of it to provide code that will run as a filter on part of the process. Basically, the application does this: read in some data If a filter is specified, use it to filter data process the data I want the filtering process (step 2) to be as flex...
Your approach to allowing users to provide custom filters is a good start. However, there are indeed alternative idioms in Ruby that can provide a more idiomatic way to achieve flexibility while keeping your code clean and maintainable. Here are a few suggestions to enhance your filtering mechanism: ### 1. Using Procs...
32,687
[ { "from": "human", "value": "I have a command line Ruby app I'm developing and I want to allow a user of it to provide code that will run as a filter on part of the process. Basically, the application does this:\n\nread in some data\nIf a filter is specified, use it to filter data\nprocess the data\n\nI wa...
With squid, we can cache webpages. I am not sure if it provides the same number of caching methods as ASP.NET caching (I primarily use ASP.NET), but it's a tool to cache webpages. Then we have memcached, which can cache database tables. I believe this is correct, and it is like SqlCacheDependency (correct me if I am wr...
Yes, there are scenarios in large web applications where using **memcached**, **Squid**, and **application-level caching** (like ASP.NET caching) together can be beneficial. Each caching mechanism serves different purposes and operates at different layers of the application architecture. ### Overview of Each Caching M...
33,344
[ { "from": "human", "value": "With squid, we can cache webpages. I am not sure if it provides the same number of caching methods as ASP.NET caching (I primarily use ASP.NET), but it's a tool to cache webpages.\nThen we have memcached, which can cache database tables. I believe this is correct, and it is like...
I used to work with VWD and now I try to install the new MVC-Beta on VS2008. Installation completes successfully but when I try to create an MVC web site I don't have it on the projects list. How can I fix it? I've uninstalled VWD and MVC preview 5, tried to install several times the beta framework.
To fix the issue of not being able to see the MVC option in Visual Studio 2008 after installing MVC Beta, you can follow these steps: 1. **Ensure Compatibility**: First, verify that you are using a version of the MVC framework that is compatible with Visual Studio 2008. The MVC 1 and MVC 2 releases were compatible wit...
32,614
[ { "from": "human", "value": "I used to work with VWD and now I try to install the new MVC-Beta on VS2008.\nInstallation completes successfully but when I try to create an MVC web site I don't have it on the projects list. How can I fix it? \nI've uninstalled VWD and MVC preview 5, tried to install several t...
You sometimes hear it said about Perl that there might be 6 different ways to approach the same problem. Good Perl developers usually have well-reasoned insights for making choices between the various possible methods of implementation. So an example Perl problem: A simple script which recursively iterates through a d...
When tackling the problem of recursively iterating through a directory structure to find files modified after a certain date in Perl, there are several methods you can choose from. Here’s a way to approach this problem using well-established Perl practices, along with some reasoning behind the choices made. ### Step-b...
27,065
[ { "from": "human", "value": "You sometimes hear it said about Perl that there might be 6 different ways to approach the same problem. Good Perl developers usually have well-reasoned insights for making choices between the various possible methods of implementation.\nSo an example Perl problem:\nA simple sc...
Are there any other ways to avoid LazyInitializationExceptions in a Hibernate web application besides using the OpenSessionInView pattern? Are there any downsides to using OpenSessionInView?
Yes, there are several ways to avoid `LazyInitializationException` in a Hibernate web application besides using the OpenSessionInView (OSIV) pattern. Here are some alternatives: ### 1. Eager Fetching You can configure your entity relationships to use eager fetching. This means that associated collections or entities a...
31,743
[ { "from": "human", "value": "Are there any other ways to avoid LazyInitializationExceptions in a Hibernate web application besides using the OpenSessionInView pattern? Are there any downsides to using OpenSessionInView?\n" }, { "from": "gpt", "value": "Yes, there are several ways to avoid `LazyI...
In Groovy, how do I grab a web page and remove HTML tags, etc., leaving only the document's text? I'd like the results dumped into a collection so I can build a word frequency counter. Finally, let me mention again that I'd like to do this in Groovy.
To grab a web page in Groovy and extract the text while removing HTML tags, you can use the `Jsoup` library, which is quite popular for parsing HTML. Below is a step-by-step guide to achieve your goal, including how to build a word frequency counter. 1. **Add Jsoup Dependency**: If you're using Gradle, add the followi...
32,215
[ { "from": "human", "value": "In Groovy, how do I grab a web page and remove HTML tags, etc., leaving only the document's text? I'd like the results dumped into a collection so I can build a word frequency counter.\nFinally, let me mention again that I'd like to do this in Groovy.\n" }, { "from": "g...
Do you know what implementation's of WS-ReliableMessaging for Axis 1.4 you have used?
Apache Axis 1.4 does not natively support WS-ReliableMessaging as it is a somewhat older version of the Axis web services framework. However, you can implement reliable messaging in Axis 1.4 applications by using additional libraries or custom implementations that adhere to the WS-ReliableMessaging specification. Some...
36,645
[ { "from": "human", "value": "Do you know what implementation's of WS-ReliableMessaging for Axis 1.4 you have used?\n" }, { "from": "gpt", "value": "Apache Axis 1.4 does not natively support WS-ReliableMessaging as it is a somewhat older version of the Axis web services framework. However, you ca...
The application is planned to be built using ASP.NET, .NET Remoting & MS SQL Server. High availability is required at presentation layer, application layer and database. Does IIS 7.0 provide any advantages over IIS 6.0 in regard to the High availability aspect?
Yes, IIS 7.0 provides several advantages over IIS 6.0, particularly in the context of high availability. Here are some key improvements and features in IIS 7.0 that can enhance high availability for your application: 1. **Improved Application Pool Isolation**: IIS 7.0 allows you to configure multiple application pools...
31,655
[ { "from": "human", "value": "The application is planned to be built using ASP.NET, .NET Remoting & MS SQL Server.\nHigh availability is required at presentation layer, application layer and database.\nDoes IIS 7.0 provide any advantages over IIS 6.0 in regard to the High availability aspect?\n" }, { ...
I'm trying to unit test a page in my ASP.NET MVC application that, when posted to, will delete a user's item. I want to restrict this page so that it can only be posted to by the owner of said item. Originally, I wanted to just stick a quick check in the controller that checked if the HttpContext.Current.User.Identit...
Yes, creating an interface to access the current logged-in user's identity is a great idea for improving testability and separation of concerns in your ASP.NET MVC application. Here’s a general approach you can follow: ### 1. Create an Interface Define an interface that encapsulates the logic for obtaining the curre...
33,485
[ { "from": "human", "value": "I'm trying to unit test a page in my ASP.NET MVC application that, when posted to, will delete a user's item. I want to restrict this page so that it can only be posted to by the owner of said item. Originally, I wanted to just stick a quick check in the controller that checke...
I have been enjoying learning the basics of python, but before I started reading things I tried to install various python versions and modules clumsily. Now that I have some ideas of what I want to do and how to do it I'm finding that various aspects are broken. For instance, 2.6 IDLE won't launch, and when I try to im...
It sounds like you have multiple versions of Python installed on your system, and this can lead to conflicts and confusion. Here are some steps you can follow to clean up your Python installations and start fresh: ### 1. Uninstall Unused Versions First, identify and uninstall any unused or broken versions of Python. ...
32,265
[ { "from": "human", "value": "I have been enjoying learning the basics of python, but before I started reading things I tried to install various python versions and modules clumsily. Now that I have some ideas of what I want to do and how to do it I'm finding that various aspects are broken. For instance, 2....
I'm using system catalog views such as SYS.ALL_ OBJECTS, SYS.FOREIGN_KEYS etc. to get information about my database structure in MS SQL 2005. Are there equivalent functions/views for MySQL (v. 5) servers?
Yes, MySQL has its own set of information schema tables and system database that you can use to retrieve metadata about your database structure. Here are some equivalents for the views you mentioned in SQL Server: 1. **All Objects**: In SQL Server, `SYS.ALL_OBJECTS` can be used to list all objects. In MySQL, you can u...
35,427
[ { "from": "human", "value": "I'm using system catalog views such as SYS.ALL_ OBJECTS, SYS.FOREIGN_KEYS etc. to get information about my database structure in MS SQL 2005. \nAre there equivalent functions/views for MySQL (v. 5) servers? \n" }, { "from": "gpt", "value": "Yes, MySQL has its own set...
In an actionscript function (method) I have access to arguments.caller which returns a Function object but I can't find out the name of the function represented by this Function object. Its toString() simply returns [Function] and I can't find any other useful accessors that give me that... Help :-/
In ActionScript, there is no straightforward way to get the name of a function from the `Function` object using the `arguments.caller`. The `toString()` method typically returns `[Function]`, and there aren’t built-in properties that expose the name of the function directly. However, you can work around this limitati...
31,339
[ { "from": "human", "value": "In an actionscript function (method) I have access to arguments.caller which returns a Function object but I can't find out the name of the function represented by this Function object. \nIts toString() simply returns [Function] and I can't find any other useful accessors that g...
I'm attempting to authenticate a user against ADAM using a user I created in ADAM. However, regardless of the password used (correct, or incorrect), my search comes back with a valid DirectoryEntry object. I would assume that if the password is invalid, then the search would come back with a null object. Are my assu...
Your understanding of how LDAP authentication works is generally correct; however, there are a few important nuances and potential flaws in your code that can lead to the behavior you're observing. Let's break down the code and see where adjustments might be necessary. ### Key Points 1. **DirectoryEntry and Authentic...
34,749
[ { "from": "human", "value": "I'm attempting to authenticate a user against ADAM using a user I created in ADAM. However, regardless of the password used (correct, or incorrect), my search comes back with a valid DirectoryEntry object. I would assume that if the password is invalid, then the search would c...
I've got an unmanaged Linux VPS running ubuntu that I'm using for the web server for a personal website. I'd like to get a barebones email server up and running. All the installation guides I've found so far are for a full-fledged email server with a webmail interface and everything. That's a lot more than I need. ...
To set up a barebones email server on your Ubuntu VPS that can send emails and forward all incoming emails to your personal Gmail account, you can use Postfix for sending and receiving emails, and configure it for forwarding. Below are the steps to accomplish this: ### Prerequisites 1. A registered domain name that p...
31,990
[ { "from": "human", "value": "I've got an unmanaged Linux VPS running ubuntu that I'm using for the web server for a personal website. I'd like to get a barebones email server up and running. All the installation guides I've found so far are for a full-fledged email server with a webmail interface and ever...
I have an asp.net page which works fine for internal calls to the services, however when used on an externally facing site I just cannot get it to function at all. The CRMImpersonator works ok when accessed internally but when using the IFD interface all I get is a message saying 'Microsoft.Crm.WebServices.Crm2007.Cook...
The error message you're encountering indicates that the ASP.NET application is attempting to use a specific version of a class from the `Microsoft.Crm.WebServices` assembly that it cannot find. This issue typically arises due to assembly version mismatches, registration issues, or deployment-related problems, particul...
33,822
[ { "from": "human", "value": "I have an asp.net page which works fine for internal calls to the services, however when used on an externally facing site I just cannot get it to function at all.\nThe CRMImpersonator works ok when accessed internally but when using the IFD interface all I get is a message sayi...
I'm automating a web application (the Mantis bug tracker) and I'm getting an interesting response header from it, called Refresh: HTTP/1.x 200 OK ... Refresh: 0;url=my_view_page.php It seems to be acting the same way that meta refresh does, and the meta refresh technique implies that it is an equivalent of a header in...
The `Refresh` header you're encountering is indeed not a standard HTTP header, and you're right in noticing that it behaves similarly to the `<meta>` refresh tag found in HTML. The `Refresh` header is not defined in the official HTTP specification, and thus its use can be considered non-standard. ### Explanation of th...
35,030
[ { "from": "human", "value": "I'm automating a web application (the Mantis bug tracker) and I'm getting an interesting response header from it, called Refresh:\nHTTP/1.x 200 OK\n...\nRefresh: 0;url=my_view_page.php\n\nIt seems to be acting the same way that meta refresh does, and the meta refresh technique i...
I've created a Silverlight project that produces [something].xap file to package a few silverlight UserControls. I would like to manipulate that .xap file through the use of javascript in the browser to show and hide user controls based upon java script events. Is it possible to do this? If so any sample could or link...
Yes, you can manipulate Silverlight UserControls from JavaScript, but it requires you to follow a few specific steps. Silverlight has a feature called "JS interop" that allows JavaScript running in the browser to call methods in your Silverlight application and vice versa. Here's a general outline of how you can achie...
34,042
[ { "from": "human", "value": "I've created a Silverlight project that produces [something].xap file to package a few silverlight UserControls. I would like to manipulate that .xap file through the use of javascript in the browser to show and hide user controls based upon java script events.\nIs it possible ...