instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm looking at the source code for the .net membership provider, and it sqlmembershipprovider.cs there are calls to EncryptPassword and DecryptPassword but I don't see the method anywhere in the source.
What algorithm are they using? Isn't the source for that released also?
| In the .NET Framework, the `SqlMembershipProvider` utilizes the `EncryptPassword` and `DecryptPassword` methods to handle password encryption and decryption. However, the specific implementation of these methods is not provided directly in the `SqlMembershipProvider` class itself. Instead, they are typically implemente... | 36,371 | [
{
"from": "human",
"value": "I'm looking at the source code for the .net membership provider, and it sqlmembershipprovider.cs there are calls to EncryptPassword and DecryptPassword but I don't see the method anywhere in the source.\nWhat algorithm are they using? Isn't the source for that released also?\n"... |
I'm building a .NET application where I want to dynamically add an email address for users when they create an account, so that they can email themselves things to their account and see it in the app.
The email address would be something like [account_name]@[site.com].
Is there a good reference URL to read which explai... | Creating a dynamic email address for users as part of your .NET application can be a great way to enhance the user experience, allowing them to send emails to themselves and access content directly through their accounts. Below are a few key points and resources to help you with this feature, especially in the context ... | 35,530 | [
{
"from": "human",
"value": "I'm building a .NET application where I want to dynamically add an email address for users when they create an account, so that they can email themselves things to their account and see it in the app.\nThe email address would be something like [account_name]@[site.com].\nIs ther... |
I'm working on an intranet with several subdomains. I have control over each subdomain, so security of cross-site requests is not a concern. I have PHP scripts with JSON responses I'd like to call from multiple subdomains without duplication. For GET requests, I can do this with AJAX and JSONP, but that doesn't work wi... | It sounds like you're dealing with a common issue when managing multiple subdomains and needing to share data between them. Given that you have control over each subdomain and security is not a concern, there are several approaches you could consider for handling POST requests. Let's discuss each of your suggestions br... | 32,708 | [
{
"from": "human",
"value": "I'm working on an intranet with several subdomains. I have control over each subdomain, so security of cross-site requests is not a concern. I have PHP scripts with JSON responses I'd like to call from multiple subdomains without duplication. For GET requests, I can do this with... |
I have a Oracle database and one of the fields is a date range field. It is basically just stored in the database as a VARCHAR(40) in the format YYYY/MM/DD-YYYY/MM/DD. I want to map it in nHibernate to a custom class I have created like this
public class DateTimeRange
{
public DateTimeRange(DateTime fromTime, DateT... | To map a custom class like `DateTimeRange` to a `VARCHAR` field in an Oracle database using NHibernate, you will need to create a custom user type. This user type will handle the conversion between the `VARCHAR` representation stored in the database and your `DateTimeRange` class.
Here are the steps to create a custom... | 32,089 | [
{
"from": "human",
"value": "I have a Oracle database and one of the fields is a date range field. It is basically just stored in the database as a VARCHAR(40) in the format YYYY/MM/DD-YYYY/MM/DD. I want to map it in nHibernate to a custom class I have created like this\npublic class DateTimeRange\n{\n p... |
I want to let the user draw on an image in a browser. In other words, I need both bitmapped graphics and drawing capabilities, whether vector or bitmapped.
Canvas looks good, but is not supported by IE, and though there is ExCanvas, I wonder if ExCanvas is stable enough for consistent use in IE6 through 8.
Or best of a... | If you're looking for an open-source solution to allow users to draw on images in a browser, especially with support for Internet Explorer versions 6 through 8, your options are somewhat limited due to the lack of native support for the `<canvas>` element in those older browsers. However, there are some libraries and t... | 36,215 | [
{
"from": "human",
"value": "I want to let the user draw on an image in a browser. In other words, I need both bitmapped graphics and drawing capabilities, whether vector or bitmapped.\nCanvas looks good, but is not supported by IE, and though there is ExCanvas, I wonder if ExCanvas is stable enough for con... |
I am trying to fade in a on mouseover and fade out on mouseout:
$("p.follow").mouseover(function(){
$(this).fadeTo("slow", 1.00);
})
$("p.follow").mouseout(function(){
$(this).fadeTo("fast", 0.50);
})
If you go to ryancoughlin.com and on the right side, if you go over it you will see what I mean, it... | It sounds like the issue you're experiencing is due to the fact that the mouseover event is being triggered multiple times as you hover over the paragraph, causing it to repeatedly fade in. To resolve this, you can use a combination of `stop()` and `fadeTo()` to ensure that any ongoing animations are stopped before sta... | 35,865 | [
{
"from": "human",
"value": "I am trying to fade in a on mouseover and fade out on mouseout:\n $(\"p.follow\").mouseover(function(){\n $(this).fadeTo(\"slow\", 1.00);\n})\n$(\"p.follow\").mouseout(function(){\n $(this).fadeTo(\"fast\", 0.50);\n})\n\nIf you go to ryancoughlin.com and on the r... |
Is it possible to have two virtual directories under the same website in IIS but have the virtual directories be using different versions of the .net framework?
For example, under the default website, can I have one virtual directory targeting the 2.0 framework and a second virtual directory targeting the 1.1 framework... | Yes, it is possible to have two virtual directories under the same website in IIS 6, each targeting different versions of the .NET Framework (e.g., one using .NET Framework 2.0 and the other using .NET Framework 1.1). However, there are some specific steps you need to follow to set this up.
### Steps to Configure Virt... | 35,432 | [
{
"from": "human",
"value": "Is it possible to have two virtual directories under the same website in IIS but have the virtual directories be using different versions of the .net framework?\nFor example, under the default website, can I have one virtual directory targeting the 2.0 framework and a second vir... |
I'm working on a search module that searches in text columns that contains html code. The queries are constructed like: WHERE htmlcolumn LIKE '% searchterm %';
Default the modules searches with spaces at both end of the searchterms, with wildcards at the beginning and/or the end of the searchterms these spaces are remo... | To achieve the search functionality you are looking for—where you want to match terms that are not preceded or followed by alphabetic characters (A-Z, a-z)—you can leverage regular expressions in your SQL queries. However, the ability to use regular expressions depends on the database system you are using, as not all S... | 34,574 | [
{
"from": "human",
"value": "I'm working on a search module that searches in text columns that contains html code. The queries are constructed like: WHERE htmlcolumn LIKE '% searchterm %';\nDefault the modules searches with spaces at both end of the searchterms, with wildcards at the beginning and/or the en... |
I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA_OPTS environment variable, but I'm testing that with jconsole to see if it work... | To configure Tomcat's memory settings without relying on the configuration GUI, you can use environment variables and/or configuration files to set the JVM options.
### 1. Use `CATALINA_OPTS`
While you mentioned that `CATALINA_OPTS` didn’t work for you, it is typically the recommended way to set memory options that wi... | 33,365 | [
{
"from": "human",
"value": "I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA_OPTS environment variable, but I'm tes... |
I have a CSV file that has a column that contains strings that look like integers. That is they should be dealt with as strings, but since they are numbers they appear to be imported as integers (dropping off the leading zeroes).
Example Data:
0000000000079
0000999000012
0001002000005
0004100000007
The problem I'm ... | When using OleDB to read data from CSV files, it can automatically infer the data types of the columns, which might lead to the issues you're experiencing with leading zeros and data types, especially for large numeric strings that exceed the size of a standard integer. Unfortunately, with OleDB, you cannot directly sp... | 36,605 | [
{
"from": "human",
"value": "I have a CSV file that has a column that contains strings that look like integers. That is they should be dealt with as strings, but since they are numbers they appear to be imported as integers (dropping off the leading zeroes).\nExample Data:\n\n0000000000079\n0000999000012\n... |
Is it best to create sharepoint lists in a feature using xml (schema.xml) or using custom code which create the list using the API?
I ask because I would expect the declarative approach to be the easiest, but according to all tutorials I have found it seems I have to create an enormous schema.xml file by copying and m... | When deciding between creating SharePoint lists using the declarative approach (via `schema.xml`) and using custom code with the SharePoint API, both methods have their pros and cons. Here’s a breakdown to help you make an informed decision:
### Declarative Approach (schema.xml)
**Pros:**
1. **Easier Deployment**: On... | 36,284 | [
{
"from": "human",
"value": "Is it best to create sharepoint lists in a feature using xml (schema.xml) or using custom code which create the list using the API? \nI ask because I would expect the declarative approach to be the easiest, but according to all tutorials I have found it seems I have to create an... |
I have an access database, with a query made. I need to automate it so that each night this query can run and export to a tab delimited csv file. It is not possible to export a query to a csv file from within access. My question is, are there any tools that can select certain tables, or perform an sql query on an mdb f... | Yes, there are several tools and methods you can use to automate the export of query results from an Access database to a tab-delimited CSV file. Here are some approaches you can consider:
### 1. **Using VBA within Access:**
You can create a VBA script in Access that runs your query and exports the results to a CSV fi... | 35,071 | [
{
"from": "human",
"value": "I have an access database, with a query made. I need to automate it so that each night this query can run and export to a tab delimited csv file. It is not possible to export a query to a csv file from within access. My question is, are there any tools that can select certain ta... |
I'm familiar with Sybase / SQL server, where I can create a temp. table like this:
SELECT *
INTO #temp
FROM tab1 ,
tab2
WHERE tab1.key = tab2.fkey
SELECT *
FROM #temp
WHERE field1 = 'value'
#temp only exists for the duration of this session, and can only be seen by me.
I would like to do a sim... | In Oracle, the concept of temporary tables is indeed implemented through Global Temporary Tables (GTT). While the terminology and underlying functionality might differ from Sybase/SQL Server, you can achieve a similar effect.
### Global Temporary Tables (GTT) in Oracle
Global Temporary Tables are created in the datab... | 30,774 | [
{
"from": "human",
"value": "I'm familiar with Sybase / SQL server, where I can create a temp. table like this: \nSELECT * \nINTO #temp\nFROM tab1 , \n tab2 \nWHERE tab1.key = tab2.fkey\n\nSELECT * \nFROM #temp \nWHERE field1 = 'value' \n\n#temp only exists for the duration of this session, an... |
A web app our group has put together uses the ASP.NET Wizard control. Each step in the wizard contains a corresponding custom UserControl.
The trouble is that as you go through the wizard steps, all the UserControls are loaded on each step, rather than just the one used in that step. That doesn't seem right to me.
So... | When working with the ASP.NET Wizard control, it is indeed important to manage the UserControls efficiently, especially when you want to avoid loading all controls at once. If all the UserControls are being instantiated with each wizard step, it might lead to performance issues and increased resource consumption. Here ... | 31,609 | [
{
"from": "human",
"value": "A web app our group has put together uses the ASP.NET Wizard control. Each step in the wizard contains a corresponding custom UserControl.\nThe trouble is that as you go through the wizard steps, all the UserControls are loaded on each step, rather than just the one used in tha... |
I've got a console application that compiles and executes fine with Visual C++ 6.0, except that it will then only get as far as telling me about missing command line parameters. There doesn't seem to be anywhere obvious to enter these. How do I run or debug it with command line parameters?
| To run or debug a console application with command line parameters in Visual C++ 6.0, you need to specify the parameters in the project settings. Here are the steps to do this:
1. **Open your project** in Visual C++ 6.0.
2. Go to the **Project** menu and select **Settings**. This will open the Project Settings dialog... | 36,850 | [
{
"from": "human",
"value": "I've got a console application that compiles and executes fine with Visual C++ 6.0, except that it will then only get as far as telling me about missing command line parameters. There doesn't seem to be anywhere obvious to enter these. How do I run or debug it with command line ... |
I'm writing a simple .bat file and I've run into some weird behavior. There are a couple places where I have to do a simple if/else, but the code inside the blocks don't seem to be working correctly.
Here's a simple case that demonstrates the error:
@echo off
set MODE=FOOBAR
if "%~1"=="" (
set MODE=all
echo mode... | The behavior you are encountering is due to how variable expansion works in batch files. When you use `set` to change a variable inside a block (such as within an `if` statement), the value is not updated immediately for use in the same block unless you use a special technique.
In your example, when you do `echo mode:... | 37,544 | [
{
"from": "human",
"value": "I'm writing a simple .bat file and I've run into some weird behavior. There are a couple places where I have to do a simple if/else, but the code inside the blocks don't seem to be working correctly.\nHere's a simple case that demonstrates the error:\n@echo off\n\nset MODE=FOOB... |
In eclipse 3.4 I'm trying to do some performance tests on a large product, one of the included libraries is the vecmath.jar (javax.vecmath package) from the Java3D project. Everything was working fine and then when trying to run it yesterday I get this exception/error not long after starting it up:
java.lang.Unsupport... | The issue you're experiencing, where the class file is reported as version 49.0 (Java 5) while the class file viewer shows it as version 46.0 (Java 2), suggests that there is a mismatch between the Java Virtual Machine (JVM) you're using and the libraries that are available in your environment.
The `java.lang.Unsuppor... | 33,458 | [
{
"from": "human",
"value": "In eclipse 3.4 I'm trying to do some performance tests on a large product, one of the included libraries is the vecmath.jar (javax.vecmath package) from the Java3D project. Everything was working fine and then when trying to run it yesterday I get this exception/error not long ... |
I need your advice with converting plain text to an URL.
The scenario will be this: The user will select some entry and then click a "convert to link" button.
The entry text the user selected will convert to (link: selected_text). I do it with JavaScript. And after that, when he clicks the Save button to save all his ... | To convert selected text into a clickable link in a user-friendly way, you'll want to follow these steps:
1. **JavaScript Handling**: When a user selects some text and clicks the "convert to link" button, you can capture the selected text, format it as a link using JavaScript, and insert it back into the text box or a... | 35,379 | [
{
"from": "human",
"value": "I need your advice with converting plain text to an URL.\nThe scenario will be this: The user will select some entry and then click a \"convert to link\" button. \nThe entry text the user selected will convert to (link: selected_text). I do it with JavaScript. And after that, wh... |
I followed the commonly-linked tip for reducing an application to the system tray : http://www.developer.com/net/csharp/article.php/3336751 Now it works, but there is still a problem : my application is shown when it starts ; I want it to start directly in the systray. I tried to minimize and hide it in the Load event,... | To make your application start minimized to the system tray, you can modify the `Main` method to check if the application is being started normally or if it is being started by the user (e.g., through the system tray icon). You can use the `Form.WindowState` property and call `Hide()` method for the main form in the `L... | 34,975 | [
{
"from": "human",
"value": "I followed the commonly-linked tip for reducing an application to the system tray : http://www.developer.com/net/csharp/article.php/3336751 Now it works, but there is still a problem : my application is shown when it starts ; I want it to start directly in the systray. I tried t... |
What features do you wish were in common languages? More precisely, I mean features which generally don't exist at all but would be nice to see, rather than, "I wish dynamic typing was popular."
| That's an interesting question! Here are some features that aren't commonly found across programming languages but could greatly enhance programming experience and expressiveness if they were more widely adopted:
1. **Built-in Undo/Redo for Code Changes**: Imagine if programming languages had a built-in mechanism that... | 36,006 | [
{
"from": "human",
"value": "What features do you wish were in common languages? More precisely, I mean features which generally don't exist at all but would be nice to see, rather than, \"I wish dynamic typing was popular.\"\n"
},
{
"from": "gpt",
"value": "That's an interesting question! Here ... |
I am writing an RSS feed (for fun) and was looking at the spec here.
RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.
Obviously this means that I am not serving 'pure' RSS if I choose the JSON option. That said, if I conform... | Creating a JSON-based feed that mimics RSS is an interesting idea, and you're correct in that it deviates from the traditional RSS specification which mandates XML formatting. Here are some points to consider regarding your proposal:
1. **Feasibility**: As you've mentioned, if you create a JSON feed and ensure it foll... | 29,278 | [
{
"from": "human",
"value": "I am writing an RSS feed (for fun) and was looking at the spec here.\n\nRSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.\n\nObviously this means that I am not serving 'pure' RSS if I ch... |
escaping html is fine - it will remove <'s and >'s etc.
ive run into a problem where i am outputting a filename inside a comment tag eg. <!-- ${filename} -->
of course things can be bad if you dont escape, so it becomes:
<!-- <c:out value="${filename}"/> -->
the problem is that if the file has "--" in the name, all th... | When dealing with HTML comments, especially in situations where a filename might contain the string `--`, it's essential to ensure that your comment does not inadvertently break the HTML structure. As you mentioned, the sequence `<!-- -- -->` is invalid and will break your HTML output.
Here are some strategies you ca... | 38,047 | [
{
"from": "human",
"value": "escaping html is fine - it will remove <'s and >'s etc. \nive run into a problem where i am outputting a filename inside a comment tag eg. <!-- ${filename} -->\nof course things can be bad if you dont escape, so it becomes:\n<!-- <c:out value=\"${filename}\"/> -->\nthe problem i... |
I have an application which I have made a 256 x 256 Windows Vista icon for.
I was wondering how I would be able to use a 256x256 PNG file in the ico file used as the application icon and show it in a picture box on a form.
I am using VB.NET, but answers in C# are fine. I'm thinking I may have to use reflection.
I am no... | To use a 256x256 PNG file as an icon in a Windows Forms application (specifically in a PictureBox) and create an ICO file in VB.NET or C#, you can follow these steps. Since Windows XP doesn't natively support 256x256 icons in the ICO format, it's advisable to use a system that supports Vista or later.
### Steps to Cre... | 35,286 | [
{
"from": "human",
"value": "I have an application which I have made a 256 x 256 Windows Vista icon for.\nI was wondering how I would be able to use a 256x256 PNG file in the ico file used as the application icon and show it in a picture box on a form.\nI am using VB.NET, but answers in C# are fine. I'm thi... |
Possible Duplicate:
What's the difference between NOT EXISTS vs. NOT IN vs. LEFT JOIN WHERE IS NULL?
I need to wite a query that will retrieve the records from Table A , provided that the key in Table A does not exist in Table B.
Any help will be appreciated.
Thanks
| To retrieve records from Table A where the keys do not exist in Table B, you can use several approaches. Below are three common methods: using `NOT EXISTS`, `NOT IN`, and a `LEFT JOIN`. Here’s how each of these methods would look in SQL:
### Method 1: Using `NOT EXISTS`
```sql
SELECT *
FROM TableA a
WHERE NOT EXISTS ... | 34,299 | [
{
"from": "human",
"value": "\nPossible Duplicate:\nWhat's the difference between NOT EXISTS vs. NOT IN vs. LEFT JOIN WHERE IS NULL? \n\nI need to wite a query that will retrieve the records from Table A , provided that the key in Table A does not exist in Table B.\nAny help will be appreciated.\nThanks\n"
... |
I develop rich client software on Mac OS X and Linux. I wish to port an application to Windows and not being a user of Microsoft products, I'm not very familiar with Windows in general.
What I'm familiar with:
On Mac OS X, I have the option of Cocoa and Objective C or Carbon and C/C++. On Linux, I have the option of GT... | To port your application to Windows, you'll want to choose a GUI framework and language that is well-supported, compatible with your cross-platform C++ core, and follows similar design principles to what you have used on macOS and Linux. Below are the answers to your questions:
### Question 1: Preferred Language and G... | 35,212 | [
{
"from": "human",
"value": "I develop rich client software on Mac OS X and Linux. I wish to port an application to Windows and not being a user of Microsoft products, I'm not very familiar with Windows in general.\nWhat I'm familiar with:\nOn Mac OS X, I have the option of Cocoa and Objective C or Carbon a... |
I need to find the min and max value in an array. The .max function works but .min keeps showing zero.
Public Class Program_2_Grade
Dim max As Integer
Dim min As Integer
Dim average As Integer
Dim average1 As Integer
Dim grade As String
Private Sub Button1_Click(ByVal sender As System.Object, By... | The issue you're experiencing with the `.Min()` method returning zero in your Visual Basic .NET code is likely due to how you are managing the `counter` variable and how you are iterating through the grades.
### Potential Issues
1. **Counter Management**: Ensure the `counter` variable reflects the number of grades e... | 30,679 | [
{
"from": "human",
"value": "I need to find the min and max value in an array. The .max function works but .min keeps showing zero.\nPublic Class Program_2_Grade\n Dim max As Integer\n Dim min As Integer\n Dim average As Integer\n Dim average1 As Integer\n Dim grade As String\n Private Sub... |
What are the coolest examples of metaprogramming that you've seen in C++?
What are some practical uses of metaprogramming that you've seen in C++?
| Metaprogramming in C++ is a powerful technique that leverages the language's template system to write code that can manipulate types and generate code at compile time. This can lead to more efficient, cleaner, and reusable code. Here are some cool examples and practical uses of metaprogramming in C++:
### Cool Example... | 35,595 | [
{
"from": "human",
"value": "What are the coolest examples of metaprogramming that you've seen in C++?\nWhat are some practical uses of metaprogramming that you've seen in C++?\n"
},
{
"from": "gpt",
"value": "Metaprogramming in C++ is a powerful technique that leverages the language's template ... |
Is it possible to check if a dynamically loaded assembly has been signed with a specific strong name?
Is it enough / secure to compare the values returned from AssemblyName.GetPublicKey() method?
Assembly loaded = Assembly.LoadFile(path);
byte[] evidenceKey = loaded.GetName().GetPublicKey();
if (evidenceKey != null)
... | You bring up an important point regarding the validation of strong-named assemblies and the potential for spoofing. To ensure the integrity of a dynamically loaded assembly, it's important to understand how strong naming works and the limitations of the approach you've outlined.
### Strong-Named Assemblies
Strong-nam... | 35,579 | [
{
"from": "human",
"value": "Is it possible to check if a dynamically loaded assembly has been signed with a specific strong name?\nIs it enough / secure to compare the values returned from AssemblyName.GetPublicKey() method?\nAssembly loaded = Assembly.LoadFile(path);\n\nbyte[] evidenceKey = loaded.GetName... |
I have a master / detail table and want to update some summary values in the master table against the detail table. I know I can update them like this:
update MasterTbl set TotalX = (select sum(X) from DetailTbl where DetailTbl.MasterID = MasterTbl.ID)
update MasterTbl set TotalY = (select sum(Y) from DetailTbl where ... | You can achieve the desired update in a single statement by using a `JOIN` between your master and detail tables. However, keep in mind that different databases might have slightly different syntax for such operations. Since you're using Advantage Database Server, I'll provide a more general SQL solution that should be... | 37,006 | [
{
"from": "human",
"value": "I have a master / detail table and want to update some summary values in the master table against the detail table. I know I can update them like this:\nupdate MasterTbl set TotalX = (select sum(X) from DetailTbl where DetailTbl.MasterID = MasterTbl.ID)\nupdate MasterTbl set To... |
I would like to generate a list of files within a directory. Some of the filenames contain Chinese characters.
eg: [试验].Test.txt
I am using the following code:
require 'find'
dirs = ["TestDir"]
for dir in dirs
Find.find(dir) do |path|
if FileTest.directory?(path)
else
p path
end
end
end
Run... | The issue you're encountering with the escaped characters in the output is likely due to the default encoding settings of the terminal or the Ruby script itself. Ruby uses UTF-8 encoding by default, but if your terminal or environment isn't set to handle UTF-8 properly, you might see the characters being escaped.
To e... | 36,092 | [
{
"from": "human",
"value": "I would like to generate a list of files within a directory. Some of the filenames contain Chinese characters.\neg: [试验].Test.txt\nI am using the following code:\nrequire 'find'\ndirs = [\"TestDir\"]\nfor dir in dirs\n Find.find(dir) do |path|\n if FileTest.directory?(path... |
How is profiling different from logging?
Is it just that profiling is used for performance measurements to see how long each function takes? Or am I off?
Typically, how are profiling libraries used?
What types of stats are obtained by profiling?
| Profiling and logging are two distinct activities used in software development and performance monitoring, and they serve different purposes.
### Differences Between Profiling and Logging:
1. **Purpose**:
- **Profiling**: The primary purpose of profiling is to analyze the performance of an application. It helps in... | 32,580 | [
{
"from": "human",
"value": "How is profiling different from logging?\nIs it just that profiling is used for performance measurements to see how long each function takes? Or am I off?\nTypically, how are profiling libraries used?\nWhat types of stats are obtained by profiling?\n"
},
{
"from": "gpt"... |
I have some client side code that uploads an Outlook email to a document library and as long as the path is pointing to the root of the doc library it works just fine.
@"https://<server>/sites/<subweb>/<customer>/<teamweb>/<Documents>/" + docname;
is the projectUrl in this function :
public bool SaveMail(string filep... | It seems like you've already figured out the solution to your issue—adding the folder path to the URL. For clarity and for future reference, here’s how you can upload a file to a specific folder within a SharePoint document library using the method you provided.
To upload an email to a specific folder (in your case, "... | 35,717 | [
{
"from": "human",
"value": "I have some client side code that uploads an Outlook email to a document library and as long as the path is pointing to the root of the doc library it works just fine. \n@\"https://<server>/sites/<subweb>/<customer>/<teamweb>/<Documents>/\" + docname;\n\nis the projectUrl in thi... |
is there a way to change an oracle user's default schema?
I found it in the FAQ that I can alter it in the session, but it's not what I want. E.G. the user at log on always sees another schema as default.
Thanks in advance.
| In Oracle, the concept of a default schema is tied to the user’s login. By default, when a user logs in, they will be associated with their own schema, which has the same name as their username. While you can change the current schema for a session using the `ALTER SESSION SET CURRENT_SCHEMA` command, this does not cha... | 34,932 | [
{
"from": "human",
"value": "is there a way to change an oracle user's default schema?\nI found it in the FAQ that I can alter it in the session, but it's not what I want. E.G. the user at log on always sees another schema as default.\nThanks in advance.\n"
},
{
"from": "gpt",
"value": "In Oracl... |
I am using the System.Web.Routing assembly in a WebForms application. When running the application deployed on win2008/IIS7 I got the following message.
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.... | The error message you're encountering indicates that session state is not enabled for the routes you've configured in your WebForms application. Since it works when directly navigating to an `.aspx` page, but not with the routed pages, this suggests that the session state settings are not properly configured or recogni... | 24,155 | [
{
"from": "human",
"value": "I am using the System.Web.Routing assembly in a WebForms application. When running the application deployed on win2008/IIS7 I got the following message.\n\nSession state can only be used when enableSessionState is set to true, either in a configuration file or in the Page direct... |
Executive Summary: When assertion errors are thrown in the threads, the unit test doesn't die. This makes sense, since one thread shouldn't be allowed to crash another thread. The question is how do I either 1) make the whole test fail when the first of the helper threads crashes or 2) loop through and determine the st... | In a multithreading environment, when you have unit tests running in separate threads, it's indeed a common challenge that assertion failures in those threads do not propagate back to the main thread running the tests. This is because exceptions thrown in one thread do not automatically terminate other threads or signa... | 37,072 | [
{
"from": "human",
"value": "Executive Summary: When assertion errors are thrown in the threads, the unit test doesn't die. This makes sense, since one thread shouldn't be allowed to crash another thread. The question is how do I either 1) make the whole test fail when the first of the helper threads crashe... |
My Aim: Sending an email (e.g. support request, error report) out of a C# Windows forms application. I know how do do this technically but here is the catch:
In order to authenticate myself on the mail server (e.g. gmx, yahoo, own website) I need to store the login details inside the application (which runs on the clie... | When developing a C# Windows Forms application that needs to send emails securely without storing sensitive credentials directly in the application, you need to consider several approaches to minimize the risk of credential exposure. Here are some secure concepts and strategies you can implement:
### 1. **OAuth2 Authe... | 35,612 | [
{
"from": "human",
"value": "My Aim: Sending an email (e.g. support request, error report) out of a C# Windows forms application. I know how do do this technically but here is the catch:\nIn order to authenticate myself on the mail server (e.g. gmx, yahoo, own website) I need to store the login details insi... |
I have an MS SQL database and have a varchar field that I would like to do queries like where name like '%searchTerm%'. But right now it is too slow, even with SQL enterprise's full text indexing.
Can someone explain how Lucene .Net might help my situation? How does the indexer work? How do queries work?
What is ... | Lucene.NET is a powerful, open-source search library that allows you to build full-text search capabilities into your applications. It can significantly improve the performance and flexibility of text searches compared to traditional database querying methods, especially when working with large datasets.
### How Lucen... | 27,358 | [
{
"from": "human",
"value": "I have an MS SQL database and have a varchar field that I would like to do queries like where name like '%searchTerm%'. But right now it is too slow, even with SQL enterprise's full text indexing. \nCan someone explain how Lucene .Net might help my situation? How does the i... |
How can I escape a bracket in a full-text SQL Server contains() query? I've tried all the following, none of which work:
CONTAINS(crev.RawText, 'arg[0]')
CONTAINS(crev.RawText, 'arg[[0]]')
CONTAINS(crev.RawText, 'arg\[0\]')
Using double quotes does work, but it forces the entire search to be a phrase, which is a shows... | In SQL Server's full-text search, specifically using the `CONTAINS` function, escaping characters like brackets ([]) can be a bit tricky since they have special meanings (e.g., they can denote a range of characters in certain contexts).
Unfortunately, `CONTAINS` does not provide a built-in way to escape brackets. Thi... | 37,948 | [
{
"from": "human",
"value": "How can I escape a bracket in a full-text SQL Server contains() query? I've tried all the following, none of which work:\nCONTAINS(crev.RawText, 'arg[0]')\nCONTAINS(crev.RawText, 'arg[[0]]')\nCONTAINS(crev.RawText, 'arg\\[0\\]')\n\nUsing double quotes does work, but it forces th... |
I received a WSDL file for a web service interface that our system should call somewhere in the future.
Until then, I'd like to setup a dummy/mockup web service that does nothing else than to log the web service invocations and return dummy data.
What I've done so far is to generate Java objects from the WSDL file.
Wh... | Setting up a mock web service that logs invocations and returns dummy data is a straightforward process, especially since you already have Java objects generated from the WSDL file. Here’s a step-by-step guide to create a simple mock web service on JBoss:
### 1. Set Up Your Environment
Ensure you have the following:
-... | 32,662 | [
{
"from": "human",
"value": "I received a WSDL file for a web service interface that our system should call somewhere in the future. \nUntil then, I'd like to setup a dummy/mockup web service that does nothing else than to log the web service invocations and return dummy data.\nWhat I've done so far is to g... |
I am using a GDI+ Graphic to draw a 4000*3000 image to screen, but it is really slow. It takes about 300ms. I wish it just occupy less than 10ms.
Bitmap *bitmap = Bitmap::FromFile("XXXX",...);
//--------------------------------------------
// this part takes about 300ms, terrible!
int width = bitmap->GetWidth();
int h... | To optimize the drawing of your bitmap using GDI+ and achieve faster rendering times, you can use the `Bitmap::LockBits` method to access the pixel data directly, which allows you to modify the bitmap's bits while also preparing them for efficient drawing.
Here's how you can convert a GDI+ `Bitmap` object into a forma... | 32,457 | [
{
"from": "human",
"value": "I am using a GDI+ Graphic to draw a 4000*3000 image to screen, but it is really slow. It takes about 300ms. I wish it just occupy less than 10ms.\nBitmap *bitmap = Bitmap::FromFile(\"XXXX\",...);\n\n//--------------------------------------------\n// this part takes about 300ms, ... |
Simple question, spurred on by the removal of the target attribute in HTML 4.0 Strict and XHTML 1.0 Strict.
| In HTML 4.0 Strict and XHTML 1.0 Strict, the `target` attribute was removed to promote cleaner and more semantic web design practices. This means that when using these standards, you cannot specify how a link should open (e.g., in a new window, the same frame, etc.) using the `target` attribute.
In practice, if you're... | 39,092 | [
{
"from": "human",
"value": "Simple question, spurred on by the removal of the target attribute in HTML 4.0 Strict and XHTML 1.0 Strict.\n"
},
{
"from": "gpt",
"value": "In HTML 4.0 Strict and XHTML 1.0 Strict, the `target` attribute was removed to promote cleaner and more semantic web design pr... |
Ok, I know this is a strange question, but there is a "standard" (fan-wise at least) Unicode support for the Klingon alphabet, and since code can be written in Unicode with no problem, that means it is possible to write Kode with Klingon tokens( vars, function names, etc...).
For the record I've written C++ in Japanese... | Writing code using Klingon tokens is indeed a fascinating concept! While there may not be dedicated text editors specifically designed for Klingon, you can use any general-purpose text editor that supports Unicode. Here are some suggestions to help you work with Klingon in your code:
1. **Visual Studio Code**: This po... | 35,745 | [
{
"from": "human",
"value": "Ok, I know this is a strange question, but there is a \"standard\" (fan-wise at least) Unicode support for the Klingon alphabet, and since code can be written in Unicode with no problem, that means it is possible to write Kode with Klingon tokens( vars, function names, etc...).\... |
When would a database design be described as overnormalized? Is this characterization an absolute one? Or is it dependent on the way it is used in the application? Thanks.
| A database design is described as overnormalized when it has been excessively broken down into smaller tables and relationships, leading to a structure that prioritizes normalization principles (like eliminating redundancy and ensuring data integrity) to the point where it negatively impacts performance, usability, and... | 39,132 | [
{
"from": "human",
"value": "When would a database design be described as overnormalized? Is this characterization an absolute one? Or is it dependent on the way it is used in the application? Thanks.\n"
},
{
"from": "gpt",
"value": "A database design is described as overnormalized when it has b... |
I would like to move items from one list to another on a page, and I'm pretty flexible about what type of a list it is. What's the best way to do that? ASP.NET Ajax? jQuery? Anything else?
| When it comes to moving items from one list to another on a web page, you have several options depending on your specific requirements, including user experience, performance, and ease of implementation. Below are some common approaches you can take, including the use of ASP.NET Ajax, jQuery, and other methods.
### 1.... | 32,890 | [
{
"from": "human",
"value": "I would like to move items from one list to another on a page, and I'm pretty flexible about what type of a list it is. What's the best way to do that? ASP.NET Ajax? jQuery? Anything else?\n"
},
{
"from": "gpt",
"value": "When it comes to moving items from one list t... |
I'm playing around with ASP.net MVC and JQuery at the moment. I've come across behavour which doesn't seem to make sense.
I'm calling JQuery's $.getJSON function to populate some div's. The event is triggered on the $(document).ready event. This works perfectly.
There is a small AJAX.BeginForm which adds another valu... | The behavior you're observing is related to how Internet Explorer handles caching for AJAX requests. By default, many browsers, including older versions of Internet Explorer (like IE8), may cache AJAX responses to improve performance. This can lead to the issue you're experiencing where subsequent calls to the same URL... | 37,767 | [
{
"from": "human",
"value": "I'm playing around with ASP.net MVC and JQuery at the moment. I've come across behavour which doesn't seem to make sense. \nI'm calling JQuery's $.getJSON function to populate some div's. The event is triggered on the $(document).ready event. This works perfectly.\nThere is a s... |
I'm working on a time sheet application, where I'd like the user to be able to enter times in TextBoxes, e.g.: 8 a or 8:00 a or the like, just like you can in Excel.
Now if you enter a date in a TextBox and then use DateTime.TryParse, you can enter it in several formats (Jan 31, 2007; 1/31/2007; 31/1/2007; January 31, ... | To handle time inputs in a flexible way similar to how Excel does, you can use a combination of parsing, manipulation, and `DateTime.TryParse`. The `DateTime.TryParse` method is somewhat strict about time formats, so you might need to preprocess the input to normalize it before passing it to `TryParse`.
Here's how you... | 33,903 | [
{
"from": "human",
"value": "I'm working on a time sheet application, where I'd like the user to be able to enter times in TextBoxes, e.g.: 8 a or 8:00 a or the like, just like you can in Excel.\nNow if you enter a date in a TextBox and then use DateTime.TryParse, you can enter it in several formats (Jan 31... |
Is it possible to add a button to a column in the DataGrid for the compact framework? So far the only thing I can find is you can add textbox and that's it. What would be a good alternative to a DataGrid that can allow other controls?
| In the .NET Compact Framework, the standard `DataGrid` control has limited customization options, and it does not support adding arbitrary controls like buttons directly into its cells. However, there are some alternatives and workarounds you can consider:
### Alternatives to DataGrid:
1. **ListView Control**:
- ... | 34,560 | [
{
"from": "human",
"value": "Is it possible to add a button to a column in the DataGrid for the compact framework? So far the only thing I can find is you can add textbox and that's it. What would be a good alternative to a DataGrid that can allow other controls?\n"
},
{
"from": "gpt",
"value"... |
In C++, a function's signature depends partly on whether or not it's const. This means that a class can have two member functions with identical signatures except that one is const and the other is not. If you have a class like this, then the compiler will decide which function to call based on the object you call it... | The ability to overload member functions based on constness in C++ can be particularly useful in several scenarios, especially when designing classes that manage resources or data where some operations do not modify the object's state. Here are some circumstances where this feature might be beneficial:
1. **Getter Fun... | 31,580 | [
{
"from": "human",
"value": "In C++, a function's signature depends partly on whether or not it's const. This means that a class can have two member functions with identical signatures except that one is const and the other is not. If you have a class like this, then the compiler will decide which functio... |
I've seen various options for URL rewriting here on Stack Overflow, and other places on the web, but was curious to see if there were other options.
| URL rewriting is a technique used to modify the URL of a web page to make it more user-friendly and SEO-friendly. There are various methods and tools to achieve URL rewriting, depending on the server environment and programming languages you are using. Here are some common options:
### 1. **Server-Side URL Rewriting**... | 34,427 | [
{
"from": "human",
"value": "I've seen various options for URL rewriting here on Stack Overflow, and other places on the web, but was curious to see if there were other options.\n"
},
{
"from": "gpt",
"value": "URL rewriting is a technique used to modify the URL of a web page to make it more use... |
We have created a new List View Style that shows thumbnails from a picture library, we have added a HyperLink Column and made the View style map the HyperLink url to an anchor tag.
The intention is that when the Content Managers want to create a image based list of hyper links they just have to create a Picture Library... | To remove the "Sort Bar" from your custom List View Style in a SharePoint Picture Library, you'll need to modify the view settings in your custom style definition. Here's how you can approach this:
1. **Modify the XSLT of the List View Style**:
Since you're using a custom List View Style, you'll likely have a corre... | 37,094 | [
{
"from": "human",
"value": "We have created a new List View Style that shows thumbnails from a picture library, we have added a HyperLink Column and made the View style map the HyperLink url to an anchor tag.\nThe intention is that when the Content Managers want to create a image based list of hyper links ... |
MySQL offers many ways (on Windows) to connect to it, those are:
Shared memory
Named pipes
TCP/IP
My question is, if MySQL will be run on the same machine of the web server, then which method is best for security and performance?
P.S. This is a one web server scenario, no web farm.
Thanks
| In a scenario where MySQL and your web server are running on the same machine, you have a few connection options: Shared Memory, Named Pipes, and TCP/IP. Each method has its own advantages and disadvantages in terms of performance and security.
### 1. Shared Memory
- **Performance**: This is typically the fastest opti... | 36,844 | [
{
"from": "human",
"value": "MySQL offers many ways (on Windows) to connect to it, those are:\n\nShared memory\nNamed pipes\nTCP/IP\n\nMy question is, if MySQL will be run on the same machine of the web server, then which method is best for security and performance?\nP.S. This is a one web server scenario, ... |
What's the best practise way to handle a primary key in an unbound datagrid view combo-box column?
I want to display a meaningful value but store only the primary key (much like Access combo-boxes). I achieve this with a regular combo-box by adding an object with two properties into the items collection rather than a ... | Handling primary keys in a DataGridView combo-box column while displaying meaningful values can be effectively achieved by creating a custom object that holds both the primary key and the display value. You will then set the DataGridView to use this object as its data source for the combo-box column. Here’s how to achi... | 33,735 | [
{
"from": "human",
"value": "What's the best practise way to handle a primary key in an unbound datagrid view combo-box column? \nI want to display a meaningful value but store only the primary key (much like Access combo-boxes). I achieve this with a regular combo-box by adding an object with two propertie... |
We are logging any exceptions that happen in our system by writing the Exception.Message to a file. However, they are written in the culture of the client. And Turkish errors don't mean a lot to me.
So how can we log any error messages in English without changing the users culture?
| To log exception messages in English without changing the user's culture, you can use the `CultureInfo` class in .NET to create a new culture context specifically for logging. This way, you can format and log error messages in English while keeping the user's culture intact.
Here's how you can achieve this in C#:
1. ... | 36,372 | [
{
"from": "human",
"value": "We are logging any exceptions that happen in our system by writing the Exception.Message to a file. However, they are written in the culture of the client. And Turkish errors don't mean a lot to me.\nSo how can we log any error messages in English without changing the users cult... |
Let's say we have a concrete class Apple. (Apple objects can be instantiated.)
Now, someone comes and derives an abstract class Peach from Apple. It's abstract because it introduces a new pure virtual function. The user of Peach is now forced to derive from it and define this new function. Is this a common pattern? Is ... | Your question touches on a couple of important concepts in object-oriented design, particularly around inheritance and the use of abstract classes. Let's analyze both scenarios you've presented.
### 1. Abstracting a Class (Apple to Peach)
In your first example, you have a concrete class `Apple` and an abstract class `... | 36,774 | [
{
"from": "human",
"value": "Let's say we have a concrete class Apple. (Apple objects can be instantiated.)\nNow, someone comes and derives an abstract class Peach from Apple. It's abstract because it introduces a new pure virtual function. The user of Peach is now forced to derive from it and define this n... |
In Erlang, every process has a group leader, and when a process wants to print something (i.e. it calls the io library or does something similar), it will send a message to its group leader.
My question is, where can I find the specification of these messages? Or in general, the specification of what a group leader sho... | In Erlang, the concept of a group leader is indeed tied to how processes interact with I/O operations. As you've discovered through experimentation, when a process wants to perform an I/O operation, it communicates with its group leader, which usually manages the actual I/O. However, the specifics of these messages can... | 34,730 | [
{
"from": "human",
"value": "In Erlang, every process has a group leader, and when a process wants to print something (i.e. it calls the io library or does something similar), it will send a message to its group leader.\nMy question is, where can I find the specification of these messages? Or in general, th... |
I'm trying to see data in my OLAP cube by ascmd utility. As input I put a MDX query, but only what I have as output (in command line) is a XML file. I tried to use -Tf text and -Tf csv parameters, but they don't work in the way I think they should (I have a XML on output all the time). I want to have on my output somet... | It seems you're using the `ascmd` utility to run your MDX queries against your OLAP cube and you're encountering issues with output formats. By default, `ascmd` generates results in XML format. However, you can use the `-Tf` option to specify the output format as text or CSV, but it doesn't always work as expected with... | 34,903 | [
{
"from": "human",
"value": "I'm trying to see data in my OLAP cube by ascmd utility. As input I put a MDX query, but only what I have as output (in command line) is a XML file. I tried to use -Tf text and -Tf csv parameters, but they don't work in the way I think they should (I have a XML on output all the... |
I'd like to see the command-line arguments that FlexBuilder is using to compile my application. This is so that I can build them into the ANT script I'm working on. Is there any way to view the command line compilation step?
The reason I'm asking for this is that when I compile my app using Ant/Flex SDK vs. FlexBuilder... | To see the command-line arguments that FlexBuilder (now known as Flash Builder) is using to compile your application, you can follow these steps:
1. **Enable Verbose Compilation**: In Flash Builder, go to `Project -> Properties -> Flex Build Path`, then enable the `Show build output in the console` option in the `Comp... | 36,609 | [
{
"from": "human",
"value": "I'd like to see the command-line arguments that FlexBuilder is using to compile my application. This is so that I can build them into the ANT script I'm working on. Is there any way to view the command line compilation step?\nThe reason I'm asking for this is that when I compile... |
What is the difference between a const_iterator and an iterator and where would you use one over the other?
| In C++ standard containers (like `std::vector`, `std::list`, etc.), both `iterator` and `const_iterator` are types used to traverse and access elements in a container. The primary difference between the two lies in the ability to modify the elements they point to.
### `iterator`
- **Modifiable**: An `iterator` allows... | 36,110 | [
{
"from": "human",
"value": "What is the difference between a const_iterator and an iterator and where would you use one over the other?\n"
},
{
"from": "gpt",
"value": "In C++ standard containers (like `std::vector`, `std::list`, etc.), both `iterator` and `const_iterator` are types used to tra... |
I'm conducting experiments regarding e-mail spam. One of these experiments require sending mail thru Tor. Since I'm using Python and smtplib for my experiments, I'm looking for a way to use the Tor proxy (or other method) to perform that mail sending.
Ideas how this can be done?
| To send emails through the Tor network using Python, you can use the `smtplib` module alongside the Tor network by connecting to an SMTP server via the Tor proxy. The common method is to use the Tor SOCKS proxy, which usually runs on `localhost:9050`. Here’s a step-by-step guide to set this up:
### Prerequisites
1. *... | 33,970 | [
{
"from": "human",
"value": "I'm conducting experiments regarding e-mail spam. One of these experiments require sending mail thru Tor. Since I'm using Python and smtplib for my experiments, I'm looking for a way to use the Tor proxy (or other method) to perform that mail sending.\nIdeas how this can be done... |
I have a Visual Studio 2008 Setup Project that when compiled in the past would generate a Setup.exe in the output directory along with the .msi output file. Now it no longer generates the Setup.exe which I actually do need.
Did I change a project setting without realizing? How do I get it to generate it again?
| In Visual Studio 2008, the Setup.exe is generated when you build a Setup Project, and this can sometimes stop occurring if certain settings are changed or if there are issues with the project. Here are several steps you can take to troubleshoot and ensure that the Setup.exe is generated again:
1. **Check Build Configu... | 37,158 | [
{
"from": "human",
"value": "I have a Visual Studio 2008 Setup Project that when compiled in the past would generate a Setup.exe in the output directory along with the .msi output file. Now it no longer generates the Setup.exe which I actually do need.\nDid I change a project setting without realizing? How ... |
There are two Databases, Database A has a table A with columns of id, group and flag. Database B has a table B with columns of ID and flag. Table B is essentially a subset of table A where the group == 'B'.
They are updated/created in odd ways that are outside my understanding at this time, and are beyond the scope... | To address your requirement, you can create a stored procedure in SQL that will handle the updates from Table A to the corresponding Table B based on the `group` value. Given that there are separate databases for each group, you will need to create a stored procedure for each group database that updates the `flag` fiel... | 30,714 | [
{
"from": "human",
"value": "There are two Databases, Database A has a table A with columns of id, group and flag. Database B has a table B with columns of ID and flag. Table B is essentially a subset of table A where the group == 'B'. \nThey are updated/created in odd ways that are outside my understand... |
What is a view in Oracle?
| In Oracle, a view is a virtual table that is based on the result of a SQL query. It does not store data itself; instead, it provides a way to present data from one or more tables (or other views) in a structured manner. Views can be used to simplify complex queries, encapsulate complex logic, restrict access to specifi... | 36,869 | [
{
"from": "human",
"value": "What is a view in Oracle?\n"
},
{
"from": "gpt",
"value": "In Oracle, a view is a virtual table that is based on the result of a SQL query. It does not store data itself; instead, it provides a way to present data from one or more tables (or other views) in a structu... |
After years of programming it's still some of the simple things that keep tripping me up.
Is there a commonly agreed definition of filename ?
Even the wikipedia article confuses the two interpretations.
It starts by defining it as 'a special kind of string used to uniquely identify a file stored on the file system of a... | The concept of a "filename" can indeed be a bit ambiguous due to various interpretations and contexts. Here's a more detailed breakdown of your questions, including definitions and suggestions for naming conventions.
### Definition of "Filename"
A **filename** is generally defined as the name of a file within a file ... | 34,298 | [
{
"from": "human",
"value": "After years of programming it's still some of the simple things that keep tripping me up.\nIs there a commonly agreed definition of filename ?\nEven the wikipedia article confuses the two interpretations.\nIt starts by defining it as 'a special kind of string used to uniquely id... |
How can I draw a 2D rubber band rectangle in DirectX? Preferable using C#.
| To draw a 2D rubber band rectangle in DirectX using C#, you typically use the DirectX Toolkit for managed DirectX. Below are the steps to implement a rubber band rectangle using C# and DirectX.
### Prerequisites
1. Make sure you have the DirectX SDK installed.
2. Set up a C# project (Windows Forms or WPF) and add ref... | 33,815 | [
{
"from": "human",
"value": "How can I draw a 2D rubber band rectangle in DirectX? Preferable using C#.\n"
},
{
"from": "gpt",
"value": "To draw a 2D rubber band rectangle in DirectX using C#, you typically use the DirectX Toolkit for managed DirectX. Below are the steps to implement a rubber ba... |
Are there any html helpers for page navigation. eg. if i have 1000 records to display, i want to display the Previous 1 2 3 4 ... etc Next link stuff under the filtered collection.
Anyone know of anything out there?
| Yes, there are several HTML helpers and libraries that you can use for implementing pagination in your web application. The approach may vary based on the web framework or language you are using, but I can provide a general solution that works in HTML and is easily integrated with most server-side languages or client-s... | 33,098 | [
{
"from": "human",
"value": "Are there any html helpers for page navigation. eg. if i have 1000 records to display, i want to display the Previous 1 2 3 4 ... etc Next link stuff under the filtered collection.\nAnyone know of anything out there?\n"
},
{
"from": "gpt",
"value": "Yes, there are s... |
Previously, I had a class that wrapped an internal System.Collections.Generic.List<Item> (where Item is a class I created). The wrapper class provided several collection-level properties that provided totals, averages, and other computations on items in the list. I was creating a BindingSource around this wrapped Lis... | When you derive your class from `System.Collections.Generic.List<Item>`, you're effectively making it a specialized list. However, since it behaves like a list, the properties that you originally defined for collection-level computations (like `AverageValue` and `TotalValue`) are not part of the list itself but rather ... | 35,131 | [
{
"from": "human",
"value": "Previously, I had a class that wrapped an internal System.Collections.Generic.List<Item> (where Item is a class I created). The wrapper class provided several collection-level properties that provided totals, averages, and other computations on items in the list. I was creatin... |
In Visual Studio 2008 if you have a web project you can use menu Build -> Publish Web.
Can I achieve the same result with msbuild via command line?
Found the answer in this blog post: How to publish a web site with MSBuild.
In more detail is here: Using MSBuild to deploy visual studio 2005 web applications.
| Yes, you can achieve the same result as the "Publish Web" option in Visual Studio 2008 using MSBuild via the command line. MSBuild is a powerful tool that allows you to build, package, and publish applications directly from the command line or as part of a build automation process.
To publish a web project using MSBui... | 37,897 | [
{
"from": "human",
"value": "In Visual Studio 2008 if you have a web project you can use menu Build -> Publish Web.\nCan I achieve the same result with msbuild via command line?\n\nFound the answer in this blog post: How to publish a web site with MSBuild.\nIn more detail is here: Using MSBuild to deploy vi... |
I have an Axis2 Web Service that requests the status of some objects. The objects can either exist on the server, or not exist.
The web service is implemented with POJOs, and the wsdl is generated with java2wsdl tool.
Lets say the relevant part of the SOAP response looks like this:
String
int
int
... | To achieve the desired behavior in your Axis2 web service, you can define a response object that can represent both cases: when the object is found and when it is not found. The strategy would typically involve using `null` values or perhaps an `Optional` wrapper for the properties that are not applicable when the obje... | 34,656 | [
{
"from": "human",
"value": "I have an Axis2 Web Service that requests the status of some objects. The objects can either exist on the server, or not exist. \nThe web service is implemented with POJOs, and the wsdl is generated with java2wsdl tool.\nLets say the relevant part of the SOAP response looks like... |
I have a layout similar to this:
<div id="..."><img src="..."></div>
and would like to use a jQuery selector to select the child img inside the div on click.
To get the div, I've got this selector:
$(this)
How can I get the child img using a selector?
| To select the child `<img>` element inside the clicked `<div>` using jQuery, you can use the `.find()` method. If you already have a jQuery object for the `<div>` (in your case, `$(this)`), you can chain the `.find()` method to select the `<img>` inside it. Here’s how you can do it:
```javascript
$(this).find('img')
`... | 39,959 | [
{
"from": "human",
"value": "I have a layout similar to this:\n<div id=\"...\"><img src=\"...\"></div>\n\nand would like to use a jQuery selector to select the child img inside the div on click.\nTo get the div, I've got this selector:\n$(this)\n\nHow can I get the child img using a selector?\n"
},
{
... |
One thing that always been a pain is to log SQL (JDBC) errors when you have a PreparedStatement instead of the query itself.
You always end up with messages like:
2008-10-20 09:19:48,114 ERROR LoggingQueueConsumer-52 [Logger.error:168] Error
executing SQL: [INSERT INTO private_rooms_bans (room_id, name, user_id, msisd... | Logging SQL errors along with the parameter values used in a `PreparedStatement` can indeed be challenging, especially since `PreparedStatement` itself doesn't expose the parameter values directly. However, you can create a utility class that wraps around `PreparedStatement` and captures both the SQL and the parameter ... | 24,385 | [
{
"from": "human",
"value": "One thing that always been a pain is to log SQL (JDBC) errors when you have a PreparedStatement instead of the query itself.\nYou always end up with messages like:\n2008-10-20 09:19:48,114 ERROR LoggingQueueConsumer-52 [Logger.error:168] Error \nexecuting SQL: [INSERT INTO priva... |
I am new to C#. I wanted to do a simple program with some type of loops.
I wanted my program to loop through the numbers that the user enters and if it is less than a number then write keep guessing,but once they enter the number 25 i wanted it to say Merry Christmas.. Please Help
int number;
do
{
Console.WriteL... | Welcome to C#! It looks like you're on the right track with your loop and user input. To achieve the functionality you described—where the program encourages the user to keep guessing until they enter the number 25 and then responds with "Merry Christmas"—you can slightly modify your code. Here's an example implementat... | 35,326 | [
{
"from": "human",
"value": "I am new to C#. I wanted to do a simple program with some type of loops. \nI wanted my program to loop through the numbers that the user enters and if it is less than a number then write keep guessing,but once they enter the number 25 i wanted it to say Merry Christmas.. Please... |
I need to convert a UNICODE_STRING structure to a simple NULL TERMINATED STRING.
typedef
struct _UNICODE_STRING
{
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
}
UNICODE_STRING, *PUNICODE_STRING;
I can't find a clean sollution on MSDN about it.
Anyone been there?
I am not using .net so I ne... | To convert a `UNICODE_STRING` structure to a simple null-terminated string (an ANSI string), you'll need to handle the conversion of each wide character to a regular character. You can use the Windows API function `WideCharToMultiByte` for this purpose. Below is a step-by-step implementation in C:
1. Determine the len... | 32,033 | [
{
"from": "human",
"value": "I need to convert a UNICODE_STRING structure to a simple NULL TERMINATED STRING.\ntypedef \nstruct _UNICODE_STRING \n{\n USHORT Length; \n USHORT MaximumLength; \n PWSTR Buffer;\n} \nUNICODE_STRING, *PUNICODE_STRING;\n\nI can't find a clean sollution on MSDN about... |
I'd like to call caspol from within a script inside a custom action in
an msi (setup project). I'd prefer a standard msi to ClickOnce,
because with a standard msi I can install drivers & associate
filetypes with our application whereas with ClickOnce I can't.
When I execute the caspol command from the command line it s... | It looks like there are a few potential issues in your VBScript that could be causing the problem with executing the `caspol` command. Here are some suggestions to help you troubleshoot and correct the script:
1. **Quotes in Command**: Ensure that any parameters containing spaces or special characters are properly enc... | 35,291 | [
{
"from": "human",
"value": "I'd like to call caspol from within a script inside a custom action in\nan msi (setup project). I'd prefer a standard msi to ClickOnce,\nbecause with a standard msi I can install drivers & associate\nfiletypes with our application whereas with ClickOnce I can't.\nWhen I execute ... |
I'm trying to start a process, but I need to be able to get an event when the process has terminated.
Do I get a finished signal if I start a QProcess using startDetached()?
| No, when you start a `QProcess` using `startDetached()`, you do not receive a finished signal. The `startDetached()` function starts the process independently of the parent application, and it is designed to allow the process to run independently without the parent (your application) needing to monitor its execution.
... | 39,047 | [
{
"from": "human",
"value": "I'm trying to start a process, but I need to be able to get an event when the process has terminated.\nDo I get a finished signal if I start a QProcess using startDetached()?\n"
},
{
"from": "gpt",
"value": "No, when you start a `QProcess` using `startDetached()`, yo... |
I am trying to write a C program that uses dlysm, and I keep getting an undefined reference to dlysm. I think I need to set my -ldl flags but I have no idea how to do this.
I am very new to linux and setting variables. If this is what I need to do can someone help me out with the commands?
| It sounds like you're trying to link your C program with the `dlysm` function, which is typically part of the `libdl` library in Linux. When you get an "undefined reference" error, it generally means that the linker cannot find the definition of the function you've used in your code.
To compile your program with the n... | 37,525 | [
{
"from": "human",
"value": "I am trying to write a C program that uses dlysm, and I keep getting an undefined reference to dlysm. I think I need to set my -ldl flags but I have no idea how to do this. \nI am very new to linux and setting variables. If this is what I need to do can someone help me out with ... |
I am battling regular expressions now as I type.
I would like to determine a pattern for the following example file: b410cv11_test.ext. I want to be able to do a search for files that match the pattern of the example file aforementioned. Where do I start (so lost and confused) and what is the best way of arriving at a... | To create a regular expression that matches the specified pattern for the filename `b410cv11_test.ext`, we need to break down the components of the pattern based on your requirements:
1. **Must start with 'b'**: This indicates that the filename should begin with the letter 'b'.
2. **Followed by three digits**: This ca... | 36,593 | [
{
"from": "human",
"value": "I am battling regular expressions now as I type. \nI would like to determine a pattern for the following example file: b410cv11_test.ext. I want to be able to do a search for files that match the pattern of the example file aforementioned. Where do I start (so lost and confused)... |
I have a VBScript script that starts a cmd prompt, telnets into a device and TFTP's the configuration to a server. It works when I am logged in and run it manually. I would like to automate it with Windows Task Scheduler.
Any assistance would be appreciated, here is the VBScript script:
set WshShell = WScript.CreateObj... | Automating your VBScript to run with Windows Task Scheduler requires a few considerations, particularly regarding the environment in which it will run. When a script is executed via Task Scheduler, it might not have the same interactive capabilities as when you run it manually, which is especially important for scripts... | 35,307 | [
{
"from": "human",
"value": "I have a VBScript script that starts a cmd prompt, telnets into a device and TFTP's the configuration to a server. It works when I am logged in and run it manually. I would like to automate it with Windows Task Scheduler.\nAny assistance would be appreciated, here is the VBScrip... |
My requirement is I have server J2EE web application and client J2EE web application. Sometimes client can go offline. When client comes online he should be able to synchronize changes to and fro. Also I should be able to control which rows/tables need to be synchronized based on some filters/rules. Is there any existi... | To implement synchronization between a server J2EE web application and a client J2EE web application, especially considering offline scenarios, you have several options, both existing frameworks and custom implementations. Below are some suggestions and considerations:
### Existing Frameworks
1. **Apache CouchDB / Pou... | 33,210 | [
{
"from": "human",
"value": "My requirement is I have server J2EE web application and client J2EE web application. Sometimes client can go offline. When client comes online he should be able to synchronize changes to and fro. Also I should be able to control which rows/tables need to be synchronized based o... |
Instead of writing
((x: Double) => (((y: Double) => y*y))(x+x))(3)
I would like to write something like
((x: Double) => let y=x+x in y*y)(3)
Is there anything like this sort of syntactic sugar in Scala?
| In Scala, there is no direct syntactic sugar for the `let` construct as seen in some other languages, such as OCaml or Haskell. However, you can achieve similar functionality using the `let` pattern in a more Scala-idiomatic way by using local variables inside a function. While it's not exactly like `let`, you can achi... | 39,527 | [
{
"from": "human",
"value": "Instead of writing\n((x: Double) => (((y: Double) => y*y))(x+x))(3)\n\nI would like to write something like\n((x: Double) => let y=x+x in y*y)(3)\n\nIs there anything like this sort of syntactic sugar in Scala?\n"
},
{
"from": "gpt",
"value": "In Scala, there is no d... |
For my small wiki application, I mostly need to have the textarea used to edit the contents to use soft (or virtual) wrapping. However, in some cases, not wrapping the content would be preferable. I thought I would do this by simply having a button to turn off wrapping. Here is the simplified code:
<form name="wikied... | The issue you're experiencing is related to how different browsers handle the `wrap` attribute on the `<textarea>` element. While Internet Explorer allows for the `wrap` attribute to be changed dynamically using JavaScript, other browsers like Firefox and Opera do not support this approach directly.
To create a soluti... | 35,933 | [
{
"from": "human",
"value": "For my small wiki application, I mostly need to have the textarea used to edit the contents to use soft (or virtual) wrapping. However, in some cases, not wrapping the content would be preferable. I thought I would do this by simply having a button to turn off wrapping. Here is ... |
Update:
Screenshot http://farm4.static.flickr.com/3277/3048788466_661e8e5e78_b.jpg
To reproduce:
Get this sample project from Silveright.net - http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip
Open the UserControlDemo Solution. Then on Line 9 of Page.xaml, ... | It looks like you are encountering a known issue related to the design-time experience in Visual Studio when working with User Controls and StaticResources in Silverlight 2. Here’s a breakdown of the situation and some potential solutions:
### Understanding the Issue
1. **StaticResource Limitations**: When you define... | 36,161 | [
{
"from": "human",
"value": "Update:\nScreenshot http://farm4.static.flickr.com/3277/3048788466_661e8e5e78_b.jpg\nTo reproduce:\n\nGet this sample project from Silveright.net - http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip\n\nOpen the UserCont... |
I have a workstation with Windows 2008 x64, MS Access 2007 and Oracle 11g x64
I use Access to connect to Oracle via ODBC.
I am the administrator (in the administrator group) on the workstation. I run Access as administrator but when I want to make an ODBC call to Oracle it does not work.
How do I do it:
I start MS Acce... | It sounds like you're having an issue with the Oracle ODBC driver not being available when you're trying to set up your ODBC connection in MS Access on Windows 2008. Here are some steps you can follow to troubleshoot and resolve the issue:
### Step 1: Check if Oracle ODBC Driver is Installed
1. **Verify Installation*... | 33,944 | [
{
"from": "human",
"value": "I have a workstation with Windows 2008 x64, MS Access 2007 and Oracle 11g x64\nI use Access to connect to Oracle via ODBC.\nI am the administrator (in the administrator group) on the workstation. I run Access as administrator but when I want to make an ODBC call to Oracle it doe... |
I'm quoting myself on a previous question I asked to further explain:
"I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 10-15 seconds it displays a "Connection Inte... | It sounds like you encountered issues with ESET NOD32 antivirus interfering with your ASP.NET development environment by blocking or redirecting network traffic. This is a known issue with certain antivirus software that scans or blocks local connections, which can lead to problems when developing web applications loca... | 37,047 | [
{
"from": "human",
"value": "I'm quoting myself on a previous question I asked to further explain:\n\"I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 1... |
Does the C++ STL set data structure have a set difference operator?
| The C++ Standard Template Library (STL) does not provide a built-in set difference operator specifically for the `std::set` data structure. However, you can achieve the set difference operation using the `std::set_difference` algorithm from the `<algorithm>` header.
Here's how you can use `std::set_difference` to comp... | 35,154 | [
{
"from": "human",
"value": "Does the C++ STL set data structure have a set difference operator?\n"
},
{
"from": "gpt",
"value": "The C++ Standard Template Library (STL) does not provide a built-in set difference operator specifically for the `std::set` data structure. However, you can achieve t... |
I'm trying to create a custom web browser for on a pocket pc in C++ MFC. When I add the Microsoft Web Browser activeX control and run the app on the pocket pc (emulator) then this error pops up:
"Debug assertion failed. occcont.cpp line: 916"
When I look in the debug window of VS2005:
"CoCreateInstance of OLE control {... | The error message you're encountering indicates that the Microsoft Web Browser ActiveX control is not properly registered in your environment. This is a common issue when attempting to use ActiveX controls, particularly on devices like Pocket PCs, which have different capabilities compared to full desktop Windows envir... | 38,707 | [
{
"from": "human",
"value": "I'm trying to create a custom web browser for on a pocket pc in C++ MFC. When I add the Microsoft Web Browser activeX control and run the app on the pocket pc (emulator) then this error pops up:\n\"Debug assertion failed. occcont.cpp line: 916\"\nWhen I look in the debug window ... |
My form does not go to recipient when submitted! I changed the file mail.tpl.txt to direct to my own email address as a test and I got the email just fine.
Client has checked junk mail folder as well and he is just not getting information.
Below is the form code, followed by the code from mail.tpl.txt and then the form... | There are several potential issues that could prevent the email from being received by your client, even if the form submission appears to work correctly on your end. Here are some troubleshooting steps you can take to diagnose and resolve the issue:
1. **Check Email Configuration:**
- Ensure that the "To" address ... | 35,983 | [
{
"from": "human",
"value": "My form does not go to recipient when submitted! I changed the file mail.tpl.txt to direct to my own email address as a test and I got the email just fine.\nClient has checked junk mail folder as well and he is just not getting information.\nBelow is the form code, followed by t... |
I have a form whose controls I want to enable/disable depending on the values in a ComboBox control. This ComboBox control is linked, like all the other controls in the form, to a table. Inside the ComboBox's Change event, I placed the code that enables/disables the other controls.
The problem I have is that when I o... | It sounds like you're working with a form in Microsoft Access (or a similar environment) and you want to enable or disable controls based on the selected value in a ComboBox. You also noticed that the controls aren't being updated until you change the ComboBox value again, which is likely because the `Change` event is ... | 36,845 | [
{
"from": "human",
"value": "I have a form whose controls I want to enable/disable depending on the values in a ComboBox control. This ComboBox control is linked, like all the other controls in the form, to a table. Inside the ComboBox's Change event, I placed the code that enables/disables the other cont... |
I realize that this could probably be done easier in any number of other scripting languages but started to do it quick in cmd and now Im curious.
Looking to start a process at an offset to the time that another process started. Lets say 5 minutes to keep it simple. Is there a way to add to the %TIME% variable?
For i... | In a Windows Command Prompt (cmd), you can't directly manipulate the `%TIME%` variable like you would in some scripting languages. However, you can calculate a future time using batch commands. Below is a basic example of how you could start `foo.exe` and then start `bar.exe` five minutes later.
Here's a simple batch ... | 37,817 | [
{
"from": "human",
"value": "I realize that this could probably be done easier in any number of other scripting languages but started to do it quick in cmd and now Im curious.\nLooking to start a process at an offset to the time that another process started. Lets say 5 minutes to keep it simple. Is there ... |
While working on a C++ project, I was looking for a third party library for something that is not my core business. I found a really good library, doing exactly what's needed, but it is written in Python. I decided to experiment with embedding Python code in C++, using the Boost.Python library.
The C++ code looks somet... | You're encountering a common challenge when embedding Python in C++. The issue you're facing is due to the fact that `result` is defined inside `MyFunc` but is not being returned or stored in a way that the C++ code can access it.
### Solutions
Here are a few ways to achieve what you want:
1. **Return the result fro... | 31,745 | [
{
"from": "human",
"value": "While working on a C++ project, I was looking for a third party library for something that is not my core business. I found a really good library, doing exactly what's needed, but it is written in Python. I decided to experiment with embedding Python code in C++, using the Boost... |
In one of the system (Windows), if I ping to a particular public forum site, [lets say testsite.com here], then I get a request timed out message. However, if I just put that site address in the browser (used IE6, but its not specific) with http://, then the link works fine and the browser goes to the web page.
What is... | When you ping a website, your computer sends ICMP (Internet Control Message Protocol) Echo Request packets to the server hosting that website and waits for Echo Reply packets in return. If you receive a "request timed out" message, it means that the server did not respond to those ping requests. This can happen for var... | 38,679 | [
{
"from": "human",
"value": "In one of the system (Windows), if I ping to a particular public forum site, [lets say testsite.com here], then I get a request timed out message. However, if I just put that site address in the browser (used IE6, but its not specific) with http://, then the link works fine and ... |
Our windows deliverable has different sets of config files and binary assets for different customers. Right now the configuring is done by hand before packaging and its error prone. What do you think of using branches for each customer, and having the package build/script automerge the customer's branch with trunk?
I... | Using branches for each customer is a valid approach, especially in the context of your goal to automate the process and reduce human errors. However, there are several factors to consider:
### Pros of Using Branches:
1. **Isolation:** Each customer's configurations and binary assets are isolated, which means that cha... | 37,803 | [
{
"from": "human",
"value": "Our windows deliverable has different sets of config files and binary assets for different customers. Right now the configuring is done by hand before packaging and its error prone. What do you think of using branches for each customer, and having the package build/script auto... |
We determined in a previous question that many features of HTML SELECTs are not supported in IE. Is there an alternative widget that you would recommend from your experience that meets the following requirements?
Respects the contentEditable property (does not allow selection changes if true)
Respects the disabled pr... | Given the requirements you've listed, there are several alternatives to the standard HTML `<select>` element that can better meet your needs, especially for compatibility with Internet Explorer 6 and above. Below are some recommendations:
### 1. Custom Dropdown Libraries
Consider using a custom dropdown library that m... | 36,775 | [
{
"from": "human",
"value": "We determined in a previous question that many features of HTML SELECTs are not supported in IE. Is there an alternative widget that you would recommend from your experience that meets the following requirements?\n\nRespects the contentEditable property (does not allow selectio... |
Are there any good code profilers/analyzers for Erlang? I need something that can build a call graph (eg gprof) for my code.
| Yes, there are several tools available for profiling and analyzing Erlang code that can help you build call graphs and gain insights into performance. Here are some notable ones:
1. **Erlang Observer**: This is a built-in tool that comes with the Erlang/OTP distribution. It provides a graphical interface to monitor an... | 33,560 | [
{
"from": "human",
"value": "Are there any good code profilers/analyzers for Erlang? I need something that can build a call graph (eg gprof) for my code.\n"
},
{
"from": "gpt",
"value": "Yes, there are several tools available for profiling and analyzing Erlang code that can help you build call g... |
I have a function that takes another function as a parameter. If the function is a member of a class, I need to find the name of that class. E.g.
def analyser(testFunc):
print testFunc.__name__, 'belongs to the class, ...
I thought
testFunc.__class__
would solve my problems, but that just tells me that testFun... | When you pass a method of a class (i.e., a function defined inside a class), that method has an associated `__self__` attribute which refers to the instance of the class. You can use this attribute to determine the class to which the method belongs.
Here's how you can modify your `analyser` function to find the class ... | 38,478 | [
{
"from": "human",
"value": "I have a function that takes another function as a parameter. If the function is a member of a class, I need to find the name of that class. E.g.\ndef analyser(testFunc):\n print testFunc.__name__, 'belongs to the class, ...\n\nI thought \ntestFunc.__class__ \n\nwould solve ... |
As far as Google searches tell me, the maximum allowed number of cookies depends very much on the browser, however I cannot find any recent data as to how much cookies are allowed on modern browsers.
I need to store a somewhat large number of user preferences in cookies (for not-yet-registered users), so what would be ... | You're correct that the maximum number of cookies allowed can vary by browser and can also depend on the size of each cookie. Here are some general guidelines regarding cookies in modern browsers:
1. **Cookie Size Limit**: Most browsers impose a limit of about 4KB (4096 bytes) per cookie. This size limit includes both... | 35,043 | [
{
"from": "human",
"value": "As far as Google searches tell me, the maximum allowed number of cookies depends very much on the browser, however I cannot find any recent data as to how much cookies are allowed on modern browsers.\nI need to store a somewhat large number of user preferences in cookies (for no... |
I have a PHP script that sends critical e-mails. I know how to check whether the e-mail was sent successfully. However, is there a way to verify whether the e-mail reached its destination?
| Verifying whether an email has reached its destination can be challenging because there is no definitive way to track the final delivery of an email due to the nature of email protocols and privacy concerns. However, there are a few approaches you can consider to improve your chances of verifying email delivery:
### 1... | 31,000 | [
{
"from": "human",
"value": "I have a PHP script that sends critical e-mails. I know how to check whether the e-mail was sent successfully. However, is there a way to verify whether the e-mail reached its destination?\n"
},
{
"from": "gpt",
"value": "Verifying whether an email has reached its de... |
Is there a way to make OpenGL transform a general vector I give it with the current modelview matrix and get the result back?
The obvious way is to query the modelview matrix and do the multiplication myself but
I am almost sure there should be a way to make OpenGL do this for me.
| In OpenGL, there is no direct function that allows you to transform a vector with the current modelview matrix and return the result. OpenGL primarily deals with vertex transformations during the rendering pipeline and doesn't provide high-level functions for manipulating individual vectors outside of that context.
Ho... | 34,002 | [
{
"from": "human",
"value": "Is there a way to make OpenGL transform a general vector I give it with the current modelview matrix and get the result back?\nThe obvious way is to query the modelview matrix and do the multiplication myself but \nI am almost sure there should be a way to make OpenGL do this fo... |
Can a Silverlight 2 enabled web page be managed from an Apache server? (I'm not actually interested in doing this but trying to understand Silverlight 2 a bit more.)
Assuming that I have IIS6 and Server 2003 what are the .NET version requirements to host a web site with Silverlight 2? Are .NET 3.0 and 3.5 required on t... | Silverlight 2 is primarily a client-side technology that allows for rich internet applications to be developed using .NET languages such as C#. However, you can indeed host Silverlight applications on an Apache server or any other web server that serves static files and can handle the necessary MIME types.
### Hosting... | 38,736 | [
{
"from": "human",
"value": "Can a Silverlight 2 enabled web page be managed from an Apache server? (I'm not actually interested in doing this but trying to understand Silverlight 2 a bit more.)\nAssuming that I have IIS6 and Server 2003 what are the .NET version requirements to host a web site with Silverl... |
The code golf series seem to be fairly popular. I ran across some code that converts a number to its word representation. Some examples would be (powers of 2 for programming fun):
2 -> Two
1024 -> One Thousand Twenty Four
1048576 -> One Million Forty Eight Thousand Five Hundred Seventy Six
The algorithm my co-worke... | Here's a concise Python solution that converts numbers into their word representation, following the guidelines you provided. The solution is designed to be as compact as possible while remaining readable and functional:
```python
def number_to_words(num):
if num == 0:
return "Zero"
ones = ["", "O... | 36,303 | [
{
"from": "human",
"value": "The code golf series seem to be fairly popular. I ran across some code that converts a number to its word representation. Some examples would be (powers of 2 for programming fun):\n\n2 -> Two\n1024 -> One Thousand Twenty Four\n1048576 -> One Million Forty Eight Thousand Five H... |
I'm looking for computationally heavy tasks to implement with CUDA and wonder if neural networks or bayesian networks might apply. This is not my question, though, but rather what the relation between the two network types is. They seem very related, especially if you look at bayesian networks with a learning capabilit... | Certainly! Neural networks and Bayesian networks are both powerful models for representing and learning from data, but they are founded on different principles and serve different purposes, even if they exhibit some superficial similarities. Here’s a summary of their relationship and differences:
### Overview of the T... | 36,933 | [
{
"from": "human",
"value": "I'm looking for computationally heavy tasks to implement with CUDA and wonder if neural networks or bayesian networks might apply. This is not my question, though, but rather what the relation between the two network types is. They seem very related, especially if you look at ba... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.