qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
265,650
<p>I have a question regarding a symptom of my misuse of CreateProcess. I'm using the lpcommandline parameter to feed the path to my executable and parameters. My misuse is that I have not surrounded the path to the exe with quotes. </p> <p>My question is, why does the CreateProcess work just fine on most computers ...
[ { "answer_id": 265847, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 2, "selected": false, "text": "char commandline[] = \"C:\\Program Files\\My Company\\doit.exe parameter1 parameter2\";\nCreateProcess(NULL,commandlin...
2008/11/05
[ "https://Stackoverflow.com/questions/265650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24979/" ]
265,669
<p>I have some code that opens a word document using VBScript on an ASP.net page:</p> <pre><code>set objWord = CreateObject("Word.Application") objWord.Visible = True objWord.Documents.Open "c:\inetpub\wwwroot\JSWordTest\test.doc", False, False, False </code></pre> <p>This works great but opens the word doc in anot...
[ { "answer_id": 267116, "author": "unrealtrip", "author_id": 11130, "author_profile": "https://Stackoverflow.com/users/11130", "pm_score": 2, "selected": false, "text": "' Declare an object for the word application '\nSet objWord = CreateObject(\"Word.Application\")\n\nobjWord.Visible = F...
2008/11/05
[ "https://Stackoverflow.com/questions/265669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23066/" ]
265,679
<p>I want to do something like this from within Eclipse: <a href="http://svn.collab.net/viewvc/svn?view=rev&amp;revision=33845" rel="nofollow noreferrer">http://svn.collab.net/viewvc/svn?view=rev&amp;revision=33845</a></p> <p>I use Subversive 0.7.5 with the Native JavaHL 1.5.3 (r33570) Connector.</p> <p>I tried to chan...
[ { "answer_id": 265697, "author": "masi", "author_id": 12398, "author_profile": "https://Stackoverflow.com/users/12398", "pm_score": 2, "selected": false, "text": "svn copy some_branch http://server:8080/svn/tags/TagWithChange -m\"TagWithChange\"\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12398/" ]
265,680
<p>I'm using AspectJ to advice all the public methods which do have an argument of a chosen class. I tried the following:</p> <pre><code>pointcut permissionCheckMethods(Session sess) : (execution(public * *(.., Session)) &amp;&amp; args(*, sess)); </code></pre> <p>This is working wonderfully for methods with at ...
[ { "answer_id": 320404, "author": "Manrico Corazzi", "author_id": 4690, "author_profile": "https://Stackoverflow.com/users/4690", "pm_score": 4, "selected": true, "text": "pointcut permissionCheckMethods(EhealthSession eheSess) : \n (execution(public * *(.., EhealthSession)) && args(*,...
2008/11/05
[ "https://Stackoverflow.com/questions/265680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4690/" ]
265,708
<p>A fairly basic question, but I don't see it asked anywhere.</p> <p>Let's say we have a global struct (in C) like so:</p> <pre><code>struct foo { int written_frequently1; int read_only; int written_frequently2; }; </code></pre> <p>It seems clear to me that if we have lots of threads reading and writing, we n...
[ { "answer_id": 265748, "author": "Yogi", "author_id": 32801, "author_profile": "https://Stackoverflow.com/users/32801", "pm_score": 2, "selected": false, "text": "int read_only read_only" }, { "answer_id": 267617, "author": "Adam Liss", "author_id": 29157, "author_pro...
2008/11/05
[ "https://Stackoverflow.com/questions/265708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15456/" ]
265,720
<p>In Python 2.6, a new "timeout" parameter was added to the httplib.HTTPConnection class: <a href="http://docs.python.org/library/httplib.html#httplib.HTTPConnection" rel="nofollow noreferrer">http://docs.python.org/library/httplib.html#httplib.HTTPConnection</a></p> <p>However, this is only a timeout for the connect...
[ { "answer_id": 265741, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": true, "text": "import socket\n\ntimeout = 10\nsocket.setdefaulttimeout(timeout)\n" }, { "answer_id": 4453301, "author": "Pankr...
2008/11/05
[ "https://Stackoverflow.com/questions/265720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16148/" ]
265,722
<p>I'm trying to create an ASP page that has a bridged connection with an SQL Server 2005 database (separate sever from the ASP's server). For this I am trying to use a Windows Authentication setup. I have my name with full rights to the SQL server yet I am still getting the error 'Login failed for user COMPANY\name'. ...
[ { "answer_id": 266238, "author": "Dave Swersky", "author_id": 34796, "author_profile": "https://Stackoverflow.com/users/34796", "pm_score": 0, "selected": false, "text": "<identity impersonate=\"true\" />\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
265,725
<p>I have some constants that represent the valid options in one of my model's fields. What's the best way to handle these constants in Ruby?</p>
[ { "answer_id": 265767, "author": "Micah", "author_id": 19964, "author_profile": "https://Stackoverflow.com/users/19964", "pm_score": 4, "selected": false, "text": "class MyClass < ActiveRecord::Base\n ACTIVE_STATUS = \"active\"\n INACTIVE_STATUS = \"inactive\"\n PENDING_STATUS = \"pen...
2008/11/05
[ "https://Stackoverflow.com/questions/265725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34746/" ]
265,750
<p>I have a xml build of</p> <pre><code>&lt;elig&gt; &lt;subscriber code="1234"/&gt; &lt;date to="12/30/2004" from="12/31/2004"/&gt; &lt;person name="bob" ID="654321"/&gt; &lt;dog type="labrador" color="white"/&gt; &lt;location name="hawaii" islandCod...
[ { "answer_id": 265828, "author": "mkoeller", "author_id": 33433, "author_profile": "https://Stackoverflow.com/users/33433", "pm_score": 1, "selected": false, "text": "<elig>\n <subscriber code=\"1234\">\n <date to=\"12/30/2004\" from=\"12/31/2004\"/>\n <person name=\"bob\" ID=\"...
2008/11/05
[ "https://Stackoverflow.com/questions/265750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16354/" ]
265,761
<p>In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined:</p> <pre><code>AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); </code></pre> <p>In jailbroken phones, you used to be able to use the MeCCA.framework to do this:</p> <p><a href="http://pastie.org/94481" r...
[ { "answer_id": 281614, "author": "KevinButler", "author_id": 34463, "author_profile": "https://Stackoverflow.com/users/34463", "pm_score": 5, "selected": true, "text": "extern void * _CTServerConnectionCreate(CFAllocatorRef, int (*)(void *, CFStringRef, CFDictionaryRef, void *), int *);\...
2008/11/05
[ "https://Stackoverflow.com/questions/265761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34463/" ]
265,762
<p>Always when I run java application it will display in Windows Task Manager is java.exe or javaw.exe. How to rename java.exe or javaw.exe process without wrapper by other programming languages.</p>
[ { "answer_id": 46060331, "author": "jbilander", "author_id": 7253471, "author_profile": "https://Stackoverflow.com/users/7253471", "pm_score": 1, "selected": false, "text": "javapackager -name MyTestApp -native image MyTestApp.exe" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24550/" ]
265,769
<p>I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?</p>
[ { "answer_id": 265782, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 9, "selected": true, "text": "MAX_PATH" }, { "answer_id": 265785, "author": "Kibbee", "author_id": 1862, "author_profile": "htt...
2008/11/05
[ "https://Stackoverflow.com/questions/265769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
265,774
<p>Consider the following code:</p> <pre><code>&lt;a href="#label2"&gt;GoTo Label2&lt;/a&gt; ... [content here] ... &lt;a name="label0"&gt;&lt;/a&gt;More content &lt;a name="label1"&gt;&lt;/a&gt;More content &lt;a name="label2"&gt;&lt;/a&gt;More content &lt;a name="label3"&gt;&lt;/a&gt;More content &lt;a name="label4"...
[ { "answer_id": 265789, "author": "mkoeller", "author_id": 33433, "author_profile": "https://Stackoverflow.com/users/33433", "pm_score": 2, "selected": false, "text": "window.location=\"<yourCurrentUri>#label2\";\n" }, { "answer_id": 265805, "author": "Ken Pespisa", "autho...
2008/11/05
[ "https://Stackoverflow.com/questions/265774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
265,807
<p>I have a control that is basically functioning as a client-side timer countdown control.</p> <p>I want to fire a server-side event when the count down has reached a certain time.</p> <p>Does anyone have an idea how this could be done?</p> <p>So, when timer counts down to 0, a server-side event is fired.</p>
[ { "answer_id": 265840, "author": "wonderchook", "author_id": 32113, "author_profile": "https://Stackoverflow.com/users/32113", "pm_score": 1, "selected": false, "text": "function NotifyServer()\n{\n xmlHttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n xmlHttp.onreadystatechange = ...
2008/11/05
[ "https://Stackoverflow.com/questions/265807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5853/" ]
265,809
<p>I'm scouring the internet for a definition of the term &quot;Internal Node.&quot; I cannot find a succinct definition. Every source I'm looking at uses the term without defining it, and the usage doesn't yield a proper definition of what an internal node actually is.</p> <p>Here are the two places I've been mainly l...
[ { "answer_id": 265823, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 8, "selected": true, "text": " I ROOT (root is also an INTERNAL NODE, unless it is leaf)\n / \\\n I I INTERNAL NODES\n / ...
2008/11/05
[ "https://Stackoverflow.com/questions/265809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29119/" ]
265,814
<p>How can I create a regex for a string such as this:</p> <pre><code>&lt;SERVER&gt; &lt;SERVERKEY&gt; &lt;COMMAND&gt; &lt;FOLDERPATH&gt; &lt;RETENTION&gt; &lt;TRANSFERMODE&gt; &lt;OUTPUTPATH&gt; &lt;LOGTO&gt; &lt;OPTIONAL-MAXSIZE&gt; &lt;OPTIONAL-OFFSET&gt; </code></pre> <p>Most of these fields are just simple words...
[ { "answer_id": 265940, "author": "Stroboskop", "author_id": 23428, "author_profile": "https://Stackoverflow.com/users/23428", "pm_score": 0, "selected": false, "text": "<OUTPUTPATH> <LOGTO>\n c:\\ 12 bin \\ 250 bin \\output\n <FOLDERPATH> <RETENTION> <TRANSFERMODE> <OUTPUTPATH>\n <SERVER...
2008/11/05
[ "https://Stackoverflow.com/questions/265814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34395/" ]
265,849
<p>That's it. It's a dumb dumb (embarrassing!) question, but I've never used C# before, only C++ and I can't seem to figure out how to access a Label on my main form from a secondary form and change the text. If anybody can let me know real quick what to do I'd be so grateful!</p> <p>BTW, I should really clarify. Sorr...
[ { "answer_id": 265885, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "this public class Form1 : Form \n{\n private Label label;\n\n // Construction etc as normal\n\n public string La...
2008/11/05
[ "https://Stackoverflow.com/questions/265849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
265,850
<p>Usually, I need to retrieve data from a table in some range; for example, a separate page for each search result. In MySQL I use LIMIT keyword but in DB2 I don't know. Now I use this query for retrieve range of data.</p> <pre><code>SELECT * FROM( SELECT SMALLINT(RANK() OVER(ORDER BY NAME DESC)) AS RUNNI...
[ { "answer_id": 273106, "author": "Paul Morgan", "author_id": 16322, "author_profile": "https://Stackoverflow.com/users/16322", "pm_score": 2, "selected": false, "text": "SELECT SMALLINT(RANK() OVER(ORDER BY NAME DESC)) AS RUNNING_NO,\n DATA_KEY_VALUE,\n SHOW_PRIORITY\n FROM ...
2008/11/05
[ "https://Stackoverflow.com/questions/265850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24550/" ]
265,855
<p>I've got a database here that runs entirely on GMT. The client machines, however, may run on many different time zones (including BST). When you pull data back using SqlConnection, it will translate the datetime value so, for instance</p> <p>19 August 2008</p> <p>becomes</p> <p>18 August 2008 23:00:00.</p> <p>...
[ { "answer_id": 265971, "author": "Craig Norton", "author_id": 24804, "author_profile": "https://Stackoverflow.com/users/24804", "pm_score": 2, "selected": false, "text": "returnedDataTable.Columns(\"ColumnName\").DateTimeMode = DataSetDateTime.Unspecified\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
265,875
<p>I have always initialized my strings to NULL, with the thinking that NULL means the absence of a value and &quot;&quot; or String.Empty is a valid value. I have seen more examples lately of code where String.Empty is considered the default value or represents no value. This strikes me as odd, with the newly added ...
[ { "answer_id": 265900, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 5, "selected": false, "text": "Empty null NullReferenceException IsNullOrEmpty()" }, { "answer_id": 266272, "author": "Robert Rossney", "...
2008/11/05
[ "https://Stackoverflow.com/questions/265875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24279/" ]
265,879
<p>I am interested in using/learning RoR in a project where I have to use a .NET dll. Is Ruby capable of importing a .NET dll?</p>
[ { "answer_id": 266032, "author": "mackenir", "author_id": 25457, "author_profile": "https://Stackoverflow.com/users/25457", "pm_score": 2, "selected": false, "text": "\"Your Ruby Code\" -> RubyCOM -> \"COM-Callable Wrappers\" -> \"Your .NET objects\"\n" }, { "answer_id": 266403, ...
2008/11/05
[ "https://Stackoverflow.com/questions/265879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34766/" ]
265,896
<p>I've got a junk directory where I toss downloads, one-off projects, email drafts, and other various things that might be useful for a few days but don't need to be saved forever. To stop this directory from taking over my machine, I wrote a program that will delete all files older than a specified number of days an...
[ { "answer_id": 265916, "author": "mkoeller", "author_id": 33433, "author_profile": "https://Stackoverflow.com/users/33433", "pm_score": 1, "selected": false, "text": ">del /F *\n" }, { "answer_id": 265938, "author": "Gulzar Nazim", "author_id": 4337, "author_profile":...
2008/11/05
[ "https://Stackoverflow.com/questions/265896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2547/" ]
265,898
<p>I'm coding a small CMS to get a better understanding of how they work and to learn some new things about PHP. I have however come across a problem.</p> <p>I want to use mod_rewrite (though if someone has a better solution I'm up for trying it) to produce nice clean URLs, so site.com/index.php?page=2 can instead be ...
[ { "answer_id": 265934, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 4, "selected": true, "text": "RewriteEngine on\nRewriteBase /\n\n# only rewrite if the requested file doesn't exist\nRewriteCond %{REQUEST_FILENAME} !-s \n\n...
2008/11/05
[ "https://Stackoverflow.com/questions/265898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
265,919
<p>I'm working on a program that processes many requests, none of them reaching more than 50% of CPU (<strong>currently I'm working on a dual core</strong>). So I created a thread for each request, the whole process is faster. Processing 9 requests, a single thread lasts 02min08s, while with 3 threads working simultane...
[ { "answer_id": 265935, "author": "mackenir", "author_id": 25457, "author_profile": "https://Stackoverflow.com/users/25457", "pm_score": 2, "selected": false, "text": "class Test\n{\n static void Main() //This will be an MTA thread by default\n {\n var o = new COMObjectClass();\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/265919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21668/" ]
265,930
<p>I'm generating and showing a new WinForms window on top of a Main Window. How can I achieve that the original (Main Window) keeps the focus? Setting the focus back after showing the new window does not solve my problem because I need to prevent the Main Window's title bar from flickering. The new window has to stay ...
[ { "answer_id": 265987, "author": "Spidey", "author_id": 4236, "author_profile": "https://Stackoverflow.com/users/4236", "pm_score": 2, "selected": false, "text": "private void button1_Click(object sender, EventArgs e)\n{\n Form2 f2 = new Form2();\n f2.TopMost = true;\n f2.Sho...
2008/11/05
[ "https://Stackoverflow.com/questions/265930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
265,944
<p>How do you reverse the effect of a merge on polarised branches without dying of agony?</p> <p>This problem has been plaguing me for <strong>months</strong> and I have finally given up. </p> <p>You have 1 Repository, with 2 <strong>Named</strong> Branches. A and B. </p> <p>Changes that occur to A will inevitably...
[ { "answer_id": 2093167, "author": "oenli", "author_id": 251438, "author_profile": "https://Stackoverflow.com/users/251438", "pm_score": 6, "selected": false, "text": "hg update 11 $EDITOR some/file.txt hg commit -m \"generating commit on BRANCH_V8 to rectify wrong merge from BRANCH_V9\" ...
2008/11/05
[ "https://Stackoverflow.com/questions/265944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15614/" ]
265,953
<p>Basically, I would like to check if I have rights to open the file before I actually try to open it; I do not want to use a try/catch for this check unless I have to. Is there a file access property I can check before hand?</p>
[ { "answer_id": 265958, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 7, "selected": false, "text": ".Exists()" }, { "answer_id": 266316, "author": "Robert Rossney", "author_id": 19403, "author_profi...
2008/11/05
[ "https://Stackoverflow.com/questions/265953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12333/" ]
265,956
<p>I am pretty new to php, but I am learning! I have a simple form on a client website. I am testing the form and when I click submit, I get the following error:</p> <p>Form Mail Script</p> <pre><code>Wrong referrer (referring site). For security reasons the form can only be used, if the referring page is part of this ...
[ { "answer_id": 266105, "author": "pd.", "author_id": 19066, "author_profile": "https://Stackoverflow.com/users/19066", "pm_score": 2, "selected": false, "text": "$referring_server = 'http://www.mywebsite.com, scripts';\n $referring_server = 'yourdomain.com';\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30043/" ]
265,960
<p>It seems like there should be a simpler way than:</p> <pre><code>import string s = "string. With. Punctuation?" # Sample string out = s.translate(string.maketrans("",""), string.punctuation) </code></pre> <p>Is there?</p>
[ { "answer_id": 265995, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 5, "selected": false, "text": "import re, string\ns = \"string. With. Punctuation?\" # Sample string \nout = re.sub('[%s]' % re.escape(string.punct...
2008/11/05
[ "https://Stackoverflow.com/questions/265960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
265,970
<p>I'm more of a programmer than a designer, and I'm trying to embrace <code>&lt;div&gt;</code>s rather than using tables but am getting stuck.</p> <p>Here's what I'm trying to do. I am setting up a survey page. I want each question's text to sit at the top of the blue div, and wrap if it's too long. I want all of ...
[ { "answer_id": 266007, "author": "philnash", "author_id": 28376, "author_profile": "https://Stackoverflow.com/users/28376", "pm_score": 3, "selected": true, "text": "<div class=\"greencontainer\">\n <div class=\"redcontainer\">\n <input type=\"checkbox\" />\n </div>\n <div class=\"...
2008/11/05
[ "https://Stackoverflow.com/questions/265970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28351/" ]
265,973
<p>I've inherited someone else's monster of a BASH script. The script was written in such a way that it uses a ridiculous amount of memory (around 1GB). I can run it from a shell with out issue, but if I run it from cron I crashes with a sig fault. </p> <p>Apart from digging into the poorly commented behemoth, is t...
[ { "answer_id": 266161, "author": "JimB", "author_id": 32880, "author_profile": "https://Stackoverflow.com/users/32880", "pm_score": -1, "selected": false, "text": "/path/to/bigscript.sh &> /dev/null\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/265973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
265,984
<p>Let's say we have defined a CSS class that is being applied to various elements on a page.</p> <pre><code>colourful { color: #DD00DD; background-color: #330033; } </code></pre> <p>People have complained about the colour, that they don't like pink/purple. So you want to give them the ability to change the s...
[ { "answer_id": 266023, "author": "kemiller2002", "author_id": 1942, "author_profile": "https://Stackoverflow.com/users/1942", "pm_score": -1, "selected": false, "text": "function changeColourful(colorRGB, backgroundColorRGB)\n {changeColor (document, colorRGB, backgroundColorRGB)}\n\nfun...
2008/11/05
[ "https://Stackoverflow.com/questions/265984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34778/" ]
266,002
<p>I'm using this XPath to get the value of a field:</p> <pre class="lang-none prettyprint-override"><code>//input[@type="hidden"][@name="val"]/@value </code></pre> <p>I get several results, but I only want the first. Using</p> <pre class="lang-none prettyprint-override"><code>//input[@type="hidden"][@name="val"]/@v...
[ { "answer_id": 266083, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": false, "text": "var result = document.evaluate(\n \"//input[@type='hidden' and @name='var' and position()=1]/@value\",\n document, null,...
2008/11/05
[ "https://Stackoverflow.com/questions/266002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,015
<p>I want to have two items on the same line using <code>float: left</code> for the item on the left.</p> <p>I have no problems achieving this alone. The problem is, I want the two items to <strong>stay</strong> on the same line <em>even when you resize the browser very small</em>. You know... like how it was with tab...
[ { "answer_id": 266025, "author": "Eric Wendelin", "author_id": 25066, "author_profile": "https://Stackoverflow.com/users/25066", "pm_score": 7, "selected": true, "text": "<div> <div> .minwidth { min-width:100px; width: auto !important; width: 100px; }\n !important min-width min-width wid...
2008/11/05
[ "https://Stackoverflow.com/questions/266015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
266,026
<p>Just looking for the relevant documentation. An example is not necessary, but would be appreciated. </p> <p>We have a situation where we are having to create 100s of virtual directories manually, and it seems like automating this would be a good way to make the process more efficient for now. </p> <p>Perhaps ne...
[ { "answer_id": 266045, "author": "John Sheehan", "author_id": 1786, "author_profile": "https://Stackoverflow.com/users/1786", "pm_score": 2, "selected": false, "text": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.DirectoryServices;\nusing System.IO;...
2008/11/05
[ "https://Stackoverflow.com/questions/266026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17847/" ]
266,028
<p>We are looking to provide two <strong>custom Platform switches</strong> (the <strong>platform dropdown</strong> in the configuration manager) for our projects <strong>in Visual Studio</strong>. </p> <p>For example one for 'Desktop' and one for 'Web'. The target build tasks then compile the code in a custom way base...
[ { "answer_id": 6463259, "author": "aster.x", "author_id": 506499, "author_profile": "https://Stackoverflow.com/users/506499", "pm_score": 3, "selected": false, "text": "<PropertyGroup Condition=\" '$(Platform)' == 'Web' \">\n <DefineConstants>Web</DefineConstants>\n <PlatformTarget...
2008/11/05
[ "https://Stackoverflow.com/questions/266028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1747/" ]
266,082
<p>How do I tell if my application (compiled in Visual&nbsp;Studio&nbsp;2008 as <em>Any CPU</em>) is running as a 32-bit or 64-bit application?</p>
[ { "answer_id": 266084, "author": "Redwood", "author_id": 1512, "author_profile": "https://Stackoverflow.com/users/1512", "pm_score": 3, "selected": false, "text": "public static bool Is64BitMode() {\n return System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr)) == 8;\n}\n" }...
2008/11/05
[ "https://Stackoverflow.com/questions/266082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
266,114
<p>I'm running <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Leopard" rel="nofollow noreferrer">Mac&nbsp;OS&nbsp;X Leopard</a> and wanted to know what the easy way to setup a web development environment to use Python, MySQL, Apache on my machine which would allow me to develop on my Mac and then easily move it to a ho...
[ { "answer_id": 266509, "author": "Null303", "author_id": 13787, "author_profile": "https://Stackoverflow.com/users/13787", "pm_score": 1, "selected": false, "text": "manager.py" }, { "answer_id": 624603, "author": "Idan Gazit", "author_id": 29451, "author_profile": "h...
2008/11/05
[ "https://Stackoverflow.com/questions/266114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,115
<p>The title is kind of obscure. What I want to know is if this is possible:</p> <pre><code>string typeName = &lt;read type name from somwhere&gt;; Type myType = Type.GetType(typeName); MyGenericClass&lt;myType&gt; myGenericClass = new MyGenericClass&lt;myType&gt;(); </code></pre> <p>Obviously, MyGenericClass is des...
[ { "answer_id": 266282, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 9, "selected": true, "text": "using System;\nusing System.Reflection;\n\npublic class Generic<T>\n{\n public Generic()\n {\n Console.Write...
2008/11/05
[ "https://Stackoverflow.com/questions/266115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9209/" ]
266,116
<p>How do you programmatically obtain a picture of a .Net control?</p>
[ { "answer_id": 266139, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 7, "selected": true, "text": "Control c = new TextBox();\nSystem.Drawing.Bitmap bmp = new System.Drawing.Bitmap(c.Width, c.Height);\nc.DrawToBitmap(bmp, c.Cl...
2008/11/05
[ "https://Stackoverflow.com/questions/266116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34787/" ]
266,123
<p>Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in...</p> <p>I'm my specific case - I need it to open upwards - always.</p> <p>UPDATE:...
[ { "answer_id": 268915, "author": "Mitch Haile", "author_id": 28807, "author_profile": "https://Stackoverflow.com/users/28807", "pm_score": 3, "selected": true, "text": "private function initMenu(): void {\n var m:Menu = new Menu();\n m.dataProvider = theMenuData;\n m.addEventLis...
2008/11/05
[ "https://Stackoverflow.com/questions/266123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3435/" ]
266,168
<p>Can someone post a simple example of starting two (Object Oriented) threads in C++. </p> <p>I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to calling a C-style thread library.</p> <p>I left out any OS specific requests in the hopes that whoever replied ...
[ { "answer_id": 266180, "author": "LorenzCK", "author_id": 3118, "author_profile": "https://Stackoverflow.com/users/3118", "pm_score": 3, "selected": false, "text": "class RThread : public wxThread {\n\npublic:\n RThread()\n : wxThread(wxTHREAD_JOINABLE){\n }\nprivate:\n R...
2008/11/05
[ "https://Stackoverflow.com/questions/266168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2112692/" ]
266,184
<p>I'm trying to be responsible with my "DOM" references in this little Flash 8/AS2 project.</p> <p>What has become increasingly frustrating is obtaining references to other movie clips and objects. For example, currently my code to access the submit button of a form looks something like this</p> <pre><code>var b:Bu...
[ { "answer_id": 266604, "author": "moritzstefaner", "author_id": 23069, "author_profile": "https://Stackoverflow.com/users/23069", "pm_score": 2, "selected": true, "text": "var my_MC=createEmptyMovieClip(\"instanceName\", depth);\n _parentClip.instanceName my_MC." }, { "answer_id"...
2008/11/05
[ "https://Stackoverflow.com/questions/266184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8815/" ]
266,196
<p>I'm looking at having certain users access one database and other users accessing another database based on the company they belong to. What would be the best way to handle the connection strings and make sure the user connects to the right db when they login?</p> <p>Thanks for any ideas.</p>
[ { "answer_id": 266225, "author": "GeekyMonkey", "author_id": 29900, "author_profile": "https://Stackoverflow.com/users/29900", "pm_score": 4, "selected": true, "text": "<connectionStrings>\n <add name=\"ConnectionForDudes\" providerName=\"System.Data.SqlClient\"\n connectionString=...
2008/11/05
[ "https://Stackoverflow.com/questions/266196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34571/" ]
266,199
<p>I'm trying to do a very simple button that changes color based on mouseover, mouseout and click, I'm doing this in prototype and the weird thing is if I used mouseover and mouseout, after I clicked on the button, the button wouldn't change to white, seems like it is because of the mouseout, here's my code</p> <pre>...
[ { "answer_id": 266223, "author": "EndangeredMassa", "author_id": 106, "author_profile": "https://Stackoverflow.com/users/106", "pm_score": 2, "selected": false, "text": "var wasClicked = false;\n\n$(\"izzy\").observe('mouseover', function() {\n if (!wasClicked) $('izzy').setStyle({ co...
2008/11/05
[ "https://Stackoverflow.com/questions/266199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34797/" ]
266,202
<h2>There seems to be two major conventions for organizing project files and then many variations.</h2> <p><strong>Convention 1: High-level type directories, project sub-directories</strong></p> <p>For example, the <a href="http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/" rel="nofollow noreferrer">wxWidgets</a> proj...
[ { "answer_id": 268485, "author": "Thomas L Holaday", "author_id": 29403, "author_profile": "https://Stackoverflow.com/users/29403", "pm_score": 1, "selected": false, "text": "mkdir /solution/test\nlinkd /solution/test/prj1 /solution/prj1/test\nlinkd /solution/test/prj2 /solution/prj2/tes...
2008/11/05
[ "https://Stackoverflow.com/questions/266202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233/" ]
266,206
<p>I'm relatively new to C++. In Java, it's easy for me to instantiate and use a hashmap. I'd like to know how to do it in a simple way in C++, since I saw many different implementations and none of them looked simple to me.</p>
[ { "answer_id": 266233, "author": "hazzen", "author_id": 5066, "author_profile": "https://Stackoverflow.com/users/5066", "pm_score": 6, "selected": true, "text": "std::hash_map C++0x std::unordered_map int char bool char * hash_map MyClass size_t MyClass::HashValue() const { /* something ...
2008/11/05
[ "https://Stackoverflow.com/questions/266206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33857/" ]
266,213
<p>Is there a way (preferrably using JavaScript) to determine whether a URL is to a SWF or a JPG? </p> <p>The obvious answer is to sniff the filename for ".jpg" or ".swf" but I'm dealing with banners that are dynamically decided by the server and usually have a lot of parameters and generally don't include an extensio...
[ { "answer_id": 266273, "author": "loraderon", "author_id": 22092, "author_profile": "https://Stackoverflow.com/users/22092", "pm_score": 3, "selected": true, "text": "function isImage(url, callback) {\n var img = document.createElement('img');\n img.onload = function() {\n c...
2008/11/05
[ "https://Stackoverflow.com/questions/266213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8349/" ]
266,245
<p>I have a git repository with remote foo.</p> <p>foo is a web app, is contains some files and dirs directly in its root:</p> <pre><code>Rakefile app ... public script </code></pre> <p>My main git repository is a larger system which comprises this web app. I want to pull the commits from foo, but I need the files t...
[ { "answer_id": 12243677, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 2, "selected": false, "text": "/path/to/B dir-B $ git remote add -f Bproject /path/to/B\n$ git merge -s ours --no-commit Bproject/master\n$ git read-tree --...
2008/11/05
[ "https://Stackoverflow.com/questions/266245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13989/" ]
266,250
<p>I'm learning some PowerShell. Is it possible to see the source code for a built-in cmdlet like <a href="http://technet.microsoft.com/en-us/library/hh849800.aspx" rel="noreferrer">Get-ChildItem</a>?</p>
[ { "answer_id": 267600, "author": "halr9000", "author_id": 6637, "author_profile": "https://Stackoverflow.com/users/6637", "pm_score": 5, "selected": false, "text": "Get-Command Get-ChildItem | Reflect-Cmdlet\n" }, { "answer_id": 20484505, "author": "ImpossibleSqui", "auth...
2008/11/05
[ "https://Stackoverflow.com/questions/266250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,255
<p>I try to instantiate an instance of <code>SPSite</code> on the farm server in a custom process (MyApp.exe) and I give it as parameter the whole URI (<a href="http://mysite:80/" rel="nofollow noreferrer">http://mysite:80/</a>). I also made sure that the account running <code>MyApp.exe</code> is <code>Site Collection ...
[ { "answer_id": 266333, "author": "Lars Fastrup", "author_id": 27393, "author_profile": "https://Stackoverflow.com/users/27393", "pm_score": 5, "selected": true, "text": "System.IO.FileNotFoundException : The site http://server/sites/bah could not be found in the Web application SPWebAppl...
2008/11/05
[ "https://Stackoverflow.com/questions/266255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24975/" ]
266,308
<p>Is there a way to compile a .vbproj or .csproj project file directly, just like Visual Studio does?</p> <p>When you compile in Visual Studio, the "output" window shows the actual call to the compiler, which normally looks like:</p> <p>vbc.exe [bunch of options] [looooong list of .vb files]</p> <p>I would like to ...
[ { "answer_id": 266319, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "msbuild /property:Configuration=Release MyFile.vbproj\n" }, { "answer_id": 18820303, "author": "JWPlatt", ...
2008/11/05
[ "https://Stackoverflow.com/questions/266308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3314/" ]
266,321
<p>I'm interested to find which way of creating box shadows with css is most effective. But that I mean : ease of implementation, flexibility, and cross browser compatibility. </p>
[ { "answer_id": 50398229, "author": "allenski", "author_id": 9132582, "author_profile": "https://Stackoverflow.com/users/9132582", "pm_score": 0, "selected": false, "text": "box-shadow: 3px 3px 3px rgba(0,0,0,0.33);\n inset box-shadow: 3px 3px 3px rgba(0,0,0,0.33) inset;\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32582/" ]
266,326
<p>Am I safe in casting a C++ bool to a Windows API BOOL via this construct</p> <pre><code>bool mybool = true; BOOL apiboolean = mybool ? TRUE : FALSE; </code></pre> <p>I'd assume this is a yes because I don't see any obvious problems but I wanted to take a moment to ask only because this may be more subtle than it a...
[ { "answer_id": 266338, "author": "Dima", "author_id": 13313, "author_profile": "https://Stackoverflow.com/users/13313", "pm_score": 4, "selected": true, "text": "\nbool b;\n...\nBOOL apiboolean = b ? TRUE : FALSE;\n" }, { "answer_id": 266468, "author": "James Curran", "au...
2008/11/05
[ "https://Stackoverflow.com/questions/266326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2820/" ]
266,327
<p>A pattern that's started to show up a lot in one of the web apps I'm working are links that used to just be a regular a-tag link now need a popup box asking "are you sure?" before the link will go. (If the user hits cancel, nothing happens.)</p> <p>We've got a solution that works, but somehow we're a web app shop ...
[ { "answer_id": 266347, "author": "Electrons_Ahoy", "author_id": 19074, "author_profile": "https://Stackoverflow.com/users/19074", "pm_score": 3, "selected": false, "text": "<a href=\"#\" onClick=\"goThere(); return false;\">Go to new page</a>`\n\nfunction goThere() \n{ \n if( confirm(\...
2008/11/05
[ "https://Stackoverflow.com/questions/266327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19074/" ]
266,332
<p>I have a <strong>MS Access</strong> form with a <strong>Datasheet</strong> subform.<br> Using code, I change the <strong>ColumnHidden</strong> property of various of its columns. But, when I close the form, I'm asked whether to save the table layout of the Datasheet's table.</p> <ul> <li>How can I stop the form fro...
[ { "answer_id": 271263, "author": "David-W-Fenton", "author_id": 9787, "author_profile": "https://Stackoverflow.com/users/9787", "pm_score": 0, "selected": false, "text": " DoCmd.Close acForm, Me.Name, acSaveNo\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15884/" ]
266,357
<p>I have been trying to tokenize a string using SPACE as delimiter but it doesn't work. Does any one have suggestion on why it doesn't work?</p> <p>Edit: tokenizing using:</p> <pre><code>strtok(string, " "); </code></pre> <p>The code is like the following</p> <pre><code>pch = strtok (str," "); while (pch != NULL) ...
[ { "answer_id": 266405, "author": "gbjbaanb", "author_id": 13744, "author_profile": "https://Stackoverflow.com/users/13744", "pm_score": 6, "selected": false, "text": "char s[256];\nstrcpy(s, \"one two three\");\nchar* token = strtok(s, \" \");\nwhile (token) {\n printf(\"token: %s\\n\...
2008/11/05
[ "https://Stackoverflow.com/questions/266357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382480/" ]
266,364
<p>I've got a DB table where we store a lot of MD5 hashes (and yes I know that they aren't 100% unique...) where we have a lot of comparison queries against those strings. This table can become quite large with over 5M rows.</p> <p>My question is this: Is it wise to keep the data as hexadecimal strings or should I con...
[ { "answer_id": 266405, "author": "gbjbaanb", "author_id": 13744, "author_profile": "https://Stackoverflow.com/users/13744", "pm_score": 6, "selected": false, "text": "char s[256];\nstrcpy(s, \"one two three\");\nchar* token = strtok(s, \" \");\nwhile (token) {\n printf(\"token: %s\\n\...
2008/11/05
[ "https://Stackoverflow.com/questions/266364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,370
<p>I'd like to write some unit tests for some code that connects to a database, runs one or more queries, and then processes the results. (Without actually using a database)</p> <p>Another developer here wrote our own DataSource, Connection, Statement, PreparedStatement, and ResultSet implementation that will return t...
[ { "answer_id": 274752, "author": "P Arrayah", "author_id": 33459, "author_profile": "https://Stackoverflow.com/users/33459", "pm_score": 1, "selected": false, "text": "DBUtils.getMetadataFor(String tablename)" }, { "answer_id": 20901399, "author": "Paweł Prażak", "author_...
2008/11/05
[ "https://Stackoverflow.com/questions/266370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310/" ]
266,371
<p>In VIM in command line mode a "%" denotes the current file, "cword" denotes the current word under the cursor. I want to create a shortcut where I need the current line number. What is the symbol which denotes this?</p>
[ { "answer_id": 266386, "author": "WMR", "author_id": 2844, "author_profile": "https://Stackoverflow.com/users/2844", "pm_score": 4, "selected": false, "text": ":1,.s/foo/bar/g foo bar :!echo . % # :he cmdline-special" }, { "answer_id": 267827, "author": "Oli", "author_id"...
2008/11/05
[ "https://Stackoverflow.com/questions/266371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29653/" ]
266,372
<p>For a rigorous marker of the source database state, I'd like to capture the @@DBTS of an external database in a sproc. Yeah, I think I could issue </p> <blockquote> <code> <br/>USE ExternalDB <br/>GO <br/> <br/>SELECT @myVarbinary8 = @@DBTS <br/>GO <br/> <br/>USE OriginalDB <br/>GO </code> </blockquote> <p>but, e...
[ { "answer_id": 267396, "author": "6eorge Jetson", "author_id": 23422, "author_profile": "https://Stackoverflow.com/users/23422", "pm_score": 0, "selected": false, "text": "\nDECLARE @sourceDbName nvarchar(128)\nSET     @sourceDbName = N'sbaportia1'\n\nDECLARE @strQuery nvarchar(...
2008/11/05
[ "https://Stackoverflow.com/questions/266372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23422/" ]
266,373
<p>If something is making a single-thread program take, say, 10 times as long as it should, you could run a profiler on it. You could also just halt it with a "pause" button, and you'll see exactly what it's doing. </p> <p>Even if it's only 10% slower than it should be, if you halt it more times, before long you'll se...
[ { "answer_id": 8290367, "author": "Crashworks", "author_id": 53543, "author_profile": "https://Stackoverflow.com/users/53543", "pm_score": 4, "selected": false, "text": "malloc stricmp" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23771/" ]
266,389
<p>What's the easiest programmatic way to restart a service on a remote Windows system? Language or method doesn't matter as long as it doesn't require human interaction.</p>
[ { "answer_id": 266423, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 8, "selected": true, "text": "sc.exe psservice.exe" }, { "answer_id": 266434, "author": "dkretz", "author_id": 31641, "author_profile...
2008/11/05
[ "https://Stackoverflow.com/questions/266389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,395
<p>I have a git repository which tracks an svn repository. I cloned it using <code>--stdlayout</code>.</p> <p>I created a new local branch via <code>git checkout -b foobar</code></p> <p>Now I want this branch to end up in <code>…/branches/foobar</code> in the svn repository.</p> <p>How do I go about that?</p> <p>(s...
[ { "answer_id": 266561, "author": "kch", "author_id": 13989, "author_profile": "https://Stackoverflow.com/users/13989", "pm_score": 7, "selected": true, "text": "git svn branch" }, { "answer_id": 1911069, "author": "Jesper Rønn-Jensen", "author_id": 109305, "author_pro...
2008/11/05
[ "https://Stackoverflow.com/questions/266395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13989/" ]
266,409
<p>I've got a WAR file that I need to add two files to. Currently, I'm doing this:</p> <pre><code>File war = new File(DIRECTORY, "server.war"); JarOutputStream zos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(war))); //Add file 1 File file = new File(DIRECTORY, "file1.jar"); InputStream is = ne...
[ { "answer_id": 266469, "author": "hark", "author_id": 34826, "author_profile": "https://Stackoverflow.com/users/34826", "pm_score": 3, "selected": false, "text": "JarOutputStream zos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(war, True)));\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4893/" ]
266,417
<p>We are in a Windows environment and looking to automate this process for non-company machines. If a vendor comes on site, we'd like to be able to have him/her hit a website that can perform a quick scan of the workstation to determine if they have the proper MS KB patches and if their virus scanner dats are up to d...
[ { "answer_id": 392605, "author": "Hernán", "author_id": 48026, "author_profile": "https://Stackoverflow.com/users/48026", "pm_score": 3, "selected": true, "text": " Set oWMI = GetObject\n(\"winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\SecurityCenter\") \n Set colItems ...
2008/11/05
[ "https://Stackoverflow.com/questions/266417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11130/" ]
266,431
<p>I used to use the standard mysql_connect(), mysql_query(), etc statements for doing MySQL stuff from PHP. Lately I've been switching over to using the wonderful MDB2 class. Along with it, I'm using prepared statements, so I don't have to worry about escaping my input and SQL injection attacks.</p> <p>However, there...
[ { "answer_id": 266464, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 0, "selected": false, "text": "\"\"" }, { "answer_id": 266512, "author": "Powerlord", "author_id": 15880, "author_profile": "https://Sta...
2008/11/05
[ "https://Stackoverflow.com/questions/266431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14569/" ]
266,433
<p>So... I used to think that when you accessed a file but specified the name without a path (CAISLog.csv in my case) that .NET would expect the file to reside at the same path as the running .exe. </p> <p>This works when I'm stepping through a solution (C# .NET2.* VS2K5) but when I run the app in normal mode (Star...
[ { "answer_id": 266473, "author": "Rob Prouse", "author_id": 30827, "author_profile": "https://Stackoverflow.com/users/30827", "pm_score": 3, "selected": false, "text": "Assembly ass = Assembly.GetEntryAssembly();\nstring dir = Path.GetDirectoryName(ass.Location);\nstring filename = Path....
2008/11/05
[ "https://Stackoverflow.com/questions/266433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30901/" ]
266,448
<p>How would I format the standard RSS pubDate string as something closer to ASP.NET's DateTime?</p> <p>So, from this:</p> <p>Wed, 29 Oct 2008 14:14:48 +0000</p> <p>to this:</p> <p>10/29/2008 2:14 PM</p>
[ { "answer_id": 266470, "author": "AaronS", "author_id": 26932, "author_profile": "https://Stackoverflow.com/users/26932", "pm_score": 3, "selected": true, "text": "string orig = \"Wed, 29 Oct 2008 14:14:48 +0000\";\nstring newstring = String.Format(\"{0:MM/dd/yyyy hh:mm tt}\", DateTime.P...
2008/11/05
[ "https://Stackoverflow.com/questions/266448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4241/" ]
266,457
<p>I have a linq query and I am trying to put that in to a serializable object for a distributed caching (Velocity) but its failing due to a LINQ-to-SQL lazy list</p> <p>like so</p> <pre><code> return from b in _datacontext.MemberBlogs let cats = GetBlogCategories(b.MemberBlogID) ...
[ { "answer_id": 266541, "author": "Duncan", "author_id": 25035, "author_profile": "https://Stackoverflow.com/users/25035", "pm_score": 4, "selected": true, "text": "(from x select new MemberBlogs).ToList()\n" }, { "answer_id": 266547, "author": "Chris Shaffer", "author_id"...
2008/11/05
[ "https://Stackoverflow.com/questions/266457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22093/" ]
266,486
<p>I am trying to write out a png file from a java.awt.image.BufferedImage. Everything works fine but the resulting png is a 32-bit file.</p> <p>Is there a way to make the png file be 8-bit? The image is grayscale, but I do need transparency as this is an overlay image. I am using java 6, and I would prefer to retu...
[ { "answer_id": 267316, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 1, "selected": false, "text": "public class ImageUtil\n{\n public static int ALPHA_BIT_MASK = 0xFF000000;\n\n public static BufferedImage imageToBuffere...
2008/11/05
[ "https://Stackoverflow.com/questions/266486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,491
<p>I have a lot of buttons and by clicking on different button, different image and text would appear. I can achieve what I want, but the code is just so long and it seems very repetitive. For example:</p> <pre><code> var aaClick = false; $("aa").observe('click', function() { unclick(); $('charac...
[ { "answer_id": 266515, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "$(container).childElements().each(function(element) {\n $(element).observe('click', function () { … });\n …\n})...
2008/11/05
[ "https://Stackoverflow.com/questions/266491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34797/" ]
266,501
<p>Is there a way to define a macro that contains a <code>#include</code> directive in its body?</p> <p>If I just put the "<code>#include</code>", it gives the error</p> <pre><code>C2162: "expected macro formal parameter" </code></pre> <p>since here I am not using <code>#</code> to concatenate strings.<br> If I use ...
[ { "answer_id": 266580, "author": "HanClinto", "author_id": 26933, "author_profile": "https://Stackoverflow.com/users/26933", "pm_score": -1, "selected": false, "text": "#include \"standardAppDefs.h\"\n#myStandardIncludeMacro\n #define myStandardIncludeMacro #include <foo.h>\n #include \"...
2008/11/05
[ "https://Stackoverflow.com/questions/266501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34829/" ]
266,506
<p>Using a standard ASP.NET ListView with a LinqDataSource and pagination enabled (with a DataPager), what would be the best way to default to displaying the last page of results?</p>
[ { "answer_id": 266580, "author": "HanClinto", "author_id": 26933, "author_profile": "https://Stackoverflow.com/users/26933", "pm_score": -1, "selected": false, "text": "#include \"standardAppDefs.h\"\n#myStandardIncludeMacro\n #define myStandardIncludeMacro #include <foo.h>\n #include \"...
2008/11/05
[ "https://Stackoverflow.com/questions/266506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9433/" ]
266,507
<p>I'm using linq to pull back an object (i.e. customer) that might have a collection of other objects(customer.orders). I would be nice if I can pass this list of customers to the ultragrid and a hierarchical view of customers and thier orders displayed on databind. When I try this, I just get customers. Anyone kno...
[ { "answer_id": 272436, "author": "Bless Yahu", "author_id": 32120, "author_profile": "https://Stackoverflow.com/users/32120", "pm_score": 4, "selected": true, "text": "IList<T> DisplayLayout.ViewStyle = ViewStyle.MultiBand" }, { "answer_id": 3055563, "author":...
2008/11/05
[ "https://Stackoverflow.com/questions/266507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32120/" ]
266,523
<p>Are there any drawbacks to using the STL or templates. Are there any situations for which they are inappropriate.</p>
[ { "answer_id": 267412, "author": "ididak", "author_id": 28888, "author_profile": "https://Stackoverflow.com/users/28888", "pm_score": 1, "selected": false, "text": "hash_map tr1/unordered_map" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
266,549
<p>Using MEF I want to do the following.</p> <p>I have a WPF Shell. To the shell I want to Import from another DLL a UserControl that is also a View of my MVP triad. The way the MVP triad works, is that in presenter I have a constructor that takes both IModel and IView and wires them up. So, in order for this to work,...
[ { "answer_id": 285744, "author": "Glenn Block", "author_id": 18419, "author_profile": "https://Stackoverflow.com/users/18419", "pm_score": 3, "selected": true, "text": " 1: using System.ComponentModel.Composition;\n 2: using System.Reflection;\n 3: using Microsoft.VisualStudio.Test...
2008/11/05
[ "https://Stackoverflow.com/questions/266549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13163/" ]
266,570
<p>Is there any performance difference between the for loops on a primitive array? </p> <p>Assume:</p> <pre><code>double[] doubleArray = new double[300000]; for (double var: doubleArray) someComplexCalculation(var); </code></pre> <p>or :</p> <pre><code>for ( int i = 0, y = doubleArray.length; i &lt; y; i++) ...
[ { "answer_id": 266727, "author": "erickson", "author_id": 3474, "author_profile": "https://Stackoverflow.com/users/3474", "pm_score": 4, "selected": true, "text": "1: double[] tmp = doubleArray;\n2: for (int i = 0, y = tmp.length; i < y; i++) {\n3: double var = tmp[i];\n4: someComple...
2008/11/05
[ "https://Stackoverflow.com/questions/266570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9774/" ]
266,578
<p>I really like the Flex framework, however I routinely deal with SWF files that are ~ 500KB. </p> <p>I don't know at what point a file considered to be "too big" to be served on the internet, but I would assume that a 500KB download just to use a web application would certainly annoy some users.</p> <p>Are there an...
[ { "answer_id": 266613, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 1, "selected": false, "text": "URLRequest" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638/" ]
266,586
<p>I am coding in ColdFusion, but trying to stay in cfscript, so I have a function that allows me to pass in a query to run it with <code> &lt;cfquery blah > #query# &lt;/cfquery> </code></p> <p>Somehow though, when I construct my queries with <code>sql = "SELECT * FROM a WHERE b='#c#'"</code> and pass it in, Cold...
[ { "answer_id": 266680, "author": "ale", "author_id": 21960, "author_profile": "https://Stackoverflow.com/users/21960", "pm_score": 4, "selected": false, "text": "<cfquery> PreserveSingleQuotes() <cfquery ...>#PreserveSingleQuotes(query)#</cfquery>\n <cfqueryparam> <cfqueryparam>" }, ...
2008/11/05
[ "https://Stackoverflow.com/questions/266586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
266,601
<p>My spring-context file is shown below.</p> <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jms="http://www....
[ { "answer_id": 266627, "author": "Mike Pone", "author_id": 16404, "author_profile": "https://Stackoverflow.com/users/16404", "pm_score": 0, "selected": false, "text": "<beans> </beans>" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23249/" ]
266,606
<p>I'm running an application (web service) in tomcat with TLS enabled (with certificates both for the client and the server).</p> <p>I want that my application will be able to send audit message (logging) when TLS handshake fails. For example I want to log when:</p> <ul> <li>the client certificate is expired,</li> <...
[ { "answer_id": 266650, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "javax.net.ssl.SSLHandshakeException" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20065/" ]
266,621
<p>I'm consuming an axis 1.4 web service that returns soap responses that I want to unmarshal into my domain objects using jaxb annotations. My initial tests worked very well until some of the returned messages had multiRef elements. Objects that were marshalled using multiRef were showing up as null in my client side...
[ { "answer_id": 444582, "author": "martsraits", "author_id": 55036, "author_profile": "https://Stackoverflow.com/users/55036", "pm_score": 0, "selected": false, "text": "org.apache.axis.AxisEngine.PROP_DOMULTIREFS" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32825/" ]
266,639
<p>What is the best tool / practice to enable browser history for Flash (or AJAX) websites? I guess the established practice is to set and read a hash-addition to the URL like</p> <pre><code>http://example.com/#id=1 </code></pre> <p>I am aware of the Flex History Manager, but was wondering if there are any good alter...
[ { "answer_id": 405704, "author": "nakajima", "author_id": 39589, "author_profile": "https://Stackoverflow.com/users/39589", "pm_score": 0, "selected": false, "text": "(function() {\n var oldHash, newHash;\n\n function checkHash() {\n // Grab the hash\n newHash = document.location...
2008/11/05
[ "https://Stackoverflow.com/questions/266639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23069/" ]
266,648
<p>How can I check if a file uploaded by a user is a real jpg file in Python (Google App Engine)?</p> <p>This is how far I got by now:</p> <p>Script receives image via HTML Form Post and is processed by the following code</p> <pre><code>... incomming_image = self.request.get("img") image = db.Blob(incomming_image) ....
[ { "answer_id": 266731, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 6, "selected": true, "text": "Start Marker | JFIF Marker | Header Length | Identifier\n0xff, 0xd8 | 0xff, 0xe0 | 2-bytes | \"JFIF\\0\"\n def is_jp...
2008/11/05
[ "https://Stackoverflow.com/questions/266648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26763/" ]
266,652
<p>We are trying to build a Crystal Report that sends control characters directly to the printer, without going through the (buggy) Windows driver for that printer. Does anyone know a way to do this from within a Crystal Report? </p> <p>The specific control character we are trying to send is CHR(2). However when we pu...
[ { "answer_id": 266731, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 6, "selected": true, "text": "Start Marker | JFIF Marker | Header Length | Identifier\n0xff, 0xd8 | 0xff, 0xe0 | 2-bytes | \"JFIF\\0\"\n def is_jp...
2008/11/05
[ "https://Stackoverflow.com/questions/266652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20068/" ]
266,665
<p>I'm learning C++ and writing little programs as I go along. The following is one such program:</p> <pre><code>// This program is intended to take any integer and convert to the // corresponding signed char. #include &lt;iostream&gt; int main() { signed char sch = 0; int n = 0; while(true){ std::cin &gt...
[ { "answer_id": 266703, "author": "Evan Teran", "author_id": 13430, "author_profile": "https://Stackoverflow.com/users/13430", "pm_score": 5, "selected": true, "text": "cin #include <iostream>\n\nint main()\n{\n signed char sch = 0;\n int n = 0;\n while(std::cin >> n){\n sch = n;\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/266665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32944/" ]
266,681
<p>I just realized that in some place in my code I have the return statement inside the lock and sometime outside. Which one is the best?</p> <p>1)</p> <pre><code>void example() { lock (mutex) { //... } return myData; } </code></pre> <p>2)</p> <pre><code>void example() { lock (mutex) { ...
[ { "answer_id": 266685, "author": "Greg Beech", "author_id": 13552, "author_profile": "https://Stackoverflow.com/users/13552", "pm_score": 5, "selected": false, "text": "T myData;\nMonitor.Enter(mutex)\ntry\n{\n myData= // something\n}\nfinally\n{\n Monitor.Exit(mutex);\n}\n\nreturn...
2008/11/05
[ "https://Stackoverflow.com/questions/266681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
266,688
<p>As many do I have a config.php file in the root of a web app that I want to include in almost every other php file. So most of them have a line like:</p> <pre><code>require_once("config.php"); </code></pre> <p>or sometimes</p> <pre><code>require_once("../config.php"); </code></pre> <p>or even</p> <pre><code>re...
[ { "answer_id": 266730, "author": "bobwienholt", "author_id": 24257, "author_profile": "https://Stackoverflow.com/users/24257", "pm_score": 4, "selected": false, "text": "require_once(dirname(__FILE__).\"/../_include/header.inc\");\n" }, { "answer_id": 266749, "author": "Kent ...
2008/11/05
[ "https://Stackoverflow.com/questions/266688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28565/" ]
266,693
<p>I'd like to remove all "unchecked" warnings from this general utility method (part of a larger class with a number of similar methods). In a pinch, I can use @SuppressWarnings("unchecked") but I'm wondering if I can use generics properly to avoid the warning.</p> <p>The method is intended to be allow callers to c...
[ { "answer_id": 266741, "author": "jfpoilpret", "author_id": 1440720, "author_profile": "https://Stackoverflow.com/users/1440720", "pm_score": -1, "selected": false, "text": "public static <T> int compareObject(Comparable<T> o1, Comparable<T> o2)\n{\n if ((o1 instanceof String) && (o2 ...
2008/11/05
[ "https://Stackoverflow.com/questions/266693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32978/" ]
266,697
<p>I have a stored procedure that has a optional parameter, <code>@UserID VARCHAR(50)</code>. The thing is, there are two ways to work with it:</p> <ol> <li>Give it a default value of <code>NULL</code>, the have an <code>IF...ELSE</code> clause, that performs two different <code>SELECT</code> queries, one with <code>'...
[ { "answer_id": 266717, "author": "Matt Rogish", "author_id": 2590, "author_profile": "https://Stackoverflow.com/users/2590", "pm_score": 3, "selected": false, "text": "WHERE ( @UserID IS NULL OR UserID = @UserID )\n" }, { "answer_id": 266728, "author": "Greg Beech", "auth...
2008/11/05
[ "https://Stackoverflow.com/questions/266697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8363/" ]
266,704
<p>Is there any way in JavaScript to create a &quot;weak reference&quot; to another object? <a href="http://en.wikipedia.org/wiki/Weak_reference" rel="nofollow noreferrer">Here is the wiki page describing what a weak reference is.</a> <a href="https://community.oracle.com/blogs/enicholas/2006/05/04/understanding-weak-r...
[ { "answer_id": 266892, "author": "bobince", "author_id": 18936, "author_profile": "https://Stackoverflow.com/users/18936", "pm_score": 6, "selected": true, "text": "WeakRef" }, { "answer_id": 42119578, "author": "Markus", "author_id": 1826075, "author_profile": "https...
2008/11/05
[ "https://Stackoverflow.com/questions/266704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21317/" ]
266,716
<p>Is there a way to select which TestMethods you want to execute in Visual Studio 2008 Unit Test project while debugging? I want to debug one particular test without having my other TestMethods execute during each debug session.</p>
[ { "answer_id": 1999464, "author": "peSHIr", "author_id": 50846, "author_profile": "https://Stackoverflow.com/users/50846", "pm_score": 0, "selected": false, "text": "Test Windows Test List Editor" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/266716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26327/" ]
266,719
<p>I've seen a lot of discussion on URL Routing, and LOTS of great suggestions... but in the real world, one thing I haven't seen discussed are: </p> <ol> <li>Creating Friendly URLs <strong>with Spaces and illegal characters</strong> </li> <li>Querying the DB</li> </ol> <p>Say you're building a Medical site, which ha...
[ { "answer_id": 266834, "author": "bobince", "author_id": 18936, "author_profile": "https://Stackoverflow.com/users/18936", "pm_score": 1, "selected": false, "text": "http://www.example.com/x/category-name/subcat-name/article-name/348254863\n" }, { "answer_id": 266898, "author...
2008/11/05
[ "https://Stackoverflow.com/questions/266719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26931/" ]
266,761
<p>I'm pivoting data in MS SQL stored procedure. Columns which are pivoted are dynamically created using stored procedure parameter (for exampe: "location1,location2,location3,") so number of columns which will be generated is not known. Output should look like (where locations are taken from stored procedure parameter...
[ { "answer_id": 266860, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 0, "selected": false, "text": "SELECT ES.Location, DateAdd(dd, DateDiff(dd, 0, ES.OrderTime), 0),ES.Charge\nFROM dbo.log_sales ES\n public class LogSale\n{\n...
2008/11/05
[ "https://Stackoverflow.com/questions/266761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23280/" ]
266,771
<p>I'm trying to figure out a way to detect files that are not opened for editing but have nevertheless been modified locally. <code>p4 fstat</code> returns a value <code>headModTime</code> for any given file, but this is the change time in the depot, which should not be equal to the filesystem's <code>stat</code> last...
[ { "answer_id": 266813, "author": "grieve", "author_id": 34329, "author_profile": "https://Stackoverflow.com/users/34329", "pm_score": 6, "selected": true, "text": "p4 diff -se //myclient/... | p4 -x - edit\n" }, { "answer_id": 1013591, "author": "Cristian Diaconescu", "au...
2008/11/05
[ "https://Stackoverflow.com/questions/266771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594/" ]
266,776
<p>We have some methods that call File.Copy, File.Delete, File.Exists, etc. How can we test these methods without actually hitting the file system?</p> <p>I consider myself a unit testing n00b, so any advice is appreciated.</p>
[ { "answer_id": 266804, "author": "yfeldblum", "author_id": 12349, "author_profile": "https://Stackoverflow.com/users/12349", "pm_score": 6, "selected": true, "text": "public interface IFile {\n void Copy(string source, string dest);\n void Delete(string fn);\n bool Exists(string...
2008/11/05
[ "https://Stackoverflow.com/questions/266776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
266,777
<p>As a web developer, a number of the projects I work on fall under government umbrellas and hence are subject to <a href="http://www.section508.gov/" rel="noreferrer">508 Accessibility</a> laws, and sometimes <a href="http://www.w3.org/TR/WCAG/" rel="noreferrer">W3C accessibility</a> guidelines. To what extent can Ja...
[ { "answer_id": 266833, "author": "danpickett", "author_id": 21788, "author_profile": "https://Stackoverflow.com/users/21788", "pm_score": 2, "selected": false, "text": "<script>\n $(\"#hello\").click(function(){\n alert(\"Hi\");\n });\n</script>\n<a href=\"/say_hello.htm\" id=\"hell...
2008/11/05
[ "https://Stackoverflow.com/questions/266777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20770/" ]
266,794
<p>I'm trying to submit a form with javascript. Firefox works fine but IE complains that "Object doesn't support this property or method" on the submit line of this function:</p> <pre><code>function submitPGV(formName, action) { var gvString = ""; pgVisibilities.each(function(pair) { gvString += pair....
[ { "answer_id": 266822, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 0, "selected": false, "text": "alert($('ProductGroupVisibility').id)\n" }, { "answer_id": 266866, "author": "Brian", "...
2008/11/05
[ "https://Stackoverflow.com/questions/266794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34859/" ]
266,800
<p>I have a C# class the returns a List, using System.Collections.Generic Lists not F# List</p> <p>I want to iterate though the list to find a object or not find it. Here is how I would do it in C#. How would I accomplish the similar thing in F#</p> <pre><code>foreach (AperioCaseObj caseObj in CaseList) { if (...
[ { "answer_id": 267047, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 3, "selected": true, "text": "#light\nopen System.Collections.Generic\n\nlet genList = new List<int>()\n\ngenList.Add(1)\ngenList.Add(2)\ngenL...
2008/11/05
[ "https://Stackoverflow.com/questions/266800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/72123/" ]