instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'd like to "reserve" a portion of the screen so that maximized windows don't cover that area (think taskbar(Win) or dock(mac). I've seen other programs that have done this, but really have not liked them and since I'm in the business, thought I might have a hand at it... at least for my personal use. I prefer to use a...
To reserve a portion of the screen so that maximized windows don't cover that area, you can create a desktop overlay application that simulates the behavior of a taskbar or dock. This can be accomplished using various programming languages and frameworks, with some of the popular options being C# with Windows Forms or ...
35,140
[ { "from": "human", "value": "I'd like to \"reserve\" a portion of the screen so that maximized windows don't cover that area (think taskbar(Win) or dock(mac).\nI've seen other programs that have done this, but really have not liked them and since I'm in the business, thought I might have a hand at it... at ...
I have a .fla file with some text that I want to get at. Is there a free app than you can use to open .fla files, or just a tool to dump strings and pics?
To work with .fla files, which are Adobe Flash files, you have a few options, although the support for Flash has diminished due to its end of life in 2020. Here are some free tools you might consider: 1. **JPEXS Free Flash Decompiler**: This is an open-source decompiler for Flash SWF files, which can also open .fla fi...
37,654
[ { "from": "human", "value": "I have a .fla file with some text that I want to get at. Is there a free app than you can use to open .fla files, or just a tool to dump strings and pics?\n" }, { "from": "gpt", "value": "To work with .fla files, which are Adobe Flash files, you have a few options, a...
How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more. Edit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html Also possible from shell: defaults read com.apple.desktop Background And fro...
It looks like you've already found some useful methods for getting the current wallpaper on a Mac. To summarize: 1. **Using `NSUserDefaults`:** You can access the wallpaper settings through `NSUserDefaults`. You may look for keys like `Background` in the `com.apple.desktop` domain. 2. **Using the Terminal:** The comm...
38,590
[ { "from": "human", "value": "How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more.\nEdit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html\nAlso possible from shell:\ndefaul...
I'm looking for a library in PHP that can create a tree structure from a database (or array of values) with left and right ids. For the result when getting values I am only looking for an array so I can create any type of view. For adding and removing, it would be nice if the library did it all. Even if the library is ...
If you're looking for a PHP library to handle tree structures using the nested set model (which uses left and right IDs), there are a few options that you can consider. Here are some libraries and approaches that might suit your needs: ### 1. **PHP Nested Set Class** You can create your own simple nested set class fo...
35,262
[ { "from": "human", "value": "I'm looking for a library in PHP that can create a tree structure from a database (or array of values) with left and right ids. For the result when getting values I am only looking for an array so I can create any type of view. For adding and removing, it would be nice if the li...
Following is some obviously-defective code for which I think the compiler should emit a diagnostic. But neither gcc nor g++ does, even with all the warnings options I could think of: -pedantic -Wall -Wextra #include <stdio.h> short f(short x) { return x; } int main() { long x = 0x10000007; /* bigger than s...
You're correct that using the `-Wconversion` flag with GCC can help catch implicit conversions that might lead to data loss, particularly when passing a type of a larger size to a function expecting a smaller type. In your case, the issue arises from passing a `long` value to a function that takes a `short`. In GCC ve...
36,540
[ { "from": "human", "value": "Following is some obviously-defective code for which I think the compiler should emit a diagnostic. But neither gcc nor g++ does, even with all the warnings options I could think of: -pedantic -Wall -Wextra\n#include <stdio.h>\n\nshort f(short x)\n{\n return x;\n}\n\nint mai...
Does anybody have experience using the open source offering from Terracotta as opposed to their enterprise offering? Specifically, I'm interested if it is worth the effort to use terracotta without the enterprise tools to manage your cluster? Over-simplified usage summary: we're a small startup with limited budget that...
Terracotta offers both open-source and enterprise versions of its platform, each with distinct features and benefits. Here’s a breakdown of the considerations when choosing between the two: ### Open Source vs. Enterprise Offering 1. **Cost**: - The open-source version is cost-effective, which is a significant adva...
36,732
[ { "from": "human", "value": "Does anybody have experience using the open source offering from Terracotta as opposed to their enterprise offering? Specifically, I'm interested if it is worth the effort to use terracotta without the enterprise tools to manage your cluster?\nOver-simplified usage summary: we'r...
I am trying to locate an evil plugin that includes a stoneage version of a certain jar file. How do I do that ?
Finding a specific "evil plugin" or malicious software can be challenging, and it requires careful consideration to ensure you're not inadvertently accessing harmful content. Here are some general steps you might take to locate a potentially malicious plugin or a specific version of a JAR file: 1. **Identify the Plugi...
35,699
[ { "from": "human", "value": "I am trying to locate an evil plugin that includes a stoneage version of a certain jar file. How do I do that ?\n" }, { "from": "gpt", "value": "Finding a specific \"evil plugin\" or malicious software can be challenging, and it requires careful consideration to ensu...
I need to render JSON data in my JSPs for some AJAX requests. I'd like to know what's the best way to do it in terms of easy to use and stability.
Rendering JSON data in JSPs for AJAX requests can be achieved efficiently and cleanly by following best practices. Here’s a general guide to help you render JSON data in JSPs: ### Step 1: Prepare Your Data First, ensure that your backend logic prepares the data you want to send as JSON. This typically involves using ...
33,633
[ { "from": "human", "value": "I need to render JSON data in my JSPs for some AJAX requests. I'd like to know what's the best way to do it in terms of easy to use and stability.\n" }, { "from": "gpt", "value": "Rendering JSON data in JSPs for AJAX requests can be achieved efficiently and cleanly b...
I have a GUI application that executes (in a new process) "console" applications and parse the output. To redirect the Output i set the pConsole.StartInfo.RedirectStandardOutput to true. I also subscribes to the event pConsole.Exited. The problem I see is that I have to use Thread.Sleep() in the Exited event handler to...
The issue you're encountering is related to the way asynchronous output is handled in your application. When you redirect the standard output of a process, the data might not be immediately available for reading by the time the `Exited` event is triggered. This means that there could still be output data waiting to be ...
31,455
[ { "from": "human", "value": "I have a GUI application that executes (in a new process) \"console\" applications and parse the output. To redirect the Output i set the pConsole.StartInfo.RedirectStandardOutput to true. I also subscribes to the event pConsole.Exited.\nThe problem I see is that I have to use T...
I have this naive regex "<([\s]|[^<])+?>" (excluding the quotation marks). It seems so straightforward but it is indeed evil when it works against the below HTML text. It sends the Java regular expression engine to an infinite loop. I have another regex ("<.+?>"), which does somewhat the same thing, but it doesn't kill...
The issue you're experiencing with the regular expression `<([\s]|[^<])+?>` causing an infinite loop is due to the way the regex engine processes the expression, particularly with the quantifier `+` and the way groups are constructed. Let's break down your regex: 1. `<`: Matches the opening angle bracket `<`. 2. `([\...
35,824
[ { "from": "human", "value": "I have this naive regex \"<([\\s]|[^<])+?>\" (excluding the quotation marks). It seems so\nstraightforward but it is indeed evil when it works against the below HTML text. It sends the Java regular expression engine to an infinite loop.\nI have another regex (\"<.+?>\"), which d...
I keep finding files which show a size of 10kb but a size on disk on 10gb. Trying to figure out how this is done, anyone have any ideas?
The situation you're encountering where a file shows a size of 10 KB but takes up 10 GB on disk can be attributed to several factors: 1. **Sparse Files**: Sparse files are designed to save disk space by only allocating blocks for non-zero data. If a file has a lot of zero bytes, the file system may not allocate physic...
37,258
[ { "from": "human", "value": "I keep finding files which show a size of 10kb but a size on disk on 10gb. Trying to figure out how this is done, anyone have any ideas?\n" }, { "from": "gpt", "value": "The situation you're encountering where a file shows a size of 10 KB but takes up 10 GB on disk ...
While maintaining a castor based system, I amend the source schema to produce a new set of classes and find that introducing a new element produces a different class hierarchy. This is true of any element type. Briefly, the current schema creates class foo which extends fooParent which extends fooGrandparent. Introduc...
Yes, this behavior can occur in Castor when changes are made to the schema, especially when introducing new elements. The class hierarchy generated by Castor is heavily influenced by the XML schema definition (XSD) and how elements and types are defined and related within it. When you amend the schema to include new ...
37,776
[ { "from": "human", "value": "While maintaining a castor based system, I amend the source schema to produce a new set of classes and find that introducing a new element produces a different class hierarchy. This is true of any element type.\nBriefly, the current schema creates class foo which extends fooPare...
I'm trying to add a new node to an jQuery SimpleTree, but all I seem to be able to get is "sTC.addNode is not a function"... var simpleTreeCollection = $('.simpleTree').simpleTree({ animate:true, drag:false, autoclose: false, afterClick:function(node){}, afterDblClick:function(node){}, beforeMo...
The error "sTC.addNode is not a function" suggests that the jQuery SimpleTree instance is not returning an object that has an `addNode` method. The issue lies in how you're initializing and using the SimpleTree plugin. In jQuery SimpleTree, the `simpleTree` function returns a jQuery object containing the element it wa...
35,068
[ { "from": "human", "value": "I'm trying to add a new node to an jQuery SimpleTree, but all I seem to be able to get is \"sTC.addNode is not a function\"... \nvar simpleTreeCollection = $('.simpleTree').simpleTree({\n animate:true,\n drag:false,\n autoclose: false,\n afterClick:function(node){},\...
I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: Message: Specified cast is not valid. Type: System.InvalidCastException Source: System.Data.Linq TargetSite: Boolean TryCr...
The error message you are encountering, "Specified cast is not valid," when using LINQ to insert a record into a child table, typically indicates that there is an issue with how the keys are being handled in your entity model. Here's a breakdown of potential issues and solutions: 1. **Foreign Key Configuration**: ...
35,578
[ { "from": "human", "value": "I'm attempting to use LINQ to insert a record into a child table and I'm \nreceiving a \"Specified cast is not valid\" error that has something to do w/ \nthe keys involved. The stack trace is:\n\nMessage: Specified cast is not valid.\nType: System.InvalidCastException\n Sourc...
I've been discussing a code style issue with a friend. We have a series of packages that implement an interface by returning a specific type of value via a named subroutine. For example: package Foo::Type::Bar; sub generate_foo { # about 5-100 lines of code return stuff here; } So you can go: my $bar_foo = Foo...
This is a classic debate in software design about clarity versus simplicity, and there are valid points on both sides. Let’s break down the arguments: ### Your Perspective 1. **Clarity of Intent**: By using inheritance, you clearly express that `Foo::Type::Bar` and `Foo::Type::Baz` are implementations of the same int...
36,539
[ { "from": "human", "value": "I've been discussing a code style issue with a friend. We have a series of packages that implement an interface by returning a specific type of value via a named subroutine. For example:\npackage Foo::Type::Bar;\nsub generate_foo {\n # about 5-100 lines of code\n return st...
We are experiencing some slowdowns on our web-app deployed on a Tomcat 5.5.17 running on a Sun VM 1.5.0_06-b05 and our hosting company doesn't gives enough data to find the problem. We are considering installing lambda probe on the production server but it requires to enable JMX (com.sun.management.jmxremote) in order ...
Enabling JMX (Java Management Extensions) does not typically incur a significant performance penalty on the JVM itself. The overhead associated with JMX is generally minimal and shouldn't impact your application's performance under normal usage conditions. However, if a monitoring tool is excessively polling the JMX be...
36,425
[ { "from": "human", "value": "We are experiencing some slowdowns on our web-app deployed on a Tomcat 5.5.17 running on a Sun VM 1.5.0_06-b05 and our hosting company doesn't gives enough data to find the problem.\nWe are considering installing lambda probe on the production server but it requires to enable JM...
When a user clicks a link to download a file on my website, they go to this PHP file which increments a download counter for that file and then header()-redirects them to the actual file. I suspect that bots are following the download link, however, so the number of downloads is inaccurate. How do I let bots know that...
To address your concerns about counting downloads accurately and mitigating the effect of bots on your statistics, consider the following approaches: ### 1. Use a Robots.txt File While it won't stop all bots, you can create or update your `robots.txt` file to suggest that well-behaved bots (like those from search engi...
24,723
[ { "from": "human", "value": "When a user clicks a link to download a file on my website, they go to this PHP file which increments a download counter for that file and then header()-redirects them to the actual file. I suspect that bots are following the download link, however, so the number of downloads is...
I'm creating an asp.net app with just some lite data access from xml files. However, I need to be able to authenticate administrative users (via forms) to manage that data. I don't want to stand up a sql db just for authentication purposes. I'd like to use xml, but not sure about security with that. Any suggestions...
Using XML files for user authentication can be a feasible solution for lightweight applications, especially when setting up a full-fledged database feels unnecessary. However, you'll need to ensure you implement it securely to protect sensitive information. Here are some suggestions to handle authentication with XML fi...
35,327
[ { "from": "human", "value": "I'm creating an asp.net app with just some lite data access from xml files. However, I need to be able to authenticate administrative users (via forms) to manage that data. I don't want to stand up a sql db just for authentication purposes. I'd like to use xml, but not sure a...
I have a suspicion that I'm using the finally block incorrectly, and that I don't understand the fundamentals of its purpose... function myFunc() { try { if (true) { throw "An error"; } } catch (e) { alert (e); return false; } finally { ...
In JavaScript, the `finally` block is designed to run after the `try` and `catch` blocks, regardless of whether an exception was thrown or caught. One important characteristic of the `finally` block is that it will execute after the `catch` block, and if there is a `return` statement in the `finally` block, that return...
36,281
[ { "from": "human", "value": "I have a suspicion that I'm using the finally block incorrectly, and that I don't understand the fundamentals of its purpose...\n function myFunc() {\n try {\n if (true) {\n throw \"An error\";\n }\n } catch (e) {\n alert (e...
What's the best way to get a temp directory name in Windows? I see that I can use GetTempPath and GetTempFileName to create a temporary file, but is there any equivalent to the Linux / BSD mkdtemp function for creating a temporary directory?
In Windows, there isn't a direct equivalent of the `mkdtemp` function that you might find in Unix-like systems. However, you can create a temporary directory in a similar fashion by using the `GetTempPath` function to retrieve the path to the temporary directory, and then generating a unique directory name. Here's a c...
30,739
[ { "from": "human", "value": "What's the best way to get a temp directory name in Windows? I see that I can use GetTempPath and GetTempFileName to create a temporary file, but is there any equivalent to the Linux / BSD mkdtemp function for creating a temporary directory?\n" }, { "from": "gpt", "...
In Perl print "a" x 3; # aaa In C# Console.WriteLine( ??? )
In C#, you can achieve the same effect of repeating a string multiple times using the `string` class method `Repeat`. Here's how you can do it: ```csharp using System; class Program { static void Main() { Console.WriteLine(string.Concat(Enumerable.Repeat("a", 3))); // aaa } } ``` Alternatively, i...
39,602
[ { "from": "human", "value": "In Perl\nprint \"a\" x 3; # aaa\n\nIn C# \nConsole.WriteLine( ??? )\n\n" }, { "from": "gpt", "value": "In C#, you can achieve the same effect of repeating a string multiple times using the `string` class method `Repeat`. Here's how you can do it:\n\n```csharp\nusing...
I'm trying to convert a cookie from www.example.com to .example.com. So I thought I'd go to C:\Users\SWEAVER\AppData\Local\Microsoft\Windows\Temporary Internet Files and just delete the cookie there. To my surprise there were not only no temporary internet files (images/html...) but also very few cookies. And of cour...
It sounds like you're encountering some challenges with cookie management in Internet Explorer 7 on Windows Server 2008. Here are a few steps and considerations to help you troubleshoot and manage your cookies more effectively: ### 1. Understanding Cookie Storage Internet Explorer 7 does not store cookies the same way...
37,455
[ { "from": "human", "value": "I'm trying to convert a cookie from www.example.com to .example.com. \nSo I thought I'd go to C:\\Users\\SWEAVER\\AppData\\Local\\Microsoft\\Windows\\Temporary Internet Files and just delete the cookie there. \nTo my surprise there were not only no temporary internet files (imag...
I'm trying to create number of Evenement instances and set the date for them: for (int i=2004; i<2009; i++){ evenementen.add(new Evenement("Rock Werchter", "Rock", "Werchter", 200000, (Date)formatter.parse(i+"/07/03"))); But I can't seem to get it to work, Any ideas?
The code snippet you provided seems to have an issue with parsing the date correctly, especially since you're trying to convert an integer directly into a `Date` object using a date formatter. Assuming you're using a `SimpleDateFormat` to format your dates, I can help you with that. Here's an example of how you can co...
34,402
[ { "from": "human", "value": "I'm trying to create number of Evenement instances and set the date for them:\n for (int i=2004; i<2009; i++){\n evenementen.add(new Evenement(\"Rock Werchter\", \"Rock\", \"Werchter\", 200000,\n (Date)formatter.parse(i+\"/07/03\")));\n\nBut...
I have a script that constantly segfaults - the problem that I can't solve as segfault is in python libxml bindings - didn't write those. Ok, so in Linux I used to run an inf.loop so that when script dies - it restarts, like so: #!/bin/bash while [ 1 ] do nice -n 19 python server.py sleep 1 done Well, I can't seem to ...
In FreeBSD, you can use a similar approach to what you have in your bash script, but you'll likely want to use `sh` instead, as `/bin/sh` is available and compatible with the syntax you provided. Here's a revised version of your script that should work in FreeBSD: ```sh #!/bin/sh while true; do nice -n 19 python s...
37,753
[ { "from": "human", "value": "I have a script that constantly segfaults - the problem that I can't solve as segfault is in python libxml bindings - didn't write those. Ok, so in Linux I used to run an inf.loop so that when script dies - it restarts, like so:\n#!/bin/bash\nwhile [ 1 ]\ndo\nnice -n 19 python s...
I use Jasper reports with the JasperReportsMultiFormatView class provided by the Spring framework. This class takes care of compiling the source .jrxml files to their compiled .jasper format when the Spring application context is created. However, this compilation process is really slowing down the application startup ...
Hi Don, Yes, you can achieve lazy compilation of Jasper reports in your Spring application instead of compiling them at startup time. While the `JasperReportsMultiFormatView` class compiles .jrxml files when the Spring application context is initialized, you can customize the behavior to defer compilation until the re...
36,840
[ { "from": "human", "value": "I use Jasper reports with the JasperReportsMultiFormatView class provided by the Spring framework. This class takes care of compiling the source .jrxml files to their compiled .jasper format when the Spring application context is created.\nHowever, this compilation process is re...
Hello I was writing a Regular Expression (first time in my life I might add) but I just can't figure out how to do what I want. So far, so good since I already allow only Letters and spaces (as long as it's not the first character) now what I'm missing is that I don't want to allow any numbers in between the characters...
Certainly! It looks like you're on the right track, but there are a few adjustments you need to make to achieve your goal of allowing only letters and spaces (with restrictions) while ensuring that no numbers appear in between the characters. Here’s a breakdown of what you need: 1. The string should not start with a s...
34,804
[ { "from": "human", "value": "Hello I was writing a Regular Expression (first time in my life I might add) but I just can't figure out how to do what I want. So far, so good since I already allow only Letters and spaces (as long as it's not the first character) now what I'm missing is that I don't want to al...
I created a custom login page using Forms Authentication and using a sQL DB to store user data. I am able to create a session variable from the username, but wondering if it is possible to pull a separate field and create a session variable based on that. I would like the session variable to be based off a SalesNumbe...
Yes, you can definitely pull a separate field (in your case, `SalesNumber`) from your SQL database and create a session variable to store it. Based on your provided code, you'll want to modify it slightly to include retrieving the `SalesNumber` along with the password. Here is an example of how you can do that: ```cs...
37,217
[ { "from": "human", "value": "I created a custom login page using Forms Authentication and using a sQL DB to store user data. I am able to create a session variable from the username, but wondering if it is possible to pull a separate field and create a session variable based on that. I would like the sess...
I wanted to compare the datetime which is in this format "7/20/2008" with the ones in the database which is in format "7/20/2008 7:14:53 AM". I tried using "like" clause but it did not work beacuse the "like" clause uses only string and the one which I am using is date time format. Can anyone tell how to convert and co...
To compare a date in the format "7/20/2008" with a datetime field in your database that includes a time component (e.g., "7/20/2008 7:14:53 AM"), you'll want to ensure that you only compare the date part of the datetime field in your query. Instead of directly comparing the two values, you can use the `DateTime.Date` ...
37,502
[ { "from": "human", "value": "I wanted to compare the datetime which is in this format \"7/20/2008\" with the ones in the database which is in format \"7/20/2008 7:14:53 AM\".\nI tried using \"like\" clause but it did not work beacuse the \"like\" clause uses only string and the one which I am using is date ...
Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way?
If you want to prevent search engines from indexing certain text ads while still displaying them on your website, there are several strategies you can consider. However, be cautious when using methods that could be perceived as manipulative or against search engine guidelines. Here are some common and accepted methods...
11,136
[ { "from": "human", "value": "Is there any way to keep search engines from indexing text ads? \nThese are basically stylized links.\nI have thought about generating images with text or using javascript to write them into a DIV. \nWhat is the best and most accepted way?\n" }, { "from": "gpt", "va...
Is it possible to turn off all HTML formatting in Visual Studio 2008? It just totally messes everything up. For example, I'll add a grid with columns, styles, etc. with them all indented and on separate lines. I'll switch to design view or split view and all the work I just did is on one line! It is so frustrating. I'v...
In Visual Studio 2008, it can be frustrating when the HTML formatting changes automatically, especially when you're working primarily in Source View and just want a clean layout without automatic reformatting. Here are a few steps you can take to minimize the impact of this automatic formatting: 1. **Use Source View E...
37,877
[ { "from": "human", "value": "Is it possible to turn off all HTML formatting in Visual Studio 2008? It just totally messes everything up. For example, I'll add a grid with columns, styles, etc. with them all indented and on separate lines. I'll switch to design view or split view and all the work I just did ...
i have a 3 column datafile and i wanted to use splot to plot the same. But what i want is that gnuplot plots first row (in some colour, say red) and then pauses for say 0.3 secs and then moves on to plotting next row (in other colour, not in red, say in green), pauses for 0.3 secs and then proceeds to next row....so on...
To achieve the desired effect of plotting each row of data sequentially with a pause in Gnuplot, you can use a loop to iterate through the rows of your data file. While Gnuplot does not have a built-in feature for pauses between plots, you can simulate this behavior by using the `pause` command. Here's an example of h...
31,363
[ { "from": "human", "value": "i have a 3 column datafile and i wanted to use splot to plot the same.\nBut what i want is that gnuplot plots first row (in some colour, say red) and then pauses for say 0.3 secs and then moves on to plotting next row (in other colour, not in red, say in green), pauses for 0.3 s...
I'm new to Python and am running to a problem I can't google my way out of. I've built a GUI using wxPython and ObjectiveListView. In its very center, the GUI has a list control displaying data in X rows (the data is loaded by the user) and in five columns. When the user selects multiple entries from the list control (...
To find the common values across multiple dictionaries in your list, you can follow a step-by-step approach. The basic idea is to identify the keys in the dictionaries, and then check the values for each key to see if they are the same across all dictionaries. Here's a clear way to accomplish this using a combination ...
37,074
[ { "from": "human", "value": "I'm new to Python and am running to a problem I can't google my way out of. I've built a GUI using wxPython and ObjectiveListView. In its very center, the GUI has a list control displaying data in X rows (the data is loaded by the user) and in five columns.\nWhen the user select...
I am trying to run a DataTable through an XSL tranform and then put the results back into a DataTable. My DataTable is coming up empty. Any help would be great. Dim finalExelList As New DataTable Dim xlsMyList = New XPath.XPathDocument(New StringReader(myList.DataSet.GetXml())) Dim trans As Xsl.XslCompiledTransform = N...
When using XSLT to transform an XML dataset and read the result back into a DataTable, there are several potential pitfalls that could lead to your `finalExelList` being empty. Here's a checklist and some troubleshooting steps you can follow to diagnose and fix the issue: ### 1. Check the XSL Transformation Ensure tha...
34,398
[ { "from": "human", "value": "I am trying to run a DataTable through an XSL tranform and then put the results back into a DataTable. My DataTable is coming up empty. Any help would be great.\nDim finalExelList As New DataTable\nDim xlsMyList = New XPath.XPathDocument(New StringReader(myList.DataSet.GetXml())...
W3C recommends putting a space before the closing tag in XHTML, because this would give a better backwards compability with some browsers, e.g. write <br /> instead of <br/>. But are there still browsers out there, that would not tolerate that you omitted the space? (W3C do not mention which browsers cause problems.) I...
The recommendation from W3C to include a space before the closing slash in XHTML (e.g., `<br />` instead of `<br/>`) is primarily for historical reasons and backward compatibility with certain browsers and XML parsers. The idea was that some older browsers might have had trouble correctly interpreting the no-space vers...
37,274
[ { "from": "human", "value": "W3C recommends putting a space before the closing tag in XHTML, because this would give a better backwards compability with some browsers, e.g. write <br /> instead of <br/>. But are there still browsers out there, that would not tolerate that you omitted the space? (W3C do not ...
For example, in http://homepages.cwi.nl/~paulv/papers/algorithmicstatistics.pdf at the bottom of page 5 and top of page 6, he uses a plus/equal symbol and a similar plus/lessthan symbol. I can't figure out how to make that symbol, and I'd like to quote him. Any help?
In the context you're referring to, the symbols used are likely meant to represent "approximately equal to" or "is asymptotically equal to" and "much less than" respectively. 1. The plus/equal symbol (≈) can often be represented in LaTeX as `\approx`, which produces the symbol "≈". 2. The plus/less than symbol (≪)...
39,011
[ { "from": "human", "value": "For example, in http://homepages.cwi.nl/~paulv/papers/algorithmicstatistics.pdf at the bottom of page 5 and top of page 6, he uses a plus/equal symbol and a similar plus/lessthan symbol. I can't figure out how to make that symbol, and I'd like to quote him.\nAny help?\n" }, ...
We've had this question already, but I want to narrow it down to already high-speed typists. The original poster had hit a barrier of 75 WPM and wanted to increase his speed. I'm at a barrier where I can reliably type around 130, and I can sometimes hit 150, probably depending on the distribution of words in the text....
Absolutely! When you're already typing at a high speed like 130-150 WPM, the strategies for improving further can be more nuanced. Here are some tailored suggestions to help you break through that barrier: 1. **Focus on Accuracy**: Higher speeds often lead to more mistakes. Concentrate on typing accurately, as this wi...
36,809
[ { "from": "human", "value": "We've had this question already, but I want to narrow it down to already high-speed typists. \nThe original poster had hit a barrier of 75 WPM and wanted to increase his speed. I'm at a barrier where I can reliably type around 130, and I can sometimes hit 150, probably depending...
The default generated hashCode and equals implementations are ugly at best. Is it possible to make eclipse generate ones from HashCodeBuilder and EqualsBuilder, and perhaps even a toString with ToStringBuilder?
Eclipse IDE provides built-in features for generating `hashCode()`, `equals()`, and `toString()` methods, but it doesn't natively support generating these methods using `HashCodeBuilder`, `EqualsBuilder`, and `ToStringBuilder` from Apache Commons Lang. However, you can streamline your development process and maintain ...
36,601
[ { "from": "human", "value": "The default generated hashCode and equals implementations are ugly at best.\nIs it possible to make eclipse generate ones from HashCodeBuilder and EqualsBuilder, and perhaps even a toString with ToStringBuilder?\n" }, { "from": "gpt", "value": "Eclipse IDE provides b...
I've been looking into adopting Carbon Emacs for use on my Mac, and the only stumbling block I've run into is the annoying scroll beep when you try to scroll past the end of the document. I've looked online but I can't seem to find what I should add to my .emacs that will stop it from beeping when scrolling. I don't wa...
To suppress the beep sound when scrolling in Emacs (including Carbon Emacs) but keep it enabled for other actions, you can customize the behavior specifically for scrolling. Add the following code to your `.emacs` configuration file: ```elisp (setq ring-bell-function 'ignore) (setq visible-bell t) ``` However, this ...
39,524
[ { "from": "human", "value": "I've been looking into adopting Carbon Emacs for use on my Mac, and the only stumbling block I've run into is the annoying scroll beep when you try to scroll past the end of the document. I've looked online but I can't seem to find what I should add to my .emacs that will stop i...
I've used MS Word automation to save a .doc to a .htm. If there are bullet characters in the .doc file, they are saved fine to the .htm, but when I try to read the .htm file into a string (so I can subsequently send to a database for ultimate storage as a string, not a blob), the bullets are converted to question mark...
The issue you're experiencing with bullet characters (or other special characters) being replaced by question marks (�) typically indicates that there's a mismatch in character encoding. When saving a .doc file as .htm, the encoding used in the output HTML file must be appropriately handled when reading it into your ap...
37,018
[ { "from": "human", "value": "I've used MS Word automation to save a .doc to a .htm. If there are bullet characters in the .doc file, they are saved fine to the .htm, but when I try to read the .htm file into a string (so I can subsequently send to a database for ultimate storage as a string, not a blob), t...
I am looking for a clear, complete example of programmatically deleting all documents from a specific document library, via the Sharepoint object model. The doclib does not contain folders. I am looking to delete the documents completely (ie I don't want them in the Recycle Bin). I know of SPWeb.ProcessBatchData, but...
To programmatically delete all documents from a specific document library in SharePoint using the SharePoint object model, you can iterate through all the documents in that library and delete them using the `SPListItem.Delete()` method. To ensure that the items are permanently deleted (bypassing the Recycle Bin), you w...
32,237
[ { "from": "human", "value": "I am looking for a clear, complete example of programmatically deleting all documents from a specific document library, via the Sharepoint object model. The doclib does not contain folders. I am looking to delete the documents completely (ie I don't want them in the Recycle Bi...
Wanting to build and test a bunch of Borland Delphi 6 projects that are integrated with ASP.NET services. Had been using WANT and CruiseControl for building Delphi. With TFS Build agent we can tie all together and do some testing. I am looking for guidance and direction. One issue I see is that there is no "solutio...
Integrating Borland Delphi 6 projects with a .NET-based build system like TFS (Team Foundation Server) Build can be a bit tricky, especially since Delphi doesn't have the same project structure as .NET solutions. Here’s a high-level guide on how to approach this integration, leveraging TFS Build, MSBuild, and custom ta...
30,958
[ { "from": "human", "value": "Wanting to build and test a bunch of Borland Delphi 6 projects that are integrated with ASP.NET services. Had been using WANT and CruiseControl for building Delphi. With TFS Build agent we can tie all together and do some testing. I am looking for guidance and direction. \nOn...
I'm building an XML document with PHP's SimpleXML extension, and I'm adding a token to the file: $doc->addChild('myToken'); This generates (what I know as) a self-closing or single tag: <myToken/> However, the aging web-service I'm communicating with is tripping all over self-closing tags, so I need to have a separat...
When using PHP's SimpleXML, the `addChild()` method does create self-closing tags for empty elements by default. However, if you want to create a non-self-closing tag for a specific element, one way to do this is to first add the child element and then add some empty content within it. Here’s how you can do it: 1. Cr...
39,183
[ { "from": "human", "value": "I'm building an XML document with PHP's SimpleXML extension, and I'm adding a token to the file:\n$doc->addChild('myToken');\n\nThis generates (what I know as) a self-closing or single tag:\n<myToken/>\n\nHowever, the aging web-service I'm communicating with is tripping all over...
I need to style links for a Blackberry browser that has disabled CSS. The following is what I try to achieve: <style type="text/css"> a.hover { border:0; } a { text-decoration: none; } </style> Is it even possible, just using html?
If you're working with a Blackberry browser that has disabled CSS, you're limited to using HTML for styling your links. Since CSS won't be effective, you can use HTML attributes and inline styles to achieve some level of styling directly. ### Basic Link Styling with HTML Here's how you can do basic styling using HTML...
39,682
[ { "from": "human", "value": "I need to style links for a Blackberry browser that has disabled CSS.\nThe following is what I try to achieve: \n<style type=\"text/css\">\na.hover { \n border:0;\n} \na {\n text-decoration: none;\n}\n</style>\n\nIs it even possible, just using html?\n" }, { "from": "g...
How can you find the number of occurrences of a particular character in a string using sql? Example: I want to find the number of times the letter ‘d’ appears in this string. declare @string varchar(100) select @string = 'sfdasadhfasjfdlsajflsadsadsdadsa'
To find the number of occurrences of a particular character in a string using SQL, you can use the following approach, which works in SQL Server. One common technique is to compare the original string's length with the length of the string after removing the character you're interested in. The difference in lengths wil...
38,839
[ { "from": "human", "value": "How can you find the number of occurrences of a particular character in a string using sql?\nExample: I want to find the number of times the letter ‘d’ appears in this string.\ndeclare @string varchar(100)\nselect @string = 'sfdasadhfasjfdlsajflsadsadsdadsa'\n\n" }, { "f...
I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS. The user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have my makefile install executables. Prefer o...
If you're looking for a way to zip files in your non-GUI C/C++ application across multiple platforms (Windows, Linux/Unix, and MacOS) without requiring users to install additional software, several open-source libraries can help you achieve this. Below are a few options, including considerations based on your preferenc...
35,760
[ { "from": "human", "value": "I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS.\nThe user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have...
I want to override the default CreateObject() function in VBScript with my own. Basically this example in VB6: http://www.darinhiggins.com/the-vb6-createobject-function/ I cannot figure out is this line: Set CreateObject = VBA.CreateObject(Class$, ServerName$) How do I refer to "VBA" in VBSript?
In VBScript, there is no direct equivalent to the VBA object model as in VB6. Unlike VB6, which has a specific VBA library that provides access to functions and methods, VBScript operates within its own environment and does not have built-in support for explicitly referencing the VBA library. However, you can use the ...
37,730
[ { "from": "human", "value": "I want to override the default CreateObject() function in VBScript with my own.\nBasically this example in VB6:\nhttp://www.darinhiggins.com/the-vb6-createobject-function/\nI cannot figure out is this line:\n Set CreateObject = VBA.CreateObject(Class$, ServerName$)\n\nHow do I r...
I am trying to use ResourceBundle#getStringArray to retrieve a String[] from a properties file. The description of this method in the documentation reads: Gets a string array for the given key from this resource bundle or one of its parents. However, I have attempted to store the values in the properties file as mult...
The `ResourceBundle#getStringArray` method is designed to retrieve a string array for a specific key, but it expects the values to be stored in a certain format. Specifically, when using properties files, you cannot store multiple values directly under the same key or as a single comma-delimited string for automatic re...
32,694
[ { "from": "human", "value": "I am trying to use ResourceBundle#getStringArray to retrieve a String[] from a properties file. The description of this method in the documentation reads:\n\nGets a string array for the given key from this resource bundle or one of its parents.\n\nHowever, I have attempted to st...
I am working with a peripheral device that needs to be communicated through serial. I can send it commands using HyperTerminal, but now I need to write programs that will let me do it without HyperTerminal. Can somebody point me to a website and/or show me a sample hello world program to get me started? I have searc...
Certainly! To communicate with a peripheral device over a serial port in a modern programming environment, you can use languages like Python, C#, or C++. Below are examples for Python and C# to help you get started with serial communication. ### Using Python with `pySerial` 1. **Install `pySerial`**: You need to i...
35,647
[ { "from": "human", "value": "I am working with a peripheral device that needs to be communicated through serial. I can send it commands using HyperTerminal, but now I need to write programs that will let me do it without HyperTerminal. Can somebody point me to a website and/or show me a sample hello world...
How do I change the size of figure drawn with Matplotlib?
To change the size of a figure drawn with Matplotlib, you can use the `figsize` parameter when creating a new figure with `plt.figure()` or when using the `plt.subplots()` function. The `figsize` parameter takes a tuple that specifies the width and height of the figure in inches. Here’s how you can do it: ### Using `...
39,382
[ { "from": "human", "value": "How do I change the size of figure drawn with Matplotlib?\n" }, { "from": "gpt", "value": "To change the size of a figure drawn with Matplotlib, you can use the `figsize` parameter when creating a new figure with `plt.figure()` or when using the `plt.subplots()` func...
Is the following scenario possible in SQL Server using a single active connection? Inside a READCOMMITED transaction I need to update one table without locking it. For example each time I execute a statement I increase a field in that table. This operation doesn't need to be rolled back in case the transaction fails. A...
In SQL Server, the `READ COMMITTED` isolation level does provide mechanisms to avoid reading uncommitted data, but it does not allow you to perform updates without acquiring locks on the data being updated. However, you can achieve a scenario similar to what you described using a combination of techniques that minimize...
36,663
[ { "from": "human", "value": "Is the following scenario possible in SQL Server using a single active connection?\nInside a READCOMMITED transaction I need to update one table without locking it. For example each time I execute a statement I increase a field in that table. This operation doesn't need to be ro...
this was for an old computer class project which I am over with and now am wondering if there was a better way of doing things . we used to program an appointment.sh program where I solved the comparing time using an algorithm which converts time to a certain number you can compare today and tomorrow and of course wh...
Yes, in Bash on a Linux system, you can use the `date` command to work with and compare times. The `date` command allows you to format and manipulate date and time values easily. Below are a few examples of how you can use it to get the current time, compare times, and perform other related tasks. ### Getting Current ...
36,095
[ { "from": "human", "value": "this was for an old computer class project which I am over with and now am wondering if there was a better way of doing things . \nwe used to program an appointment.sh program where I solved the comparing time using an algorithm which converts time to a certain number\nyou can c...
You can set the HcDynamicCompressionLevel anywhere from 0-10. I've heard 10 is bad (high CPU usage), but what's the magic number that works the best?
The optimal setting for `HcDynamicCompressionLevel` in IIS (Internet Information Services) can vary based on your specific server environment, application load, and performance requirements. Here are some general guidelines: 1. **Low Settings (0-3)**: These settings provide minimal compression and result in lower CPU ...
38,190
[ { "from": "human", "value": "You can set the HcDynamicCompressionLevel anywhere from 0-10. I've heard 10 is bad (high CPU usage), but what's the magic number that works the best? \n" }, { "from": "gpt", "value": "The optimal setting for `HcDynamicCompressionLevel` in IIS (Internet Information Se...
Is there a Wiki plugin for TFS 2005, ie. SharePoint Services 2.0?
For Team Foundation Server (TFS) 2005, there isn't a built-in Wiki feature as we see in later versions of TFS and Azure DevOps. However, many organizations used SharePoint Services 2.0 to create documentation and collaboration spaces that could function similarly to a Wiki. There are some third-party tools and plugin...
40,052
[ { "from": "human", "value": "Is there a Wiki plugin for TFS 2005, ie. SharePoint Services 2.0?\n" }, { "from": "gpt", "value": "For Team Foundation Server (TFS) 2005, there isn't a built-in Wiki feature as we see in later versions of TFS and Azure DevOps. However, many organizations used SharePo...
I recently came across the data structure known as a skip list. It seems to have very similar behavior to a binary search tree. Why would you ever want to use a skip list over a binary search tree?
Skip lists and binary search trees (BSTs) both serve similar purposes in terms of storing sorted data and allowing for efficient search, insertion, and deletion operations. However, they have different underlying structures and performance characteristics, which can make one more suitable than the other in certain scen...
35,245
[ { "from": "human", "value": "I recently came across the data structure known as a skip list. It seems to have very similar behavior to a binary search tree. \nWhy would you ever want to use a skip list over a binary search tree? \n" }, { "from": "gpt", "value": "Skip lists and binary search tree...
I'm searching for the best way to automatically organize all user generated content in a social network. I'm building a site in ruby based upon lovdbyless' framework. the site is a place for men to share specialised knowledge. I've looked into wikis,forums, blogs by need a platform/organizational structure that will al...
Creating an organized and searchable repository for user-generated content (UGC) on your social network can significantly enhance user engagement and knowledge sharing. Here’s a structured approach to achieving this using Ruby and the Lovdbyless framework: ### 1. Define Content Types and Structure First, clearly defi...
34,669
[ { "from": "human", "value": "I'm searching for the best way to automatically organize all user generated content in a social network.\nI'm building a site in ruby based upon lovdbyless' framework. the site is a place for men to share specialised knowledge.\nI've looked into wikis,forums, blogs by need a pla...
How do you safely encode a URL using JavaScript such that it can be put into a GET string? var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl; I assume that you need to encode the myUrl variable on that second line?
Yes, you're correct! When constructing a URL that includes another URL as a parameter, you need to properly encode the inner URL to ensure it is safe and does not interfere with the structure of the outer URL. In JavaScript, you can use the `encodeURIComponent()` function to encode the URL. Here's how you can safely e...
39,953
[ { "from": "human", "value": "How do you safely encode a URL using JavaScript such that it can be put into a GET string?\nvar myUrl = \"http://example.com/index.html?param=1&anotherParam=2\";\nvar myOtherUrl = \"http://example.com/index.html?url=\" + myUrl;\n\nI assume that you need to encode the myUrl varia...
In logging frameworks like log4j & log4net you have the ability to log various levels of information. Most of the levels have obvious intentions (such as what a "Debug" log is vs. a "Error"). However, one thing that I have always been timid on was classifying my logging as "Fatal". What type of errors are so severe tha...
Logging frameworks like log4j and log4net offer different levels of logging, each with a specific purpose. Understanding when to use the "Fatal" level versus the "Error" level can indeed be a bit nuanced. Here are some guidelines and rules of thumb to help classify errors as "Fatal": ### Definition of Levels - **Error...
36,066
[ { "from": "human", "value": "In logging frameworks like log4j & log4net you have the ability to log various levels of information. Most of the levels have obvious intentions (such as what a \"Debug\" log is vs. a \"Error\"). However, one thing that I have always been timid on was classifying my logging as \...
I'm looking to build some functionality for a content management system for the editing of files stored on the server. I'd like to provide users the ability to easily download files locally to their computer, open the file for editing, and save it back to the server. The process should be as seamless as possible. Here...
What you're looking to achieve is indeed a common requirement for many organizations that use content management systems, especially for creative applications like Photoshop. However, achieving the seamless functionality you're describing can be quite complex due to various factors such as file handling and security me...
35,227
[ { "from": "human", "value": "I'm looking to build some functionality for a content management system for the editing of files stored on the server.\nI'd like to provide users the ability to easily download files locally to their computer, open the file for editing, and save it back to the server. The proce...
I have a couple of Divs which I style using a class and an ID, he div's themselves are emtpy since they are only placeholders for their background. Example Div: <div id='ranImg1' class='ranImg'></div> Then I style them using this css: .ranImg { position:fixed; z-index:0; width:250px; height:250px; display:bl...
The behavior you're experiencing is related to the `background-attachment` property set to `fixed`. When you use `background-attachment: fixed;`, the background image is fixed with respect to the viewport, meaning it will stay in place when you scroll. This is why the image appears to be "stuck" to the top-left corner ...
39,161
[ { "from": "human", "value": "I have a couple of Divs which I style using a class and an ID, he div's themselves are emtpy since they are only placeholders for their background. Example Div:\n<div id='ranImg1' class='ranImg'></div>\n\nThen I style them using this css:\n.ranImg {\n position:fixed;\n z-index...
I'm looking at the MySQL docs and trying to sort out the distinction between FOREIGN KEYs and CONSTRAINTs. I thought an FK was a constraint, but the docs seem to talk about them like they're separate things. The syntax for creating an FK is (in part) [CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name, ....
In MySQL (and SQL in general), the terms **foreign key** (FK) and **constraint** are closely related but have distinct meanings, and understanding their relationship is key to using them effectively. ### Foreign Key (FK) A foreign key is a specific type of constraint that establishes a relationship between two tables...
36,986
[ { "from": "human", "value": "I'm looking at the MySQL docs and trying to sort out the distinction between FOREIGN KEYs and CONSTRAINTs. I thought an FK was a constraint, but the docs seem to talk about them like they're separate things.\nThe syntax for creating an FK is (in part)\n[CONSTRAINT [symbol]] FORE...
In Django templates, is there a variable in the context (e.g. {{ BASE\_URL }}, {{ ROOT\_URL }}, or {{ MEDIA\_URL }} that one can use to link to the home url of a project? I.e. if Django is running in the root of a project, the variable (let's call it R) {{ R }} in a template would be /. If the root url is a sub-folder ...
In Django, there isn't a built-in context variable that directly gives you the base URL or the root URL of your project. However, you can easily create one using Django's template context processors or by adding it to your views. ### Option 1: Using a Custom Template Context Processor You can create a custom context ...
35,761
[ { "from": "human", "value": "In Django templates, is there a variable in the context (e.g. {{ BASE\\_URL }}, {{ ROOT\\_URL }}, or {{ MEDIA\\_URL }} that one can use to link to the home url of a project?\nI.e. if Django is running in the root of a project, the variable (let's call it R) {{ R }} in a template...
I'm working on a project where I need to analyze a page of text and collections of pages of text to determine dominant words. I'd like to know if there is a library (prefer c# or java) that will handle the heavy lifting for me. If not, is there an algorithm or multiple that would achieve my goals below. What I wan...
You have a solid plan laid out for analyzing textual data, and there are indeed libraries and algorithms that can help you with your goals in both C# and Java. Below are some recommendations, strategies, and libraries you can consider for your project. ### Libraries #### C# Libraries 1. **NLTK for .NET**: - Althou...
34,023
[ { "from": "human", "value": "I'm working on a project where I need to analyze a page of text and collections of pages of text to determine dominant words. I'd like to know if there is a library (prefer c# or java) that will handle the heavy lifting for me. If not, is there an algorithm or multiple that w...
Has anyone come across an example of a non .Net consumer of an ADO.NET Data Service? I am on the second day of looking at what Astoria is and how it can be used. I am also trying to answer why would I use this instead of a web service? After getting my examples running, I kind get the RESTful approach to getting data o...
ADO.NET Data Services, also known as WCF Data Services, provides a way to expose data as a RESTful service using the OData (Open Data Protocol) standard. This makes it possible for both .NET and non-.NET consumers to interact with your data service. ### Examples of Non-.NET Consumers Here are a few examples of how no...
33,077
[ { "from": "human", "value": "Has anyone come across an example of a non .Net consumer of an ADO.NET Data Service? I am on the second day of looking at what Astoria is and how it can be used. I am also trying to answer why would I use this instead of a web service?\nAfter getting my examples running, I kind ...
I come from a background of MoM. I think I understand ESB conceptually. However, I'm not too sure about the practical differences between the two when it comes to making a choice architecturally. Here is what I want to know 1) Any good links online which can help me in this regard. 2) Can someone tell me where it makes...
Understanding the differences between Message-Oriented Middleware (MoM) and an Enterprise Service Bus (ESB) is crucial for making informed architectural decisions. Here's a breakdown of your queries: ### 1) Online Resources Here are some resources that provide detailed insights into MoM and ESB: - **Articles and Guid...
36,018
[ { "from": "human", "value": "I come from a background of MoM. I think I understand ESB conceptually. However, I'm not too sure about the practical differences between the two when it comes to making a choice architecturally.\nHere is what I want to know\n1) Any good links online which can help me in this re...
Using .NET 1.1, I have a DataGrid that contains three columns for each row. Row one has a label with some text. Row three will always have two radio buttons and two checkboxes and those are in the HTML side of the page. Row two will have dynamically generated controls (just textboxes for now) and there can be 1 or mor...
In ASP.NET Web Forms, when you dynamically create controls on a page, you need to recreate those controls on every postback in order to maintain their state and handle their events. This means that when the page posts back (like when the user clicks the button), you need to recreate the dynamically generated TextBox co...
23,611
[ { "from": "human", "value": "Using .NET 1.1, I have a DataGrid that contains three columns for each row. \nRow one has a label with some text.\nRow three will always have two radio buttons and two checkboxes and those are in the HTML side of the page.\nRow two will have dynamically generated controls (just ...
I have classX: Sub New(ByVal item_line_no As String, ByVal item_text As String) ' check to ensure that the parameters do not exceed the file template limits Select Case item_line_no.Length Case Is > m_item_line_no_capacity Throw New ArgumentOutOfRangeException(item_line_no, "Line No exceeds...
It appears that you are using the `ExpectedException` attribute in a testing framework that has undergone some changes. In your case, the error indicates that you have a mismatch between the expected exception message and the actual message thrown by the `ArgumentOutOfRangeException`. The difference in the messages is ...
33,580
[ { "from": "human", "value": "I have classX: \nSub New(ByVal item_line_no As String, ByVal item_text As String)\n ' check to ensure that the parameters do not exceed the file template limits\n Select Case item_line_no.Length\n Case Is > m_item_line_no_capacity\n Throw New ArgumentOutO...
I am changing document template macros. The one thing I can't find out how to do is to customize error messages. For example an error message in a document is "Error! No table of figures entries found" I would like to change this to display something else. Is it possible to do this with Word VBA or VBScript?
Yes, you can customize error messages in Word using VBA. While there isn't a built-in way to change the default error messages in Word directly, you can create a workaround to detect when an error occurs and display a custom message instead. Here’s an example of how you might handle the situation where a specific erro...
36,518
[ { "from": "human", "value": "I am changing document template macros. The one thing I can't find out how to do is to customize error messages. For example an error message in a document is\n\"Error! No table of figures entries found\"\nI would like to change this to display something else. Is it possible to ...
I have some function to find a value: struct FindPredicate { FindPredicate(const SomeType& t) : _t(t) { } bool operator()(SomeType& t) { return t == _t; } private: const SomeType& _t; }; bool ContainsValue(std::vector<SomeType>& v, SomeType& valueToFind) { return find_if(v.begin(), v.en...
Certainly! To check if all members of a vector satisfy a certain predicate, you can use the `std::any_of` algorithm in combination with negating the predicate. The idea is to check if there are any elements that do not satisfy the predicate, and if there are none, then all elements satisfy it. Here’s how you can imple...
36,300
[ { "from": "human", "value": "I have some function to find a value:\nstruct FindPredicate\n{\n\n FindPredicate(const SomeType& t) : _t(t) {\n }\n bool operator()(SomeType& t) {\n return t == _t;\n }\n\nprivate:\n const SomeType& _t;\n};\n\nbool ContainsValue(std::vector<SomeType>& v, Some...
I was using GetWindowLong like this: [DllImport("user32.dll")] private static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex); But according to the MSDN docs I am supposed to be using GetWindowLongPtr to be 64bit compatible. http://msdn.microsoft.com/en-us/library/ms633584(VS.85).aspx The MSDN docs for GetWindowL...
To ensure proper 64-bit compatibility in your interop calls to Windows API functions like `GetWindowLong` and `GetWindowLongPtr`, you need to use the appropriate data types in your P/Invoke signatures in C#. ### Understanding LONG_PTR - `LONG_PTR` is defined as `long` on 64-bit systems and `int` on 32-bit systems. Th...
37,930
[ { "from": "human", "value": "I was using GetWindowLong like this:\n[DllImport(\"user32.dll\")]\nprivate static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex);\n\nBut according to the MSDN docs I am supposed to be using GetWindowLongPtr to be 64bit compatible.\nhttp://msdn.microsoft.com/en-us/library/m...
I have a struts2 application with a single page that may show one of a number of values stored in a database. The application is for a school with many departments and each department has many programs. The department page is accessed using a url like this department.action?id=2 and the DepartmentAction will load the ...
Your solution for handling user-friendly URLs in your Struts2 application seems quite practical and well-thought-out. By creating a new action that intercepts the requests for department names and parses the URL to determine the appropriate department, you've established a clean and maintainable approach. Here are a fe...
37,855
[ { "from": "human", "value": "I have a struts2 application with a single page that may show one of a number of values stored in a database. The application is for a school with many departments and each department has many programs. The department page is accessed using a url like this\ndepartment.action?id=...
Using SSRS2005, can you pull in values specified in the SSRS Web.Config file (think appSettings)? I'm needing to build up a dynamic hyperlink in a series of reports and would like this to be based on a value set in a config file. At present, it seems my only options are to: Update the hardcoded variable in each rep...
In SQL Server Reporting Services (SSRS) 2005, there is no direct way to access values from the `Web.Config` file (like appSettings) within your reports. However, there are a couple of workarounds you can consider to achieve your goal of dynamically generating hyperlinks without hardcoding values in each report. ### Wo...
36,626
[ { "from": "human", "value": "Using SSRS2005, can you pull in values specified in the SSRS Web.Config file (think appSettings)? I'm needing to build up a dynamic hyperlink in a series of reports and would like this to be based on a value set in a config file. \nAt present, it seems my only options are to:\...
Say I have a class that's meant to perform a single function. After performing the function, it can be destroyed. Is there any reason to prefer one of these approaches? // Initialize arguments in constructor MyClass myObject = new MyClass(arg1, arg2, arg3); myObject.myMethod(); // Pass arguments to method MyClass myOb...
When deciding how to structure a class with a single function, the approach you take can significantly impact usability, readability, and maintainability. Each of the three approaches you've mentioned has its own advantages and potential drawbacks, depending on the context in which the class is used. Here are some guid...
26,815
[ { "from": "human", "value": "Say I have a class that's meant to perform a single function. After performing the function, it can be destroyed. Is there any reason to prefer one of these approaches?\n// Initialize arguments in constructor\nMyClass myObject = new MyClass(arg1, arg2, arg3);\nmyObject.myMethod(...
I'm trying to integrate a NSURLConnection object with UIProgressView, so I can update the user while a file download is happening in the background. I created a separate object to download the file in the background, and I'm having problems figuring out how to update the progress property in the UIProgressView object w...
The issue you're facing is primarily due to how you're logging and handling the values of `NSNumber`. Specifically, you're seeing `-1.000000` for `float filesize` because you are trying to convert a `NSNumber` that represents a long long directly to a float without ensuring it is appropriately handled. Let's walk throu...
35,715
[ { "from": "human", "value": "I'm trying to integrate a NSURLConnection object with UIProgressView, so I can update the user while a file download is happening in the background.\nI created a separate object to download the file in the background, and I'm having problems figuring out how to update the progre...
How do I check to see if a variable is a number, or contains a number, in UNIX shell?
In a UNIX shell (such as `bash`), you can check if a variable is a number or contains a number using different methods. Below are a few methods that you can use. ### Method 1: Using `[[` with Regular Expressions You can use the `[[` conditional expression with a regular expression to check if a variable contains a num...
36,234
[ { "from": "human", "value": "How do I check to see if a variable is a number, or contains a number, in UNIX shell?\n" }, { "from": "gpt", "value": "In a UNIX shell (such as `bash`), you can check if a variable is a number or contains a number using different methods. Below are a few methods that...
I have a bit of an unusual question. I'm running an old DOS game in dosbox under windows xp and i'm trying to determine when and where it access it's data file. what can i use that will give me a log of all read requests made to a file? I want to know the "when", "from" and "size" of each file read. I know my basic 808...
To monitor file access in DOSBox, you have a few options, both in terms of built-in tools and external utilities that can assist you in logging file read requests. ### Options for Monitoring File Access 1. **DOSBox Debugger**: - DOSBox has a built-in debugger, which you can use to set breakpoints and monitor file-...
33,022
[ { "from": "human", "value": "I have a bit of an unusual question. I'm running an old DOS game in dosbox under windows xp and i'm trying to determine when and where it access it's data file.\nwhat can i use that will give me a log of all read requests made to a file? I want to know the \"when\", \"from\" and...
Here are some tools that I have found to test web services consumers: http://www.soapui.org/ https://wsunit.dev.java.net/ Are there any others? I would prefer testing frameworks that are written in Java or Python.
Yes, there are several other tools and frameworks you can use to test web services that are written in Java or Python. Here are some notable ones: ### Java-based Testing Frameworks 1. **Apache JMeter**: Primarily used for load testing, JMeter can also be used to test web services (both REST and SOAP). It provides a co...
36,316
[ { "from": "human", "value": "Here are some tools that I have found to test web services consumers:\nhttp://www.soapui.org/\nhttps://wsunit.dev.java.net/\nAre there any others? I would prefer testing frameworks that are written in Java or Python.\n" }, { "from": "gpt", "value": "Yes, there are se...
I've added a weakly named assembly to my Visual Studio 2005 project (which is strongly named). I'm now getting the error: "Referenced assembly 'xxxxxxxx' does not have a strong name" Do I need to sign this third-party assembly?
When you reference a weakly named assembly in a strongly named assembly project in Visual Studio, you will encounter the error: "Referenced assembly 'xxxxxxxx' does not have a strong name". This occurs because strong-named assemblies have a unique identity that is tied to their version, culture, and public key, which c...
38,749
[ { "from": "human", "value": "I've added a weakly named assembly to my Visual Studio 2005 project (which is strongly named). I'm now getting the error:\n\n\"Referenced assembly 'xxxxxxxx' does not have a strong name\"\n\nDo I need to sign this third-party assembly?\n" }, { "from": "gpt", "value":...
I have a binary file - Windows static library (*.lib). Is there a simple way to find out names of the functions and their interface from that library ? Something similar to emfar and elfdump utilities (on Linux systems) ?
On Windows, you can use several tools to inspect the contents of a `.lib` (static library) file, similar to `nm` or `objdump` on Linux. Here are some commonly used tools: 1. **Dumpbin**: This is a utility that comes with Microsoft Visual Studio. You can use it to examine the contents of the `.lib` file, including the ...
36,937
[ { "from": "human", "value": "I have a binary file - Windows static library (*.lib).\nIs there a simple way to find out names of the functions and their interface from that library ?\nSomething similar to emfar and elfdump utilities (on Linux systems) ?\n" }, { "from": "gpt", "value": "On Windows...
I want to set up an automatic rsync job to backup a bunch of user accounts on my OS X machine to a linux fileserver. I have set up password-free ssh from my account to another machine, and it works great, so I tried using this command: sudo rsync -avz /Users/jbloggs myserv:/var/Backup/ where myserv is an alias set up ...
When you run a command with `sudo`, it doesn't use the environment settings of your user account by default, including the configuration files in your home directory such as `~/.ssh/config`. One way to solve your issue is to specify the SSH options directly in the `rsync` command. Here's a modified version of your com...
35,541
[ { "from": "human", "value": "I want to set up an automatic rsync job to backup a bunch of user accounts on my OS X machine to a linux fileserver. I have set up password-free ssh from my account to another machine, and it works great, so I tried using this command:\nsudo rsync -avz /Users/jbloggs myserv:/var...
I'm looking for a lightweight, easy to setup CI server that I can run on my laptop along with Visual Studio & Resharper. I'm obviously looking at all the big names like CruiseControl, TeamCity etc etc but the biggest consideration to me is ease of setup and to a lesser extent memory footprint. Edit: I'd also like some ...
If you're looking for lightweight and easy-to-setup CI servers to run on your laptop alongside Visual Studio and ReSharper, here are a few alternatives to the big names like CruiseControl and TeamCity: ### 1. **Jenkins** - **Description**: A widely-used open-source automation server that supports building, deploying, ...
30,347
[ { "from": "human", "value": "I'm looking for a lightweight, easy to setup CI server that I can run on my laptop along with Visual Studio & Resharper. I'm obviously looking at all the big names like CruiseControl, TeamCity etc etc but the biggest consideration to me is ease of setup and to a lesser extent me...
I'm trying to add extra validation to jdpl process-definition files using XSD. We have a couple of rules we want to add; but the one that's causing me problems is that there must exist one "node" element with it's "name" attribute = "Problem". so this is valid: <process-definition name='sample'> <node name="Problem...
To enforce the validation rules you've outlined for your JDPL `process-definition` files using XSD (XML Schema Definition), you can use a combination of simple type constraints and a more complex mechanism like assertions (if using XML Schema 1.1). Unfortunately, XML Schema 1.0 does not have built-in support for assert...
34,957
[ { "from": "human", "value": "I'm trying to add extra validation to jdpl process-definition files using XSD.\nWe have a couple of rules we want to add; but the one that's causing me problems is that there must exist one \"node\" element with it's \"name\" attribute = \"Problem\".\nso this is valid:\n<process...
Hey all.... I am having a little bit of difficulty to make the integration between flex and cakephp to work with authentication... I have an MVC on Flex that comunicates with Users MVC on cakephp. It authenticates and sends me back the logged user, but when I try to access another controller, the value for $this->Auth-...
It sounds like you're having issues with session management when using Flex with CakePHP, specifically regarding authentication. Here are a few suggestions that might help you troubleshoot and resolve the problem: ### 1. Session Management Make sure that the sessions are correctly managed between Flex and CakePHP. Wh...
35,213
[ { "from": "human", "value": "Hey all.... I am having a little bit of difficulty to make the integration between flex and cakephp to work with authentication...\nI have an MVC on Flex that comunicates with Users MVC on cakephp. It authenticates and sends me back the logged user, but when I try to access anot...
I need to use utf-8 characters in my perl-documentation. If I use: perldoc MyMod.pm I see strange characters. If I use: pod2text MyMod.pm everything is fine. I use Ubuntu/Debian. $ locale LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE...
The issue you're encountering with `perldoc` showing strange characters when using UTF-8 characters in your Perl documentation likely stems from how `perldoc` handles character encodings. Here's how to properly use UTF-8 in Perl documentation, along with some tips for ensuring it displays correctly. ### Steps to Use U...
37,154
[ { "from": "human", "value": "I need to use utf-8 characters in my perl-documentation.\nIf I use:\nperldoc MyMod.pm\n\nI see strange characters. If I use:\npod2text MyMod.pm\n\neverything is fine.\nI use Ubuntu/Debian.\n$ locale\nLANG=de_DE.UTF-8\nLC_CTYPE=\"de_DE.UTF-8\"\nLC_NUMERIC=\"de_DE.UTF-8\"\nLC_TIME...
I'm having a problem where a jQuery setting against an .html() property on a selected element is returning the error 'nodeName' is null or not an object. This only occurs on IE6 and IE7, but not FF2, FF3, Opera (latest Nov 12,2008) or Safari (again, latest).
The error you're encountering—`'nodeName' is null or not an object`—is a common issue in older versions of Internet Explorer (specifically IE6 and IE7) that can occur for several reasons when manipulating the DOM with jQuery. Here are some potential causes and solutions you can consider: ### 1. Ensure the Element Exi...
34,708
[ { "from": "human", "value": "I'm having a problem where a jQuery setting against an .html() property on a selected element is returning the error 'nodeName' is null or not an object. This only occurs on IE6 and IE7, but not FF2, FF3, Opera (latest Nov 12,2008) or Safari (again, latest).\n" }, { "fro...
I am investigating a production system where there are several Windows services communicating with each other through TCP/IP sockets. I'm trying to figure out which executable is listening to which IP address and which port on a given machine. Other than rummaging through each windows service's obscure configuration fi...
Yes, there are several tools and commands available in Windows that can help you identify which executables are listening on which IP addresses and ports. Here are some common methods you can use: ### 1. **Using `netstat` Command** The `netstat` command can be used to display active connections, listening ports, and a...
30,640
[ { "from": "human", "value": "I am investigating a production system where there are several Windows services communicating with each other through TCP/IP sockets. I'm trying to figure out which executable is listening to which IP address and which port on a given machine.\nOther than rummaging through each ...
In my project I have a class that is inherited by many other classes. We'll call it ClassBase. public class ClassInheritFromBase : ClassBase When ClassBase is being inherited, ReSharper throws an "Ambiguous reference" warning on the ClassBase, and anything inside the new class that inherited from ClassBase does not ha...
The issue you're facing with ReSharper throwing an "Ambiguous reference" warning while compiling the code can be tricky, especially since it compiles and runs fine but has IntelliSense issues. Here are several troubleshooting steps and solutions that you can try to resolve this problem: 1. **Clear ReSharper Cache**: ...
23,680
[ { "from": "human", "value": "In my project I have a class that is inherited by many other classes. We'll call it ClassBase.\npublic class ClassInheritFromBase : ClassBase\n\nWhen ClassBase is being inherited, ReSharper throws an \"Ambiguous reference\" warning on the ClassBase, and anything inside the new c...
All, I currently have my solution comprising of 2 Class librarys and a Web Site building within teamCity using Msbuild. Now I want to precompile the website and make it available as an artifact. However when i try to Precompile it using <Target Name="PrecompileWeb" DependsOnTargets="Build"> <AspNetCompiler ...
Precompiling an ASP.NET website using MSBuild and the `AspNetCompiler` task requires that the `PhysicalPath` is a valid path to an ASP.NET application, which often includes being configured as a virtual directory under IIS. However, since you're working with a website that isn't hosted in IIS, you can work around this ...
35,732
[ { "from": "human", "value": "All, \nI currently have my solution comprising of 2 Class librarys and a Web Site building within teamCity using Msbuild. Now I want to precompile the website and make it available as an artifact. However when i try to Precompile it using \n<Target Name=\"PrecompileWeb\" Depends...
I have a class library with all my database logic. My DAL/BLL. I have a few web projects which will use the same database and classes, so I thought it was a good idea to abstract the data layer into its own project. However, when it comes to adding functionality to classes for certain projects I want to add methods ...
Using partial classes in C# is a great way to extend the functionality of classes, and they can indeed be split across multiple files in the same assembly. However, when you try to define a partial class in a different project (and hence a different assembly), it will not work because partial classes must be in the sam...
36,378
[ { "from": "human", "value": "I have a class library with all my database logic. My DAL/BLL. \nI have a few web projects which will use the same database and classes, so I thought it was a good idea to abstract the data layer into its own project.\nHowever, when it comes to adding functionality to classes ...
I am using C# and Windows Forms. I have a normal progress bar working fine in the program, but now I have another operation where the duration cannot be easily calculated. I would like to display a progress bar but don't know the best way to start/stop the scrolling marquee. I was hoping for something as simple as sett...
In Windows Forms, a `ProgressBar` can be configured to display a marquee style, which is useful for operations where you do not know the duration or progress. To achieve this, you don't need to run an empty loop. Instead, you can control the marquee animation by simply setting the `Style` of the `ProgressBar` and using...
35,851
[ { "from": "human", "value": "I am using C# and Windows Forms. I have a normal progress bar working fine in the program, but now I have another operation where the duration cannot be easily calculated. I would like to display a progress bar but don't know the best way to start/stop the scrolling marquee. I w...
In earlier versions of MS-DOS - I want to say version 7, but I could be wrong - there was a deltree command, which recursively deleted all subdirectories and files from a given path. deltree no longer exists, but del didn't seem to inherit the ability to delete a tree. del /s deletes files, but not folders. How to yo...
In MS-DOS and Windows command line environments, the `deltree` command was indeed used to recursively delete directories and their contents. Although `deltree` has been removed in later versions of Windows, you can achieve the same functionality using the `rmdir` (or `rd`) command with the `/s` and `/q` options. Here’...
40,178
[ { "from": "human", "value": "In earlier versions of MS-DOS - I want to say version 7, but I could be wrong - there was a deltree command, which recursively deleted all subdirectories and files from a given path. \ndeltree no longer exists, but del didn't seem to inherit the ability to delete a tree. del /s...
Do you have any examples of real life applications of mutation testing? Does it work better than simple test coverage tools? Or is it useless? What are the advantages/disadvantages of mutation testing in the real world?
Mutation testing is a software testing technique that involves making small changes (mutations) to a program's source code and then running tests to see if they can detect the changes. The purpose is to evaluate the quality of the test suite—specifically, how well it can identify faults. ### Real-Life Applications of ...
34,102
[ { "from": "human", "value": "Do you have any examples of real life applications of mutation testing? Does it work better than simple test coverage tools? Or is it useless?\nWhat are the advantages/disadvantages of mutation testing in the real world?\n" }, { "from": "gpt", "value": "Mutation test...
I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits: byte messageDigest[] = algorithm.digest(); StringBuffer hexString = new StringBuffer(); for (int i=0;i<messageDigest.length;i++) { hexString.append(Integer.toHexString(0xFF & messa...
You're correct that `Integer.toHexString()` drops leading zeros, which can result in a hex string that doesn't maintain the expected format. To ensure that each byte is represented by two hexadecimal digits, you can modify your code to format the output appropriately. A simple way to achieve this is to use `String.for...
39,150
[ { "from": "human", "value": "I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits:\nbyte messageDigest[] = algorithm.digest(); \nStringBuffer hexString = new StringBuffer();\nfor (int i=0;i<messageDigest.length;i++) {\n hexS...
How do you (using .NET) use WebDAV to get a listing of emails in a user's inbox (not your own inbox) and then get the properties and/or contents of each email? I'd like to do this without WebDAV.NET, if at all possible.
To interact with a user's inbox via WebDAV in .NET without using a library like WebDAV.NET, you will typically need to perform the following steps: 1. **Setup WebDAV Client**: Use `HttpClient` to make requests to the WebDAV server. 2. **Authenticate**: Use the appropriate authentication method for the server (e.g., Ba...
33,473
[ { "from": "human", "value": "How do you (using .NET) use WebDAV to get a listing of emails in a user's inbox (not your own inbox) and then get the properties and/or contents of each email?\nI'd like to do this without WebDAV.NET, if at all possible.\n" }, { "from": "gpt", "value": "To interact w...
To get some smooth graphics, I want to draw oversampled by factor 2 and scale down afterwards. So what I am doing is to draw oversampled on a wxBitmap in a wxMemoryDC, and then scale it down before copying to my dc. The code below works fine, but bitmapOversampled.ConvertToImage(); is extremely slow. Is there any way t...
To achieve smooth graphics and avoid the overhead of converting between `wxBitmap` and `wxImage`, you can use `wxGraphicsContext`, which supports rendering to a bitmap and performing transformations, such as scaling, directly. Here's an optimized approach that uses `wxGraphicsContext` to draw the oversampled content ...
35,957
[ { "from": "human", "value": "To get some smooth graphics, I want to draw oversampled by factor 2 and scale down afterwards.\nSo what I am doing is to draw oversampled on a wxBitmap in a wxMemoryDC, and then scale it down before copying to my dc. The code below works fine, but bitmapOversampled.ConvertToImag...
We need to set up a secure certificate on an Apache reverse proxy. We've been advised that we need to use a virtual host directive. I've looked these up in the O'Reilly book bit can't find any examples that pick up https specifically. Does anyone have any examples of config snippets to do this?
Certainly! Setting up a secure certificate for an Apache reverse proxy using VirtualHost directives involves configuring both HTTP and HTTPS, specifically for the SSL-enabled sites. Below is an example configuration snippet for Apache that demonstrates how to set up a secure reverse proxy with HTTPS using VirtualHost. ...
34,976
[ { "from": "human", "value": "We need to set up a secure certificate on an Apache reverse proxy.\nWe've been advised that we need to use a virtual host directive.\nI've looked these up in the O'Reilly book bit can't find any examples that pick up https specifically.\nDoes anyone have any examples of config s...
I want to remotely tag a CVS archive for a given date and time, this seems to be supported by the -D parameter but I can only find examples of the format to use for dates: cvs -d :pserver:server:/repo rtag -D 20081121 module Dates seem to take the format of YYYYMMDD but I can't seem to work out the format for times, Y...
In CVS, when using the `-D` option to specify a date for tagging, the format is indeed primarily focused on the date itself. The issue you're encountering with the time format arises from the fact that CVS doesn't support a granular date-time format that includes hours and minutes directly as part of the `-D` option. ...
35,695
[ { "from": "human", "value": "I want to remotely tag a CVS archive for a given date and time, this seems to be supported by the -D parameter but I can only find examples of the format to use for dates:\ncvs -d :pserver:server:/repo rtag -D 20081121 module\n\nDates seem to take the format of YYYYMMDD but I ca...
Did you ever use SQL Server auditing features on a production db? How did that impact on performances, and are there differences you noticed between different versions of SQL Server. Also how we need to enable the audit features.
Yes, SQL Server provides various auditing features that can be useful in a production environment, and their performance impact and configuration can vary based on the version of SQL Server and the specific auditing features you choose to implement. ### Impact on Performance 1. **Performance Overhead**: Enabling audit...
36,227
[ { "from": "human", "value": "Did you ever use SQL Server auditing features on a production db?\nHow did that impact on performances, and are there differences you noticed between different versions of SQL Server.\nAlso how we need to enable the audit features.\n" }, { "from": "gpt", "value": "Ye...
I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then watch the flow of data from the GPS. Then I want the data in my program, not so easy... I have implemented some methods using the serialPort class ...
When working with USB-to-Serial devices like your u-blox GPS, there can sometimes be specific issues that affect how the data is read. Here are several steps and tips that you can take to troubleshoot and potentially resolve the issues you are facing in your C# application: ### 1. **Ensure Correct COM Port and Setting...
35,338
[ { "from": "human", "value": "I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then watch the flow of data from the GPS.\nThen I want the data in my program, not so easy...\nI have implement...
.NET's SslStream class does not send the close_notify alert before closing the connection. How can I send the close_notify alert manually?
In .NET, the `SslStream` class automatically handles the SSL/TLS protocol details, including the sending of close alerts. However, if you want to ensure that the `close_notify` alert is sent before closing the connection, you can achieve this by calling the `Close` method after explicitly calling the `AuthenticateAsCli...
36,853
[ { "from": "human", "value": ".NET's SslStream class does not send the close_notify alert before closing the connection.\nHow can I send the close_notify alert manually?\n" }, { "from": "gpt", "value": "In .NET, the `SslStream` class automatically handles the SSL/TLS protocol details, including t...
my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc... isnt there any other way of doing this? cant i simply just ftp the blog folder to one of my virtual directories and then access it online??
In a shared hosting environment, where you have limitations such as a limited number of virtual directories, there are still several ways to host multiple web applications. Here are some options you can consider: ### 1. **Use Subdirectories:** If your hosting allows you to create subdirectories within your virtual dir...
36,980
[ { "from": "human", "value": "my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc... \nisnt there any other way of doing this? cant i simply just ftp the blog folder to one of my virtual directories and...