qid int64 4 8.14M | question stringlengths 20 48.3k | answers list | date stringlengths 10 10 | metadata list | input stringlengths 12 45k | output stringlengths 2 31.8k |
|---|---|---|---|---|---|---|
85,459 | <p>I have a series of PDFs named sequentially like so:</p>
<ul>
<li>01_foo.pdf</li>
<li>02_bar.pdf</li>
<li>03_baz.pdf</li>
<li>etc.</li>
</ul>
<p>Using Ruby, is it possible to combine these into one big PDF while keeping them in sequence? I don't mind installing any necessary gems to do the job.</p>
<p>If this isn'... | [
{
"answer_id": 85493,
"author": "akauppi",
"author_id": 14455,
"author_profile": "https://Stackoverflow.com/users/14455",
"pm_score": 0,
"selected": false,
"text": "<p>I don't think Ruby has tools for that. You might check ImageMagick and Cairo. ImageMagick can be used for binding mult... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1944/"
] | I have a series of PDFs named sequentially like so:
* 01\_foo.pdf
* 02\_bar.pdf
* 03\_baz.pdf
* etc.
Using Ruby, is it possible to combine these into one big PDF while keeping them in sequence? I don't mind installing any necessary gems to do the job.
If this isn't possible in Ruby, how about another language? No co... | A [Ruby-Talk](http://www.ruby-forum.com/topic/120008#new) post suggests using the **[pdftk](http://www.accesspdf.com/pdftk/)** toolkit to merge the PDFs.
It should be relatively straightforward to call *pdftk* as an external process and have it handle the merging. *PDF::Writer* may be overkill because all you're look... |
85,479 | <p>Can someone give an example of a good time to actually use "unsafe" and "fixed" in C# code? I've played with it before, but never actually found a good use for it. </p>
<p>Consider this code...</p>
<pre><code>fixed (byte* pSrc = src, pDst = dst) {
//Code that copies the bytes in a loop
}
</code></pre>
<p>comp... | [
{
"answer_id": 85527,
"author": "Matt Wilkinson",
"author_id": 12832,
"author_profile": "https://Stackoverflow.com/users/12832",
"pm_score": 1,
"selected": false,
"text": "<p>I believe unsafe code is used if you want to access something outside of the .NET runtime, ie. it is not managed ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Can someone give an example of a good time to actually use "unsafe" and "fixed" in C# code? I've played with it before, but never actually found a good use for it.
Consider this code...
```
fixed (byte* pSrc = src, pDst = dst) {
//Code that copies the bytes in a loop
}
```
compared to simply using...
```
Arra... | It's useful for interop with unmanaged code. Any pointers passed to unmanaged functions need to be fixed (aka. pinned) to prevent the garbage collector from relocating the underlying memory.
If you are using P/Invoke, then the default marshaller will pin objects for you. Sometimes it's necessary to perform custom mars... |
85,481 | <p>Say I've got this table (SQL Server 2005):</p>
<pre><code>Id => integer
MyField => XML
</code></pre>
<p><b>Id MyField</b> </p>
<pre><code>1 < Object>< Type>AAA< /Type>< Value>10< /Value>< /Object>< Object>< Type>BBB< /Type><Value>20< /Valu... | [
{
"answer_id": 85535,
"author": "Darren Kopp",
"author_id": 77,
"author_profile": "https://Stackoverflow.com/users/77",
"pm_score": 1,
"selected": false,
"text": "<p>You will need to use the <a href=\"http://msdn.microsoft.com/en-us/library/ms345122.aspx#sql2k5_xqueryintro_topic8\" rel=\... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15928/"
] | Say I've got this table (SQL Server 2005):
```
Id => integer
MyField => XML
```
**Id MyField**
```
1 < Object>< Type>AAA< /Type>< Value>10< /Value>< /Object>< Object>< Type>BBB< /Type><Value>20< /Value>< /Object>
2 < Object>< Type>AAA< /Type>< Value>15< /Value>< /Object>
3 < Object>< Type>AAA< /Type>< ... | You will need to use the [XML querying in sql server](http://msdn.microsoft.com/en-us/library/ms345122.aspx#sql2k5_xqueryintro_topic8) to do that.
somethings like
```
select id, MyField.query('/Object/Type[.="AAA"]/Value') as AAA, MyField.query('/Object/Type[.="BBB"]/Value) AS BBB
```
not sure if that's 100% correc... |
85,500 | <p>First time working with UpdatePanels in .NET. </p>
<p>I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.</p>
<p>When the UpdatePanel refreshes, it needs values from the FormView control so that on the server i... | [
{
"answer_id": 85554,
"author": "StingyJack",
"author_id": 16391,
"author_profile": "https://Stackoverflow.com/users/16391",
"pm_score": 1,
"selected": false,
"text": "<p>Try </p>\n\n<ul>\n<li>...looking in the Request and\nResponse. </li>\n<li>...setting a breakpoint\non the Load() meth... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16426/"
] | First time working with UpdatePanels in .NET.
I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.
When the UpdatePanel refreshes, it needs values from the FormView control so that on the server it can use them to... | make a javascript function that will collect the pieces of form data, and then sends that data to an ASHX handler. the ASHX handler will do some work, and can reply with a response.
This is an example I made that calls a database to populate a grid using AJAX calls. There are better libraries for doing AJAX (prototype... |
85,532 | <p>Ok, I've run across my first StackOverflowError since joining this site, I figured this is a must post :-). My environment is Seam 2.0.1.GA, JBoss 4.2.2.GA and I'm using JSF. I am in the process of converting from a facelets view to JSP to take advantage of some existing JSP tags used on our existing site. I ch... | [
{
"answer_id": 90220,
"author": "Peter",
"author_id": 17123,
"author_profile": "https://Stackoverflow.com/users/17123",
"pm_score": 2,
"selected": false,
"text": "<p>Stack overflows in java are almost always caused by infinite recursion / method calls. In your case given the stack trace... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5917/"
] | Ok, I've run across my first StackOverflowError since joining this site, I figured this is a must post :-). My environment is Seam 2.0.1.GA, JBoss 4.2.2.GA and I'm using JSF. I am in the process of converting from a facelets view to JSP to take advantage of some existing JSP tags used on our existing site. I changed th... | I was able to figure out this problem. Apparently you can not configure web.xml to have the same param-value of .jsp for Javax.faces.DEFAULT\_SUFFIX as the Faces Servlet url-pattern (\*.jsp). If you change your url-pattern to *.jspx or to /whateverdirnameyouwant/* the application starts up with no stack overflow errors... |
85,559 | <p>I have a problem in my project with the .designer which as everyone know is autogenerated and I ahvent changed at all. One day I was working fine, I did a back up and next day boom! the project suddenly stops working and sends a message that the designer cant procees a code line... and due to this I get more errores... | [
{
"answer_id": 85602,
"author": "Quintin Robinson",
"author_id": 12707,
"author_profile": "https://Stackoverflow.com/users/12707",
"pm_score": 1,
"selected": false,
"text": "<p>I would take out the static assignment in the designer to the resource CrystalReport11 and then add a load hand... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have a problem in my project with the .designer which as everyone know is autogenerated and I ahvent changed at all. One day I was working fine, I did a back up and next day boom! the project suddenly stops working and sends a message that the designer cant procees a code line... and due to this I get more errores (2... | I would back up the designer.cs file associated with it (like copy it to the desktop), then edit the designer.cs file and remove the offending lines (keeping track of what they do) and then I'd try to redo those lines via the design mode of that form. |
85,588 | <p>I have a line of C# in my ASP.NET code behind that looks like this:</p>
<pre><code>DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates");
</code></pre>
<p>The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView contro... | [
{
"answer_id": 85727,
"author": "Adam Weber",
"author_id": 9324,
"author_profile": "https://Stackoverflow.com/users/9324",
"pm_score": 0,
"selected": false,
"text": "<p>Are you 100% sure that's the line of code that's throwing the exception? I'm pretty certain that the FindControl method... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85588",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1284/"
] | I have a line of C# in my ASP.NET code behind that looks like this:
```
DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates");
```
The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView control. When my code hits this ... | If that's the stacktrace, its comingn from databinding, not from the line you posted. Is it possible that you have some really large data set? I've seen a 6000-page GridView overflow an Int16, although it seems pretty unlikely you'd actually overflow an Int32...
Check to make sure you're passing in sane data into, say... |
85,622 | <p>Most precompiled Windows binaries are made with the MSYS+gcc toolchain. It uses MSVCRT runtime, which is incompatible with Visual C++ 2005/2008.</p>
<p>So, how to go about and compile Cairo 1.6.4 (or later) for Visual C++ only. Including dependencies (png,zlib,pixman).</p>
| [
{
"answer_id": 91312,
"author": "Roel",
"author_id": 11449,
"author_profile": "https://Stackoverflow.com/users/11449",
"pm_score": 1,
"selected": false,
"text": "<p>Did you check here: <a href=\"http://cairographics.org/visualstudio/\" rel=\"nofollow noreferrer\">http://cairographics.org... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85622",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14455/"
] | Most precompiled Windows binaries are made with the MSYS+gcc toolchain. It uses MSVCRT runtime, which is incompatible with Visual C++ 2005/2008.
So, how to go about and compile Cairo 1.6.4 (or later) for Visual C++ only. Including dependencies (png,zlib,pixman). | Here are instructions for building Cairo/Cairomm with Visual C++.
Required:
* Visual C++ 2008 Express SP1 (now includes SDK)
* MSYS 1.0
To use VC++ command line tools, a batch file 'vcvars32.bat' needs to be run.
```
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vcvars32.bat
```
ZLib
----
Downl... |
85,675 | <p>I have two tables I would like to complare. One of the columns is type CLOB. I would like to do something like this:</p>
<pre><code>select key, clob_value source_table
minus
select key, clob_value target_table
</code></pre>
<p>Unfortunately, Oracle can't perform minus operations on clobs. How can I do this?</p>... | [
{
"answer_id": 85716,
"author": "hamishmcn",
"author_id": 3590,
"author_profile": "https://Stackoverflow.com/users/3590",
"pm_score": 2,
"selected": false,
"text": "<p>Can you access the data via a built in package? If so then perhaps you could write a function that returned a string rep... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16484/"
] | I have two tables I would like to complare. One of the columns is type CLOB. I would like to do something like this:
```
select key, clob_value source_table
minus
select key, clob_value target_table
```
Unfortunately, Oracle can't perform minus operations on clobs. How can I do this? | The format is this:
```
dbms_lob.compare(
lob_1 IN BLOB,
lob_2 IN BLOB,
amount IN INTEGER := 18446744073709551615,
offset_1 IN INTEGER := 1,
offset_2 IN INTEGER := 1)
RETURN INTEGER;
```
---
If dbms\_lob.compare(lob1, lob2) = 0, they are identical.
Here's an example query based on your exampl... |
85,701 | <p>I have a database field that contains a raw date field (stored as character data), such as </p>
<blockquote>
<p>Friday, September 26, 2008 8:30 PM Eastern Daylight Time</p>
</blockquote>
<p>I can parse this as a Date easily, with SimpleDateFormat</p>
<pre><code>DateFormat dbFormatter = new SimpleDateFormat("EEE... | [
{
"answer_id": 85862,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": 0,
"selected": false,
"text": "<p>Well as a partial solution you could use a RegEx match to get the timezone since you will always have the same t... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4249/"
] | I have a database field that contains a raw date field (stored as character data), such as
>
> Friday, September 26, 2008 8:30 PM Eastern Daylight Time
>
>
>
I can parse this as a Date easily, with SimpleDateFormat
```
DateFormat dbFormatter = new SimpleDateFormat("EEEE, MMMM dd, yyyy hh:mm aa zzzz");
Date sche... | I found that the following:
```
DateFormat dbFormatter = new SimpleDateFormat("EEEE, MMMM dd, yyyy hh:mm aa zzzz");
dbFormatter.setTimeZone(TimeZone.getTimeZone("America/Chicago"));
Date scheduledDate = dbFormatter.parse("Friday, September 26, 2008 8:30 PM Eastern Daylight Time");
Syste... |
85,702 | <p>I want to have a "select-only" <code>ComboBox</code> that provides a list of items for the user to select from. Typing should be disabled in the text portion of the <code>ComboBox</code> control.</p>
<p>My initial googling of this turned up an overly complex, misguided suggestion to capture the <code>KeyPress</code... | [
{
"answer_id": 85706,
"author": "Cory Engebretson",
"author_id": 3406,
"author_profile": "https://Stackoverflow.com/users/3406",
"pm_score": 10,
"selected": true,
"text": "<p>To make the text portion of a ComboBox non-editable, set the DropDownStyle property to \"DropDownList\". The Com... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3406/"
] | I want to have a "select-only" `ComboBox` that provides a list of items for the user to select from. Typing should be disabled in the text portion of the `ComboBox` control.
My initial googling of this turned up an overly complex, misguided suggestion to capture the `KeyPress` event. | To make the text portion of a ComboBox non-editable, set the DropDownStyle property to "DropDownList". The ComboBox is now essentially select-only for the user. You can do this in the Visual Studio designer, or in C# like this:
```
stateComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
```
Link to the documentati... |
85,761 | <p>I have an external variable coming in as a string and I would like to do a switch/case on it. How do I do that in xquery?</p>
| [
{
"answer_id": 85780,
"author": "Sixty4Bit",
"author_id": 1681,
"author_profile": "https://Stackoverflow.com/users/1681",
"pm_score": 2,
"selected": false,
"text": "<p>XQuery doesn't have a function for switching on anything other than elements.</p>\n\n<p>The first thing you do is conver... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1681/"
] | I have an external variable coming in as a string and I would like to do a switch/case on it. How do I do that in xquery? | Starting with XQuery 1.1, use switch:
<http://www.w3.org/TR/xquery-11/#id-switch>
```xquery
switch ($animal)
case "Cow" return "Moo"
case "Cat" return "Meow"
case "Duck" return "Quack"
default return "What's that odd noise?"
``` |
85,770 | <p>here is the input i am getting from my flash file </p>
<p>process.php?Q2=898&Aa=Grade1&Tim=0%3A0%3A12&Q1=908&Bb=lkj&Q4=jhj&Q3=08&Cc=North%20America&Q0=1</p>
<p>and in php i use this code
foreach ($_GET as $field => $label)
{
$datarray[]=$_GET[$field];</p>
<pre><code>echo "$fi... | [
{
"answer_id": 85792,
"author": "terminus",
"author_id": 9232,
"author_profile": "https://Stackoverflow.com/users/9232",
"pm_score": 4,
"selected": true,
"text": "<pre><code>ksort($_GET);\n</code></pre>\n<p>This should <a href=\"http://php.net/manual/en/function.ksort.php\" rel=\"nofollo... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16458/"
] | here is the input i am getting from my flash file
process.php?Q2=898&Aa=Grade1&Tim=0%3A0%3A12&Q1=908&Bb=lkj&Q4=jhj&Q3=08&Cc=North%20America&Q0=1
and in php i use this code
foreach ($\_GET as $field => $label)
{
$datarray[]=$\_GET[$field];
```
echo "$field :";
echo $_GET[$field];;
echo "<br>";
```
i get this out... | ```
ksort($_GET);
```
This should [ksort](http://php.net/manual/en/function.ksort.php) the `$_GET` array by it's keys. [krsort](http://php.net/manual/en/function.krsort.php) for reverse order. |
85,773 | <p>My source code needs to support both .NET version 1.1 and 2.0 ... how do I test for the different versions & what is the best way to deal with this situation.</p>
<p>I'm wondering if I should have the two sections of code inline, in separate classes, methods etc. What do you think?</p>
| [
{
"answer_id": 85827,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": 0,
"selected": false,
"text": "<p>I would be asking the question of WHY you have to maintain two code bases, I would pick one and go with it if th... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85773",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4491/"
] | My source code needs to support both .NET version 1.1 and 2.0 ... how do I test for the different versions & what is the best way to deal with this situation.
I'm wondering if I should have the two sections of code inline, in separate classes, methods etc. What do you think? | If you want to do something like this you will need to use preprocessor commands and conditional compilation symbols.
I would use symbols that clearly indicate the version of .NET you are targeting (say NET11 and NET20) and then wrap the relevant code like this:
```
#if NET11
// .NET 1.1 code
#elif NET20
// .NET 2.0 ... |
85,815 | <p>How do you tell if a function in JavaScript is defined?</p>
<p>I want to do something like this</p>
<pre><code>function something_cool(text, callback) {
alert(text);
if( callback != null ) callback();
}
</code></pre>
<p>But it gets me a</p>
<blockquote>
<p>callback is not a function</p>
</blockquote>
... | [
{
"answer_id": 85822,
"author": "Tom Ritter",
"author_id": 8435,
"author_profile": "https://Stackoverflow.com/users/8435",
"pm_score": 10,
"selected": true,
"text": "<pre><code>typeof callback === \"function\"\n</code></pre>\n"
},
{
"answer_id": 85825,
"author": "bdukes",
... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8351/"
] | How do you tell if a function in JavaScript is defined?
I want to do something like this
```
function something_cool(text, callback) {
alert(text);
if( callback != null ) callback();
}
```
But it gets me a
>
> callback is not a function
>
>
>
error when callback is not defined. | ```
typeof callback === "function"
``` |
85,816 | <p>I've got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you submit a form to an HTTPS page from an HTTP page, does it send it by HTTPS instead of HTTP?</p>
<p>Here is my example:</p>
<pre><code>http://www.e... | [
{
"answer_id": 85835,
"author": "thebigjc",
"author_id": 16507,
"author_profile": "https://Stackoverflow.com/users/16507",
"pm_score": 6,
"selected": false,
"text": "<p>You could do it with a directive and mod_rewrite on Apache:</p>\n\n<pre><code><Location /buyCrap.php>\nRewriteEn... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I've got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you submit a form to an HTTPS page from an HTTP page, does it send it by HTTPS instead of HTTP?
Here is my example:
```
http://www.example.com/some-pag... | The way I've done it before is basically like what you wrote, but doesn't have any hardcoded values:
```
if($_SERVER["HTTPS"] != "on")
{
header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
exit();
}
``` |
85,880 | <p>Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not defined.</p>
<p>I did this previously ... | [
{
"answer_id": 85903,
"author": "JBB",
"author_id": 12332,
"author_profile": "https://Stackoverflow.com/users/12332",
"pm_score": 9,
"selected": true,
"text": "<p>Like this: <code>[[ $(type -t foo) == function ]] && echo "Foo exists"</code></p>\n<p>The built-in <code>ty... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85880",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9232/"
] | Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not defined.
I did this previously by greping... | Like this: `[[ $(type -t foo) == function ]] && echo "Foo exists"`
The built-in `type` command will tell you whether something is a function, built-in function, external command, or just not defined.
Additional examples:
```none
$ LC_ALL=C type foo
bash: type: foo: not found
$ LC_ALL=C type ls
ls is aliased to `ls ... |
85,892 | <p>I'm trying to determine if there's a way in Visual Basic 2008 (Express edition if that matters) to do inline collection initialization, a la JavaScript or Python:</p>
<pre><code>Dim oMapping As Dictionary(Of Integer, String) = {{1,"First"}, {2, "Second"}}
</code></pre>
<p>I know Visual Basic 2008 supports array in... | [
{
"answer_id": 85914,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 5,
"selected": true,
"text": "<p><a href=\"http://en.wikipedia.org/wiki/Visual_Basic_.NET#Visual_Basic_2008_.28VB_9.0.29\" rel=\"nofollow noreferrer\... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7542/"
] | I'm trying to determine if there's a way in Visual Basic 2008 (Express edition if that matters) to do inline collection initialization, a la JavaScript or Python:
```
Dim oMapping As Dictionary(Of Integer, String) = {{1,"First"}, {2, "Second"}}
```
I know Visual Basic 2008 supports array initialization like this, bu... | [Visual Basic 9.0](http://en.wikipedia.org/wiki/Visual_Basic_.NET#Visual_Basic_2008_.28VB_9.0.29) doesn't support this yet. However, [Visual Basic 10.0](http://en.wikipedia.org/wiki/Visual_Basic_.NET#Visual_Basic_2010_.28VB_10.0.29) [will](http://msdn.microsoft.com/en-us/library/dd293617.aspx). |
85,941 | <p>I get the following error when running my Visual Studio 2008 ASP.NET project (start without Debugging) on my XP Professional box:</p>
<pre><code>System.Web.HttpException: The current identity (machinename\ASPNET) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
... | [
{
"answer_id": 85956,
"author": "DevelopingChris",
"author_id": 1220,
"author_profile": "https://Stackoverflow.com/users/1220",
"pm_score": 5,
"selected": true,
"text": "<p>Have you tried, the aspnet_regiis exe in the framework folder?</p>\n"
},
{
"answer_id": 85966,
"a... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/417/"
] | I get the following error when running my Visual Studio 2008 ASP.NET project (start without Debugging) on my XP Professional box:
```
System.Web.HttpException: The current identity (machinename\ASPNET) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
```
How can ... | Have you tried, the aspnet\_regiis exe in the framework folder? |
85,978 | <p>For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. I'm using Oracle 10G.</p>
| [
{
"answer_id": 86104,
"author": "Mike Monette",
"author_id": 6166,
"author_profile": "https://Stackoverflow.com/users/6166",
"pm_score": 7,
"selected": true,
"text": "<p>This should work (or something close):</p>\n\n<pre><code>select table_name\nfrom all_constraints\nwhere constraint_typ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9940/"
] | For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. I'm using Oracle 10G. | This should work (or something close):
```
select table_name
from all_constraints
where constraint_type='R'
and r_constraint_name in
(select constraint_name
from all_constraints
where constraint_type in ('P','U')
and table_name='<your table here>');
``` |
85,992 | <p>How do I enumerate the properties of a JavaScript object?</p>
<p>I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object.</p>
| [
{
"answer_id": 86014,
"author": "Jason Bunting",
"author_id": 1790,
"author_profile": "https://Stackoverflow.com/users/1790",
"pm_score": 11,
"selected": true,
"text": "<p>Simple enough:</p>\n\n<pre><code>for(var propertyName in myObject) {\n // propertyName is what you want\n // you... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4777/"
] | How do I enumerate the properties of a JavaScript object?
I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object. | Simple enough:
```
for(var propertyName in myObject) {
// propertyName is what you want
// you can get the value like this: myObject[propertyName]
}
```
Now, you will not get private variables this way because they are not available.
---
EDIT: [@bitwiseplatypus](https://stackoverflow.com/questions/85992/how-... |
85,996 | <p>I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with a clean install of Windows, without actually going on the net. Unfortunately I'm having problems creating the folder I want to put them in and am unsure how to go about it.<... | [
{
"answer_id": 86009,
"author": "GEOCHET",
"author_id": 5640,
"author_profile": "https://Stackoverflow.com/users/5640",
"pm_score": 3,
"selected": false,
"text": "<p>Try this: <code>Directory.Exists(TheFolderName)</code> and <code>Directory.CreateDirectory(TheFolderName)</code></p>\n\n<p... | 2008/09/17 | [
"https://Stackoverflow.com/questions/85996",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with a clean install of Windows, without actually going on the net. Unfortunately I'm having problems creating the folder I want to put them in and am unsure how to go about it.
I wa... | ```
If Not System.IO.Directory.Exists(YourPath) Then
System.IO.Directory.CreateDirectory(YourPath)
End If
``` |
86,002 | <p>I need to write a Delphi application that pulls entries up from various tables in a database, and different entries will be in different currencies. Thus, I need to show a different number of decimal places and a different currency character for every Currency data type ($, Pounds, Euros, etc) depending on the curr... | [
{
"answer_id": 86289,
"author": "user16120",
"author_id": 16120,
"author_profile": "https://Stackoverflow.com/users/16120",
"pm_score": 3,
"selected": false,
"text": "<p>I'd use SysUtils.CurrToStr(Value: Currency; var FormatSettings: TFormatSettings): string;</p>\n\n<p>I'd setup an array... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/42219/"
] | I need to write a Delphi application that pulls entries up from various tables in a database, and different entries will be in different currencies. Thus, I need to show a different number of decimal places and a different currency character for every Currency data type ($, Pounds, Euros, etc) depending on the currency... | Even with the same currency, you may have to display values with a different format (separators for instance), so I would recommend that you associate a LOCALE instead of the currency only with your values.
You can use a simple Integer to hold the LCID (locale ID).
See the list here: <http://msdn.microsoft.com/en... |
86,018 | <p>If you are using HAML and SASS in your Rails application, then any templates you define in public/stylesheet/*.sass will be compiled into *.css stylesheets. From your code, you use stylesheet_link_tag to pull in the asset by name without having to worry about the extension. </p>
<p>Many people dislike storing gener... | [
{
"answer_id": 86106,
"author": "Pete",
"author_id": 13472,
"author_profile": "https://Stackoverflow.com/users/13472",
"pm_score": 0,
"selected": false,
"text": "<p>If I can manage it, I like to store all of my styles in SASS templates when I choose HAML/SASS for a project, and I'll remo... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13472/"
] | If you are using HAML and SASS in your Rails application, then any templates you define in public/stylesheet/\*.sass will be compiled into \*.css stylesheets. From your code, you use stylesheet\_link\_tag to pull in the asset by name without having to worry about the extension.
Many people dislike storing generated c... | I always version all stylesheets in "public/stylesheets/sass/\*.sass" and set up an exclude filter for compiled ones:
```
/public/stylesheets/*.css
``` |
86,049 | <p>How do I ignore files in Subversion?</p>
<p>Also, how do I find files which are not under version control?</p>
| [
{
"answer_id": 86052,
"author": "andyuk",
"author_id": 2108,
"author_profile": "https://Stackoverflow.com/users/2108",
"pm_score": 11,
"selected": true,
"text": "<p>(This answer has been updated to match SVN 1.8 and 1.9's behaviour)</p>\n\n<p>You have 2 questions:</p>\n\n<h1>Marking file... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86049",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2108/"
] | How do I ignore files in Subversion?
Also, how do I find files which are not under version control? | (This answer has been updated to match SVN 1.8 and 1.9's behaviour)
You have 2 questions:
Marking files as ignored:
=========================
By "ignored file" I mean the file won't appear in lists even as "unversioned": your SVN client will pretend the file doesn't exist at all in the filesystem.
Ignored files are... |
86,119 | <p>I am trying to have Apache follow a symlink to a raid array server that will contain some large data files. I have tried modifying <code>httpd.conf</code> to have an entry like this</p>
<pre><code><Directory "/Users/imagine/Sites">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from ... | [
{
"answer_id": 86137,
"author": "Alex M",
"author_id": 9652,
"author_profile": "https://Stackoverflow.com/users/9652",
"pm_score": 1,
"selected": false,
"text": "<p>Look in the enclosing directories. They need to be at least mode 711. (<code>drwx--x--x</code>)</p>\n\n<p>Also, look in <co... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I am trying to have Apache follow a symlink to a raid array server that will contain some large data files. I have tried modifying `httpd.conf` to have an entry like this
```
<Directory "/Users/imagine/Sites">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
```
to have A... | I had the same problem last week and the solution was pretty simple for me.
Run:
```
sudo -i -u www-data
```
And then try navigating the path, directory by directory. You will notice at some point that you don't have access to open the dir.
If you get into the last directory, check that you can read the file (with ... |
86,129 | <p>I can make a DAO recordset in VB6/Access do anything - add data, clean data, move data, get data dressed in the morning and take it to school. But I don't even know where to start in .NET. </p>
<p>I'm not having any problems retrieving data from the database, but what do real people do when they need to edit data a... | [
{
"answer_id": 86137,
"author": "Alex M",
"author_id": 9652,
"author_profile": "https://Stackoverflow.com/users/9652",
"pm_score": 1,
"selected": false,
"text": "<p>Look in the enclosing directories. They need to be at least mode 711. (<code>drwx--x--x</code>)</p>\n\n<p>Also, look in <co... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16415/"
] | I can make a DAO recordset in VB6/Access do anything - add data, clean data, move data, get data dressed in the morning and take it to school. But I don't even know where to start in .NET.
I'm not having any problems retrieving data from the database, but what do real people do when they need to edit data and put it ... | I had the same problem last week and the solution was pretty simple for me.
Run:
```
sudo -i -u www-data
```
And then try navigating the path, directory by directory. You will notice at some point that you don't have access to open the dir.
If you get into the last directory, check that you can read the file (with ... |
86,138 | <p>I need to get the default printer name. I'll be using C# but I suspect this is more of a framework question and isn't language specific.</p>
| [
{
"answer_id": 86185,
"author": "OwenP",
"author_id": 2547,
"author_profile": "https://Stackoverflow.com/users/2547",
"pm_score": 8,
"selected": true,
"text": "<p>The easiest way I found is to create a new <code>PrinterSettings</code> object. It starts with all default values, so you ca... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7176/"
] | I need to get the default printer name. I'll be using C# but I suspect this is more of a framework question and isn't language specific. | The easiest way I found is to create a new `PrinterSettings` object. It starts with all default values, so you can check its *Name* property to get the name of the default printer.
`PrinterSettings` is in System.Drawing.dll in the namespace `System.Drawing.Printing`.
```
PrinterSettings settings = new PrinterSettings... |
86,143 | <p>There are a couple of tricks for getting glass support for .Net forms.</p>
<p>I think the original source for this method is here: <a href="http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx</a></p>
<p>Basically:</p>
<pre>... | [
{
"answer_id": 86168,
"author": "TheSmurf",
"author_id": 1975282,
"author_profile": "https://Stackoverflow.com/users/1975282",
"pm_score": 3,
"selected": true,
"text": "<p>There really isn't an easier way to do this. These APIs are not exposed by the .NET Framework (yet), so the only way... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/905/"
] | There are a couple of tricks for getting glass support for .Net forms.
I think the original source for this method is here: <http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx>
Basically:
```
//reference Desktop Windows Manager (DWM API)
[DllImport( "dwmapi.dll" )]
static extern void DwmIsCompositionEnabled( ... | There really isn't an easier way to do this. These APIs are not exposed by the .NET Framework (yet), so the only way to do it is through some kind of interop (or WPF).
As for working with both Windows versions, the code you have should be fine, since the runtime does not go looking for the entry point to the DLL until... |
86,175 | <p>On all my Windows servers, except for one machine, when I execute the following code to allocate a temporary files folder:</p>
<pre><code>use CGI;
my $tmpfile = new CGITempFile(1);
print "tmpfile='", $tmpfile->as_string(), "'\n";
</code></pre>
<p>The variable <code>$tmpfile</code> is assigned the value <code>'.... | [
{
"answer_id": 86200,
"author": "hometoast",
"author_id": 2009,
"author_profile": "https://Stackoverflow.com/users/2009",
"pm_score": 1,
"selected": false,
"text": "<p>If you're running this script as you, check the %TEMP% environment variable to see if if it differs.</p>\n\n<p>If IIS is... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/419/"
] | On all my Windows servers, except for one machine, when I execute the following code to allocate a temporary files folder:
```
use CGI;
my $tmpfile = new CGITempFile(1);
print "tmpfile='", $tmpfile->as_string(), "'\n";
```
The variable `$tmpfile` is assigned the value `'.\CGItemp1'` and this is what I want. But on o... | The name of the temporary directory is held in `$CGITempFile::TMPDIRECTORY` and initialised in the `find_tempdir` function in CGI.pm.
The algorithm for choosing the temporary directory is described in the CGI.pm documentation (search for **-private\_tempfiles**).
IIUC, if a C:\Temp folder exists on the server, CGI.pm w... |
86,202 | <p>Does <a href="https://facelets.dev.java.net/" rel="nofollow noreferrer">Facelets</a> have any features for neater or more readable internationalised user interface text labels that what you can otherwise do using JSF?</p>
<p>For example, with plain JSF, using h:outputFormat is a very verbose way to interpolate vari... | [
{
"answer_id": 92356,
"author": "Javaxpert",
"author_id": 15241,
"author_profile": "https://Stackoverflow.com/users/15241",
"pm_score": -1,
"selected": false,
"text": "<p>Use ResourceBundle and property files.</p>\n"
},
{
"answer_id": 93224,
"author": "Community",
"author... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2670/"
] | Does [Facelets](https://facelets.dev.java.net/) have any features for neater or more readable internationalised user interface text labels that what you can otherwise do using JSF?
For example, with plain JSF, using h:outputFormat is a very verbose way to interpolate variables in messages.
*Clarification:* I know tha... | You could create your own faces tag library to make it less verbose, something like:
```
<ph:i18n key="label.widget.count" p0="#{widgetCount}"/>
```
Then create the taglib in your view dir: /components/ph.taglib.xml
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc... |
86,269 | <p>So, I am seeing a curious problem. If I have a function</p>
<pre><code>// counter wraps around to beginning eventually, omitted for clarity.
var counter;
cycleCharts(chartId) {
// chartId should be undefined when called from setInterval
console.log('chartId: ' + chartId);
if(typeof chartId == 'undefine... | [
{
"answer_id": 86309,
"author": "Kent Fredric",
"author_id": 15614,
"author_profile": "https://Stackoverflow.com/users/15614",
"pm_score": 3,
"selected": true,
"text": "<p>setInterval is feeding cycleCharts actual timing data ( so one can work out the actual time it ran and use to produc... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13289/"
] | So, I am seeing a curious problem. If I have a function
```
// counter wraps around to beginning eventually, omitted for clarity.
var counter;
cycleCharts(chartId) {
// chartId should be undefined when called from setInterval
console.log('chartId: ' + chartId);
if(typeof chartId == 'undefined' || chartId ... | setInterval is feeding cycleCharts actual timing data ( so one can work out the actual time it ran and use to produce a less stilted response, mostly practical in animation )
you want
```
var cycleId = setInterval(function(){ cycleCharts(); }, 10000);
```
( this behavior may not be standardized, so don't rely on... |
86,271 | <p>I am attempting to find xml files with large swaths of commented out xml. I would like to programmatically search for xml comments that stretch beyond a given number of lines. Is there an easy way of doing this?</p>
| [
{
"answer_id": 86332,
"author": "Sam",
"author_id": 9406,
"author_profile": "https://Stackoverflow.com/users/9406",
"pm_score": 1,
"selected": false,
"text": "<p>Considering that XML doesn't use a line based format, you should probably check the number of characters. With a regular expre... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86271",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I am attempting to find xml files with large swaths of commented out xml. I would like to programmatically search for xml comments that stretch beyond a given number of lines. Is there an easy way of doing this? | Considering that XML doesn't use a line based format, you should probably check the number of characters. With a regular expression, you can create a pattern to match the comment prefix and match a minimum number of characters before it matches the first comment suffix.
<http://www.regular-expressions.info/>
Here is ... |
86,292 | <p>I would much prefer to do this without catching an exception in <code>LoadXml()</code> and using this results as part of my logic. Any ideas for a solution that doesn't involve manually parsing the xml myself? I think VB has a return value of false for this function instead of throwing an XmlException. Xml input i... | [
{
"answer_id": 86330,
"author": "Sunny Milenov",
"author_id": 8220,
"author_profile": "https://Stackoverflow.com/users/8220",
"pm_score": 4,
"selected": false,
"text": "<p>Using a XmlValidatingReader will prevent the exceptions, if you provide your own ValidationEventHandler.</p>\n"
},... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1551/"
] | I would much prefer to do this without catching an exception in `LoadXml()` and using this results as part of my logic. Any ideas for a solution that doesn't involve manually parsing the xml myself? I think VB has a return value of false for this function instead of throwing an XmlException. Xml input is provided from ... | Just catch the exception. The small overhead from catching an exception drowns compared to parsing the XML.
If you want the function (for stylistic reasons, not for performance), implement it yourself:
```
public class MyXmlDocument: XmlDocument
{
bool TryParseXml(string xml){
try{
ParseXml(xml);
re... |
86,365 | <p>Suppose I have a class module <code>clsMyClass</code> with an object as a member variable. Listed below are two complete implementations of this very simple class.</p>
<p>Implementation 1:</p>
<pre><code>Dim oObj As New clsObject
</code></pre>
<p>Implementation 2:</p>
<pre><code>Dim oObj As clsObject
Private S... | [
{
"answer_id": 86390,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": 0,
"selected": false,
"text": "<p>If in implementation 1 the declaration is inside the class and not a sub, yes the scope is the same for both exa... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/863/"
] | Suppose I have a class module `clsMyClass` with an object as a member variable. Listed below are two complete implementations of this very simple class.
Implementation 1:
```
Dim oObj As New clsObject
```
Implementation 2:
```
Dim oObj As clsObject
Private Sub Class_Initialize()
Set oObj = New clsObject
End S... | In implementation 1 the clsObject will not get instantiated until it is used. If it is never used, then the clsObject.Class\_Initialize event will never fire.
In implementation 2, the clsObject instance will be created at the same time that the clsMyClass is instantiated. The clsObject.Class\_Initialize will always b... |
86,402 | <p>Is my best be going to be a shell script which replaces symlinks with copies, or is there another way of telling Git to follow symlinks?</p>
<p>PS: I know it's not very secure, but I only want to do it in a few specific cases.</p>
| [
{
"answer_id": 86459,
"author": "Kent Fredric",
"author_id": 15614,
"author_profile": "https://Stackoverflow.com/users/15614",
"pm_score": 7,
"selected": true,
"text": "<p><strong>NOTE:</strong> This advice is now out-dated as per comment since Git 1.6.1. Git used to behave this way, and... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15368/"
] | Is my best be going to be a shell script which replaces symlinks with copies, or is there another way of telling Git to follow symlinks?
PS: I know it's not very secure, but I only want to do it in a few specific cases. | **NOTE:** This advice is now out-dated as per comment since Git 1.6.1. Git used to behave this way, and no longer does.
---
Git by default attempts to store symlinks instead of following them (for compactness, and it's generally what people want).
However, I accidentally managed to get it to add files beyond the sym... |
86,408 | <p>Let's say I have an aspx page with this calendar control:</p>
<pre><code><asp:Calendar ID="Calendar1" runat="server" SelectedDate="" ></asp:Calendar>
</code></pre>
<p>Is there anything I can put in for SelectedDate to make it use the current date by default, without having to use the code-behind?</p>
| [
{
"answer_id": 86543,
"author": "Philip Rieck",
"author_id": 12643,
"author_profile": "https://Stackoverflow.com/users/12643",
"pm_score": 5,
"selected": true,
"text": "<p>If you are already doing databinding:</p>\n\n<pre><code><asp:Calendar ID=\"Calendar1\" runat=\"server\" Selected... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3043/"
] | Let's say I have an aspx page with this calendar control:
```
<asp:Calendar ID="Calendar1" runat="server" SelectedDate="" ></asp:Calendar>
```
Is there anything I can put in for SelectedDate to make it use the current date by default, without having to use the code-behind? | If you are already doing databinding:
```
<asp:Calendar ID="Calendar1" runat="server" SelectedDate="<%# DateTime.Today %>" />
```
Will do it. This does require that somewhere you are doing a Page.DataBind() call (or a databind call on a parent control). If you are not doing that and you absolutely do not want any c... |
86,413 | <p>What is the best way to create a fixed width file in C#. I have a bunch of fields with lengths to write out. Say 20,80.10,2 etc all left aligned. Is there an easy way to do this? </p>
| [
{
"answer_id": 86445,
"author": "artur02",
"author_id": 13937,
"author_profile": "https://Stackoverflow.com/users/13937",
"pm_score": 0,
"selected": false,
"text": "<p>Can't you use standard text file? You can read back data line by line.</p>\n"
},
{
"answer_id": 86452,
"auth... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3208/"
] | What is the best way to create a fixed width file in C#. I have a bunch of fields with lengths to write out. Say 20,80.10,2 etc all left aligned. Is there an easy way to do this? | You can use string.Format to easily pad a value with spaces
e.g.
```
string a = String.Format("|{0,5}|{1,5}|{2,5}", 1, 20, 300);
string b = String.Format("|{0,-5}|{1,-5}|{2,-5}", 1, 20, 300);
// 'a' will be equal to "| 1| 20| 300|"
// 'b' will be equal to "|1 |20 |300 |"
``` |
86,417 | <p>I have a custom (code-based) workflow, deployed in WSS via features in a .wsp file. The workflow is configured with a custom task content type (ie, the Workflow element contains a TaskListContentTypeId attribute). This content type's declaration contains a FormUrls element pointing to a custom task edit page.</p>
... | [
{
"answer_id": 86445,
"author": "artur02",
"author_id": 13937,
"author_profile": "https://Stackoverflow.com/users/13937",
"pm_score": 0,
"selected": false,
"text": "<p>Can't you use standard text file? You can read back data line by line.</p>\n"
},
{
"answer_id": 86452,
"auth... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5782/"
] | I have a custom (code-based) workflow, deployed in WSS via features in a .wsp file. The workflow is configured with a custom task content type (ie, the Workflow element contains a TaskListContentTypeId attribute). This content type's declaration contains a FormUrls element pointing to a custom task edit page.
When the... | You can use string.Format to easily pad a value with spaces
e.g.
```
string a = String.Format("|{0,5}|{1,5}|{2,5}", 1, 20, 300);
string b = String.Format("|{0,-5}|{1,-5}|{2,-5}", 1, 20, 300);
// 'a' will be equal to "| 1| 20| 300|"
// 'b' will be equal to "|1 |20 |300 |"
``` |
86,428 | <p>I would like to reload an <code><iframe></code> using JavaScript. The best way I found until now was set the iframe’s <code>src</code> attribute to itself, but this isn’t very clean. Any ideas?</p>
| [
{
"answer_id": 86441,
"author": "scunliffe",
"author_id": 6144,
"author_profile": "https://Stackoverflow.com/users/6144",
"pm_score": 4,
"selected": false,
"text": "<pre><code>window.frames['frameNameOrIndex'].location.reload();\n</code></pre>\n"
},
{
"answer_id": 86771,
"aut... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86428",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8276/"
] | I would like to reload an `<iframe>` using JavaScript. The best way I found until now was set the iframe’s `src` attribute to itself, but this isn’t very clean. Any ideas? | ```
document.getElementById('some_frame_id').contentWindow.location.reload();
```
be careful, in Firefox, `window.frames[]` cannot be indexed by id, but by name or index |
86,435 | <p>I'm receiving feedback from a developer that "The only way visual basic (6) can deal with a UNC path is to map it to a drive." Is this accurate? And, if so, what's the underlying issue and are there any alternatives other than a mapped drive?</p>
| [
{
"answer_id": 86463,
"author": "Mike L",
"author_id": 12085,
"author_profile": "https://Stackoverflow.com/users/12085",
"pm_score": 3,
"selected": false,
"text": "<p>We have a legacy VB6 app that uses UNC to build a connection string, so I know VB6 can do it. Often, you'll find permiss... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5199/"
] | I'm receiving feedback from a developer that "The only way visual basic (6) can deal with a UNC path is to map it to a drive." Is this accurate? And, if so, what's the underlying issue and are there any alternatives other than a mapped drive? | Here is one way that works.
```
Sub Main()
Dim fs As New FileSystemObject ' Add Reference to Microsoft Scripting Runtime
MsgBox fs.FileExists("\\server\folder\file.ext")
End Sub
``` |
86,477 | <p>In JavaScript:</p>
<pre><code>encodeURIComponent("©√") == "%C2%A9%E2%88%9A"
</code></pre>
<p>Is there an equivalent for C# applications? For escaping HTML characters I used:</p>
<pre><code>txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]",
m => @"&#" + ((int)m.Value[0]).ToString() + ";");
</co... | [
{
"answer_id": 86484,
"author": "David Thibault",
"author_id": 5903,
"author_profile": "https://Stackoverflow.com/users/5903",
"pm_score": 4,
"selected": false,
"text": "<p><code>HttpUtility.HtmlEncode</code> / Decode<br>\n<code>HttpUtility.UrlEncode</code> / Decode</p>\n\n<p>You can add... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1414/"
] | In JavaScript:
```
encodeURIComponent("©√") == "%C2%A9%E2%88%9A"
```
Is there an equivalent for C# applications? For escaping HTML characters I used:
```
txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]",
m => @"&#" + ((int)m.Value[0]).ToString() + ";");
```
But I'm not sure how to convert the match ... | `Uri.EscapeDataString` or `HttpUtility.UrlEncode` is the correct way to escape a string meant to be part of a URL.
Take for example the string `"Stack Overflow"`:
* `HttpUtility.UrlEncode("Stack Overflow")` --> `"Stack+Overflow"`
* `Uri.EscapeUriString("Stack Overflow")` --> `"Stack%20Overflow"`
* `Uri.EscapeDataStri... |
86,491 | <p>ASP.NET 2.0 provides the <code>ClientScript.RegisterClientScriptBlock()</code> method for registering JavaScript in an ASP.NET Page.</p>
<p>The issue I'm having is passing the script when it's located in another directory. Specifically, the following syntax does not work:</p>
<pre><code>ClientScript.RegisterClien... | [
{
"answer_id": 86496,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": -1,
"selected": false,
"text": "<p>Your script value has to be a full script, so put in the following for your script value.</p>\n\n<pre><code><... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86491",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16587/"
] | ASP.NET 2.0 provides the `ClientScript.RegisterClientScriptBlock()` method for registering JavaScript in an ASP.NET Page.
The issue I'm having is passing the script when it's located in another directory. Specifically, the following syntax does not work:
```
ClientScript.RegisterClientScriptBlock(this.GetType(), "scr... | What you're after is:
```
ClientScript.RegisterClientScriptInclude(this.GetType(), "scriptName", "../dir/subdir/scriptName.js")
``` |
86,515 | <p>I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.</p>
<p>I need to know the files that have changed, the user that changed them, and the comment.</p>
<p>I... | [
{
"answer_id": 86547,
"author": "Zathrus",
"author_id": 16220,
"author_profile": "https://Stackoverflow.com/users/16220",
"pm_score": 1,
"selected": false,
"text": "<p>CVS does not provide this capability. You can, however, get it by buying a license for <a href=\"http://www.atlassian.co... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1078/"
] | I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.
I need to know the files that have changed, the user that changed them, and the comment.
I've been trying t... | Wow.
I'd forgotten how hard this is to do. What I'd done before was a two stage process.
Firstly, running
```
cvs history -c -a -D "7 days ago" |
gawk '{ print "$1 == \"" $6 "\" && $2 == \"" $8 "/" $7 "\" { print \"" $2 " " $3 " " $6 " " $5 " " $8 "/" $7 "\"; next }" }' > /tmp/$$.awk
```
to gather information ... |
86,526 | <p>I have an Ant script that performs a copy operation using the <a href="http://ant.apache.org/manual/Tasks/copy.html" rel="noreferrer">'copy' task</a>. It was written for Windows, and has a hardcoded C:\ path as the 'todir' argument. I see the 'exec' task has an OS argument, is there a similar way to branch a copy ba... | [
{
"answer_id": 86593,
"author": "sblundy",
"author_id": 4893,
"author_profile": "https://Stackoverflow.com/users/4893",
"pm_score": 1,
"selected": false,
"text": "<p>You can't use a variable and assign it depending on the type? You could put it in a <code>build.properties</code> file. Or... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/99021/"
] | I have an Ant script that performs a copy operation using the ['copy' task](http://ant.apache.org/manual/Tasks/copy.html). It was written for Windows, and has a hardcoded C:\ path as the 'todir' argument. I see the 'exec' task has an OS argument, is there a similar way to branch a copy based on OS? | I would recommend putting the path in a property, then setting the property conditionally based on the current OS.
```
<condition property="foo.path" value="C:\Foo\Dir">
<os family="windows"/>
</condition>
<condition property="foo.path" value="/home/foo/dir">
<os family="unix"/>
</condition>
<fail unless="foo.p... |
86,534 | <p>I have a .csv file that is frequently updated (about 20 to 30 times per minute). I want to insert the newly added lines to a database as soon as they are written to the file.</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx" rel="nofollow noreferrer">FileSystemWatcher</a>... | [
{
"answer_id": 86622,
"author": "expedient",
"author_id": 4248,
"author_profile": "https://Stackoverflow.com/users/4248",
"pm_score": 0,
"selected": false,
"text": "<p>off the top of my head, you could store the last known file size. Check against the file size, and when it changes, open... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4714/"
] | I have a .csv file that is frequently updated (about 20 to 30 times per minute). I want to insert the newly added lines to a database as soon as they are written to the file.
The [FileSystemWatcher](http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx) class listens to the file system change notifi... | I've written something very similar. I used the FileSystemWatcher to get notifications about changes. I then used a FileStream to read the data (keeping track of my last position within the file and seeking to that before reading the new data). Then I add the read data to a buffer which automatically extracts complete ... |
86,561 | <p>Is there any difference to the following code:</p>
<pre><code>class Foo
{
inline int SomeFunc() { return 42; }
int AnotherFunc() { return 42; }
};
</code></pre>
<p>Will both functions gets inlined? Does inline actually make any difference? Are there any rules on when you should or shouldn't inline code? I o... | [
{
"answer_id": 86576,
"author": "Branan",
"author_id": 13894,
"author_profile": "https://Stackoverflow.com/users/13894",
"pm_score": 5,
"selected": true,
"text": "<p>Both forms should be inlined in the exact same way. Inline is implicit for function bodies defined in a class definition.<... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9236/"
] | Is there any difference to the following code:
```
class Foo
{
inline int SomeFunc() { return 42; }
int AnotherFunc() { return 42; }
};
```
Will both functions gets inlined? Does inline actually make any difference? Are there any rules on when you should or shouldn't inline code? I often use the `AnotherFunc` ... | Both forms should be inlined in the exact same way. Inline is implicit for function bodies defined in a class definition. |
86,563 | <p>I'm creating a custom drop down list with AJAX dropdownextender. Inside my drop panel I have linkbuttons for my options.</p>
<pre><code><asp:Label ID="ddl_Remit" runat="server" Text="Select remit address."
Style="display: block; width: 300px; padding:2px; padding-right: 50px; font-family: Tahoma; font-size:... | [
{
"answer_id": 86675,
"author": "Quintin Robinson",
"author_id": 12707,
"author_profile": "https://Stackoverflow.com/users/12707",
"pm_score": 2,
"selected": true,
"text": "<p>I'm not sure what your setDDL method does in your script but it should fire if one of the link buttons is clicke... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1491425/"
] | I'm creating a custom drop down list with AJAX dropdownextender. Inside my drop panel I have linkbuttons for my options.
```
<asp:Label ID="ddl_Remit" runat="server" Text="Select remit address."
Style="display: block; width: 300px; padding:2px; padding-right: 50px; font-family: Tahoma; font-size: 11px;" />
<asp:Pa... | I'm not sure what your setDDL method does in your script but it should fire if one of the link buttons is clicked. I think you might be better off just inserting a generic html anchor though instead of a .net linkbutton as you will have no reference to the control on the server side. Then you can handle the data excahn... |
86,582 | <p>Edit:
From another question I provided an answer that has links to a lot of questions/answers about singletons: <a href="https://stackoverflow.com/questions/1008019/c-singleton-design-pattern/1008289#1008289">More info about singletons here:</a></p>
<p>So I have read the thread <a href="https://stackoverflow.com... | [
{
"answer_id": 86609,
"author": "Rob",
"author_id": 9236,
"author_profile": "https://Stackoverflow.com/users/9236",
"pm_score": 3,
"selected": false,
"text": "<p>The first example isn't thread safe - if two threads call getInstance at the same time, that static is going to be a PITA. So... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14065/"
] | Edit:
From another question I provided an answer that has links to a lot of questions/answers about singletons: [More info about singletons here:](https://stackoverflow.com/questions/1008019/c-singleton-design-pattern/1008289#1008289)
So I have read the thread [Singletons: good design or a crutch?](https://stackoverf... | Answer:
Use a Singleton if:
* You need to have one and only one object of a type in system
Do not use a Singleton if:
* You want to save memory
* You want to try something new
* You want to show off how much you know
* Because everyone else is doing it (See [cargo cult programmer](http://en.wikipedia.org/wiki/Cargo... |
86,607 | <p>I have two classes, and want to include a static instance of one class inside the other and access the static fields from the second class via the first. </p>
<p>This is so I can have non-identical instances with the same name. </p>
<pre><code>Class A
{
public static package1.Foo foo;
}
Class B
{
publ... | [
{
"answer_id": 86625,
"author": "Jason Cohen",
"author_id": 4926,
"author_profile": "https://Stackoverflow.com/users/4926",
"pm_score": 3,
"selected": false,
"text": "<p>You should use:</p>\n\n<pre><code>Foo.bar\n</code></pre>\n\n<p>And not:</p>\n\n<pre><code>A.foo.bar\n</code></pre>\n\n... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12982/"
] | I have two classes, and want to include a static instance of one class inside the other and access the static fields from the second class via the first.
This is so I can have non-identical instances with the same name.
```
Class A
{
public static package1.Foo foo;
}
Class B
{
public static package2.Foo ... | I agree with others that you're probably thinking about this the wrong way. With that out of the way, this may work for you if you are only accessing static members:
```
public class A {
public static class Foo extends package1.Foo {}
}
public class B {
public static class Foo extends package2.Foo {}
}
``` |
86,653 | <p>I would like my JSON output in Ruby on Rails to be "pretty" or nicely formatted. </p>
<p>Right now, I call <code>to_json</code> and my JSON is all on one line. At times this can be difficult to see if there is a problem in the JSON output stream.</p>
<p>Is there way to configure to make my JSON "pretty" or nicely... | [
{
"answer_id": 1823885,
"author": "lambshaanxy",
"author_id": 218340,
"author_profile": "https://Stackoverflow.com/users/218340",
"pm_score": 11,
"selected": true,
"text": "<p>Use the <code>pretty_generate()</code> function, built into later versions of JSON. For example:</p>\n\n<pre><co... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86653",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10333/"
] | I would like my JSON output in Ruby on Rails to be "pretty" or nicely formatted.
Right now, I call `to_json` and my JSON is all on one line. At times this can be difficult to see if there is a problem in the JSON output stream.
Is there way to configure to make my JSON "pretty" or nicely formatted in Rails? | Use the `pretty_generate()` function, built into later versions of JSON. For example:
```
require 'json'
my_object = { :array => [1, 2, 3, { :sample => "hash"} ], :foo => "bar" }
puts JSON.pretty_generate(my_object)
```
Which gets you:
```
{
"array": [
1,
2,
3,
{
"sample": "hash"
}
],
... |
86,685 | <p>I am having a really hard time attempting to debug LINQ to SQL and submitting changes.</p>
<p>I have been using <a href="http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx" rel="noreferrer">http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx</a>, whic... | [
{
"answer_id": 86704,
"author": "Per Hornshøj-Schierbeck",
"author_id": 11619,
"author_profile": "https://Stackoverflow.com/users/11619",
"pm_score": 1,
"selected": false,
"text": "<p>A simple solution could be to run a trace on your database and inspect the queries run against it - filt... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7561/"
] | I am having a really hard time attempting to debug LINQ to SQL and submitting changes.
I have been using <http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx>, which works great for debugging simple queries.
I'm working in the DataContext Class for my project with the following snippet... | First, thanks everyone for the help, I finally found it.
The solution was to drop the .dbml file from the project, add a blank .dbml file and repopulate it with the tables needed for my project from the 'Server Explorer'.
I noticed a couple of things while I was doing this:
* There are a few tables in the system nam... |
86,726 | <p>I have the following type :</p>
<pre><code>// incomplete class definition
public class Person
{
private string name;
public string Name
{
get { return this.name; }
}
}
</code></pre>
<p>I want this type to be <strong>created</strong> and <strong>updated</strong> with some sort of dedicated ... | [
{
"answer_id": 86753,
"author": "Jason Cohen",
"author_id": 4926,
"author_profile": "https://Stackoverflow.com/users/4926",
"pm_score": 1,
"selected": false,
"text": "<p>I like to have a read-only interface. Then the builder/controller/whatever can reference the object directly, but when... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4687/"
] | I have the following type :
```
// incomplete class definition
public class Person
{
private string name;
public string Name
{
get { return this.name; }
}
}
```
I want this type to be **created** and **updated** with some sort of dedicated controller/builder, but I want it to remain **read-o... | Create an interface IReadOnlyPerson which exposes only get accessors. Have Person implement IReadOnlyPerson. Store the reference to Person in your controller. Give other clients only the read only version.
This will protect against mistakes, but not fraud, as with most OO features. Clients can runtime cast to Person i... |
86,763 | <p>I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps:</p>
<ol>
<li>Open XLA document with Excel.</li>
<li>Switch to VBEdit... | [
{
"answer_id": 89121,
"author": "Mark Nold",
"author_id": 4134,
"author_profile": "https://Stackoverflow.com/users/4134",
"pm_score": 1,
"selected": false,
"text": "<p>I'm not 100% sure how to do exactly what you have requested. But guessing the goal you have in mind there are a few poss... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1390/"
] | I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version\_Number. This number needs to be changed for every build. The exact steps:
1. Open XLA document with Excel.
2. Switch to VBEditor mode. (Alt+F11)
3. ... | An alternative way of handling versioning of an XLA file is to use a custom property in Document Properties. You can access and manipulate using COM as described here: <http://support.microsoft.com/?kbid=224351>.
Advantages of this are:
* You can examine the version number without opening the XLA file
* You don't nee... |
86,766 | <p>Often I find myself interacting with files in some way but after writing the code I'm always uncertain how robust it actually is. The problem is that I'm not entirely sure how file related operations can fail and, therefore, the best way to handle exceptions.</p>
<p>The simple solution would seem to be just to catch... | [
{
"answer_id": 86855,
"author": "Scott Dorman",
"author_id": 1559,
"author_profile": "https://Stackoverflow.com/users/1559",
"pm_score": 3,
"selected": false,
"text": "<p>The first thing you should change are your calls to StreamWriter and StreamReader to wrap them in a using statement, ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86766",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4055/"
] | Often I find myself interacting with files in some way but after writing the code I'm always uncertain how robust it actually is. The problem is that I'm not entirely sure how file related operations can fail and, therefore, the best way to handle exceptions.
The simple solution would seem to be just to catch any `IOE... | >
> ...but is it possible to get a bit more fine-grained error messages.
>
>
>
Yes. Go ahead and catch `IOException`, and use the `Exception.ToString()` method to get a relatively relevant error message to display. Note that the exceptions generated by the .NET Framework will supply these useful strings, but if yo... |
86,780 | <p>Say I have two strings,</p>
<pre><code>String s1 = "AbBaCca";
String s2 = "bac";
</code></pre>
<p>I want to perform a check returning that <code>s2</code> is contained within <code>s1</code>. I can do this with:</p>
<pre><code>return s1.contains(s2);
</code></pre>
<p>I am pretty sure that <code>contains()</code>... | [
{
"answer_id": 86832,
"author": "Dave L.",
"author_id": 3093,
"author_profile": "https://Stackoverflow.com/users/3093",
"pm_score": 9,
"selected": true,
"text": "<p>Yes, contains is case sensitive. You can use java.util.regex.Pattern with the CASE_INSENSITIVE flag for case insensitive m... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2628/"
] | Say I have two strings,
```
String s1 = "AbBaCca";
String s2 = "bac";
```
I want to perform a check returning that `s2` is contained within `s1`. I can do this with:
```
return s1.contains(s2);
```
I am pretty sure that `contains()` is case sensitive, however I can't determine this for sure from reading the docum... | Yes, contains is case sensitive. You can use java.util.regex.Pattern with the CASE\_INSENSITIVE flag for case insensitive matching:
```
Pattern.compile(Pattern.quote(wantedStr), Pattern.CASE_INSENSITIVE).matcher(source).find();
```
**EDIT:** If s2 contains regex special characters (of which there are many) it's impo... |
86,793 | <p>If a user select all items in a .NET 2.0 ListView, the ListView will fire a <strong>SelectedIndexChanged</strong> event for every item, rather than firing an event to indicate that the <em>selection</em> has changed.</p>
<p>If the user then clicks to select just one item in the list, the ListView will fire a <stron... | [
{
"answer_id": 86893,
"author": "Rob",
"author_id": 12413,
"author_profile": "https://Stackoverflow.com/users/12413",
"pm_score": 0,
"selected": false,
"text": "<p>I would either try tying the postback to a button to allow the user to submit their changes and unhook the event handler.</p... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] | If a user select all items in a .NET 2.0 ListView, the ListView will fire a **SelectedIndexChanged** event for every item, rather than firing an event to indicate that the *selection* has changed.
If the user then clicks to select just one item in the list, the ListView will fire a **SelectedIndexChanged** event for *... | Good solution from Ian. I took that and made it into a reusable class, making sure to dispose of the timer properly. I also reduced the interval to get a more responsive app. This control also doublebuffers to reduce flicker.
```
public class DoublebufferedListView : System.Windows.Forms.ListView
{
private Ti... |
86,800 | <p>I've recently embarked upon the <em>grand voyage</em> of Wordpress theming and I've been reading through the Wordpress documentation for how to write a theme. One thing I came across <a href="http://codex.wordpress.org/Theme_Development" rel="nofollow noreferrer">here</a> was that the <code>style.css</code> file mu... | [
{
"answer_id": 86841,
"author": "Martin",
"author_id": 15840,
"author_profile": "https://Stackoverflow.com/users/15840",
"pm_score": 1,
"selected": false,
"text": "<p>You are probably thinking about this:</p>\n\n<pre><code>/*\nTHEME NAME: Parallax\nTHEME URI: http://parallaxdenigrate.net... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16562/"
] | I've recently embarked upon the *grand voyage* of Wordpress theming and I've been reading through the Wordpress documentation for how to write a theme. One thing I came across [here](http://codex.wordpress.org/Theme_Development) was that the `style.css` file must contain a specific header in order to be used by the Wor... | Based on <http://codex.wordpress.org/Theme_Development>:
The following is an example of the first few lines of the stylesheet, called the style sheet header, for the Theme "Rose":
```
/*
Theme Name: Rose
Theme URI: the-theme's-homepage
Description: a-brief-description
Author: your-name
Author URI: your-URI
Templat... |
86,824 | <p>I'm getting a <code>ConnectException: Connection timed out</code> with some frequency from my code. The URL I am trying to hit is up. The same code works for some users, but not others. It seems like once one user starts to get this exception they continue to get the exception.</p>
<p>Here is the stack trace:</p... | [
{
"answer_id": 86876,
"author": "larsivi",
"author_id": 14047,
"author_profile": "https://Stackoverflow.com/users/14047",
"pm_score": 0,
"selected": false,
"text": "<p>There is a possibility that your IP/host are blocked by the remote host, especially if it thinks you are hitting it too ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86824",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16677/"
] | I'm getting a `ConnectException: Connection timed out` with some frequency from my code. The URL I am trying to hit is up. The same code works for some users, but not others. It seems like once one user starts to get this exception they continue to get the exception.
Here is the stack trace:
```
java.net.ConnectExcep... | Connection timeouts (assuming a local network and several client machines) typically result from
a) some kind of firewall on the way that simply eats the packets without telling the sender things like "No Route to host"
b) packet loss due to wrong network configuration or line overload
c) too many requests overloadi... |
86,849 | <p>If I have the following:</p>
<pre><code>{"hdrs": ["Make","Model","Year"],
"data" : [
{"Make":"Honda","Model":"Accord","Year":"2008"}
{"Make":"Toyota","Model":"Corolla","Year":"2008"}
{"Make":"Honda","Model":"Pilot","Year":"2008"}]
}
</code></pre>
<p>And I have a "hdrs" name (i.e. "Make"), how can I refe... | [
{
"answer_id": 86892,
"author": "Adam Weber",
"author_id": 9324,
"author_profile": "https://Stackoverflow.com/users/9324",
"pm_score": 0,
"selected": false,
"text": "<p>perhaps try data[0].Make</p>\n"
},
{
"answer_id": 86903,
"author": "Stephen Wrighton",
"author_id": 751... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2755/"
] | If I have the following:
```
{"hdrs": ["Make","Model","Year"],
"data" : [
{"Make":"Honda","Model":"Accord","Year":"2008"}
{"Make":"Toyota","Model":"Corolla","Year":"2008"}
{"Make":"Honda","Model":"Pilot","Year":"2008"}]
}
```
And I have a "hdrs" name (i.e. "Make"), how can I reference the `data` array ins... | I had to alter your code a little:
```
var x = {"hdrs": ["Make","Model","Year"],
"data" : [
{"Make":"Honda","Model":"Accord","Year":"2008"},
{"Make":"Toyota","Model":"Corolla","Year":"2008"},
{"Make":"Honda","Model":"Pilot","Year":"2008"}]
};
alert( x.data[0]... |
86,878 | <p>I am having problem that even though I specify the level to ERROR in the root tag, the specified appender logs all levels (debug, info, warn) to the file regardless the settings. I am not a Log4j expert so any help is appreciated.</p>
<p>I have checked the classpath for log4j.properties (there is none) except the lo... | [
{
"answer_id": 86928,
"author": "Asgeir S. Nilsen",
"author_id": 16023,
"author_profile": "https://Stackoverflow.com/users/16023",
"pm_score": 3,
"selected": false,
"text": "<p>Two things: Check additivity and decide whether you want log events captured by more detailed levels of loggin... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15045/"
] | I am having problem that even though I specify the level to ERROR in the root tag, the specified appender logs all levels (debug, info, warn) to the file regardless the settings. I am not a Log4j expert so any help is appreciated.
I have checked the classpath for log4j.properties (there is none) except the log4j.xml.
... | The root logger resides at the top of the logger hierarchy. It is exceptional in three ways:
* it always exists,
* its level cannot be set to null
* it cannot be retrieved by name.
**The rootLogger is the father of all appenders. Each enabled logging request for a given logger will be forwarded to all the appenders i... |
86,901 | <p>I would like a panel in GWT to fill the page without actually having to set the size. Is there a way to do this? Currently I have the following:</p>
<pre><code>public class Main implements EntryPoint
{
public void onModuleLoad()
{
HorizontalSplitPanel split = new HorizontalSplitPanel();
/... | [
{
"answer_id": 86996,
"author": "Mike Monette",
"author_id": 6166,
"author_profile": "https://Stackoverflow.com/users/6166",
"pm_score": 0,
"selected": false,
"text": "<p>I think you'll need to put something on the left and/or right of the split (split.setLeftWidget(widget), split.setRig... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10333/"
] | I would like a panel in GWT to fill the page without actually having to set the size. Is there a way to do this? Currently I have the following:
```
public class Main implements EntryPoint
{
public void onModuleLoad()
{
HorizontalSplitPanel split = new HorizontalSplitPanel();
//split.setSize("... | Google has answered the main part of your question in one of their FAQs:
<http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#How_do_I_create_an_app_that_fills_the_page_vertically_when_the_b>
The primary point is that you can't set height to 100%, you must do something like this:
```
final VerticalPanel vp = new Ve... |
86,905 | <p>In <a href="https://stackoverflow.com/questions/48669/are-there-any-tools-out-there-to-compare-the-structure-of-2-web-pages">this post</a> I asked if there were any tools that compare the structure (not actual content) of 2 HTML pages. I ask because I receive HTML templates from our designers, and frequently miss mi... | [
{
"answer_id": 86924,
"author": "Mike",
"author_id": 1115144,
"author_profile": "https://Stackoverflow.com/users/1115144",
"pm_score": -1,
"selected": false,
"text": "<p>Open each page in the browser and save them as .htm files. Compare the two using windiff.</p>\n"
},
{
"answer... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86905",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757/"
] | In [this post](https://stackoverflow.com/questions/48669/are-there-any-tools-out-there-to-compare-the-structure-of-2-web-pages) I asked if there were any tools that compare the structure (not actual content) of 2 HTML pages. I ask because I receive HTML templates from our designers, and frequently miss minor formatting... | The DOM is a data structure - it's a tree. |
86,907 | <p>I'm using exim on both the sending and relay hosts, the sending host seems to offer:</p>
<pre><code>HELO foo_bar.example.com
</code></pre>
<p>Response: </p>
<pre><code>501 Syntactically invalid HELO argument(s)
</code></pre>
| [
{
"answer_id": 86953,
"author": "benefactual",
"author_id": 6445,
"author_profile": "https://Stackoverflow.com/users/6445",
"pm_score": 4,
"selected": true,
"text": "<p>Possibly a problem with underscores in the hostname?\n<a href=\"http://www.exim.org/lurker/message/20041124.113314.c44c... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86907",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12850/"
] | I'm using exim on both the sending and relay hosts, the sending host seems to offer:
```
HELO foo_bar.example.com
```
Response:
```
501 Syntactically invalid HELO argument(s)
``` | Possibly a problem with underscores in the hostname?
<http://www.exim.org/lurker/message/20041124.113314.c44c83b2.en.html> |
86,913 | <p>I have a variety of time-series data stored on a more-or-less georeferenced grid, e.g. one value per 0.2 degrees of latitude and longitude. Currently the data are stored in text files, so at day-of-year 251 you might see:</p>
<pre><code>251
12.76 12.55 12.55 12.34 [etc., 200 more values...]
13.02 12.95 12.70 12.4... | [
{
"answer_id": 86961,
"author": "jjrv",
"author_id": 16509,
"author_profile": "https://Stackoverflow.com/users/16509",
"pm_score": 0,
"selected": false,
"text": "<p>I'd definitely change from text to binary but keep each day in a separate file still. You could name them in such a way tha... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have a variety of time-series data stored on a more-or-less georeferenced grid, e.g. one value per 0.2 degrees of latitude and longitude. Currently the data are stored in text files, so at day-of-year 251 you might see:
```
251
12.76 12.55 12.55 12.34 [etc., 200 more values...]
13.02 12.95 12.70 12.40 [etc., 200 m... | I've assembled your comments here:
1. I'd like to do all this "w/o writing my own file I/O code"
2. I need access from "Java Ruby MATLAB" and "FORTRAN routines"
When you add these up, you definitely don't want a new file format. **Stick with the one you've got.**
If we can get you to relax your first requirement - i... |
86,919 | <p>I have a simple xml document that looks like the following snippet. I need to write a XSLT transform that basically 'unpivots' this document based on some of the attributes.</p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
<root xmlns:z="foo">
<z:row A="1" X="2" Y="n1" Z="500"/>
<... | [
{
"answer_id": 87086,
"author": "Darrel Miller",
"author_id": 6819,
"author_profile": "https://Stackoverflow.com/users/6819",
"pm_score": 0,
"selected": false,
"text": "<p>Here is a bit of a brute force way:</p>\n\n<p>\n </p>\n\n<pre><code><xsl:template match=\"z:row\">\n <... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4088/"
] | I have a simple xml document that looks like the following snippet. I need to write a XSLT transform that basically 'unpivots' this document based on some of the attributes.
```
<?xml version="1.0" encoding="utf-8" ?>
<root xmlns:z="foo">
<z:row A="1" X="2" Y="n1" Z="500"/>
<z:row A="2" X="5" Y="n2" Z="1500"/>... | ```
<xsl:template match="row">
<row A="{$A}" X="{$X}" />
<row A="{$A}" Y="{$Y}" />
<row A="{$A}" Z="{$Z}" />
</xsl:template>
```
Plus obvious boilerplate. |
86,947 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/73713/how-do-i-check-for-nulls-in-an-operator-overload-without-infinite-recursion">How do I check for nulls in an '==' operator overload without infinite recursion?</a> </p>
</blockquote>
<p>When I over... | [
{
"answer_id": 86968,
"author": "Juanma",
"author_id": 3730,
"author_profile": "https://Stackoverflow.com/users/3730",
"pm_score": 2,
"selected": false,
"text": "<p>ReferenceEquals(object obj1, object obj2)</p>\n"
},
{
"answer_id": 86986,
"author": "Timothy Carter",
"auth... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5056/"
] | >
> **Possible Duplicate:**
>
> [How do I check for nulls in an '==' operator overload without infinite recursion?](https://stackoverflow.com/questions/73713/how-do-i-check-for-nulls-in-an-operator-overload-without-infinite-recursion)
>
>
>
When I overload the == operator for objects I typically write somethin... | As Microsoft says,
>
> A common error in overloads of
> operator == is to use (a == b), (a ==
> null), or (b == null) to check for
> reference equality. This instead
> results in a call to the overloaded
> operator ==, causing an infinite loop.
> Use ReferenceEquals or cast the type
> to Object, to avoid the l... |
86,963 | <p>More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file?</p>
| [
{
"answer_id": 87080,
"author": "EfForEffort",
"author_id": 14113,
"author_profile": "https://Stackoverflow.com/users/14113",
"pm_score": 5,
"selected": true,
"text": "<p>Make a function that will ask you whether you're sure when the buffer has been edited and is not associated with a fi... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86963",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/207/"
] | More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file? | Make a function that will ask you whether you're sure when the buffer has been edited and is not associated with a file. Then add that function to the list `kill-buffer-query-functions`.
Looking at the documentation for [Buffer File Name](http://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-File-Name.html) ... |
86,987 | <p>I'm trying this with Oracle SQL Developer and am on an Intel MacBook Pro. But I believe this same error happens with other clients. I can ping the server hosting the database fine so it appears not to be an actual network problem.</p>
<p>Also, I believe I'm filling in the connection info correctly. It's somethin... | [
{
"answer_id": 87429,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 1,
"selected": false,
"text": "<p>That's the message you get when you don't have the right connection parameters. The SID, in particular, tends to trip up ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4234/"
] | I'm trying this with Oracle SQL Developer and am on an Intel MacBook Pro. But I believe this same error happens with other clients. I can ping the server hosting the database fine so it appears not to be an actual network problem.
Also, I believe I'm filling in the connection info correctly. It's something like this:
... | My problem turned out to be some kind of ACL problem. I needed to SSH tunnel in through a "blessed host". I put the following in my .ssh/config
```
Host=blessedhost
HostName=blessedhost.whatever.com
User=alice
Compression=yes
Protocol=2
LocalForward=2202 oraclemachine.whatever.com:1521
Host=foo
HostName=localhost
Por... |
86,992 | <p>I have an application with multiple "pick list" entities, such as used to populate choices of dropdown selection boxes. These entities need to be stored in the database. How do one persist these entities in the database?</p>
<p>Should I create a new table for each pick list? Is there a better solution?</p... | [
{
"answer_id": 87014,
"author": "neouser99",
"author_id": 10669,
"author_profile": "https://Stackoverflow.com/users/10669",
"pm_score": 0,
"selected": false,
"text": "<p>Depending on your needs, you can just have an options table that has a list identifier and a list value as the primary... | 2008/09/17 | [
"https://Stackoverflow.com/questions/86992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8852/"
] | I have an application with multiple "pick list" entities, such as used to populate choices of dropdown selection boxes. These entities need to be stored in the database. How do one persist these entities in the database?
Should I create a new table for each pick list? Is there a better solution? | Well, you could do something like this:
```
PickListContent
IdList IdPick Text
1 1 Apples
1 2 Oranges
1 3 Pears
2 1 Dogs
2 2 Cats
```
and optionally..
```
PickList
Id Description
1 Fruit
2 Pets
``` |
87,021 | <p>Given a moderately complex XML structure (dozens of elements, hundreds of attributes) with no XSD and a desire to create an object model, what's an elegant way to avoid writing boilerplate from_xml() and to_xml() methods? </p>
<p>For instance, given:</p>
<pre><code><Foo bar="1"><Bat baz="blah"/></Fo... | [
{
"answer_id": 87079,
"author": "Jim Deville",
"author_id": 1591,
"author_profile": "https://Stackoverflow.com/users/1591",
"pm_score": 0,
"selected": false,
"text": "<p>Could you define a method missing that allows you to do:</p>\n\n<p>@bar = el.bar? That would get rid of some boilerpla... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87021",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10116/"
] | Given a moderately complex XML structure (dozens of elements, hundreds of attributes) with no XSD and a desire to create an object model, what's an elegant way to avoid writing boilerplate from\_xml() and to\_xml() methods?
For instance, given:
```
<Foo bar="1"><Bat baz="blah"/></Foo>
```
How do I avoid writing en... | You could use Builder instead of creating your to\_xml method, and you could use XMLSimple to pull your xml file into a Hash instead of using the from \_xml method. Unfortunately, I'm not sure you'll really gain all that much from using these techniques. |
87,023 | <p>Is there a straightforward way to query a web service to see which messages it supports? The C# .NET application I'm working on needs to be able to handle an older version of the web service, which does not implement the message I'm trying to send. The web service does not expose a version number, so Plan B is to se... | [
{
"answer_id": 87131,
"author": "David Thibault",
"author_id": 5903,
"author_profile": "https://Stackoverflow.com/users/5903",
"pm_score": 1,
"selected": true,
"text": "<p>I'm pretty sure WSDL is the way to do this.</p>\n"
},
{
"answer_id": 87495,
"author": "Tegan Mulholland"... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8492/"
] | Is there a straightforward way to query a web service to see which messages it supports? The C# .NET application I'm working on needs to be able to handle an older version of the web service, which does not implement the message I'm trying to send. The web service does not expose a version number, so Plan B is to see i... | I'm pretty sure WSDL is the way to do this. |
87,030 | <p>Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at <a href="https://jdk6.dev.java.net/" rel="noreferrer">https://jdk6.dev.java.net/</a> does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages.</p>
<p>Not being ab... | [
{
"answer_id": 87106,
"author": "PW.",
"author_id": 927,
"author_profile": "https://Stackoverflow.com/users/927",
"pm_score": 4,
"selected": false,
"text": "<p>there: <a href=\"http://openjdk.java.net/groups/security/\" rel=\"noreferrer\">openjdk javax.net</a> in the security group </p>\... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at <https://jdk6.dev.java.net/> does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages.
Not being able to debug these classes makes solving SSL issues incredibly diffi... | there: [openjdk javax.net](http://openjdk.java.net/groups/security/) in the security group
```
src/share/classes/javax/net
src/share/classes/com/sun/net/ssl
src/share/classes/sun/security/ssl
src/share/classes/sun/net/www/protocol/https
```
also on this page:
```
src/share/classes/javax/crypto
src/share/classes/co... |
87,096 | <p>I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for debug builds?</p>
<p>I'm a game programmer and this has been a problem on many of the projects I've worked on. It's pretty hard to get 60 f... | [
{
"answer_id": 87108,
"author": "Fred Larson",
"author_id": 10077,
"author_profile": "https://Stackoverflow.com/users/10077",
"pm_score": 2,
"selected": false,
"text": "<p>I'll bet your STL uses a checked implementation for debug. This is probably a good thing, as it will catch iterator... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16679/"
] | I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for debug builds?
I'm a game programmer and this has been a problem on many of the projects I've worked on. It's pretty hard to get 60 fps when yo... | EASTL is a possibility, but still not perfect. Paul Pedriana of Electronic Arts did an investigation of various STL implementations with respect to performance in game applications the summary of which is found here:
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html>
Some of these adjustments to are ... |
87,101 | <p>What is a good way to select all or select no items in a listview without using:</p>
<pre><code>foreach (ListViewItem item in listView1.Items)
{
item.Selected = true;
}
</code></pre>
<p>or</p>
<pre><code>foreach (ListViewItem item in listView1.Items)
{
item.Selected = false;
}
</code></pre>
<p>I know the under... | [
{
"answer_id": 87108,
"author": "Fred Larson",
"author_id": 10077,
"author_profile": "https://Stackoverflow.com/users/10077",
"pm_score": 2,
"selected": false,
"text": "<p>I'll bet your STL uses a checked implementation for debug. This is probably a good thing, as it will catch iterator... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] | What is a good way to select all or select no items in a listview without using:
```
foreach (ListViewItem item in listView1.Items)
{
item.Selected = true;
}
```
or
```
foreach (ListViewItem item in listView1.Items)
{
item.Selected = false;
}
```
I know the underlying Win32 listview common control supports [LVM... | EASTL is a possibility, but still not perfect. Paul Pedriana of Electronic Arts did an investigation of various STL implementations with respect to performance in game applications the summary of which is found here:
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html>
Some of these adjustments to are ... |
87,107 | <p>I've setup a new .net 2.0 website on IIS 7 under Win Server 2k8 and when browsing to a page it gives me a 404.17 error, claiming that the file (default.aspx in this case) appears to be a script but is being handled by the static file handler. It SOUNDS like the module mappings for ASP.Net got messed up, but they lo... | [
{
"answer_id": 87412,
"author": "Jonathan Rupp",
"author_id": 12502,
"author_profile": "https://Stackoverflow.com/users/12502",
"pm_score": 6,
"selected": true,
"text": "<p>I had this problem on IIS6 one time when somehow the ASP.NET ISAPI stuff was broke.</p>\n\n<p>Running </p>\n\n<pre>... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16729/"
] | I've setup a new .net 2.0 website on IIS 7 under Win Server 2k8 and when browsing to a page it gives me a 404.17 error, claiming that the file (default.aspx in this case) appears to be a script but is being handled by the static file handler. It SOUNDS like the module mappings for ASP.Net got messed up, but they look f... | I had this problem on IIS6 one time when somehow the ASP.NET ISAPI stuff was broke.
Running
```
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
```
to recreate the settings took care of it. |
87,177 | <p>I had data in XML that had line feeds, spaces, and tabs that I wanted to preserve in the output HTML (so I couldn't use <p>) but I also wanted the lines to wrap when the side of the screen was reached (so I couldn't use <pre>).</p>
| [
{
"answer_id": 87194,
"author": "James A. N. Stauffer",
"author_id": 6770,
"author_profile": "https://Stackoverflow.com/users/6770",
"pm_score": 0,
"selected": false,
"text": "<p>I and a co-worker (Patricia Eromosele) came up with the following solution: (Is there a better solution?)</p... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6770/"
] | I had data in XML that had line feeds, spaces, and tabs that I wanted to preserve in the output HTML (so I couldn't use <p>) but I also wanted the lines to wrap when the side of the screen was reached (so I couldn't use <pre>). | Another way of putting this is that you want to turn all pairs of spaces into two non-breaking spaces, tabs into four non-breaking spaces and all line breaks into `<br>` elements. In XSLT 1.0, I'd do:
```
<xsl:template name="replace-spaces">
<xsl:param name="text" />
<xsl:choose>
<xsl:when test="contains($text... |
87,221 | <p><a href="https://stackoverflow.com/questions/2262/aspnet-url-rewriting">So this post</a> talked about how to actually implement url rewriting in an ASP.NET application to get "friendly urls". That works perfect and it is great for sending a user to a specific page, but does anyone know of a good solution for creati... | [
{
"answer_id": 87263,
"author": "John Sheehan",
"author_id": 1786,
"author_profile": "https://Stackoverflow.com/users/1786",
"pm_score": 0,
"selected": false,
"text": "<p>Create a UrlBuilder class with methods for each page like so:</p>\n\n<pre><code>public class UrlBuilder\n{\n publi... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13279/"
] | [So this post](https://stackoverflow.com/questions/2262/aspnet-url-rewriting) talked about how to actually implement url rewriting in an ASP.NET application to get "friendly urls". That works perfect and it is great for sending a user to a specific page, but does anyone know of a good solution for creating "Friendly" U... | See [System.Web.Routing](http://www.codethinked.com/post/2008/08/20/Exploring-SystemWebRouting.aspx)
Routing is a different from rewriting. Implementing this technique does require minor changes to your pages (namely, any code accessing querystring parameters will need to be modified), but it allows you to generate li... |
87,222 | <p>How do i represent CRLF using Hex in C#?</p>
| [
{
"answer_id": 87227,
"author": "Jonathan Rupp",
"author_id": 12502,
"author_profile": "https://Stackoverflow.com/users/12502",
"pm_score": 2,
"selected": false,
"text": "<p>Not sure why, but it's 0x0d, 0x0a, aka \"\\r\\n\".</p>\n"
},
{
"answer_id": 87312,
"author": "James Cu... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | How do i represent CRLF using Hex in C#? | Since no one has actually given the answer requested, here it is:
```
"\x0d\x0a"
``` |
87,224 | <p>It is obviosly some Perl extensions. Perl version is 5.8.8.</p>
<p>I found Error.pm, but now I'm looking for Core.pm. </p>
<p>While we're at it: how do you guys search for those modules. I tried Google, but that didn't help much. Thanks.</p>
<hr>
<p>And finally, after I built everything, running: </p>
<pre><cod... | [
{
"answer_id": 87311,
"author": "Michael Carman",
"author_id": 8233,
"author_profile": "https://Stackoverflow.com/users/8233",
"pm_score": 2,
"selected": true,
"text": "<p>It should be compatible. The <a href=\"http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Error+0.17015\" r... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] | It is obviosly some Perl extensions. Perl version is 5.8.8.
I found Error.pm, but now I'm looking for Core.pm.
While we're at it: how do you guys search for those modules. I tried Google, but that didn't help much. Thanks.
---
And finally, after I built everything, running:
```
./Build install
```
gives me:
`... | It should be compatible. The [CPAN Tester's matrix](http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Error+0.17015) shows no failures for Perl 5.8.8 on any platform.
Per the [README](https://metacpan.org/source/SHLOMIF/Error-0.17022/README), you can install it by doing:
```
perl Makefile.pl
make
make test
... |
87,262 | <p>I need to find the frequency of a sample, stored (in vb) as an array of byte. Sample is a sine wave, known frequency, so I can check), but the numbers are a bit odd, and my maths-foo is weak.
Full range of values 0-255. 99% of numbers are in range 235 to 245, but there are some outliers down to 0 and 1, and up to 2... | [
{
"answer_id": 87292,
"author": "Purfideas",
"author_id": 4615,
"author_profile": "https://Stackoverflow.com/users/4615",
"pm_score": 2,
"selected": false,
"text": "<p>Use the Fourier transform, it's much more noise insensitive than counting zero crossings</p>\n<p>Edit: @WaveyDavey</p>\n... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87262",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2135219/"
] | I need to find the frequency of a sample, stored (in vb) as an array of byte. Sample is a sine wave, known frequency, so I can check), but the numbers are a bit odd, and my maths-foo is weak.
Full range of values 0-255. 99% of numbers are in range 235 to 245, but there are some outliers down to 0 and 1, and up to 255 ... | The FFT is probably the best answer, but if you really want to do it by your method, try this:
To normalize, first make a histogram to count how many occurrances of each value from 0 to 255. Then throw out X percent of the values from each end with something like:
```
for (i=lower=0;i< N*(X/100); lower++)
i+=count[... |
87,290 | <p>Although I don't have an iPhone to test this out, my colleague told me that embedded
media files such as the one in the snippet below, only works when the iphone is connected over the
WLAN connection or 3G, and does not work when connecting via GPRS.</p>
<pre><code><html><body>
<object data="http://j... | [
{
"answer_id": 88508,
"author": "Grank",
"author_id": 12975,
"author_profile": "https://Stackoverflow.com/users/12975",
"pm_score": 0,
"selected": false,
"text": "<p>I wasn't aware of that limitation. Although it does make sense to disable potentially data-hefty OBJECT or EMBED tags whe... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6225/"
] | Although I don't have an iPhone to test this out, my colleague told me that embedded
media files such as the one in the snippet below, only works when the iphone is connected over the
WLAN connection or 3G, and does not work when connecting via GPRS.
```
<html><body>
<object data="http://joliclic.free.fr/html/object-t... | The iPhone YouTube application automatically downloads lower quality video when connected via EDGE than when connected via Wi-Fi, because the network is much slower. That fact leads me to believe Apple would make the design decision to not bother downloading an MP3 over EDGE. The browser has no way to know in advance i... |
87,303 | <p>I know I can edit each individual DTS package and save it as a Visual Basic script, but with hundreds of packages on the server, that will take forever. How can I script them all at once? I'd like to be able to create one file per package so that I can check them into source control, search them to see which one r... | [
{
"answer_id": 89343,
"author": "Tom Resing",
"author_id": 17063,
"author_profile": "https://Stackoverflow.com/users/17063",
"pm_score": 0,
"selected": false,
"text": "<p>You might try working with the system table sysdtspackages as demonstrated on sqldts.com in <a href=\"http://www.sqld... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I know I can edit each individual DTS package and save it as a Visual Basic script, but with hundreds of packages on the server, that will take forever. How can I script them all at once? I'd like to be able to create one file per package so that I can check them into source control, search them to see which one refere... | I ended up digging through the SQL 2000 documentation (Building SQL Server Applications / DTS Programming / Programming DTS Applications / DTS Object Model) and creating a VBS script to read the packages and write XML files. It's not complete, and it could be improved in several ways, but it's a big start:
GetPackages... |
87,304 | <p>What's a good algorithm for calculating frames per second in a game? I want to show it as a number in the corner of the screen. If I just look at how long it took to render the last frame the number changes too fast.</p>
<p>Bonus points if your answer updates each frame and doesn't converge differently when the fra... | [
{
"answer_id": 87333,
"author": "Martin Beckett",
"author_id": 10897,
"author_profile": "https://Stackoverflow.com/users/10897",
"pm_score": 7,
"selected": false,
"text": "<p>You need a smoothed average, the easiest way is to take the current answer (the time to draw the last frame) and ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87304",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16679/"
] | What's a good algorithm for calculating frames per second in a game? I want to show it as a number in the corner of the screen. If I just look at how long it took to render the last frame the number changes too fast.
Bonus points if your answer updates each frame and doesn't converge differently when the frame rate is... | You need a smoothed average, the easiest way is to take the current answer (the time to draw the last frame) and combine it with the previous answer.
```
// eg.
float smoothing = 0.9; // larger=more smoothing
measurement = (measurement * smoothing) + (current * (1.0-smoothing))
```
By adjusting the 0.9 / 0.1 ratio y... |
87,317 | <p>I need to get a list of attribute values from child elements in Python.</p>
<p>It's easiest to explain with an example.</p>
<p>Given some XML like this:</p>
<pre><code><elements>
<parent name="CategoryA">
<child value="a1"/>
<child value="a2"/>
<child value="... | [
{
"answer_id": 87503,
"author": "pjz",
"author_id": 8002,
"author_profile": "https://Stackoverflow.com/users/8002",
"pm_score": 2,
"selected": false,
"text": "<p>I must admit I'm a fan of <a href=\"http://www.aaronsw.com/2002/xmltramp/\" rel=\"nofollow noreferrer\">xmltramp</a> due to it... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3464/"
] | I need to get a list of attribute values from child elements in Python.
It's easiest to explain with an example.
Given some XML like this:
```
<elements>
<parent name="CategoryA">
<child value="a1"/>
<child value="a2"/>
<child value="a3"/>
</parent>
<parent name="CategoryB">
... | I'm not really an old hand at Python, but here's an XPath solution using libxml2.
```
import libxml2
DOC = """<elements>
<parent name="CategoryA">
<child value="a1"/>
<child value="a2"/>
<child value="a3"/>
</parent>
<parent name="CategoryB">
<child value="b1"/>
<ch... |
87,330 | <p>Is there a canonical ordering of submatch expressions in a regular
expression? </p>
<p>For example: What is the order of the submatches in<br>
"(([0-9]{3}).([0-9]{3}).([0-9]{3}).([0-9]{3}))\s+([A-Z]+)" ?</p>
<pre><code>a. (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3}))\s+([A-Z]+)
(([0-9]{3})\.([0-9]{3})\.([0... | [
{
"answer_id": 87354,
"author": "jjrv",
"author_id": 16509,
"author_profile": "https://Stackoverflow.com/users/16509",
"pm_score": 2,
"selected": false,
"text": "<p>They tend to be numbered in the order the capturing parens start, left to right. Therefore, option b.</p>\n"
},
{
"... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16753/"
] | Is there a canonical ordering of submatch expressions in a regular
expression?
For example: What is the order of the submatches in
"(([0-9]{3}).([0-9]{3}).([0-9]{3}).([0-9]{3}))\s+([A-Z]+)" ?
```
a. (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3}))\s+([A-Z]+)
(([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3})) ... | They tend to be numbered in the order the capturing parens start, left to right. Therefore, option b. |
87,372 | <p>I'm asking for a template trick to detect if a class has a specific member function of a given signature.</p>
<p>The problem is similar to the one cited here
<a href="http://www.gotw.ca/gotw/071.htm" rel="noreferrer">http://www.gotw.ca/gotw/071.htm</a>
but not the same: in the item of Sutter's book he answered to t... | [
{
"answer_id": 87474,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 2,
"selected": false,
"text": "<p>To be non-intrusive, you can also put <code>serialize</code> in the namespace of the class being serialised, or of the arc... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87372",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10120/"
] | I'm asking for a template trick to detect if a class has a specific member function of a given signature.
The problem is similar to the one cited here
<http://www.gotw.ca/gotw/071.htm>
but not the same: in the item of Sutter's book he answered to the question that a class C MUST PROVIDE a member function with a partic... | I'm not sure if I understand you correctly, but you may exploit SFINAE to detect function presence at compile-time. Example from my code (tests if class has member function size\_t used\_memory() const).
```
template<typename T>
struct HasUsedMemoryMethod
{
template<typename U, size_t (U::*)() const> struct SFINAE... |
87,381 | <p>With ViEmu you really need to unbind a lot of resharpers keybindings to make it work well.</p>
<p>Does anyone have what they think is a good set of keybindings that work well for resharper when using ViEmu?</p>
<p>What I'm doing at the moment using the Visual Studio bindings from Resharper. Toasting all the confli... | [
{
"answer_id": 88223,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 0,
"selected": false,
"text": "<p>I use both plugins, but I really prefer the power of the Vi input model that ViEmu gives. I really don't miss... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10431/"
] | With ViEmu you really need to unbind a lot of resharpers keybindings to make it work well.
Does anyone have what they think is a good set of keybindings that work well for resharper when using ViEmu?
What I'm doing at the moment using the Visual Studio bindings from Resharper. Toasting all the conflicting ones with V... | You can also create mappings in ViEmu that will call the VS and R# actions. For example, I have these lines in my \_viemurc file for commenting and uncommenting a selection:
```
map <C-S-c> gS:vsc Edit.CommentSelection<CR>
map <C-A-c> gS:vsc Edit.UncommentSelection<CR>
```
The :vsc is for "visual studio command," an... |
87,458 | <p>I want to do this so that I can say something like, <code>svn mv *.php php-folder/</code>, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the <a href="http://svnbook.red-bean.com/en/1.0/re18.html" rel="noreferrer">svn book</a>.</p>
<p>Example output of <c... | [
{
"answer_id": 87488,
"author": "zigdon",
"author_id": 4913,
"author_profile": "https://Stackoverflow.com/users/4913",
"pm_score": 0,
"selected": false,
"text": "<p>If you're in the correct checked out directory, I don't see why it wouldn't work? Your shell should expand the *.php to a ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16562/"
] | I want to do this so that I can say something like, `svn mv *.php php-folder/`, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the [svn book](http://svnbook.red-bean.com/en/1.0/re18.html).
Example output of `svn mv *.php php-folder/` :
`svn: Client error in... | Not sure about svn itself, but either your shell should be able to expand that wildcard and svn can take multiple source arguments, or you can use something like
```
for file in *.php; do svn mv $file php-folder/; done
```
in a bash shell, for example. |
87,459 | <p>I have a class with a string property that's actually several strings joined with a separator.</p>
<p>I'm wondering if it is good form to have a proxy property like this:</p>
<pre><code>public string ActualProperty
{
get { return actualProperty; }
set { actualProperty = value; }
}
public string[] Individu... | [
{
"answer_id": 87491,
"author": "typemismatch",
"author_id": 13714,
"author_profile": "https://Stackoverflow.com/users/13714",
"pm_score": 0,
"selected": false,
"text": "<p>Well I'd say your \"set\" is high risk, what if somebody didn't know they had to pass an already joined sequence of... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4192/"
] | I have a class with a string property that's actually several strings joined with a separator.
I'm wondering if it is good form to have a proxy property like this:
```
public string ActualProperty
{
get { return actualProperty; }
set { actualProperty = value; }
}
public string[] IndividualStrings
{
get {... | Linking two settable properties together is bad juju in my opinion. Switch to using explicit get / set methods instead of a property if this is really what you want. Code which has non-obvious side-effects will almost always bite you later on. Keep things simple and straightforward as much as possible.
Also, if you ha... |
87,468 | <p>Essentially I have a PHP page that calls out some other HTML to be rendered through an object's method. It looks like this:</p>
<p>MY PHP PAGE:</p>
<pre><code>// some content...
<?php
$GLOBALS["topOfThePage"] = true;
$this->renderSomeHTML();
?>
// some content...
<?php
$GLOBALS["topOfThe... | [
{
"answer_id": 87507,
"author": "DGM",
"author_id": 14253,
"author_profile": "https://Stackoverflow.com/users/14253",
"pm_score": 1,
"selected": false,
"text": "<p>Chaching is handled differently by different frameworks, so you'd have to help us out with some more information. But I als... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Essentially I have a PHP page that calls out some other HTML to be rendered through an object's method. It looks like this:
MY PHP PAGE:
```
// some content...
<?php
$GLOBALS["topOfThePage"] = true;
$this->renderSomeHTML();
?>
// some content...
<?php
$GLOBALS["topOfThePage"] = false;
$this->render... | Obviously, you cannot. The whole point of caching is that the 'thing' you cache is not going to change. So you either:
* provide a parameter
* aviod caching
* invalidate the cache when you set a different parameter
Or, you rewrite the cache mechanism yourself - to support some dynamic binding. |
87,514 | <p>I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works.</p>
<p>Now I want to make sure that I'm doing it "right", get some feedb... | [
{
"answer_id": 87538,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": true,
"text": "<p>For CE, it's probably a non issue. If you were pushing this app to thousands of users and they were all hitting a centralize... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16757/"
] | I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works.
Now I want to make sure that I'm doing it "right", get some feedback from e... | For CE, it's probably a non issue. If you were pushing this app to thousands of users and they were all hitting a centralized DB, you might want to spend some time on optimization. In a single-user instance DB like CE, unless you've got data that says you need to optimize, I wouldn't spend any time worrying about it. P... |
87,541 | <p>What column names cannot be used when creating an Excel spreadsheet with ADO.</p>
<p>I have a statement that creates a page in a spreadsheet:</p>
<pre><code>CREATE TABLE [TableName] (Column string, Column2 string);
</code></pre>
<p>I have found that using a column name of <code>Date</code> or <code>Container</cod... | [
{
"answer_id": 89923,
"author": "Nat",
"author_id": 13813,
"author_profile": "https://Stackoverflow.com/users/13813",
"pm_score": 1,
"selected": false,
"text": "<p>It may be possible to define a custom template for the DIP and deploy that to the site, setting the content type to link to ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87541",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5008/"
] | What column names cannot be used when creating an Excel spreadsheet with ADO.
I have a statement that creates a page in a spreadsheet:
```
CREATE TABLE [TableName] (Column string, Column2 string);
```
I have found that using a column name of `Date` or `Container` will generate an error when the statement is execute... | It may be possible to define a custom template for the DIP and deploy that to the site, setting the content type to link to that template. |
87,557 | <p>I have a class with many embedded assets. </p>
<p>Within the class, I would like to get the class definition of an asset by name. I have tried using getDefinitionByName(), and also ApplicationDomain.currentDomain.getDefinition() but neither work.</p>
<p>Example:</p>
<pre><code>public class MyClass
{
[Embed(sou... | [
{
"answer_id": 87596,
"author": "Marc Hughes",
"author_id": 6791,
"author_profile": "https://Stackoverflow.com/users/6791",
"pm_score": 4,
"selected": true,
"text": "<p>This doesn't answer your question, but it may solve your problem. I believe doing something like this should work:</p>... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87557",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8399/"
] | I have a class with many embedded assets.
Within the class, I would like to get the class definition of an asset by name. I have tried using getDefinitionByName(), and also ApplicationDomain.currentDomain.getDefinition() but neither work.
Example:
```
public class MyClass
{
[Embed(source="images/image1.png")] pri... | This doesn't answer your question, but it may solve your problem. I believe doing something like this should work:
```
public class MyClass
{
[Embed(source="images/image1.png")] private static var Image1Class:Class;
[Embed(source="images/image2.png")] private static var Image2Class:Class;
[Embed(source="images/i... |
87,561 | <p>I'd like to add some pie, bar and scatter charts to my Ruby on Rails web application. I want want them to be atractive, easy to add and not introduce much overhead. </p>
<p>What charting solution would you recommend?<br>
What are its drawbacks (requires Javascript, Flash, expensive, etc)?</p>
| [
{
"answer_id": 87579,
"author": "David Heggie",
"author_id": 4309,
"author_profile": "https://Stackoverflow.com/users/4309",
"pm_score": 3,
"selected": false,
"text": "<p>Have you tried the <a href=\"http://code.google.com/apis/chart/\" rel=\"nofollow noreferrer\">Google Charts API</a>? ... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16779/"
] | I'd like to add some pie, bar and scatter charts to my Ruby on Rails web application. I want want them to be atractive, easy to add and not introduce much overhead.
What charting solution would you recommend?
What are its drawbacks (requires Javascript, Flash, expensive, etc)? | [Google Charts](http://code.google.com/apis/chart/) is an excellent choice if you don't want to use Flash. It's pretty easy to use on its own, but for Rails, it's even easier with the [gchartrb](http://badpopcorn.com/blog/2008/09/08/rails-google-charts-gchartrb/) gem. An example:
```
GoogleChart::PieChart.new('320x200... |
87,587 | <p>Continuing my problem from yesterday, the Silverlight datagrid I have from this <a href="https://stackoverflow.com/questions/74461/silverlight-datagrid-control-selection-changed-event-interfering-with-sorting">issue</a>
is now causing Stack Overflow errors when sorting a column with a large amount of data (Like the ... | [
{
"answer_id": 88253,
"author": "BKimmel",
"author_id": 13776,
"author_profile": "https://Stackoverflow.com/users/13776",
"pm_score": 0,
"selected": false,
"text": "<p>Give this a shot:</p>\n\n<pre><code>dataGridView1.Columns[*Numberofthecolumnyoudontwantsorted*].SortMode\n= DataGridView... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87587",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12413/"
] | Continuing my problem from yesterday, the Silverlight datagrid I have from this [issue](https://stackoverflow.com/questions/74461/silverlight-datagrid-control-selection-changed-event-interfering-with-sorting)
is now causing Stack Overflow errors when sorting a column with a large amount of data (Like the text column th... | I'm only familiar with the WPF version of this datagrid, but try this:
```
<data:DataGridTextColumn CanUserSort="False" Header="First Name" Binding="{Binding FirstName}" />
```
Add the CanUserSort="False" attribute on each column you don't want sorted. |
87,621 | <p>I have an XML that I want to load to objects, manipulate those objects (set values, read values) and then save those XMLs back.
It is important for me to have the XML in the structure (xsd) that I created.</p>
<p>One way to do that is to write my own serializer, but is there a built in support for it or open source... | [
{
"answer_id": 87633,
"author": "dcstraw",
"author_id": 10391,
"author_profile": "https://Stackoverflow.com/users/10391",
"pm_score": 0,
"selected": false,
"text": "<p>I'll bet NetDataContractSerializer can do what you want.</p>\n"
},
{
"answer_id": 87638,
"author": "ljs",
... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9855/"
] | I have an XML that I want to load to objects, manipulate those objects (set values, read values) and then save those XMLs back.
It is important for me to have the XML in the structure (xsd) that I created.
One way to do that is to write my own serializer, but is there a built in support for it or open source in C# tha... | You can generate serializable C# classes from a schema (xsd) using xsd.exe:
```
xsd.exe dependency1.xsd dependency2.xsd schema.xsd /out:outputDir
```
If the schema has dependencies (included/imported schemas), they must all be included on the same command line. |
87,647 | <p>I have a DTS package with a data transformation task (data pump). I’d like to source the data with the results of a stored procedure that takes parameters, but DTS won’t preview the result set and can’t define the columns in the data transformation task.</p>
<p>Has anyone gotten this to work?</p>
<p>Caveat: The ... | [
{
"answer_id": 87746,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": 0,
"selected": false,
"text": "<p>You would need to actually load them into a table, then you can use a SQL task to move it from that table into t... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16813/"
] | I have a DTS package with a data transformation task (data pump). I’d like to source the data with the results of a stored procedure that takes parameters, but DTS won’t preview the result set and can’t define the columns in the data transformation task.
Has anyone gotten this to work?
Caveat: The stored procedure us... | Enter some valid values for the stored procedure parameters so it runs and returns some data (or even no data, you just need the columns). Then you should be able to do the mapping/etc.. Then do a disconnected edit and change to the actual parameter values (I assume you are getting them from a global variable).
```
DE... |
87,689 | <p>I have several applications that are part of a suite of tools that various developers at our studio use. these applications are mainly command line apps that open a DOS cmd shell. These apps in turn start up a GUI application that tracks output and status (via sockets) of these command line apps.</p>
<p>The comma... | [
{
"answer_id": 87816,
"author": "Adam Neal",
"author_id": 13791,
"author_profile": "https://Stackoverflow.com/users/13791",
"pm_score": 1,
"selected": false,
"text": "<p>You might be able to use SENS (System Event Notification Services). I've never used it myself, but I'm almost positiv... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4405/"
] | I have several applications that are part of a suite of tools that various developers at our studio use. these applications are mainly command line apps that open a DOS cmd shell. These apps in turn start up a GUI application that tracks output and status (via sockets) of these command line apps.
The command line apps... | I found the programmatic answer that I was looking for. It has to do with stations. Apparently anything running on the desktop will run on a station with a particular name. Anything that isn't on the desktop (i.e. a process started by the task manager when logged off or on a locked workstation) will get started with a ... |
87,692 | <p>How can I, as the wiki admin, enter scripting (Javascript) into a Sharepoint wiki page?<br><br>
I would like to enter a title and, when clicking on that, having displayed under it a small explanation. I usually have done that with javascript, any other idea?</p>
| [
{
"answer_id": 87701,
"author": "sblundy",
"author_id": 4893,
"author_profile": "https://Stackoverflow.com/users/4893",
"pm_score": 0,
"selected": false,
"text": "<p>That sounds like a security risk. It seems it's possible for the wiki admin to install scripts, see <a href=\"http://en.wi... | 2008/09/17 | [
"https://Stackoverflow.com/questions/87692",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15346/"
] | How can I, as the wiki admin, enter scripting (Javascript) into a Sharepoint wiki page?
I would like to enter a title and, when clicking on that, having displayed under it a small explanation. I usually have done that with javascript, any other idea? | Assuming you're the administrator of the wiki and are willing display this on mouseover instead of on click, you don't need javascript at all -- you can use straight CSS. Here's an example of the styles and markup:
```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
... |