instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have two routes:
routes.MapRoute(
"FetchVenue",
"venue/fetchlike/{q}",
new { controller = "venue", action = "fetchlike" }
);
routes.MapRoute(
"venue", ... | The behavior you are experiencing is due to how ASP.NET MVC routing works. In your route configuration, the route for `FetchVenue` is designed to capture a URL segment that includes a value for `{q}`. When you use a query string parameter (e.g., `?q=test`), it doesn't match the route pattern that specifies a parameter ... | 47,564 | [
{
"from": "human",
"value": "I have two routes:\nroutes.MapRoute(\n \"FetchVenue\", \n \"venue/fetchlike/{q}\", \n new { controller = \"venue\", action = \"fetchlike\" } \n );\n\n rout... |
I'm trying to put together a list of JavaScript UI widget frameworks for consideration in a project. Ideally it would be a library that has a range of ready made ui widgets, no dependencies on dom/js extention/manipulation frameworks like JQuery or Prototype, minimal additional cruft, such as Ajax API's and DOM selecto... | Here are several JavaScript UI widget frameworks that you might find useful for your project, fitting your criteria of offering a range of ready-made UI widgets without heavy dependencies on other libraries:
1. **Sencha ExtReact**: While Ext JS is what you mentioned, ExtReact offers a framework specifically for React ... | 47,076 | [
{
"from": "human",
"value": "I'm trying to put together a list of JavaScript UI widget frameworks for consideration in a project. Ideally it would be a library that has a range of ready made ui widgets, no dependencies on dom/js extention/manipulation frameworks like JQuery or Prototype, minimal additional ... |
What options do you have to communicate between the WARs in an EAR?
We have several WARs providing different webservices deployed within one EAR. For their tasks they need to communicate with the other WARs. Of course they could communicate using webservices. What other, perhaps more efficient, options are there?
EDIT... | When you have multiple WARs (Web Application Archives) deployed within a single EAR (Enterprise Archive), and they need to communicate with each other, there are several options to facilitate this communication. Here are some alternatives to web services, especially considering you require synchronous communication and... | 44,196 | [
{
"from": "human",
"value": "What options do you have to communicate between the WARs in an EAR? \nWe have several WARs providing different webservices deployed within one EAR. For their tasks they need to communicate with the other WARs. Of course they could communicate using webservices. What other, perha... |
How can i make my Java Swing GUI Components [Right To Left] for Arabic language from NetBeans Desktop Application?
| To make your Java Swing GUI components support Right-To-Left (RTL) orientation for Arabic language in a NetBeans desktop application, you need to follow a few steps. Here's how you can do it:
### 1. Set the Component Orientation
You can set the component orientation of your Swing components to RTL using the `setCompo... | 43,517 | [
{
"from": "human",
"value": "How can i make my Java Swing GUI Components [Right To Left] for Arabic language from NetBeans Desktop Application?\n"
},
{
"from": "gpt",
"value": "To make your Java Swing GUI components support Right-To-Left (RTL) orientation for Arabic language in a NetBeans deskto... |
In a previous question about overriding Time.now, I was working toward a solution of faking clock synchronization across all machines connecting to a given database. Overriding Time.now seemed the best way for the approach I was taking, however:
It appears as though I could get the result I was after via a much simple... | In Rails, you can indeed access the database's current time without directly writing raw SQL queries. Rails provides several ways to get the current timestamp from the database in a more Rails-friendly manner, avoiding the need to call `SELECT GETDATE()` or `SELECT NOW()` directly.
### Using Active Record Query Interf... | 45,715 | [
{
"from": "human",
"value": "In a previous question about overriding Time.now, I was working toward a solution of faking clock synchronization across all machines connecting to a given database. Overriding Time.now seemed the best way for the approach I was taking, however:\nIt appears as though I could ge... |
I am setting up a logging infrastructure using syslog daemon on my Linux server. I have few clients both Windows and non-Windows that I am planning on configuring to forward logs as syslogs to my Linux server. Some of my client machines log in foreign language. Therefore, how do I forward such non-English logs as syslo... | When dealing with syslog and non-English log entries, there are a few considerations and best practices you should follow to ensure that logs are transmitted and stored correctly. Here’s a general approach to set up your logging infrastructure while accommodating non-English logs:
### 1. Character Encoding
**UTF-8 En... | 44,677 | [
{
"from": "human",
"value": "I am setting up a logging infrastructure using syslog daemon on my Linux server. I have few clients both Windows and non-Windows that I am planning on configuring to forward logs as syslogs to my Linux server. Some of my client machines log in foreign language. Therefore, how do... |
Let's start with the following snippet:
Foreach(Record item in RecordList){
..
item = UpdateRecord(item, 5);
..
}
The UpdateRecode function changes some field of item and returns the altered object. In this case the compiler throws an exception saying that the item can not be updated in a foreach iteration.
Now... | To improve readability while avoiding the limitations of modifying items directly in a `foreach` loop, you can encapsulate the update logic in a method that performs the operation on each item in a more functional and descriptive way. Here are a few strategies you could adopt:
### 1. Use a `for` Loop with Indexing
In... | 46,909 | [
{
"from": "human",
"value": "Let's start with the following snippet:\nForeach(Record item in RecordList){\n ..\n item = UpdateRecord(item, 5);\n ..\n}\n\nThe UpdateRecode function changes some field of item and returns the altered object. In this case the compiler throws an exception saying that the item... |
What SQL Server Alerts do you always setup for every database? What do you always monitor regardless of the database?
| When setting up SQL Server alerts and monitoring systems for every database, there are several key alerts and monitoring metrics that are generally important to ensure optimal performance, security, and reliability. Here are the essential alerts and monitoring parameters to consider:
### Alerts to Set Up:
1. **SQL Se... | 45,090 | [
{
"from": "human",
"value": "What SQL Server Alerts do you always setup for every database? What do you always monitor regardless of the database?\n"
},
{
"from": "gpt",
"value": "When setting up SQL Server alerts and monitoring systems for every database, there are several key alerts and monito... |
What is the correct way of retrieving maximum values of all columns in a table with a single query? Thanks.
Clarification: the same query should work on any table, i.e. the column names are not to be hard-coded into it.
| To retrieve the maximum values of all columns in a SQL table without hard-coding column names, you can use dynamic SQL. The specific approach can vary based on the database system you are using. Below, I will provide examples for both PostgreSQL and SQL Server.
### PostgreSQL
You can use the `information_schema` to d... | 45,355 | [
{
"from": "human",
"value": "What is the correct way of retrieving maximum values of all columns in a table with a single query? Thanks.\nClarification: the same query should work on any table, i.e. the column names are not to be hard-coded into it.\n"
},
{
"from": "gpt",
"value": "To retrieve t... |
Just that... I get a string which contains a path to a file plus some arguments. How can I recognize the path? I thought about the index of the '.' in the file... but I don't like it.
What about using regular expressions? Can anyone point me in the right direction?
Regards
Edit: Theses are valid entries...
somefile.msi... | To extract the file path from a string that contains both a file path and some arguments, regular expressions (regex) are indeed a good choice. You can use a regex pattern to match the path of the file, considering various possible formats, such as:
1. Paths with drive letters (e.g., `C:\MyFolder\SomeFile.exe`).
2. Re... | 45,986 | [
{
"from": "human",
"value": "Just that... I get a string which contains a path to a file plus some arguments. How can I recognize the path? I thought about the index of the '.' in the file... but I don't like it.\nWhat about using regular expressions? Can anyone point me in the right direction?\nRegards\nEd... |
On our build server, we've installed the .NET Framework 2.0 SDK in order to kick off MSBuild and run our builds. Now we are upgrading to the .NET Framework 3.5. We do not want to install the complete Visual Studio, but we cannot find a .NET Framework 3.5 SDK on the internet either?
The question: What do we need ot down... | To work with .NET Framework 3.5 for building applications without installing the complete Visual Studio, you have a couple of options:
1. **Install .NET Framework 3.5 Redistributable**: This is a lightweight option that includes the necessary components to run applications built with .NET Framework 3.5. However, it do... | 47,708 | [
{
"from": "human",
"value": "On our build server, we've installed the .NET Framework 2.0 SDK in order to kick off MSBuild and run our builds. Now we are upgrading to the .NET Framework 3.5. We do not want to install the complete Visual Studio, but we cannot find a .NET Framework 3.5 SDK on the internet eith... |
What design considerations must be taken when writing software for content-distribution systems, such as managing the synchronisation and distribution of data, redirecting downloads to the nearest servers and so on?
I am also looking for examples of open source CDN (content delivery network) software. I can think of tw... | When designing software for content-distribution systems (CDNs), several key considerations must be taken into account to ensure efficient and reliable operation. Here are some essential design considerations:
### 1. Data Synchronization
- **Consistency Models**: Determine how data will be synchronized across nodes... | 42,451 | [
{
"from": "human",
"value": "What design considerations must be taken when writing software for content-distribution systems, such as managing the synchronisation and distribution of data, redirecting downloads to the nearest servers and so on?\nI am also looking for examples of open source CDN (content del... |
Certain malware such as AVG hijack 404 pages in order to display a page in the browser riddled with their own ads.
The only work around I've found is to abandon 404 http status codes for custom error pages in my webapp.
Is there any other work around?
Edit:
Anybody know of any other toolbars/programs that also hijack 4... | It sounds like you're dealing with a challenging situation regarding malware or adware that modifies your web application's behavior. Here are a few strategies and workarounds that could help you manage or mitigate the issue:
### Workarounds for 404 Page Hijacking
1. **Custom 404 Handling with Different Status Codes:... | 44,445 | [
{
"from": "human",
"value": "Certain malware such as AVG hijack 404 pages in order to display a page in the browser riddled with their own ads.\nThe only work around I've found is to abandon 404 http status codes for custom error pages in my webapp.\nIs there any other work around?\nEdit:\nAnybody know of a... |
Is there a (Unix) shell script to format JSON in human-readable form?
Basically, I want it to transform the following:
{ "foo": "lorem", "bar": "ipsum" }
... into something like this:
{
"foo": "lorem",
"bar": "ipsum"
}
| Yes, you can format JSON in a human-readable form using command-line tools available in Unix-like systems. One common tool for this purpose is `jq`, which is a lightweight and flexible command-line JSON processor.
Here’s how you can create a shell script to format JSON using `jq`:
1. **Install `jq`**: If you don’t ha... | 46,894 | [
{
"from": "human",
"value": "Is there a (Unix) shell script to format JSON in human-readable form?\nBasically, I want it to transform the following:\n{ \"foo\": \"lorem\", \"bar\": \"ipsum\" }\n\n... into something like this:\n{\n \"foo\": \"lorem\",\n \"bar\": \"ipsum\"\n}\n\n"
},
{
"from": "... |
I want add the new node as parent node of the old nodes in XML using C#. for example node have the following XMl file:
<bookstore>
<books>
<author>
</author>
</books>
</bookstore>
like that now I want add the new like below:
<bookstore>
<newnode>
<books>
<author>
</author>
</books... | You can accomplish this task using the `System.Xml` namespace in C#. The following example demonstrates how to load an existing XML file, create a new node, and move the existing nodes into this new parent node. Here’s a sample code to do that:
```csharp
using System;
using System.Xml;
class Program
{
static void... | 44,220 | [
{
"from": "human",
"value": "I want add the new node as parent node of the old nodes in XML using C#. for example node have the following XMl file:\n<bookstore>\n <books>\n <author>\n </author>\n </books> \n</bookstore>\n\nlike that now I want add the new like below:\n<bookstore>\n <newnode>\n... |
If I check out a tagged version of my source code without creating a branch, Git indicates that I'm not associated with any branch at all. It's happy to let me make changes and check them in though. Where do those changes go? If I switch back to 'master' they disappear (overwritten by what was in master) and I can't se... | When you check out a tagged version of your code in Git, you are placed in a "detached HEAD" state. This means that your HEAD is pointing directly to a specific commit (the tagged version) instead of a branch. In this state, you can make changes and commit them, but those commits are not associated with any branch.
W... | 46,045 | [
{
"from": "human",
"value": "If I check out a tagged version of my source code without creating a branch, Git indicates that I'm not associated with any branch at all. It's happy to let me make changes and check them in though. Where do those changes go? If I switch back to 'master' they disappear (overwrit... |
I have columns with count of Customers and count of orders. how can i show the average count of orders?
| To calculate the average count of orders per customer, you can use the following approach, assuming you have a dataset with two columns: one for the count of customers and another for the count of orders.
### Step-by-Step Calculation:
1. **Sum the Total Orders**: Add up all the values in the "count of orders" column.... | 46,319 | [
{
"from": "human",
"value": "I have columns with count of Customers and count of orders. how can i show the average count of orders?\n"
},
{
"from": "gpt",
"value": "To calculate the average count of orders per customer, you can use the following approach, assuming you have a dataset with two co... |
We have a data entry portlet that occassionally generates urls in excess of the 2k limit enforced by Internet Explorer.
Is there any way to stop these excessively long urls from being generated without loss of functionality?
| When dealing with excessively long URLs in a data entry portlet, particularly in Internet Explorer where the URL length is restricted to about 2,083 characters, there are several strategies you can employ to avoid generating such long URLs without sacrificing functionality:
1. **Use POST Instead of GET**: If your appl... | 48,151 | [
{
"from": "human",
"value": "We have a data entry portlet that occassionally generates urls in excess of the 2k limit enforced by Internet Explorer. \nIs there any way to stop these excessively long urls from being generated without loss of functionality?\n"
},
{
"from": "gpt",
"value": "When de... |
Different iPhones have different published memory 4GB, 8GB and 16GB. The touch can have 32GB. My understanding is this is the off-line memory (disk alike).
How much actual fast ram is there in the device available for my Cocoa Application?
Is there a preconfigured virtual amount?
| The memory specifications you've mentioned (4GB, 8GB, 16GB, and 32GB) typically refer to the storage capacity of the device, which is used for storing apps, media, and other data. This is separate from the RAM (Random Access Memory) that is used by the device to run applications and perform tasks.
As of my last knowle... | 47,746 | [
{
"from": "human",
"value": "Different iPhones have different published memory 4GB, 8GB and 16GB. The touch can have 32GB. My understanding is this is the off-line memory (disk alike). \nHow much actual fast ram is there in the device available for my Cocoa Application? \nIs there a preconfigured virtual am... |
I've written a fairly simple java application that allows you to drag your mouse and based on the length of the mouse drag you did, it will shoot a ball in that direction, bouncing off walls as it goes.
Here is a quick screenshot:
alt text http://img222.imageshack.us/img222/3179/ballbouncemf9.png
Each one of the circle... | To implement gravity and an elastic bounce effect for your `Ball` class in your Java application, you are on the right track! Let's go through the changes you need to make, step by step.
### 1. Gravity Implementation
First, you need to apply gravity to the `yVector` in your `step()` method. Since gravity accelerates ... | 45,940 | [
{
"from": "human",
"value": "I've written a fairly simple java application that allows you to drag your mouse and based on the length of the mouse drag you did, it will shoot a ball in that direction, bouncing off walls as it goes.\nHere is a quick screenshot:\nalt text http://img222.imageshack.us/img222/31... |
I have 3 tables, foo, foo2bar, and bar. foo2bar is a many to many map between foo and bar. Here are the contents.
select * from foo
+------+
| fid |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
+------+
select * from foo2bar
+------+------+
| fid | bid |
+------+------+
| 1 | 1 |
| 1 | 2 |
| 2 | ... | To achieve the desired result, you can use a SQL query that involves a LEFT JOIN operation among the three tables: `foo`, `foo2bar`, and `bar`. The LEFT JOIN will allow us to get all `fid` values from the `foo` table, including those that do not have any corresponding `bid` values in the `bar` table with `zid` equal to... | 45,904 | [
{
"from": "human",
"value": "I have 3 tables, foo, foo2bar, and bar. foo2bar is a many to many map between foo and bar. Here are the contents.\nselect * from foo\n+------+\n| fid |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n+------+\n\nselect * from foo2bar\n+------+------+\n| fid | bid |\n+---... |
When I use link_to :method=>:delete, what rails has generated is a javascript click, which is not nice if you do come across situation your client just have javascript disabled. That seems a bad idea to me. Any chance to get around this?
| You're correct that using `link_to` with the `:method => :delete` option in Rails relies on JavaScript to intercept the link click and send an AJAX request to the server. This approach is convenient but does present a problem for users with JavaScript disabled, as they won't be able to perform the action as intended.
... | 47,053 | [
{
"from": "human",
"value": "When I use link_to :method=>:delete, what rails has generated is a javascript click, which is not nice if you do come across situation your client just have javascript disabled. That seems a bad idea to me. Any chance to get around this?\n"
},
{
"from": "gpt",
"value... |
I want to send some strings in a list in a POST call. eg:
www.example.com/?post_data = A list of strings
The python code receives the data as a single string (Instead of a list of strings). How do I post it as a list of strings?
| To send a list of strings in a POST request, you need to serialize the list into a format that can be easily sent and correctly interpreted by the receiving server. One common way to do this is to convert the list into a JSON format.
Here's an example of how you can do this using Python's `requests` library. You can ... | 46,415 | [
{
"from": "human",
"value": "I want to send some strings in a list in a POST call. eg:\n www.example.com/?post_data = A list of strings\n\nThe python code receives the data as a single string (Instead of a list of strings). How do I post it as a list of strings?\n"
},
{
"from": "gpt",
"value... |
Both ideas sound very similar to me, but there might be subtle differences or the exact same thing, explained in different ways. What is the relationship between TDD and Test First Development/Programming?
| Test-Driven Development (TDD) and Test First Development (TFD) are closely related concepts in software development, and while they share similarities, they have distinct characteristics and methodologies.
### Test-Driven Development (TDD)
1. **Process**: TDD is a specific development methodology that follows a preci... | 46,689 | [
{
"from": "human",
"value": "Both ideas sound very similar to me, but there might be subtle differences or the exact same thing, explained in different ways. What is the relationship between TDD and Test First Development/Programming?\n"
},
{
"from": "gpt",
"value": "Test-Driven Development (TDD... |
I want to create a combobox in flex which will take three values, Available, Unavailable, and Busy. The constraint is, I should not allow user to go directly from Unavailable to Busy. So when a User is selected Unavailable, I should keep the Busy item disabled (unselectable), but a user will be able to go directly from... | In Apache Flex, disabling specific items in a ComboBox is not directly supported out of the box, but you can achieve the desired functionality by using a custom item renderer or by manipulating the data provider based on the selection.
Here’s one way to implement your requirement by using a custom item renderer:
1. ... | 41,402 | [
{
"from": "human",
"value": "I want to create a combobox in flex which will take three values, Available, Unavailable, and Busy. The constraint is, I should not allow user to go directly from Unavailable to Busy. So when a User is selected Unavailable, I should keep the Busy item disabled (unselectable), bu... |
I am working on a plugin system that loads .dll's contained in a specified folder. I am then using reflection to load the assemblies, iterate through the types they contain and identify any that implement my IPlugin interface.
I am checking this with code similar to the following:
foreach(Type t in myTypes )
{
if... | The issue you're experiencing with `IsAssignableFrom()` returning false for types that you expect to be assignable to `IPlugin` can arise from several potential causes. Here are some common culprits to investigate:
1. **Different Assembly Versions**: One of the most common reasons for such behavior is if the assemblie... | 42,276 | [
{
"from": "human",
"value": "I am working on a plugin system that loads .dll's contained in a specified folder. I am then using reflection to load the assemblies, iterate through the types they contain and identify any that implement my IPlugin interface. \nI am checking this with code similar to the follow... |
Windows API ::FindWindow function fails when called from Service application. GetLastError() also returns 0 (success?). Is this some privilege\access right problem? Do you think it's design problem and I should use another IPC method?
| The `FindWindow` function in the Windows API is used to find a window by its class name or window name. However, there are specific considerations when calling this function from a service application.
### Why `FindWindow` Fails in Services
1. **Session 0 Isolation**: Windows Services run in a different session (Sess... | 44,799 | [
{
"from": "human",
"value": "Windows API ::FindWindow function fails when called from Service application. GetLastError() also returns 0 (success?). Is this some privilege\\access right problem? Do you think it's design problem and I should use another IPC method? \n"
},
{
"from": "gpt",
"value"... |
I am looking for a .net templating engine - something simple, lightweight, stable with not too many dependencies. All I need it for at the moment is creating templated plain text and html emails. Can anyone give me a good recommendation?
If it helps at all - something like Java's Freemarker or Velocity libraries.
[UP... | There are several .NET templating engines that fit your requirements for creating plain text and HTML emails. Here are a few recommendations along with some insights based on user experiences:
### 1. **Scriban**
- **Overview**: Scriban is a fast, powerful, and lightweight text templating engine for .NET. It supports v... | 44,544 | [
{
"from": "human",
"value": "I am looking for a .net templating engine - something simple, lightweight, stable with not too many dependencies. All I need it for at the moment is creating templated plain text and html emails. Can anyone give me a good recommendation?\nIf it helps at all - something like Ja... |
I have been up and down this site and found a lot of info on the Screen class and how to count the number of monitors and such but how do I determine which montitor a form is currently in?
| In a Windows Forms application, you can determine which monitor a form is currently in by utilizing the `Screen` class in combination with the form's `Location` property. Each `Screen` object represents a display device, and you can check which screen contains the form's current position.
Here’s how you can do that in... | 47,658 | [
{
"from": "human",
"value": "I have been up and down this site and found a lot of info on the Screen class and how to count the number of monitors and such but how do I determine which montitor a form is currently in?\n"
},
{
"from": "gpt",
"value": "In a Windows Forms application, you can deter... |
I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it.
Below are two html's: the first one changes jpg images and it works,... | To change a Flash file (SWF) using JavaScript in a similar way to how you've changed an image, there are a few things to keep in mind. Flash content is typically embedded in the page differently than images. Here's a basic example of how you can achieve this using HTML and JavaScript.
### Example HTML for Flash Files
... | 45,145 | [
{
"from": "human",
"value": "I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it.\nBelow are two html's: the ... |
I have a network were would like like to deliver data using the Flash Remoting data format over HTTP. We have Squid working as a reverse proxy/accelerator, are there any known problems running this traffic through Squid. We would configure that particular URL to not be cached.
| Using Flash Remoting over HTTP through a Squid proxy is generally feasible, especially if you configure the proxy not to cache the specific URLs that handle Flash Remoting requests. However, there are a few considerations and potential issues to be aware of:
1. **Content-Type Handling**: Ensure that the Content-Type o... | 46,799 | [
{
"from": "human",
"value": "I have a network were would like like to deliver data using the Flash Remoting data format over HTTP. We have Squid working as a reverse proxy/accelerator, are there any known problems running this traffic through Squid. We would configure that particular URL to not be cached.... |
Can jQuery ajax made browser request a new location in redirect header send by server?
| Yes, jQuery's `ajax` method can handle HTTP redirects, but it's important to clarify how redirects are processed in general.
When an Ajax request is made using jQuery, if the server responds with a redirect status code (such as 301 or 302), the browser will not automatically follow that redirect. Instead, jQuery will ... | 44,658 | [
{
"from": "human",
"value": "Can jQuery ajax made browser request a new location in redirect header send by server?\n"
},
{
"from": "gpt",
"value": "Yes, jQuery's `ajax` method can handle HTTP redirects, but it's important to clarify how redirects are processed in general.\n\nWhen an Ajax reques... |
I have a project that builds fine If I build it manually but it fails with CC.NET.
The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's a... | When facing issues with Continuous Integration (CI) builds, such as CC.NET (CruiseControl.NET) failing to recognize project dependencies that work fine in a manual build, there are a few steps you can take to troubleshoot and resolve the problem:
1. **Check Build Order and Dependencies**: Ensure that CC.NET is set up ... | 45,108 | [
{
"from": "human",
"value": "I have a project that builds fine If I build it manually but it fails with CC.NET.\nThe error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll sh... |
I created a UserControl which consists of a couple ellipses and labels. I added it just fine to another form and things were looking pretty snazzy.
Then I went to start adding some event handlers and discovered that the control I made did not expose a Click event. Oops. Easy to fix, right? Just go back to the code-... | The error message you are encountering, "Partial declarations of MyControl must not specify different base classes," suggests that somewhere in your project, there is another part of the `MyControl` class (in a different file) that is declaring a different base class, even if you cannot find it.
In a UserControl, it ... | 45,158 | [
{
"from": "human",
"value": "I created a UserControl which consists of a couple ellipses and labels. I added it just fine to another form and things were looking pretty snazzy.\nThen I went to start adding some event handlers and discovered that the control I made did not expose a Click event. Oops. Easy... |
Can anyone post an example of Aspect-oriented programming (AOP) that is not logging?
I've looked at several resources but all the examples are trivial logging. What is it useful for?
| Aspect-Oriented Programming (AOP) is a programming paradigm that allows you to separate cross-cutting concerns from the main business logic of your application. While logging is a common example of AOP, there are many other areas where AOP can be beneficial. Here’s a brief overview followed by an example that demonstra... | 43,568 | [
{
"from": "human",
"value": "Can anyone post an example of Aspect-oriented programming (AOP) that is not logging?\nI've looked at several resources but all the examples are trivial logging. What is it useful for?\n"
},
{
"from": "gpt",
"value": "Aspect-Oriented Programming (AOP) is a programming... |
We know that IIS caches ConfigurationManager.AppSettings so it reads the disk only once until the web.config is changed. This is done for performance purposes.
Someone at:
http://forums.asp.net/p/1080926/1598469.aspx#1598469
stated that .NET Framework doesn't do the same for app.config, but it reads from the disk for e... | It's true that in ASP.NET, the `ConfigurationManager.AppSettings` is cached and only read from disk once, unless the `web.config` is modified. This caching mechanism is indeed implemented to improve performance in web applications.
For applications that use `app.config`, such as Windows Forms, Console Applications, or... | 49,731 | [
{
"from": "human",
"value": "We know that IIS caches ConfigurationManager.AppSettings so it reads the disk only once until the web.config is changed. This is done for performance purposes.\nSomeone at:\nhttp://forums.asp.net/p/1080926/1598469.aspx#1598469\nstated that .NET Framework doesn't do the same for ... |
I'm using PIL (Python Imaging Library). I'd like to draw transparent polygons. It seems that specifying a fill color that includes alpha level does not work. Are their workarounds?
If it can't be done using PIL I'm willing to use something else.
If there is more than one solution, then performance should be factored... | PIL (now known as Pillow) does support transparent images, but drawing filled polygons with alpha transparency can be a bit tricky. However, you can achieve this effect using a couple of different methods. Here are some approaches you can take:
### Method 1: Using an RGBA Image for Drawing
You can create an RGBA imag... | 44,301 | [
{
"from": "human",
"value": "I'm using PIL (Python Imaging Library). I'd like to draw transparent polygons. It seems that specifying a fill color that includes alpha level does not work. Are their workarounds?\nIf it can't be done using PIL I'm willing to use something else.\nIf there is more than one so... |
I'm using Windows Forms and VS2008. I want to store an enum value in my application's settings file.
The settings editor in VS2008 only gives me a limited set of types. Amazingly, enums don't seem to be one of these types that are automatically supported - have I understood this correctly?
From reading up on the subj... | You're correct that Visual Studio 2008 does not directly support storing enums in the application settings via the Settings editor. However, you can still achieve this by using the underlying functionality of the settings system, namely, storing the enum as a string or integer value, and then converting it as needed.
... | 49,111 | [
{
"from": "human",
"value": "I'm using Windows Forms and VS2008. I want to store an enum value in my application's settings file.\nThe settings editor in VS2008 only gives me a limited set of types. Amazingly, enums don't seem to be one of these types that are automatically supported - have I understood t... |
I have a generic list of objects in C#, for example sake, here's what the object might be.
public class Thing {
public string Name { get; set; }
public DateTime EditDate { get; set; }
}
var things = new List<Thing>();
Now I want to call:
thing.Sort((t1, t2) => t1.EditDate.CompareTo(t2.EditDate));
However, so... | You can modify your sorting logic to account for `null` values in the `EditDate` property. You can adjust your comparison so that `null` values are treated as less than any non-null value. Here's how you can do that:
```csharp
var things = new List<Thing>();
// Sample data
things.Add(new Thing { Name = "Thing1", Edit... | 45,593 | [
{
"from": "human",
"value": "I have a generic list of objects in C#, for example sake, here's what the object might be.\npublic class Thing {\n public string Name { get; set; }\n public DateTime EditDate { get; set; }\n}\n\nvar things = new List<Thing>();\n\nNow I want to call:\nthing.Sort((t1, t2) =>... |
I've got a report that works perfectly in development previews. But when I deploy I get the following error:
In the Dev Environment the Error displayed is:
Error 4 The data source 'myDataSource'
cannot be found. c:\reporting services
projects\reports\rest_of_path\my_report.rdl
0 0
On the reporting servic... | It sounds like you are experiencing issues with the data source reference when deploying your reports to SQL Server Reporting Services (SSRS). Here are a few steps you can take to ensure that your reports can locate and use the data sources correctly after deployment:
1. **Check Data Source References in the Report**:... | 46,802 | [
{
"from": "human",
"value": "I've got a report that works perfectly in development previews. But when I deploy I get the following error:\nIn the Dev Environment the Error displayed is:\n\nError 4 The data source 'myDataSource'\n cannot be found. c:\\reporting services\n projects\\reports\\rest_of_path... |
When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.
For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.
When adding the tool... | In WinForms, adding properties to controls dynamically in a way that is similar to the ToolTip component can be accomplished through the use of a design-time extender provider. This requires the implementation of a custom type descriptor to provide additional properties to the controls on your form. Below are the gener... | 40,197 | [
{
"from": "human",
"value": "When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.\nFor example I could use that to Add a \"IsDirty\"-flag to all textboxes just by adding the component to the form and it would handle ... |
I'm using ASP.Net MVC beta 1 and I'm using the asp.net membership provider with the standard authentication controller to restrict access to my site.
I'm using ajax functionality to provide e.g. editing of values by loading partial views into a div with either jQuery $.get/$.ajax or with the Ajax.Actionlink MVC helper.... | You're right to seek a cleaner solution for handling session timeouts when using AJAX in your ASP.NET MVC application. The approach you mentioned—checking the returned HTML for a login form—can indeed work, but it's not the most elegant or maintainable method.
Here are a few approaches to handle session timeouts more ... | 41,929 | [
{
"from": "human",
"value": "I'm using ASP.Net MVC beta 1 and I'm using the asp.net membership provider with the standard authentication controller to restrict access to my site.\nI'm using ajax functionality to provide e.g. editing of values by loading partial views into a div with either jQuery $.get/$.aj... |
I typically use the .markdown or .md extension for markdown documents. Unfortunately spotlight refuses to index them unless they have the .txt file extension.
I've seen a possible solution involving editing Info.plist files on the textmate blog. Is there a better way?
Update: I just discovered QuickLook generator for M... | It sounds like you've already discovered a great solution with the QuickLook generator for Markdown files, which is an excellent way to enhance the functionality of Spotlight and provide useful previews.
If you're looking for alternative methods or additional options, here are a few suggestions:
1. **Automator Workf... | 45,733 | [
{
"from": "human",
"value": "I typically use the .markdown or .md extension for markdown documents. Unfortunately spotlight refuses to index them unless they have the .txt file extension.\nI've seen a possible solution involving editing Info.plist files on the textmate blog. Is there a better way?\nUpdate: ... |
to do some visualization of data I would like to include rectangles, circles and text within my graphs. Does anyone know a Java based framework (maybe similar to very basic Powerpoint functionality) that can export SVG graphics?
| For Java-based frameworks that support drawing shapes like rectangles, circles, and text, and can export to SVG graphics, you might consider the following options:
1. **JFreeChart**:
- JFreeChart is primarily a chart library, but it allows for some customization and can be extended to include shapes and text. While... | 44,035 | [
{
"from": "human",
"value": "to do some visualization of data I would like to include rectangles, circles and text within my graphs. Does anyone know a Java based framework (maybe similar to very basic Powerpoint functionality) that can export SVG graphics?\n"
},
{
"from": "gpt",
"value": "For J... |
Here's another problem with qt:
I extend a QAbstractTableModel, but I get a compiling error ( I'm using cmake)
// file.h
#ifndef TABLEMODEL_H
#define TABLEMODEL_H
#include <QAbstractTableModel>
class TableModel : public QAbstractTableModel
{
Q_OBJECT
public:
TableModel(QObject *parent = 0);
int rowCount(const QModel... | The error message you're encountering, "undefined reference to vtable for TableModel," typically indicates that the Qt meta-object compiler (moc) has not processed your class, which is necessary when you use Qt's signal and slot mechanism or when you declare a class with the `Q_OBJECT` macro.
To resolve this issue, en... | 45,079 | [
{
"from": "human",
"value": "Here's another problem with qt:\nI extend a QAbstractTableModel, but I get a compiling error ( I'm using cmake)\n// file.h\n#ifndef TABLEMODEL_H\n#define TABLEMODEL_H\n\n#include <QAbstractTableModel>\n\nclass TableModel : public QAbstractTableModel\n{\nQ_OBJECT\n\npublic:\nTabl... |
Say you have a class who's job it is to connect to a remote server. I want to abstract this class to provide two versions, one that connects through UDP and the other through TCP. I want to build the leanest runtime code possible and instead of using polymorphism I am considering templates. Here is what I'm envisioning... | Your approach using templates to specialize for different protocols (UDP and TCP) is valid, and it allows for optimized code without the overhead of polymorphism. However, your concern about maintaining duplicate code for the generic type `T` across both specializations is indeed a valid one.
One common approach to av... | 45,404 | [
{
"from": "human",
"value": "Say you have a class who's job it is to connect to a remote server. I want to abstract this class to provide two versions, one that connects through UDP and the other through TCP. I want to build the leanest runtime code possible and instead of using polymorphism I am considerin... |
I am using GWT (Google Web Toolkit) 1.5.3 et GXT (ExtJS) 1.2
I just want to create a simple form with some radio buttons generated after a RPC call, to get some values
Code:
final FormPanel simple = new FormPanel();
simple.setFrame(true);
simple.setWidth(350);
simple.setHeaderVisible(false);
... | In your code snippet, you're working with a `RadioGroup` in GXT (which is an extension of ExtJS). You want to set and get values for the radio buttons generated dynamically after the RPC call.
Here are a few key points to help you resolve the issue:
1. **Setting Values for Radio Buttons**:
When using radio buttons... | 45,406 | [
{
"from": "human",
"value": "I am using GWT (Google Web Toolkit) 1.5.3 et GXT (ExtJS) 1.2\nI just want to create a simple form with some radio buttons generated after a RPC call, to get some values\nCode:\nfinal FormPanel simple = new FormPanel();\n simple.setFrame(true);\n simple.setWidth(350... |
In the C / Unix environment I work in, I see some developers using __progname instead of argv[0] for usage messages. Is there some advantage to this? What's the difference between __progname and argv[0]. Is it portable?
| `__progname` and `argv[0]` both provide the name of the program being executed, but they differ in their definition, usage, and certain nuances.
### Differences between `__progname` and `argv[0]`
1. **Definition**:
- `argv[0]`: This is the first element of the `argv` array passed to the `main` function in a C prog... | 44,107 | [
{
"from": "human",
"value": "In the C / Unix environment I work in, I see some developers using __progname instead of argv[0] for usage messages. Is there some advantage to this? What's the difference between __progname and argv[0]. Is it portable?\n"
},
{
"from": "gpt",
"value": "`__progname` ... |
I've to create a Web Based Application, that amongst other things, includes the following tasks
Loading a 3D model from a database.
Display the 3D Model.
Doing Inverse Kinematics computations to generate the series of steps for the model to move from an initial to final position.
Display the animation in real time.
T... | Creating a web-based application with the capabilities you've outlined is certainly feasible, especially with the advancements in web technologies. Here's a step-by-step approach to help you understand the recommended technologies and processes:
### 1. **Frontend Development**
#### a. **3D Model Loading and Display**... | 44,036 | [
{
"from": "human",
"value": "I've to create a Web Based Application, that amongst other things, includes the following tasks\n\nLoading a 3D model from a database.\nDisplay the 3D Model.\nDoing Inverse Kinematics computations to generate the series of steps for the model to move from an initial to final pos... |
The only distributed revision control system I've used on my projects is bazaar. I don't know much about git and mercurial except how to do checkouts. The reason I like bazaar is the automv plugin. It detects when I've moved/deleted files manualy (from command line/ide etc.) which I tend to do alot when I'm in a hurry.... | Yes, Git does have functionality that can help you track file renames and deletions, although it works a bit differently compared to Bazaar's automv plugin.
In Git, when you move or rename a file, you can use the `git mv` command to explicitly tell Git about the change. For example, you would run:
```bash
git mv old_... | 49,197 | [
{
"from": "human",
"value": "The only distributed revision control system I've used on my projects is bazaar. I don't know much about git and mercurial except how to do checkouts. The reason I like bazaar is the automv plugin. It detects when I've moved/deleted files manualy (from command line/ide etc.) whi... |
This post probably will need some modification. I'll do my best to explain...
Basically, as a tester, I have noticed that sometimes programers who use template-based web back ends push a lot of stuff into onload handlers that then do stuff like load menu items, change display values in forms, etc.
For example, a page t... | Your observations about the use of JavaScript in web applications and the reliance on onload handlers for dynamic content loading are certainly valid and reflect common concerns in web development. Here’s a revised version of your post that maintains your points while enhancing clarity and structure:
---
### Concerns... | 44,920 | [
{
"from": "human",
"value": "This post probably will need some modification. I'll do my best to explain...\nBasically, as a tester, I have noticed that sometimes programers who use template-based web back ends push a lot of stuff into onload handlers that then do stuff like load menu items, change display v... |
What is a mathematical way of of saying 1 - 1 = 12 for a month calculation? Adding is easy, 12 + 1 % 12 = 1, but subtraction introduces 0, stuffing things up.
My actual requirement is x = x + d, where x must always be between 1 and 12 before and after the summing, and d any unsigned integer.
| To handle the situation where you want to maintain a cyclic range for months (1 through 12), you can use modular arithmetic. Specifically, you can adjust your equation so that it wraps around correctly when you go below 1 or above 12.
For your requirement, where you want to perform the operation \( x = x + d \) while ... | 45,923 | [
{
"from": "human",
"value": "What is a mathematical way of of saying 1 - 1 = 12 for a month calculation? Adding is easy, 12 + 1 % 12 = 1, but subtraction introduces 0, stuffing things up.\nMy actual requirement is x = x + d, where x must always be between 1 and 12 before and after the summing, and d any un... |
I'm adding avatars to a forum engine I'm designing, and I'm debating whether to do something simple (forum image is named .png) and use PHP to check if the file exists before displaying it, or to do something a bit more complicated (but not much) and use a database field to contain the name of the image to show.
I'd mu... | Using `file_exists()` in PHP to check for avatar images has both advantages and disadvantages. Let's break this down and address your concerns:
### Performance of `file_exists()`
1. **File System Calls**: The `file_exists()` function performs a filesystem call, which can introduce latency, especially if there are man... | 44,790 | [
{
"from": "human",
"value": "I'm adding avatars to a forum engine I'm designing, and I'm debating whether to do something simple (forum image is named .png) and use PHP to check if the file exists before displaying it, or to do something a bit more complicated (but not much) and use a database field to cont... |
This one is weird,
I have a page that consists of a html table in a div called 'rates-viewer'. If you load this page in IE (6 or 7), you will notice that the contents of the table headers is misaligned over to the left.
If you choose a country from the dropdown, it triggers an ajax call to a script. This script returns... | This is indeed an interesting issue, and while there can be multiple reasons for the discrepancy you're experiencing, let's go over a few key areas to investigate that might explain the behavior in Internet Explorer (IE) 6 and 7:
1. **HTML Structure**: Even if you think the HTML returned by both requests is identical,... | 43,746 | [
{
"from": "human",
"value": "This one is weird,\nI have a page that consists of a html table in a div called 'rates-viewer'. If you load this page in IE (6 or 7), you will notice that the contents of the table headers is misaligned over to the left.\nIf you choose a country from the dropdown, it triggers an... |
Can anyone explaine me, what is MVC, why we use it and how we can use it. Benefits of using this? and can we use ASP.NET MVC in ASP.NET 2.0 (VS 2005)
| MVC stands for Model-View-Controller, which is a design pattern used for developing web applications. It separates an application into three interconnected components: the Model, the View, and the Controller. This separation helps manage complexity, promotes organized code, and enhances maintainability.
### Component... | 46,073 | [
{
"from": "human",
"value": "Can anyone explaine me, what is MVC, why we use it and how we can use it. Benefits of using this? and can we use ASP.NET MVC in ASP.NET 2.0 (VS 2005)\n"
},
{
"from": "gpt",
"value": "MVC stands for Model-View-Controller, which is a design pattern used for developing ... |
Is there a way to configure Velocity to use something other than toString() to convert an object to a string in a template? For example, suppose I'm using a simple date class with a format() method, and I use the same format every time. If all of my velocity code looks like this:
$someDate.format('M-D-yyyy')
is there ... | In Apache Velocity, the default method for converting an object to a string in templates is indeed the `toString()` method. However, you can achieve custom formatting for specific object types (like your date class) by using a few different strategies.
### Using a Custom Method in the Context
One way to handle this i... | 49,034 | [
{
"from": "human",
"value": "Is there a way to configure Velocity to use something other than toString() to convert an object to a string in a template? For example, suppose I'm using a simple date class with a format() method, and I use the same format every time. If all of my velocity code looks like this... |
So I have run up against this problem a few times:
I have some object in my 3D Scene Graph which is a child of some other object. Lets call them c (Child) and p (Parent).
c's position is defined relative to p. Thus c may have a position (1,0,0) but of course, due to p having some other position, say (1,2,3), it is not ... | To determine the absolute (or world) position of an object in a 3D scene graph, you need to consider the hierarchy of the parent-child relationships. The common approach in 3D graphics is to have each object (or node) in the scene graph know about its local transformation properties (such as position, rotation, and sca... | 44,289 | [
{
"from": "human",
"value": "So I have run up against this problem a few times:\nI have some object in my 3D Scene Graph which is a child of some other object. Lets call them c (Child) and p (Parent).\nc's position is defined relative to p. Thus c may have a position (1,0,0) but of course, due to p having s... |
I just got this error message:
...
from c:/ruby/lib/ruby/gems/1.8/gems/...
... 10 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/...
...
and the bug (of course) is hidden somewhere in ... 10 levels....
How can I force Ruby to show a full stack trace?
| In Ruby, when you encounter an error and the stack trace gets truncated, you can usually obtain a full stack trace by altering the way you handle exceptions or by configuring your environment to display more detailed information.
Here are a few methods to get a full stack trace in Ruby:
### Method 1: Using `rescue` t... | 47,270 | [
{
"from": "human",
"value": "I just got this error message:\n...\nfrom c:/ruby/lib/ruby/gems/1.8/gems/...\n ... 10 levels...\nfrom c:/ruby/lib/ruby/gems/1.8/gems/...\n...\n\nand the bug (of course) is hidden somewhere in ... 10 levels....\nHow can I force Ruby to show a full stack trace?\n"
},
{
"fr... |
I'm building a class that automatically loads a DB record, looks at each DB column name, and fills the associated textbox/label/literal/etc, if it has the same name. I got this idea from Rails, in case that helps clarify what I'm trying to do.
public string presentData(Page thisForm)
{
// .. for each column name
// ..... | To achieve the functionality of automatically mapping database column names to controls on an ASP.NET web form (like textboxes, labels, literals, etc.), you can create a method that iterates over your database columns and uses a more efficient way of finding controls than using `FindControl()` recursively, which can in... | 37,959 | [
{
"from": "human",
"value": "I'm building a class that automatically loads a DB record, looks at each DB column name, and fills the associated textbox/label/literal/etc, if it has the same name. I got this idea from Rails, in case that helps clarify what I'm trying to do.\npublic string presentData(Page th... |
I have a 2-dimensional array of objects and I basically want to databind each one to a cell in a WPF grid. Currently I have this working but I am doing most of it procedurally. I create the correct number of row and column definitions, then I loop through the cells and create the controls and set up the correct bindi... | To leverage XAML data binding and templates in WPF instead of procedural code for populating your grid, you can create a `DataTemplate` that defines how each `Cell` should look. You can also use an `ItemsControl` or `ItemsGrid` that can help you bind your 2D data structure without needing to manually manipulate the gri... | 40,703 | [
{
"from": "human",
"value": "I have a 2-dimensional array of objects and I basically want to databind each one to a cell in a WPF grid. Currently I have this working but I am doing most of it procedurally. I create the correct number of row and column definitions, then I loop through the cells and create ... |
Just for the sake of experimentation, I've been trying to determine different ways to non-destructively chain window.onload functions in a web browser. This is the idea of what I have so far:
var load = window.onload;
var newFunction = function(){
alert("ha!");
}
window.onload = function(){
load();
newFunct... | Yes, chaining `window.onload` functions in the way you've illustrated can lead to potential issues, such as running into an "undefined" error if there are no previously assigned functions. Each chained function call adds a new level to the call stack, which can lead to performance concerns, especially if there are many... | 47,463 | [
{
"from": "human",
"value": "Just for the sake of experimentation, I've been trying to determine different ways to non-destructively chain window.onload functions in a web browser. This is the idea of what I have so far:\nvar load = window.onload;\nvar newFunction = function(){\n alert(\"ha!\");\n}\nwind... |
When writing a class do you group members variables of the same type together? Is there any benefit to doing so? For example:
class Foo
{
private:
bool a_;
bool b_;
int c_;
int d_;
std::string e_;
std::string f_;
...
};
As opposed to:
class Bar
{
private:
std::string e_;
bool ... | Grouping member variables of the same type together in a class can have both benefits and downsides, and the best approach can depend on the specific context and the conventions used in your codebase. Here are some considerations for both approaches:
### Benefits of Grouping by Type
1. **Readability**: Grouping varia... | 44,381 | [
{
"from": "human",
"value": "When writing a class do you group members variables of the same type together? Is there any benefit to doing so? For example:\nclass Foo\n{\nprivate:\n bool a_;\n bool b_;\n int c_;\n int d_;\n std::string e_;\n std::string f_;\n ...\n};\n\nAs opposed to:\... |
A few years ago client Java was unsuitable for web development because a remarkable part of web users did not have Java installed. ( I don't remember exact numbers, more than 10%).
Now I see the Google Analytics stats for a big site and it tells that >98% of users have Java installed.
Is these stats very biased by Jav... | Your observations touch on several important points regarding the usage of Java, Flash, and JavaScript in web development.
### Java Applets and User Statistics
1. **Java Applets Usage**: While you mention that over 98% of users have Java installed according to your Google Analytics stats, it's essential to recognize ... | 44,830 | [
{
"from": "human",
"value": "A few years ago client Java was unsuitable for web development because a remarkable part of web users did not have Java installed. ( I don't remember exact numbers, more than 10%). \nNow I see the Google Analytics stats for a big site and it tells that >98% of users have Java in... |
I'm very new to Cairngorm, so apologies for what's probably a simple question:
I'm working with a number of WCF services imported into Flex Builder 3 (via Data > Manage Web Services), and I'm wondering how to expose those services to the ServiceLocator in Cairngorm. From what I've read so far, it looks like Cairngorm ... | Welcome to Cairngorm! It's great that you're diving into using WCF services with Flex. You’re correct that Cairngorm typically works with services defined in MXML, but you can definitely adapt your existing setup to integrate with Cairngorm's ServiceLocator.
Here's how you can expose your WCF services to the ServiceLo... | 44,276 | [
{
"from": "human",
"value": "I'm very new to Cairngorm, so apologies for what's probably a simple question:\nI'm working with a number of WCF services imported into Flex Builder 3 (via Data > Manage Web Services), and I'm wondering how to expose those services to the ServiceLocator in Cairngorm. From what ... |
I need to read the value of a property from a file in an Ant script and strip off the first few characters. The property in question is
path=file:C:/tmp/templates
This property is store in a file that I can access within the ant script via
<property file="${web.inf.dir}/config.properties"/>
I have two questions:
How... | Hi Don,
You can achieve both of your requirements using Ant's built-in capabilities. Below are the steps to read the `path` property from your properties file and then strip off the leading `file:` prefix.
1. **Reading the property**: After loading the properties file with the `<property>` task, you can access the `p... | 46,464 | [
{
"from": "human",
"value": "I need to read the value of a property from a file in an Ant script and strip off the first few characters. The property in question is\npath=file:C:/tmp/templates\n\nThis property is store in a file that I can access within the ant script via\n<property file=\"${web.inf.dir}/co... |
I am new here so first of all my greetings to you
I am writing an application to run on my Windows Mobile (Pocket PC). FYI, I am using VB.NET.
My idea is to use my e-mail account with my provider, who gives me a lot GB:s to use, as a virtual online storage disk. In a few words, more or less like the GMAIL-drive which y... | Hello Moster67!
Welcome, and thank you for your greetings! It's great to hear about your project, and using email as a virtual storage solution is a creative idea.
Regarding your approach to parsing emails and attachments, your suggestion to skip a complete MIME parser in favor of basic string parsing could work in ... | 44,613 | [
{
"from": "human",
"value": "I am new here so first of all my greetings to you\nI am writing an application to run on my Windows Mobile (Pocket PC). FYI, I am using VB.NET.\nMy idea is to use my e-mail account with my provider, who gives me a lot GB:s to use, as a virtual online storage disk. In a few words... |
Is there a way to get notification of date change in c#?
I have a requirement where I have to do something when the system date is changed.
I found that SystemsEvent.TimeChanged is an event you can hook into, however it is only fired only when user has changed the time.
| In C#, if you want to monitor changes to the system date, you'll have to handle this a bit differently since there isn't a built-in event that fires for date changes like there is for time changes. The `SystemEvents.TimeChanged` event only captures changes to the system time set by the user and won't trigger for change... | 45,854 | [
{
"from": "human",
"value": "Is there a way to get notification of date change in c#?\nI have a requirement where I have to do something when the system date is changed.\nI found that SystemsEvent.TimeChanged is an event you can hook into, however it is only fired only when user has changed the time.\n"
}... |
I have a win form (c#) with a datagridview. I set the grid's datasource to a datatable.
The user wants to check if some data in the datatable exists in another source, so we loop through the table comparing rows to the other source and set the rowerror on the datatable to a short message. The datagridview is not show... | When you set the `RowError` property on a `DataGridViewRow`, the error will not necessarily be displayed automatically unless you are in edit mode for that particular row. If you want to display errors for your rows that are related to validation checks without requiring them to be in edit mode, you need to ensure that... | 39,436 | [
{
"from": "human",
"value": "I have a win form (c#) with a datagridview. I set the grid's datasource to a datatable.\nThe user wants to check if some data in the datatable exists in another source, so we loop through the table comparing rows to the other source and set the rowerror on the datatable to a sh... |
If you have some directories from different version control systems (cvs, svn...), how do you find out what type of repository each came from?
| To determine the type of version control system (VCS) for directories from different systems such as CVS, SVN, Git, etc., you can look for specific indicators or files that are characteristic of each system. Here are some common methods to identify the type of repository:
1. **CVS**:
- Look for a directory named `C... | 47,044 | [
{
"from": "human",
"value": "If you have some directories from different version control systems (cvs, svn...), how do you find out what type of repository each came from?\n"
},
{
"from": "gpt",
"value": "To determine the type of version control system (VCS) for directories from different system... |
I'm currently building a project and I would like to make use of some simple javascript - I know some people have it disabled to prevent XSS and other things. Should I...
a) Use the simple javascript, those users with it disabled are missing out
b) Don't use the simple javascript, users with it enabled have to click a ... | When considering whether to use JavaScript in your project, it's essential to weigh the needs of your users and the functionality of your application. Here are some thoughts on the options you presented:
### a) Use the simple JavaScript
- **Pros**: You can create a more interactive and dynamic user experience. JavaScr... | 45,930 | [
{
"from": "human",
"value": "I'm currently building a project and I would like to make use of some simple javascript - I know some people have it disabled to prevent XSS and other things. Should I...\na) Use the simple javascript, those users with it disabled are missing out\nb) Don't use the simple javascr... |
Am I correct to understand that the abort() method for XMLHttpRequest objects is only available starting from MSIE 7? If so, what equivalent option do I have for aborting an XMLHttpRequest object on timeout in MSIE 6?
Using a JS framework to abstract the problem away is not an option at this time I'm afraid :(. I'm on ... | Yes, you are correct that the `abort()` method for `XMLHttpRequest` objects is only fully supported starting from Internet Explorer 7 (MSIE 7). In Internet Explorer 6, the `XMLHttpRequest` object does not provide an `abort()` method.
If you need to handle request timeouts in MSIE 6, you can work around the issue by im... | 45,388 | [
{
"from": "human",
"value": "Am I correct to understand that the abort() method for XMLHttpRequest objects is only available starting from MSIE 7? If so, what equivalent option do I have for aborting an XMLHttpRequest object on timeout in MSIE 6?\nUsing a JS framework to abstract the problem away is not an ... |
I have just installed darcs 2.1.2.2. When I type darcs help, sth less-like shows up. When I dismiss it with q it goes away but I don't get prompt and can't execute any commands. C-c doesn't work either. I am using bash on gentoo.
| It sounds like you are encountering an issue where the output of `darcs help` is displayed in a pager (likely `less`), and after exiting the pager, the shell prompt does not return as expected. This can happen sometimes due to terminal settings or how the pager interacts with the terminal.
Here are some steps to resol... | 46,476 | [
{
"from": "human",
"value": "I have just installed darcs 2.1.2.2. When I type darcs help, sth less-like shows up. When I dismiss it with q it goes away but I don't get prompt and can't execute any commands. C-c doesn't work either. I am using bash on gentoo.\n"
},
{
"from": "gpt",
"value": "It s... |
I'm just starting out with the whole ajax thing and I need some help. I have a form where the users will have the ability to add multiple e-mail addresses to a record. When the user clicks add a new e-mail address, I am going to perform an ajax call that will insert the email address and then get the current e-mails ... | You're on the right track in thinking about how to handle multiple email addresses with Ajax, but there are a few points to clarify regarding how to structure your data for server-side access while keeping some details hidden from the user.
### Suggested Approach
1. **Dynamic Form Fields**: Use JavaScript to dynamica... | 41,741 | [
{
"from": "human",
"value": "I'm just starting out with the whole ajax thing and I need some help. I have a form where the users will have the ability to add multiple e-mail addresses to a record. When the user clicks add a new e-mail address, I am going to perform an ajax call that will insert the email ... |
I'm writing a service that has five different methods that can take between 5 seconds and 5 minutes to run.
The service will schedule these different methods to run at different intervals.
I don't want any of the methods to run concurrently, so how do I have the methods check to see if another method is running and que... | To ensure that your service can schedule methods without running them concurrently, you can implement a simple queuing mechanism using a mutex or a semaphore. This will allow you to control access to the shared resource (in this case, the execution of your methods) and enforce that only one method is running at a time.... | 43,455 | [
{
"from": "human",
"value": "I'm writing a service that has five different methods that can take between 5 seconds and 5 minutes to run.\nThe service will schedule these different methods to run at different intervals.\nI don't want any of the methods to run concurrently, so how do I have the methods check ... |
I'm using SQL Server 2008 Management studio viewing a 2005 server and have just added 2 users. For some reason they both have slightly different icons and I'm not sure why.
Anyone have a definitive list of the icons and their meaning or a link to microsoft's doc on it as I can't find anything anywhere.
Thanks.
| In SQL Server Management Studio (SSMS), the icons associated with different objects, including users, can vary based on their properties and permissions. While there isn't an exhaustive official list provided by Microsoft for every icon in SSMS, here are some common user-related icons and their meanings:
1. **User Ico... | 47,131 | [
{
"from": "human",
"value": "I'm using SQL Server 2008 Management studio viewing a 2005 server and have just added 2 users. For some reason they both have slightly different icons and I'm not sure why.\nAnyone have a definitive list of the icons and their meaning or a link to microsoft's doc on it as I can... |
I want to write a new application that will use a DBMS. In the design stages of this application and weighing the options I found out that the there will be a lot of database accessing which means many queries. My biggest concern with developing this system is the unwieldy nature of SQL select, update, and delete state... | Given your requirements and preferences, there are several options and approaches you can consider for managing database interactions in your application without scattering SQL statements throughout your code. Since you are open to either PHP or C#, here are some solutions for each language:
### For C#:
1. **Dapper**... | 44,213 | [
{
"from": "human",
"value": "I want to write a new application that will use a DBMS. In the design stages of this application and weighing the options I found out that the there will be a lot of database accessing which means many queries. My biggest concern with developing this system is the unwieldy natur... |
What is the proper way to install Hibernate Tools in Eclipse as a plugin?
The Hibernate site doesn't really give any instructions.
Looking at the Hibernate Tools binary HibernateTools-3.2.4.Beta1-R200810311334.zip, it appears that I can just unzip this in my eclipse directory. Do I just unzip it in my eclipse directory... | Installing Hibernate Tools in Eclipse can be done in a couple of ways, but using the Eclipse Marketplace or installing it via an update site is typically the recommended method rather than unzipping files directly into the Eclipse directory. Here’s how you can do it:
### Method 1: Install via Eclipse Marketplace
1. *... | 45,718 | [
{
"from": "human",
"value": "What is the proper way to install Hibernate Tools in Eclipse as a plugin?\nThe Hibernate site doesn't really give any instructions.\nLooking at the Hibernate Tools binary HibernateTools-3.2.4.Beta1-R200810311334.zip, it appears that I can just unzip this in my eclipse directory.... |
I can see some options available:
1) Use PEAR's POP3 class --> tried it, having some weird weird issues like FF choking to death on their sample code!!!
2) Use PHPClasses (here) --> seems to be the viable option at the time, still working on it
3) Write my own or use one of the snippets available
The target is currentl... | When dealing with email in PHP, particularly with POP3 for fetching emails, you do have several options to consider. Since you've already tried PEAR's POP3 class and experienced issues, here are some alternative approaches you can consider:
### 1. PHP IMAP Functions
The built-in PHP IMAP functions are a robust and wid... | 43,703 | [
{
"from": "human",
"value": "I can see some options available:\n1) Use PEAR's POP3 class --> tried it, having some weird weird issues like FF choking to death on their sample code!!!\n2) Use PHPClasses (here) --> seems to be the viable option at the time, still working on it\n3) Write my own or use one of t... |
I have an application with several files that contain configuration parameters and other data that changes as the user uses the application. These files can change with newer versions of my software, but the user can also modify them (or they may be changed by the application itself). Basically, I'm looking for a sol... | To handle the scenario of updating configuration files in a Windows Installer (WiX) project without overwriting user-modified versions, you can adopt a strategy that leverages the features of WiX while managing user modifications. Here are the steps to achieve that:
### Recommended Approach
1. **Separate Default and ... | 46,576 | [
{
"from": "human",
"value": "I have an application with several files that contain configuration parameters and other data that changes as the user uses the application. These files can change with newer versions of my software, but the user can also modify them (or they may be changed by the application i... |
i've got a commenting system in our database. Just like stackoverflow -> each post has a list of comments. kewl.
Anonymous people can add a comment or registered users also.
In my table, i'm thinking of having the following:
Userid int NULLABLE
AnonymousNickname varchar(100) NULLABLE
AnonymousEmail varchar(200) NULLAB... | Yes, you should enforce a constraint to ensure that only one of either the `Userid` (for registered users) or the anonymous fields (`AnonymousNickname`, `AnonymousEmail`) is populated for each comment. This can be accomplished using a `CHECK` constraint in SQL Server.
A `CHECK` constraint allows you to specify a logi... | 46,606 | [
{
"from": "human",
"value": "i've got a commenting system in our database. Just like stackoverflow -> each post has a list of comments. kewl.\nAnonymous people can add a comment or registered users also.\nIn my table, i'm thinking of having the following:\n\nUserid int NULLABLE\nAnonymousNickname varchar(10... |
What would be the best method of automatically generating a Release Notes text file from a Team Foundation Server 2008 nightly build?
| Generating Release Notes automatically from a Team Foundation Server (TFS) 2008 nightly build can be accomplished by following these steps:
### 1. Set Up Build Process
Ensure your TFS build process is configured correctly to include the necessary information about changes, such as check-ins, work items, and build resu... | 45,385 | [
{
"from": "human",
"value": "What would be the best method of automatically generating a Release Notes text file from a Team Foundation Server 2008 nightly build?\n"
},
{
"from": "gpt",
"value": "Generating Release Notes automatically from a Team Foundation Server (TFS) 2008 nightly build can be... |
Consider the following simple C program that read a file into a buffer and displays that buffer to the console:
#include<stdio.h>
main()
{
FILE *file;
char *buffer;
unsigned long fileLen;
//Open file
file = fopen("HelloWorld.txt", "rb");
if (!file)
{
fprintf(stderr, "Unable to open fi... | The issue you're facing with your C program is related to how you're handling the buffer and how you are treating the contents of that buffer as a string. Let's break down the problem.
1. **Buffer Allocation**: You correctly allocate memory for the buffer with `malloc(fileLen + 1)`, which gives you enough space for th... | 43,159 | [
{
"from": "human",
"value": "Consider the following simple C program that read a file into a buffer and displays that buffer to the console:\n#include<stdio.h>\n\nmain()\n{\n FILE *file;\n char *buffer;\n unsigned long fileLen;\n //Open file\n file = fopen(\"HelloWorld.txt\", \"rb\");\n if (... |
I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|Preferences and reimport them, the settings never completely get imported back. Some colors are restored and others are left unchanged, leaving me ... | The issue you're experiencing with exporting and importing settings in Eclipse, especially for syntax highlighting, is a known limitation, particularly in older versions like Eclipse 3.4 (Ganymede). Here are a few suggestions to help you more reliably save and restore your syntax highlighting settings:
1. **Use the `.... | 46,205 | [
{
"from": "human",
"value": "I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|Preferences and reimport them, the settings never completely get imported back. Some colors are restored a... |
I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they recommend). I've found the documentation... | Integrating Spring Webflow 2 with Apache Tiles 2 can seem daunting at first, but it’s quite manageable with the right guidance. Below are steps to help you set up Tiles with Spring Webflow, along with some resources.
### Step 1: Set Up Your Dependencies
Make sure you have the required dependencies in your `pom.xml` i... | 42,924 | [
{
"from": "human",
"value": "I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they ... |
We have a website/webservice running on one of our servers. We hit that webservice once a day with a scheduled .bat scipt.
Just recently the scheduled task started to fail. The log shows "Invalid URI: The hostname could not be parsed."
When we're logged into the server we can reach the website through http://localhost/... | The error message "Invalid URI: The hostname could not be parsed" indicates that there is likely an issue with the format of the URL you are trying to access in your scheduled task. Since you've mentioned that you can access the web service through the browser when logged in, but it fails when called from the scheduled... | 45,759 | [
{
"from": "human",
"value": "We have a website/webservice running on one of our servers. We hit that webservice once a day with a scheduled .bat scipt.\nJust recently the scheduled task started to fail. The log shows \"Invalid URI: The hostname could not be parsed.\"\nWhen we're logged into the server we ca... |
I am in the process of setting up CruiseControl.NET. The problem I am having is that I am running CC as a console application and when my build completes successfully and executes (using exec) it launches it within the CruiseControl DOS prompt. I am just using simple batch files to launch my app but having it run withi... | Yes, you can open a new command prompt window from within your batch file using the `start` command. This will allow your application to run independently in a separate window, which should resolve the issue of CruiseControl.NET (CC.NET) thinking the build is still running.
Here's how you can modify your batch file to... | 48,518 | [
{
"from": "human",
"value": "I am in the process of setting up CruiseControl.NET. The problem I am having is that I am running CC as a console application and when my build completes successfully and executes (using exec) it launches it within the CruiseControl DOS prompt. I am just using simple batch files... |
I'm in the phase of implementing the server-to-server communication part of a XMPP Server.
I'm testing my implementation with Gmail.com and Jabber.org but both seem to use the dialback protocol. Does anyone know more information about this protocol related to this servers?
The protocol seems to be separated in several ... | The XMPP (Extensible Messaging and Presence Protocol) server-to-server (S2S) communication uses a mechanism called "Server Dialback" for authentication and trust establishment between servers. Dialback is a crucial part of federating XMPP servers, ensuring that messages from one server to another are legitimate and tha... | 42,075 | [
{
"from": "human",
"value": "I'm in the phase of implementing the server-to-server communication part of a XMPP Server.\nI'm testing my implementation with Gmail.com and Jabber.org but both seem to use the dialback protocol. Does anyone know more information about this protocol related to this servers?\nThe... |
I'm searching the XSD (XML Schema) for the Microsoft .NET application configuration files. Till now I found only this: Configuration File Schema for the .NET Framework but I'm more interested in the XSD.
Or - asked in general - I search also XSDs in general for .NET configuration files listed here.
I've Visual Studio 2... | The XML Schema Definition (XSD) files for Microsoft .NET configuration files can be useful for validating your configuration files in XML format. However, finding the specific XSD files for .NET application configurations (like `app.config` or `web.config`) is not always straightforward since they are not always direct... | 44,822 | [
{
"from": "human",
"value": "I'm searching the XSD (XML Schema) for the Microsoft .NET application configuration files. Till now I found only this: Configuration File Schema for the .NET Framework but I'm more interested in the XSD.\nOr - asked in general - I search also XSDs in general for .NET configurati... |
I'm running MSBuild from a NAnt script. When it tries to register one of my assemblies for com interop, the script stops like it's stuck.
If I run regasm.exe on the assembly, it succeeds. Even if I run MSBuild itself from the command-line with the exact same parameters, it builds successfully.
What is the problem wit... | The issue you're encountering when running MSBuild from an NAnt script, particularly when it comes to registering an assembly for COM Interop, could be related to several factors, including permissions, execution context, and the way NAnt handles process execution.
Here are a few potential reasons and solutions to con... | 47,398 | [
{
"from": "human",
"value": "I'm running MSBuild from a NAnt script. When it tries to register one of my assemblies for com interop, the script stops like it's stuck.\nIf I run regasm.exe on the assembly, it succeeds. Even if I run MSBuild itself from the command-line with the exact same parameters, it bu... |
I have only just found out about DB2 Express. I had a quick look and was unable to find a load of information about it but would be interested in hearing how people have found it compared to SQL Server Express (particularly 2008) in terms of
Ease of deployment
Ease of use and development tools
Limitations such as ... | DB2 Express and SQL Server Express are both free editions of their respective database management systems, designed for small-scale applications, development, and learning. Here’s a comparative overview based on the criteria you've mentioned:
### Ease of Deployment
- **DB2 Express**:
- Installation can be straightf... | 42,781 | [
{
"from": "human",
"value": "I have only just found out about DB2 Express. I had a quick look and was unable to find a load of information about it but would be interested in hearing how people have found it compared to SQL Server Express (particularly 2008) in terms of\n\nEase of deployment \nEase of use ... |
How would you ensure that only one user is logged in per account at a time?
Assuming cookies are persistent.
| To ensure that only one user is logged in per account at a time, you can implement a combination of session management and token invalidation techniques. Here are some steps to achieve this:
### 1. Use Unique Session Identifiers
When a user logs in, generate a unique session identifier (token) and store it in a databa... | 45,248 | [
{
"from": "human",
"value": "How would you ensure that only one user is logged in per account at a time?\nAssuming cookies are persistent.\n"
},
{
"from": "gpt",
"value": "To ensure that only one user is logged in per account at a time, you can implement a combination of session management and t... |
I think I might be approaching this in the wrong way, so I would appreciate any comments/guidance. Hopefully I can explain coherently enough what I am trying to achieve:
I want to create a block of HTML
(e.g. a box containing a user's
profile), which I will load as part
of my layout on most pages that I
generate.
I wo... | Your approach to creating a reusable HTML block for a user's profile that can be loaded both on initial page load and dynamically via AJAX is definitely feasible, and it's good that you're considering how to avoid code duplication. Here's a structured way to achieve this:
### Step 1: Create a Partial View (HTML Block)... | 44,076 | [
{
"from": "human",
"value": "I think I might be approaching this in the wrong way, so I would appreciate any comments/guidance. Hopefully I can explain coherently enough what I am trying to achieve:\n\nI want to create a block of HTML\n(e.g. a box containing a user's\nprofile), which I will load as part\nof... |
I am using the following html page:
<html>
<head>
<title>AJAX Example</title>
<meta http-equiv="Content-Type" content="text/html"; charset="iso-8859-1">
</head>
<script language="JavaScript" src="ajaxlib.js"></script>
<!--define the ajax javascript library-->
<body>
Click this <a href="#" OnClick="GetEmployee()... | It looks like you're trying to implement an AJAX request to fetch and display some content dynamically on your web page, but you're encountering a problem where the JavaScript function isn't being called, and the PHP file returns unexpected characters.
### Here are a few steps you can take to debug and resolve the iss... | 44,205 | [
{
"from": "human",
"value": "I am using the following html page:\n<html>\n\n<head>\n\n<title>AJAX Example</title>\n\n<meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"iso-8859-1\">\n\n</head>\n\n<script language=\"JavaScript\" src=\"ajaxlib.js\"></script>\n\n<!--define the ajax javascript l... |
My application has just started exhibiting strange behaviour.
I can boot it through the Carbide Debugger (using TRK) and it works fine with no visible errors and is left installed on the device.
Any further attempts to launch the application fail, even after a restart. Uninstalling and downloading the .sisx file manual... | When you're facing issues with an application on a device that works fine when launched through a debugger but fails during regular execution, there are several potential causes and avenues to investigate. Here are some steps you can take to troubleshoot the issue:
1. **Check Application Logs**: If your application ha... | 44,454 | [
{
"from": "human",
"value": "My application has just started exhibiting strange behaviour.\nI can boot it through the Carbide Debugger (using TRK) and it works fine with no visible errors and is left installed on the device.\nAny further attempts to launch the application fail, even after a restart. Uninsta... |
I am creating a WCF service hosted within IIS7 on Windows Vista SP1. I am getting the following error:
The certificate 'CN=SignedByLocalHost' must have a private key that is capable of key exchange. The process must have access rights for the private key.
It looks like I would need to give the host process assess to t... | You're encountering an issue with the WCF service regarding the certificate used for secure communications. The error message indicates that the certificate you are trying to use does not have a private key that is capable of key exchange, and the process does not have the necessary permissions to access the private ke... | 41,461 | [
{
"from": "human",
"value": "I am creating a WCF service hosted within IIS7 on Windows Vista SP1. I am getting the following error:\nThe certificate 'CN=SignedByLocalHost' must have a private key that is capable of key exchange. The process must have access rights for the private key. \nIt looks like I woul... |
What do I need to do to avoid the "Manual Install" in Firefox for a Plugin and where do I have to go or what do I have to do to avoid the (Author not verified) message when downloading a Plugin. Ideally I would like to initiate the installation of the Plugin automatically and if I need to sign the Plugin somehow to sho... | To avoid the "Manual Install" message and the "Author not verified" warning when adding a plugin (extension) to Firefox, you need to follow certain guidelines and requirements that align with Mozilla's policies. Here's how you can address these concerns:
### 1. **Use a Signed Extension**
Firefox requires that all exte... | 44,100 | [
{
"from": "human",
"value": "What do I need to do to avoid the \"Manual Install\" in Firefox for a Plugin and where do I have to go or what do I have to do to avoid the (Author not verified) message when downloading a Plugin. Ideally I would like to initiate the installation of the Plugin automatically and ... |
What is the best way to send Direct3D output to a printer or a plotter?
| Sending Direct3D output to a printer or a plotter involves a few steps, as Direct3D primarily deals with rendering graphics for display rather than directly interfacing with printing devices. Here are some methods you can use to achieve this:
### 1. **Render to Bitmap:**
- **Capture the Scene:** Render your Direct3... | 43,282 | [
{
"from": "human",
"value": "What is the best way to send Direct3D output to a printer or a plotter?\n"
},
{
"from": "gpt",
"value": "Sending Direct3D output to a printer or a plotter involves a few steps, as Direct3D primarily deals with rendering graphics for display rather than directly inter... |
I have a client that's been struggling with slow loading pdf files on the web.
My client has some very large pdf files that are almost 10 Mb. They take upwards of 3-4 minutes to download. The files will not display until the whole file is loaded.
We and they have seen other's sites where the pdfs load one page at a t... | The behavior you’re describing—where PDFs load one page at a time instead of having to wait for the entire file to download—relates to how the PDF file is structured, specifically whether it is "linearized" (or "optimized for fast web view"). When a PDF is linearized, it is arranged in such a way that the initial pages... | 42,156 | [
{
"from": "human",
"value": "I have a client that's been struggling with slow loading pdf files on the web. \nMy client has some very large pdf files that are almost 10 Mb. They take upwards of 3-4 minutes to download. The files will not display until the whole file is loaded. \nWe and they have seen other'... |
[EDIT]In Short: How would you write an automatic spell checker? The idea is that the checker builds a list of words from a known good source (a dictionary) and automatically adds new words when they are used often enough. Words which haven't been used a while should be phased out. So if I delete part of a scene which c... | Creating an automatic spell checker that meets your needs involves a few key components: word tracking, sets management, typo handling, and an aging mechanism for word retention. Here's a strategy to implement this system effectively:
### Components of the Spell Checker
1. **Data Structures**:
- **Sets for Word Tr... | 42,857 | [
{
"from": "human",
"value": "[EDIT]In Short: How would you write an automatic spell checker? The idea is that the checker builds a list of words from a known good source (a dictionary) and automatically adds new words when they are used often enough. Words which haven't been used a while should be phased ou... |
I am trying to call a Actionscript function from javascript but I am having problems in Internet Explorer.
I am using Swiff.remote in mootools 1.2.1 to call the actionscript function ie:
Swiff.remote(playSwf.toElement(), 'sendResult', result, plays, name);
This all works fine in FireFox, Safari and Opera but I'm getti... | Calling ActionScript functions from JavaScript can sometimes present issues, particularly with older browsers like Internet Explorer 6 and 7. Here are some potential solutions and troubleshooting tips that may help you resolve the "unspecified" error you're encountering.
### 1. Check Flash Version Compatibility
Ensure... | 44,726 | [
{
"from": "human",
"value": "I am trying to call a Actionscript function from javascript but I am having problems in Internet Explorer.\nI am using Swiff.remote in mootools 1.2.1 to call the actionscript function ie:\nSwiff.remote(playSwf.toElement(), 'sendResult', result, plays, name);\n\nThis all works fi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.