qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
356,294
<p>Say you have a class who's job it is to connect to a remote server. I want to abstract this class to provide two versions, one that connects through UDP and the other through TCP. I want to build the leanest runtime code possible and instead of using polymorphism I am considering templates. Here is what I'm envision...
[ { "answer_id": 356318, "author": "Edouard A.", "author_id": 41363, "author_profile": "https://Stackoverflow.com/users/41363", "pm_score": 2, "selected": false, "text": "template <typename Underlying>\nclass Transmit\n{\npublic:\n void send(...)\n {\n _U.send(...)\n };\n\npriva...
2008/12/10
[ "https://Stackoverflow.com/questions/356294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44996/" ]
356,297
<p>I've read a lot of comments mention in passing that the BlackBerry threading model deviates from the Java standard and can cause issues, but no amount of googling has enlightened me on what this means exactly.</p> <p>I've been developing a fairly large business application for the BlackBerry and, although I don't r...
[ { "answer_id": 807729, "author": "kozen", "author_id": 98649, "author_profile": "https://Stackoverflow.com/users/98649", "pm_score": 4, "selected": false, "text": "LabelField.setText(\"foo\");" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270/" ]
356,298
<p>I am using GWT (Google Web Toolkit) 1.5.3 et GXT (ExtJS) 1.2 I just want to create a simple form with some radio buttons generated after a RPC call, to get some values</p> <p>Code:</p> <pre><code>final FormPanel simple = new FormPanel(); simple.setFrame(true); simple.setWidth(350); simple.s...
[ { "answer_id": 1687944, "author": "user204877", "author_id": 204877, "author_profile": "https://Stackoverflow.com/users/204877", "pm_score": 0, "selected": false, "text": "radio.setAttributeValue()" }, { "answer_id": 5900218, "author": "juanm", "author_id": 740231, "a...
2008/12/10
[ "https://Stackoverflow.com/questions/356298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18714/" ]
356,321
<p>I'm about to be forced to write a script to download some number of files under Windows XP. The machines the script will be run at are all behind a proxy, and the proxy settings are entered into the IE configuration.</p> <p>What came to my mind was either to somehow call IE from the command line, and using its conf...
[ { "answer_id": 1687944, "author": "user204877", "author_id": 204877, "author_profile": "https://Stackoverflow.com/users/204877", "pm_score": 0, "selected": false, "text": "radio.setAttributeValue()" }, { "answer_id": 5900218, "author": "juanm", "author_id": 740231, "a...
2008/12/10
[ "https://Stackoverflow.com/questions/356321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4172/" ]
356,323
<p>I want to add all the files in the current directory to git:</p> <pre><code>git add . error: open(".mysql_history"): Permission denied fatal: unable to index file .mysql_history </code></pre> <p>That's fine. That file happens to be in this directory and owned by root. I want to add all <em>other</em> files. Is th...
[ { "answer_id": 356333, "author": "mipadi", "author_id": 28804, "author_profile": "https://Stackoverflow.com/users/28804", "pm_score": 2, "selected": false, "text": ".mysql_history" }, { "answer_id": 359696, "author": "matli", "author_id": 23896, "author_profile": "htt...
2008/12/10
[ "https://Stackoverflow.com/questions/356323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8611/" ]
356,330
<p>I'm currently using msbuild for a solution of over 600 projects. </p> <p>Imagine I change the code for 1 library that is used by 10 projects. Instead of providing all 600 projects to msbuild and let it compile all of them and figure out the dependencys. I was wondering if there was a program or library I could u...
[ { "answer_id": 356513, "author": "Alberto Sciessere", "author_id": 43500, "author_profile": "https://Stackoverflow.com/users/43500", "pm_score": 4, "selected": true, "text": "digraph G { \n size=\"100,69\"\n center=\"\"\n ratio=All\n node[width=.25,hight=.375,fontsize...
2008/12/10
[ "https://Stackoverflow.com/questions/356330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45005/" ]
356,336
<p>A few years ago I worked on a system where a numeric primary key was stored in a [SQL Server] varchar column, so I quickly came unstuck when querying with a BETWEEN operator:</p> <pre><code>SELECT ID FROM MyTable WHERE ID BETWEEN 100 AND 110; </code></pre> <p>Results:</p> <pre><code>100 102 103 109 110 11 </code>...
[ { "answer_id": 356349, "author": "RB.", "author_id": 15393, "author_profile": "https://Stackoverflow.com/users/15393", "pm_score": 3, "selected": false, "text": "WHERE CAST(ID as int) BETWEEN iStartValue AND iEndValue\n" }, { "answer_id": 356359, "author": "Vincent Ramdhanie"...
2008/12/10
[ "https://Stackoverflow.com/questions/356336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6898/" ]
356,337
<p>I have a Perl script that sets up variables near the top for directories and files that it will use. It also requires a few variables to be set as command-line arguments. Example:</p> <pre><code>use Getopt::Long; my ($mount_point, $sub_dir, $database_name, $database_schema); # Populate variables from the command ...
[ { "answer_id": 356442, "author": "Paul Tomblin", "author_id": 3333, "author_profile": "https://Stackoverflow.com/users/3333", "pm_score": 2, "selected": false, "text": "input_directory" }, { "answer_id": 356592, "author": "xdg", "author_id": 11800, "author_profile": "...
2008/12/10
[ "https://Stackoverflow.com/questions/356337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40619/" ]
356,340
<p>I am looking for a regex statement that will let me extract the HTML content from just between the body tags from a XHTML document.</p> <p>The XHTML that I need to parse will be very simple files, I do not have to worry about JavaScript content or <code>&lt;![CDATA[</code> tags, for example.</p> <p>Below is the ex...
[ { "answer_id": 356376, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 6, "selected": true, "text": "((?:.(?!<body[^>]*>))+.<body[^>]*>)|(</body\\>.+)\n" }, { "answer_id": 356380, "author": "Kev", "author_id": 167...
2008/12/10
[ "https://Stackoverflow.com/questions/356340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/506/" ]
356,347
<p>I'm writing a Greasemonkey script to connect two company-internal webpages. One is SSL, and the other is insecure and can only be accessed via a POST request. If I create a hidden form on the secure page and submit it via an <code>onclick()</code> in an <code>&lt;a&gt;</code>, it works fine, but FF gives a warning...
[ { "answer_id": 358751, "author": "Athena", "author_id": 17846, "author_profile": "https://Stackoverflow.com/users/17846", "pm_score": 2, "selected": false, "text": "GM_xmlhttpRequest({\n method: 'POST',\n url: 'http://your.insecure.site.here',\n onload: function(details) {\n\n //...
2008/12/10
[ "https://Stackoverflow.com/questions/356347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,371
<p>I was wondering what I could do to improve the performance of Excel automation, as it can be quite slow if you have a lot going on in the worksheet...</p> <p>Here's a few I found myself:</p> <ul> <li><p><code>ExcelApp.ScreenUpdating = false</code> -- turn off the redrawing of the screen</p></li> <li><p><code>Excel...
[ { "answer_id": 356399, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 3, "selected": false, "text": "find" }, { "answer_id": 369283, "author": "Jon Fournier", "author_id": 5106, "author_profile": "https://S...
2008/12/10
[ "https://Stackoverflow.com/questions/356371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39259/" ]
356,373
<p>Assuming following definition:</p> <pre><code>/// &lt;summary&gt; /// Replaces each occurrence of sPattern in sInput with sReplace. This is done /// with the CLR: /// new RegEx(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace). /// The result of the replacement is the return value. /// &lt;/summary&gt;...
[ { "answer_id": 356383, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 6, "selected": true, "text": "/// <summary>\n/// Replaces each occurrence of sPattern in sInput with sReplace. This is done \n/// with the CLR: \n/// ...
2008/12/10
[ "https://Stackoverflow.com/questions/356373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2260/" ]
356,382
<p>Example: an Order object (aggregate root) has a collection of OrderLine objects (child entities). What's the URL add an OrderLine to an Order? Take into consideration the difference between using the aggregate roots' controller and having a separate controller for the child entity.</p> <p>1: <a href="http://example...
[ { "answer_id": 356383, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 6, "selected": true, "text": "/// <summary>\n/// Replaces each occurrence of sPattern in sInput with sReplace. This is done \n/// with the CLR: \n/// ...
2008/12/10
[ "https://Stackoverflow.com/questions/356382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4830/" ]
356,390
<p>I have a div with two nested divs inside, the (float:left) one is the menu bar, and the right (float:right) should display whatever content the page has, it works fine when the window is at a maximum, but when i resize it the content is collapsed until it can no longer has any space, at which it is forced to be disp...
[ { "answer_id": 356400, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 1, "selected": false, "text": "width" }, { "answer_id": 356425, "author": "bezmax", "author_id": 43677, "author_profile": "https://Stacko...
2008/12/10
[ "https://Stackoverflow.com/questions/356390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45016/" ]
356,411
<p>I have a stack panel inside of an expander panel that I programaticaly adds check boxes to. Currently the exanpander stops at the bottom of the form, but the stack panel keeps growing. I would like the stack panel to be bounded by the expander and scroll to display the check boxes. Do I need house the check boxes...
[ { "answer_id": 356457, "author": "Guy Starbuck", "author_id": 2194, "author_profile": "https://Stackoverflow.com/users/2194", "pm_score": 5, "selected": true, "text": " <Grid> \n <Expander Header=\"Expander1\" Margin=\"0,0,0,2\" Name=\"Expander1\" VerticalAlignment=\"Top\" Backgrou...
2008/12/10
[ "https://Stackoverflow.com/questions/356411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38349/" ]
356,418
<p>With SMO objects using Server.JobServer.jobs to get a list of jobs, I can find the status of each job. For those that are currently executing I would like to find the SPID it is executing on. I can also get a list of the server's processes using Server.EnumProcesses(). This gives me a list of currently active SPID...
[ { "answer_id": 356457, "author": "Guy Starbuck", "author_id": 2194, "author_profile": "https://Stackoverflow.com/users/2194", "pm_score": 5, "selected": true, "text": " <Grid> \n <Expander Header=\"Expander1\" Margin=\"0,0,0,2\" Name=\"Expander1\" VerticalAlignment=\"Top\" Backgrou...
2008/12/10
[ "https://Stackoverflow.com/questions/356418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854/" ]
356,437
<p>I'm trying to create a jsp tag file but it fails to compile when I try to use <code>pageContext.getServletConfig().getInitParameter("myInitParam")</code></p> <p>I'm using tomcat and when I try to view a page including the file I get a jasper compile error pageContext cannot be resolved. I've also tried just using <...
[ { "answer_id": 356472, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "getInitParameter(\"myInitParam\");\n" }, { "answer_id": 356479, "author": "matt b", "author_id": 4249, "...
2008/12/10
[ "https://Stackoverflow.com/questions/356437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45023/" ]
356,460
<p>I'm trying to create a LINQ to SQL class that represents the "latest" version of itself.</p> <p>Right now, the table that this entity represents has a single auto-incrementing ID, and I was thinking that I would add a version number to the primary key. I've never done anything like this, so I'm not sure how to proc...
[ { "answer_id": 356917, "author": "Corbin March", "author_id": 7625, "author_profile": "https://Stackoverflow.com/users/7625", "pm_score": 4, "selected": true, "text": "CREATE TRIGGER tr_TheTrigger\nON [YourTable]\nFOR INSERT, UPDATE, DELETE \nAS\n IF EXISTS(SELECT * FROM inserted)\n ...
2008/12/10
[ "https://Stackoverflow.com/questions/356460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18866/" ]
356,464
<p>I am looking for a way to localize properties names displayed in a PropertyGrid. The property's name may be "overriden" using the DisplayNameAttribute attribute. Unfortunately attributes can not have non constant expressions. So I can not use strongly typed resources such as: </p> <pre><code>class Foo { [Display...
[ { "answer_id": 356493, "author": "configurator", "author_id": 9536, "author_profile": "https://Stackoverflow.com/users/9536", "pm_score": 1, "selected": false, "text": "Microsoft.VisualStudio.Modeling.Sdk.dll" }, { "answer_id": 356525, "author": "Marc Gravell", "author_id...
2008/12/10
[ "https://Stackoverflow.com/questions/356464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37706/" ]
356,465
<p>Each month I get new CMYK and RGB images that shall be used on the web.</p> <p>I had a script using a patched up ImageMagick doing this, but it got deleted. So I need to do it again, but it was hard last time.</p> <p>How do you <em>easily</em> and quickly convert CMYK image files to RGB?</p>
[ { "answer_id": 660407, "author": "davethegr8", "author_id": 12930, "author_profile": "https://Stackoverflow.com/users/12930", "pm_score": 1, "selected": false, "text": "convert CMYK.tiff -profile \"RGB.icc\" RGB.tiff\n" }, { "answer_id": 11482147, "author": "Kurt Pfeifle", ...
2008/12/10
[ "https://Stackoverflow.com/questions/356465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,480
<p>I want to extract 'James\, Brown' from the string below but I don't always know what the name will be. The comma is causing me some difficuly so what would you suggest to extract James\, Brown?</p> <p>OU=James\, Brown,OU=Test,DC=Internal,DC=Net</p> <p>Thanks</p>
[ { "answer_id": 356491, "author": "xan", "author_id": 15667, "author_profile": "https://Stackoverflow.com/users/15667", "pm_score": 0, "selected": false, "text": "string line = GetStringFromWherever();\n\nint start = line.IndexOf(\"=\") + 1;//+1 to get start of name\nint end = line.IndexO...
2008/12/10
[ "https://Stackoverflow.com/questions/356480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,484
<p>How do you even look at the web.config file? I don't know where to go to turn custom errors off...help! </p> <p>I tried command prompt and java script....can any one help me?</p>
[ { "answer_id": 356529, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": false, "text": "Off" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,502
<p>I often get a PDF from our designer (built in Adobe InDesign) which is supposed to be sent out to thousands of people.</p> <p>I've got the list with all the people, and it's easy doing a mail merge in OpenOffice.org. However, OpenOffice.org doesn't support the advanced PDF. I just want to output some text onto each...
[ { "answer_id": 356833, "author": "rhanekom", "author_id": 37605, "author_profile": "https://Stackoverflow.com/users/37605", "pm_score": 1, "selected": false, "text": "PdfContentByte cb= ...;\ncb.BeginText();\ncb.SetFontAndSize(font, fontSize);\nfloat x = ...;\nfloat y = ...;\ncb.SetTextM...
2008/12/10
[ "https://Stackoverflow.com/questions/356502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,506
<p>I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago</p> <p>vladimir 1tuga </p>
[ { "answer_id": 356702, "author": "Mick", "author_id": 12458, "author_profile": "https://Stackoverflow.com/users/12458", "pm_score": 3, "selected": false, "text": "while(GetMessage(&Msg, NULL, 0, 0) > 0)\n{\n TranslateMessage(&Msg);\n DispatchMessage(&Msg);\n}\n" }, { "answe...
2008/12/10
[ "https://Stackoverflow.com/questions/356506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,543
<p>I was just wondering how I could <em>automatically</em> increment the build (and version?) of my files using Visual Studio (2005). </p> <p>If I look up the properties of say <code>C:\Windows\notepad.exe</code>, the Version tab gives "File version: 5.1.2600.2180". I would like to get these cool numbers in the versio...
[ { "answer_id": 356555, "author": "Bob", "author_id": 45, "author_profile": "https://Stackoverflow.com/users/45", "pm_score": 4, "selected": false, "text": " System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();\n System.Reflection.AssemblyName assemblyN...
2008/12/10
[ "https://Stackoverflow.com/questions/356543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31765/" ]
356,547
<p>MS SQL Server 2000</p> <p>I have a column in Table A called Name. I wish to sort the Name field. Many but not all of the records for Name start will KL and are followed by a number (KL 1234, KL 2, KL 323, etc).</p> <h2>Table A</h2> <h2>Name</h2> <p>Able<br> Bravo<br> KL 2<br> KL 323<br> KL 1234<br> Zebra</p> <p...
[ { "answer_id": 356625, "author": "Charles Bretana", "author_id": 32632, "author_profile": "https://Stackoverflow.com/users/32632", "pm_score": 2, "selected": true, "text": "Order By \n Case When Left(name, 2) = 'KL' \n Then 'KL' + Replace(Str(Cast(replace(name, 'KL', '') as Big...
2008/12/10
[ "https://Stackoverflow.com/questions/356547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45042/" ]
356,548
<p>I am trying to respond back to a client with a PDF stored in a MSSQL varbinary(MAX) field. The response works on my localhost and a test server over http connection, but does not work on the production server over https connection. I am using just a simple BinaryWrite (code below).</p> <pre><code> byte[] display...
[ { "answer_id": 357031, "author": "Eddie", "author_id": 576, "author_profile": "https://Stackoverflow.com/users/576", "pm_score": 0, "selected": false, "text": "GET /displayFile.aspx?id=128 HTTP/1.1\nAccept: */*\nAccept-Language: en-us\nUA-CPU: x86\nAccept-Encoding: gzip, deflate\nUser-Ag...
2008/12/10
[ "https://Stackoverflow.com/questions/356548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/576/" ]
356,550
<p>I need a Java library to convert PDFs to TIFF images. The PDFs are faxes, and I will be converting to TIFF so that I can then do barcode recognition on the image. Can anyone recommend a good free open source library for conversion from PDF to TIFF? </p>
[ { "answer_id": 356582, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 3, "selected": false, "text": "#!/bin/sh\n\n/opt/local/bin/gs -q -dLastPage=1 -dNOPAUSE -dBATCH -dSAFER -r300 \\\n -sDEVICE=pnmraw -sOutputFile=- $* |\n...
2008/12/10
[ "https://Stackoverflow.com/questions/356550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]
356,551
<p>I'm researching this for a project and I'm wondering what other people are doing to prevent stale CSS and JavaScript files from being served with each new release. I don't want to append a timestamp or something similar which may prevent caching on every request. </p> <p>I'm working with the Spring 2.5 MVC framewor...
[ { "answer_id": 356574, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 1, "selected": false, "text": "conditional get" }, { "answer_id": 356622, "author": "Eran Galperin", "author_id": 10585, "autho...
2008/12/10
[ "https://Stackoverflow.com/questions/356551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22436/" ]
356,557
<p>I have created a class library in VB .NET. Some code in the library connects to the database. I want to create a config file that would hold the connection string. <br /><br /> I have created a "Settings.settings" file and stored the connection string in there. <br /><br /> When a class library having a settings f...
[ { "answer_id": 356571, "author": "RB.", "author_id": 15393, "author_profile": "https://Stackoverflow.com/users/15393", "pm_score": 3, "selected": true, "text": "If GetApplicationSetting(\"connectionString\") Is Nothing Then\n Throw New Exception(\"Could not retrieve connection string ...
2008/12/10
[ "https://Stackoverflow.com/questions/356557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1443363/" ]
356,570
<p>We have a query that selects rows depending on the value of another, ie. the max. I don't think that really makes much sense, so here is the query:</p> <pre><code>var deatched = DetachedCriteria.For&lt;Enquiry&gt;("e2") .SetProjection(Projections.Alias(Projections.Max("Property"), "maxProperty")) .Add(Restri...
[ { "answer_id": 11565591, "author": "Tony Wolfango", "author_id": 1535227, "author_profile": "https://Stackoverflow.com/users/1535227", "pm_score": 0, "selected": false, "text": "(from e in NHibernateSession().Query<Enquiry>()\n where e.Property == (\n (\n from e2 NHibernateS...
2008/12/10
[ "https://Stackoverflow.com/questions/356570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5802/" ]
356,578
<p>Is there an easy way to run a MySQL query from the Linux command line and output the results in <a href="http://en.wikipedia.org/wiki/Comma-separated_values" rel="noreferrer">CSV</a> format?</p> <p>Here's what I'm doing now:</p> <pre class="lang-none prettyprint-override"><code>mysql -u uid -ppwd -D dbname &lt;&lt; ...
[ { "answer_id": 356605, "author": "Paul Tomblin", "author_id": 3333, "author_profile": "https://Stackoverflow.com/users/3333", "pm_score": 12, "selected": true, "text": "SELECT order_id,product_name,qty\nFROM orders\nWHERE foo = 'bar'\nINTO OUTFILE '/var/lib/mysql-files/orders.csv'\nFIELD...
2008/12/10
[ "https://Stackoverflow.com/questions/356578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094969/" ]
356,583
<p>Is it possible to reflectively instantiate a generic type in Java? Using the technique described <a href="http://www.velocityreviews.com/forums/t149816-generics-and-forname.html" rel="noreferrer">here</a> I get an error because class tokens cannot be generic. Take the example below. I want to instantiate some subcla...
[ { "answer_id": 356596, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 2, "selected": false, "text": "public static void main(String[] args) throws Exception {\n Class<?> someClass = Class.forName(args[0]);\n Cre...
2008/12/10
[ "https://Stackoverflow.com/questions/356583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16399/" ]
356,585
<p>I have a program that needs to run as a separate NT user to connect to a SQL Server databases. For running a program itself, this isn't a big deal as I can just right click on it in windows explorer and select run as. Is there any way to run my tests as a different user as well? (it would be nice if I could do so...
[ { "answer_id": 356596, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 2, "selected": false, "text": "public static void main(String[] args) throws Exception {\n Class<?> someClass = Class.forName(args[0]);\n Cre...
2008/12/10
[ "https://Stackoverflow.com/questions/356585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
356,598
<p>Is there a way for me to delete items from calendar by using iCalendar import?</p> <p>I know that there is a METHOD:CANCEL, however when I tried it, it didn't do anything to the calendar event.</p> <p>Here is what is in my iCalendar file. When I try to import it to Outlook, it just adds these events.</p> <pre><co...
[ { "answer_id": 357641, "author": "dev.e.loper", "author_id": 37759, "author_profile": "https://Stackoverflow.com/users/37759", "pm_score": 5, "selected": true, "text": "STATUS:CANCELLED" }, { "answer_id": 6941023, "author": "Marc", "author_id": 878534, "author_profile...
2008/12/10
[ "https://Stackoverflow.com/questions/356598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
356,616
<p>In my Java application I would like to download a JPEG, transfer it to a PNG and do something with the resulting bytes.</p> <p>I am almost certain I remember a library to do this exists, I cannot remember its name.</p>
[ { "answer_id": 356635, "author": "bezmax", "author_id": 43677, "author_profile": "https://Stackoverflow.com/users/43677", "pm_score": 4, "selected": false, "text": "File file = new File(\"newimage.png\");\nImageIO.write(myJpegImage, \"png\", file);\n" }, { "answer_id": 356637, ...
2008/12/10
[ "https://Stackoverflow.com/questions/356616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33604/" ]
356,645
<p>I have a dynamic query that returns around 590,000 records. It runs successfully the first time, but if I run it again, I keep getting a <code>System.OutOfMemoryException</code>. What are some reasons this could be happening?</p> <p>The error is happening here:</p> <pre><code> public static DataSet GetDataSet(s...
[ { "answer_id": 356798, "author": "Juliet", "author_id": 40516, "author_profile": "https://Stackoverflow.com/users/40516", "pm_score": 6, "selected": true, "text": "GC.Collect()" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33690/" ]
356,666
<p>Is there a "win64" identifier in Qmake project files? <a href="http://doc.trolltech.com/4.4/qmake-advanced-usage.html" rel="noreferrer">Qt Qmake advanced</a> documentation does not mention other than unix / macx / win32.</p> <p>So far I've tried using:</p> <pre><code>win32:message("using win32") win64:message("usi...
[ { "answer_id": 404803, "author": "Tuminoid", "author_id": 40657, "author_profile": "https://Stackoverflow.com/users/40657", "pm_score": 2, "selected": false, "text": "CONFIG(myX64, myX64|myX32) {\n LIBPATH += C:\\Coding\\MSSDK60A\\Lib\\x64\n} else {\n LIBPATH += C:\\Coding\\MSSDK60...
2008/12/10
[ "https://Stackoverflow.com/questions/356666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40657/" ]
356,671
<p>The <code>JFileChooser</code> seems to be missing a feature: a way to suggest the file name when saving a file (the thing that usually gets selected so that it would get replaced when the user starts typing).</p> <p>Is there a way around this?</p>
[ { "answer_id": 356706, "author": "bruno conde", "author_id": 31136, "author_profile": "https://Stackoverflow.com/users/31136", "pm_score": 8, "selected": true, "text": "setSelectedFile" }, { "answer_id": 6652416, "author": "Aaron Digulla", "author_id": 34088, "author_...
2008/12/10
[ "https://Stackoverflow.com/questions/356671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15187/" ]
356,674
<p>I'm developing my first ASP.NET MVC application. This application tracks events, users, donors, etc. for a charitable organization. In my events controller I support standard CRUD operations with New/Edit/Show views (delete is done via a button on Show view). But I also want to list all of the events.</p> <p>Is...
[ { "answer_id": 357002, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 0, "selected": false, "text": "<body>\n <% RenderPartial(\"List\", \"Events\") %>\n</body>\n" }, { "answer_id": 586211, "author": "tvan...
2008/12/10
[ "https://Stackoverflow.com/questions/356674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12950/" ]
356,675
<p>I have a query which is meant to show me any rows in table A which have not been updated recently enough. (Each row should be updated within 2 months after "month_no".):</p> <pre><code>SELECT A.identifier , A.name , TO_NUMBER(DECODE( A.month_no , 1, 200803 , 2, 200804 ...
[ { "answer_id": 356699, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 8, "selected": true, "text": "SELECT * FROM\n(\n SELECT A.identifier\n , A.name\n , TO_NUMBER(DECODE( A.month_no\n , 1, 200803 \n , 2, 2...
2008/12/10
[ "https://Stackoverflow.com/questions/356675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1019/" ]
356,693
<p>I was curious if there's a .Net API that would allow me to identify what updates are pending for "Windows Update,"</p> <p>failing that, is there a windows powershell command that can get it?</p>
[ { "answer_id": 361722, "author": "Andy Schneider", "author_id": 45571, "author_profile": "https://Stackoverflow.com/users/45571", "pm_score": 2, "selected": false, "text": "PS C:\\> $updateSession = new-object -com Microsoft.update.Session\nPS C:\\> $updateSession | get-member\n\n\n Ty...
2008/12/10
[ "https://Stackoverflow.com/questions/356693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32238/" ]
356,705
<p>I wish to send a header to my Apache server on a Linux box. How can I achieve this via a cURL call?</p>
[ { "answer_id": 356714, "author": "Tader", "author_id": 30700, "author_profile": "https://Stackoverflow.com/users/30700", "pm_score": 11, "selected": false, "text": "man curl" }, { "answer_id": 356716, "author": "Greg", "author_id": 24181, "author_profile": "https://St...
2008/12/10
[ "https://Stackoverflow.com/questions/356705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35416/" ]
356,718
<p>Is there a way in Python, to have more than one constructor or more than one method with the <em>same name</em>, who differ in the <em>number of arguments</em> they accept or the <em>type(s) of one or more argument(s)</em>?</p> <p>If not, what would be the best way to handle such situations?</p> <p>For an example ...
[ { "answer_id": 356782, "author": "kender", "author_id": 4172, "author_profile": "https://Stackoverflow.com/users/4172", "pm_score": -1, "selected": false, "text": "def __init__(self, r = 0, g = 0, b = 0):\n # if r is a list\n if (type(r) == type([1,2,3])):\n r, g, b = r[0], ...
2008/12/10
[ "https://Stackoverflow.com/questions/356718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11666/" ]
356,722
<p>I have a defunct process on my system:</p> <pre><code>abc 22093 19508 0 23:29 pts/4 00:00:00 grep ProcA abc 31756 1 0 Dec08 ? 00:00:00 [ProcA_my_collect] &lt;defunct&gt; </code></pre> <p>How can I kill the above process, without a reboot of the machine? I have tried with</p> <pre><code>k...
[ { "answer_id": 356899, "author": "curtisk", "author_id": 17651, "author_profile": "https://Stackoverflow.com/users/17651", "pm_score": 5, "selected": false, "text": "ps -ef --forest" }, { "answer_id": 357018, "author": "Bill Karwin", "author_id": 20860, "author_profil...
2008/12/10
[ "https://Stackoverflow.com/questions/356722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35416/" ]
356,724
<p>I've used Emacs for years on Linux, and I have lots of personally useful keybindings I've put under <kbd>Hyper</kbd> and <kbd>Super</kbd>. Nowadays I'm using Emacs on Windows and am missing those extra keybindings.</p> <p>Is there some way in Windows to get modifier keys other than <kbd>Ctrl</kbd> and <kbd>Meta</kb...
[ { "answer_id": 364137, "author": "Michael Paulukonis", "author_id": 41153, "author_profile": "https://Stackoverflow.com/users/41153", "pm_score": 5, "selected": true, "text": "; setting the PC keyboard's various keys to Super or Hyper\n(setq w32-pass-lwindow-to-system nil\n w32-pass...
2008/12/10
[ "https://Stackoverflow.com/questions/356724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39683/" ]
356,726
<p>I got this doubt while writing some code. Is 'bool' a basic datatype defined in the C++ standard or is it some sort of extension provided by the compiler ? I got this doubt because Win32 has 'BOOL' which is nothing but a typedef of long. Also what happens if I do something like this:</p> <pre><code>int i = true; </...
[ { "answer_id": 356728, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 7, "selected": true, "text": "true" }, { "answer_id": 356730, "author": "hazzen", "author_id": 5066, "author_profile":...
2008/12/10
[ "https://Stackoverflow.com/questions/356726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39742/" ]
356,759
<p>I can never remember the order of the shorthand property for setting the margin or padding in one declaration. That is:</p> <pre><code>margin-top: 2px; margin-bottom: 4px; margin-left: 3px; margin-right: 8px; </code></pre> <p>may be written as</p> <pre><code>margin: 2px 8px 4px 3px; </code></pre> <p>Yes I unde...
[ { "answer_id": 356766, "author": "Ian G", "author_id": 31765, "author_profile": "https://Stackoverflow.com/users/31765", "pm_score": 1, "selected": false, "text": "top\nright \nbottom \nleft\n" }, { "answer_id": 356810, "author": "Stein G. Strindhaug", "author_id": 26115,...
2008/12/10
[ "https://Stackoverflow.com/questions/356759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18625/" ]
356,763
<p>I have a huge mbox file, with maybe 500 emails in it. </p> <p>It looks like the following:</p> <pre><code>From x@blah.com Fri Aug 12 09:34:09 2005 Message-ID: &lt;42FBEE81.9090701@blah.com&gt; Date: Fri, 12 Aug 2005 09:34:09 +0900 From: me &lt;x@blah.com&gt; User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)...
[ { "answer_id": 356871, "author": "Hudson", "author_id": 14105, "author_profile": "https://Stackoverflow.com/users/14105", "pm_score": 4, "selected": true, "text": " #!/usr/bin/perl\n use warnings;\n use strict;\n use Mail::Box::Manager;\n\n my $file = shift || $ENV{MAIL};\...
2008/12/10
[ "https://Stackoverflow.com/questions/356763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
356,775
<p>I was recently trying to explain to a programmer why, in ASP.Net, they should create HTMLControls instead of creating HTML strings to create Web pages.</p> <p>I know it is a better way of doing things, but I really couldn't give concrete reasons, other than, "This way is better."</p> <p>If you had to answer this q...
[ { "answer_id": 356840, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 3, "selected": true, "text": ".ToString()" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13449/" ]
356,778
<p>I have a function that looks something like this:</p> <pre><code>//iteration over scales foreach ($surveyScales as $scale) { $surveyItems = $scale-&gt;findDependentRowset('SurveyItems'); //nested iteration over items in scale foreach ($surveyItems as $item) { //retrieve a single value from ...
[ { "answer_id": 356869, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": false, "text": "findDependentRowset()" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11995/" ]
356,779
<p>I have a small form inside a table. POSTing that form creates a new entity. I then want users to see that new entity, but it should open in a new window so that the original view isn't lost.</p> <p>(How) can I open the result of the form submission in a new window?</p>
[ { "answer_id": 356789, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https://Stackoverflow.com/users/9254", "pm_score": 4, "selected": true, "text": "<form ... target=\"windowName\">\n" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4937/" ]
356,791
<p>It could be part of the model because it's part of the business logic of the game.</p> <p>It could be part of the controller because it could be seen as simulating player input, which would be considered part of the controller, right? Or would it?</p> <p>What about a normal enemy, like a goomba in Mario?</p> <p>U...
[ { "answer_id": 356806, "author": "jdmichal", "author_id": 12275, "author_profile": "https://Stackoverflow.com/users/12275", "pm_score": 1, "selected": false, "text": "Goomba.move()\n{\n /* Move Goomba forward one unit. */\n}\n" }, { "answer_id": 357133, "author": "Nick Van...
2008/12/10
[ "https://Stackoverflow.com/questions/356791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11911/" ]
356,794
<p>I've got a JScript error on my page. I know where the error's happening, but I'm attempting to decipher the JScript on that page (to figure out where it came from -- it's on an ASPX page, so any number of user controls could have injected it).</p> <p>It'd be easier if it was indented properly. Are there any free JS...
[ { "answer_id": 356808, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 1, "selected": false, "text": "ctrl + a" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
356,796
<p>I have been using the ASP.NET AJAX UpdatePanel control a lot lately for some intranet apps I've been working on, and for the most part, I have been using it to dynamically refresh data or hide and show controls on a form based on the user's actions.</p> <p>There is one place where I have been having a bit of troubl...
[ { "answer_id": 356827, "author": "Rob Allen", "author_id": 149, "author_profile": "https://Stackoverflow.com/users/149", "pm_score": 3, "selected": false, "text": "<tr style=\"display: <%= visible %>\">\n <td></td>\n</tr>\n" }, { "answer_id": 361435, "author": "Astra", ...
2008/12/10
[ "https://Stackoverflow.com/questions/356796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1436/" ]
356,807
<p>I wrote a class that tests for equality, less than, and greater than with two doubles in Java. My general case is comparing price that can have an accuracy of a half cent. 59.005 compared to 59.395. Is the epsilon I chose adequate for those cases?</p> <pre><code>private final static double EPSILON = 0.00001; /...
[ { "answer_id": 356825, "author": "Alex B", "author_id": 6180, "author_profile": "https://Stackoverflow.com/users/6180", "pm_score": 4, "selected": false, "text": "1E-6" }, { "answer_id": 356865, "author": "Michael Borgwardt", "author_id": 16883, "author_profile": "htt...
2008/12/10
[ "https://Stackoverflow.com/questions/356807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,809
<p>Best way to center a <code>&lt;div&gt;</code> element on a page both vertically and horizontally?</p> <p>I know that <code>margin-left: auto; margin-right: auto;</code> will center on the horizontal, but what is the best way to do it vertically, too?</p>
[ { "answer_id": 356829, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 4, "selected": false, "text": "var centerIt = function (el /* (jQuery element) Element to center */) {\n if (!el) {\n return;\n }\n ...
2008/12/10
[ "https://Stackoverflow.com/questions/356809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,830
<p>I'm doing a Python script where I need to spawn several ssh-copy-id processes, and they need for me to type in a password, so i'm using PExpect.</p> <p>I have basically this:</p> <pre><code>child = pexpect.spawn('command') child.expect('password:') child.sendline('the password') </code></pre> <p>and then I want t...
[ { "answer_id": 357021, "author": "rob", "author_id": 43927, "author_profile": "https://Stackoverflow.com/users/43927", "pm_score": 0, "selected": false, "text": "child = pexpect.spawn('command')\nchild.expect('password:')\nchild.sendline('the password')\nchild.close(True)\n" }, { ...
2008/12/10
[ "https://Stackoverflow.com/questions/356830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3314/" ]
356,831
<p>I'm very excited about the new "local F specs" coming in V6R1 - see:</p> <p><a href="http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html" rel="nofollow noreferrer">http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html</a></p> <p>Does anyone know a way to simulate this in V5R4 ...
[ { "answer_id": 357021, "author": "rob", "author_id": 43927, "author_profile": "https://Stackoverflow.com/users/43927", "pm_score": 0, "selected": false, "text": "child = pexpect.spawn('command')\nchild.expect('password:')\nchild.sendline('the password')\nchild.close(True)\n" }, { ...
2008/12/10
[ "https://Stackoverflow.com/questions/356831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,835
<p>OK, if anyone could help me with this I'd be much appreciative. If you copy and paste the following and open up in IE or Firefox</p> <pre><code>&lt;div style="border: solid 1px navy; float: left;"&gt; &lt;ul&gt; &lt;li&gt;Item 1&lt;/li&gt; &lt;li&gt;Item 2&lt;/li&gt; &lt;li&gt;Item 3&lt;...
[ { "answer_id": 356872, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 3, "selected": true, "text": "<div style=\"border: solid 1px navy; float: left;\">\n<ul>\n <li>Item 1</li>\n <li>Item 2</li>\n ...
2008/12/10
[ "https://Stackoverflow.com/questions/356835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44702/" ]
356,839
<p>I've inherited a legacy application that is supposed to grab an on the fly pdf from a reporting services server. Everything works fine up until the point where you try to open the pdf being returned and adobe acrobat tells you:</p> <blockquote> <p>Adobe Reader could not open 'thisStoopidReport'.pdf' because it ...
[ { "answer_id": 357947, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "request.Method = WebRequestMethods.Http.Post;\n" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
356,846
<p>Earlier I asked a question about <a href="https://stackoverflow.com/questions/335682/mvc-examples-use-of-var">why I see so many examples use the <code>var</code>keyword</a> and got the answer that while it is only necessary for anonymous types, that it is used nonetheless to make writing code 'quicker'/easier and 'j...
[ { "answer_id": 356855, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 9, "selected": true, "text": "var" }, { "answer_id": 356862, "author": "Michael Burr", "author_id": 12711, "author_profile": "htt...
2008/12/10
[ "https://Stackoverflow.com/questions/356846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40814/" ]
356,851
<p>I have been given a DLL ("InfoLookup.dll") that internally allocates structures and returns pointers to them from a lookup function. The structures contain string pointers:</p> <pre><code>extern "C" { struct Info { int id; char* szName; }; Info* LookupInfo( int id ); } </code></pre> <p>In...
[ { "answer_id": 356874, "author": "TheSmurf", "author_id": 1975282, "author_profile": "https://Stackoverflow.com/users/1975282", "pm_score": -1, "selected": false, "text": "using System.Runtime.InteropServices;\n\n[DllImport(\"mydll.dll\")]\npublic static extern Info LookupInfo(int val);\...
2008/12/10
[ "https://Stackoverflow.com/questions/356851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4540/" ]
356,882
<p>I've looked at every question so far and none seem to actually answer this question.</p> <p>I created a UITabBarController and added several view controllers to it. Most of the views are viewed in portrait, but one should be viewed in landscape. I don't want to use the accelerometer or detect when the user rotate...
[ { "answer_id": 356903, "author": "JamesSugrue", "author_id": 1075, "author_profile": "https://Stackoverflow.com/users/1075", "pm_score": 4, "selected": true, "text": "CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(degreesToRadian(90));\nlandscapeTransform = CGAffine...
2008/12/10
[ "https://Stackoverflow.com/questions/356882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36007/" ]
356,883
<p>Is there any way to change the taskbar icon of a browser in windows?</p> <p>I open alot of browser windows, and I like to group similar websites (in tabs) by window. So I was wondering if there was a way to assign a taskbar icon to them so that you can more easily differentiate between them. </p>
[ { "answer_id": 357177, "author": "w4g3n3r", "author_id": 36745, "author_profile": "https://Stackoverflow.com/users/36745", "pm_score": 4, "selected": true, "text": "[DllImport(\"user32.dll\", CharSet=CharSet.Auto)]\npublic static extern IntPtr FindWindow(string strClassName, string strWi...
2008/12/10
[ "https://Stackoverflow.com/questions/356883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18149/" ]
356,886
<p>I'm using CFHTTP to post data to my payment gateway (Protx).</p> <p>Protx requires that I whitelist the IP that will send this request.</p> <p>I am hosted on a shared server running Windows 2008.</p> <p>This morning, my hosting company assigned a new IP to this server for a customer who required an SSL certificat...
[ { "answer_id": 357177, "author": "w4g3n3r", "author_id": 36745, "author_profile": "https://Stackoverflow.com/users/36745", "pm_score": 4, "selected": true, "text": "[DllImport(\"user32.dll\", CharSet=CharSet.Auto)]\npublic static extern IntPtr FindWindow(string strClassName, string strWi...
2008/12/10
[ "https://Stackoverflow.com/questions/356886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22113/" ]
356,928
<p>I am writing a key record look up where the I have an index between the key and the rec number. This is sorted on the key. Is there away to do this better that what I have for speed optimization?</p> <pre><code>typedef struct { char key[MAX_KEYLEN]; int rec; } KeyRecPair; typedef struct { KeyRecPair...
[ { "answer_id": 356944, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": "bsearch" }, { "answer_id": 358906, "author": "dmityugov", "author_id": 3232, "author_profile": "https...
2008/12/10
[ "https://Stackoverflow.com/questions/356928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2064/" ]
356,929
<p>I have following situation. A main table and many other tables linked together with foreign keys. Now when I would like to delete a row in the main table a ConstraintsViolation will occur, which is intended and good.</p> <p>Now I want to be able to check if the ConstraintsViolation will occur before I trigger the d...
[ { "answer_id": 356943, "author": "Charles Bretana", "author_id": 32632, "author_profile": "https://Stackoverflow.com/users/32632", "pm_score": 2, "selected": true, "text": "If Exists ( Select * From OtherTable\n Where OtherTableFKColumn = MainTablePrimaryKey) \n Begin\n ...
2008/12/10
[ "https://Stackoverflow.com/questions/356929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6482/" ]
356,938
<p>When writing fairly typical Mac code in an OS X 10.5+ environment, what are the disadvantages to using garbage collection?</p> <p>So far everything else I've written has been either 10.4 compatible or on the iPhone, so I've become fairly comfortable with retain/release, but now that I'm working on a larger project ...
[ { "answer_id": 358910, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 5, "selected": true, "text": "-retain" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
356,947
<p>Can someone help me identify what the purpose of this unidentified syntax is. It is an extra little something in the constructor for this object. What I'm trying to figure out is what is the "&lt; IdT >" at the end of the class declaration line? I think that this is something I would find useful, I just need to unde...
[ { "answer_id": 356971, "author": "gcores", "author_id": 40256, "author_profile": "https://Stackoverflow.com/users/40256", "pm_score": 3, "selected": true, "text": "new DomainObject<string>(); \n" }, { "answer_id": 357009, "author": "tvanfosson", "author_id": 12950, "a...
2008/12/10
[ "https://Stackoverflow.com/questions/356947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42987/" ]
356,948
<p>I'm building a .NET 3.5 application and have the need to evaluate JS code on the server - basically a user provided rule set that can work within a browser or on the server. Managed JS is not an option, because the JS code would be provided at runtime. Aptana's Jaxer is also not an option. So I was looking into usin...
[ { "answer_id": 357284, "author": "Ryan Cook", "author_id": 43029, "author_profile": "https://Stackoverflow.com/users/43029", "pm_score": 6, "selected": true, "text": "V8DotNet.Shell shell = new V8DotNet.Shell();\n\nshell.ExecuteScript(@\"print('V8 version is: ' + version());\");\n" }, ...
2008/12/10
[ "https://Stackoverflow.com/questions/356948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30544/" ]
356,950
<p>I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?</p>
[ { "answer_id": 356992, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 7, "selected": false, "text": "operator()" }, { "answer_id": 356993, "author": "jalf", "author_id": 33213, "author_profile": "ht...
2008/12/10
[ "https://Stackoverflow.com/questions/356950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
356,957
<p>Here's the basic idea:</p> <p>There is a java window (main) that opens another java window (child). When the child is created, part of the initialization sets the focus in the appropriate text field in the child window:</p> <pre><code>childTextField.requestFocusInWindow(); childTextField.setCaretPosition(0); </co...
[ { "answer_id": 357019, "author": "Chris Mattmiller", "author_id": 43712, "author_profile": "https://Stackoverflow.com/users/43712", "pm_score": 1, "selected": false, "text": "init()" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45077/" ]
356,972
<p>How do you format the date time to just date? </p> <p>For example, this is what I retrieved from the database: 12/31/2008 12:00:00 AM, but I just want to show the date and no time.</p>
[ { "answer_id": 357349, "author": "Rick", "author_id": 1752, "author_profile": "https://Stackoverflow.com/users/1752", "pm_score": 4, "selected": false, "text": " Dim d As DateTime = Now\n Debug.WriteLine(d.ToLongDateString)\n Debug.WriteLine(d.ToShortDateString)\n Debug.WriteLine...
2008/12/10
[ "https://Stackoverflow.com/questions/356972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28647/" ]
356,974
<p>I have a mystery on my hands. I am trying to learn managed C++ coming from a C# background and have run into a snag. If I have a project which includes two classes, a base class <strong>Soup</strong> and a derived class <strong>TomatoSoup</strong> which I compile as a static library (.lib), I get unresolved tokens o...
[ { "answer_id": 357003, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 3, "selected": true, "text": "Abstracts.Soup::heat" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/356974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2831/" ]
356,980
<p>I have an Access Database that outputs a report in Excel format.</p> <p>The report is dependent on a date parameter chosen by the user. This parameter is selected via a textbox (text100) that has a pop up calendar.</p> <p>I would like to use the date in the text box (text100) in the filename.</p>
[ { "answer_id": 357039, "author": "DJ.", "author_id": 10492, "author_profile": "https://Stackoverflow.com/users/10492", "pm_score": 3, "selected": true, "text": "Some Module\n\nDim vParam1 as variant\nDim vParam1 as variant\n\nPublic Sub ParameterSet(byval pParamName as String, byval pPar...
2008/12/10
[ "https://Stackoverflow.com/questions/356980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44685/" ]
356,982
<p>I'm creating a multi-tenancy web site which hosts pages for clients. The first segment of the URL will be a string which identifies the client, defined in Global.asax using the following URL routing scheme:</p> <pre><code>"{client}/{controller}/{action}/{id}" </code></pre> <p>This works fine, with URLs such as /fo...
[ { "answer_id": 358554, "author": "Nicholas Piasecki", "author_id": 32187, "author_profile": "https://Stackoverflow.com/users/32187", "pm_score": 6, "selected": true, "text": "FormsAuthentication.RedirectToLoginPage()" }, { "answer_id": 1098132, "author": "user134936", "au...
2008/12/10
[ "https://Stackoverflow.com/questions/356982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43649/" ]
357,033
<p>I'm trying to do a Data Binding in the C# code behind rather than the XAML. The XAML binding created in Expression Blend 2 to my CLR object works fine. My C# implementation only updates when the application is started after which subsequent changes to the CLR doesn't update my label content. </p> <p>Here's the wo...
[ { "answer_id": 357158, "author": "devios1", "author_id": 238948, "author_profile": "https://Stackoverflow.com/users/238948", "pm_score": 3, "selected": true, "text": "Binding displayNameBinding = new Binding( \"MyAccountService.Accounts[0].DisplayName\" );\ndisplayNameBinding.Source = ne...
2008/12/10
[ "https://Stackoverflow.com/questions/357033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36234/" ]
357,041
<p>I have LINQ statement that looks like this:</p> <pre><code>return ( from c in customers select new ClientEntity() { Name = c.Name, ... }); </code></pre> <p>I'd like to be able to abstract out the select into its own method so that I can have different "mapping" option. What does my method need to return?</p> <p>I...
[ { "answer_id": 357091, "author": "bdukes", "author_id": 2688, "author_profile": "https://Stackoverflow.com/users/2688", "pm_score": 1, "selected": false, "text": "Expression" }, { "answer_id": 357417, "author": "Daniel Earwicker", "author_id": 27423, "author_profile":...
2008/12/10
[ "https://Stackoverflow.com/questions/357041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
357,046
<p>i have a Sharepoint feature that essentially extends Lists with a new feature, using a List receiver. For each list the feature is attached to, i need to store some configuration.</p> <p>Now, the first thing that came into my mind is the obvious solution: Have a global list. That works of course, but I wonder if th...
[ { "answer_id": 357083, "author": "Pascal Paradis", "author_id": 1291, "author_profile": "https://Stackoverflow.com/users/1291", "pm_score": 1, "selected": false, "text": "string sAdminEmail = ConfigStore.GetValue(\"MyApplication\", \"AdminEmail\");\n" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/357046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
357,048
<p>I have two tables, we'll call them <code>Foo</code> and <code>Bar</code>, with a one to many relationship where <code>Foo</code> is the parent of <code>Bar</code>. Foo's primary key is an integer automatically generated with a sequence. </p> <p>Since <code>Bar</code> is fully dependent on <code>Foo</code> how wou...
[ { "answer_id": 357080, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 0, "selected": false, "text": "create table SystemCounter \n( \n SystemCounterId int identity not null, \n BarIdAllocator int \n)\n--initializ...
2008/12/10
[ "https://Stackoverflow.com/questions/357048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9940/" ]
357,049
<p>I have a simple email address sign up form as follows:</p> <pre><code>&lt;form action="" id="newsletterform" method="get"&gt; &lt;input type="text" name="email" class="required email" id="textnewsletter" /&gt; &lt;input type="submit" id="signup" /&gt; &lt;/form&gt; </code></pre> <p><strong>Here's what...
[ { "answer_id": 357075, "author": "MrChrister", "author_id": 24229, "author_profile": "https://Stackoverflow.com/users/24229", "pm_score": 4, "selected": true, "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d...
2008/12/10
[ "https://Stackoverflow.com/questions/357049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37418/" ]
357,068
<p>Is there a way to use the C sprintf() function without it adding a '\0' character at the end of its output? I need to write formatted text in the middle of a fixed width string.</p>
[ { "answer_id": 357081, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": true, "text": "sprintf()" }, { "answer_id": 357391, "author": "Doug T.", "author_id": 8123, "author_profile": "https:...
2008/12/10
[ "https://Stackoverflow.com/questions/357068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39702/" ]
357,076
<p>I've been a .NET developer for several years now and this is still one of those things I don't know how to do properly. It's easy to hide a window from the taskbar via a property in both Windows Forms and WPF, but as far as I can tell, this doesn't guarantee (or necessarily even affect) it being hidden from the <kbd...
[ { "answer_id": 357270, "author": "Philipp Schmid", "author_id": 33272, "author_profile": "https://Stackoverflow.com/users/33272", "pm_score": 1, "selected": false, "text": "<Window x:Class=\"WpfApplication5.Window1\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\...
2008/12/10
[ "https://Stackoverflow.com/questions/357076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238948/" ]
357,084
<p>I do my php work on my dev box at home, where I've got a rudimentary LAMP setup. When I look at my website on my home box, any numbers I echo are automatically truncated to the least required precision. Eg 2 is echoed as 2, 2.2000 is echoed as 2.2.</p> <p>On the production box, all the numbers are echoed with at ...
[ { "answer_id": 357128, "author": "TravisO", "author_id": 35116, "author_profile": "https://Stackoverflow.com/users/35116", "pm_score": 4, "selected": true, "text": "// displays 3.14 as 3 and 4.00 as 4 \nprint number_format($price, 0); \n// display 4 as 4.00 and 1234.56 as 1,234.56 aka...
2008/12/10
[ "https://Stackoverflow.com/questions/357084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42387/" ]
357,095
<p>I would like to use JConsole to monitor my Websphere application, but I am not sure how to enable JMX.</p>
[ { "answer_id": 358814, "author": "eljenso", "author_id": 30316, "author_profile": "https://Stackoverflow.com/users/30316", "pm_score": 5, "selected": false, "text": "service:jmx:iiop://<host>:<port>/jndi/JMXConnector\n" }, { "answer_id": 1545542, "author": "Alan Chan", "a...
2008/12/10
[ "https://Stackoverflow.com/questions/357095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
357,104
<p>How do I prevent a form that is posted a second time because of a page reload in a browser from being added to my database again with C# Asp.Net.</p> <p>Thanks, Steven</p>
[ { "answer_id": 357144, "author": "orip", "author_id": 37020, "author_profile": "https://Stackoverflow.com/users/37020", "pm_score": 2, "selected": false, "text": "Page_Load" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/357104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42588/" ]
357,121
<p>In my mock class, I'm mocking method foo(). For some test cases, I want the mock implementation of foo() to return a special value. For other test cases, I want to use the real implementation of foo(). I have a boolean defined in my mock class so that I can determine in the mock method whether I want to return th...
[ { "answer_id": 357424, "author": "ebo", "author_id": 13226, "author_profile": "https://Stackoverflow.com/users/13226", "pm_score": 1, "selected": false, "text": "RealClass toTest = new RealClass(){\n public String foo(){\n return \"special value\";\n }\n}\n\n//use toTe...
2008/12/10
[ "https://Stackoverflow.com/questions/357121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20437/" ]
357,122
<p>Coming from <a href="https://stackoverflow.com/questions/356778/php-query-single-value-per-iteration-or-fetch-all-at-start-and-retrieve-from-ar">another question of mine</a> where I learnt not to EVER use db queries within loops I consequently have to learn how to fetch all the data in a convenient way before I loop...
[ { "answer_id": 357241, "author": "OIS", "author_id": 36175, "author_profile": "https://Stackoverflow.com/users/36175", "pm_score": 1, "selected": false, "text": "//first get scales\nwhile ($row = fetchrowfunctionhere()) {\n $scale = $scales->createFromArray($row);\n}\n\n//then get ite...
2008/12/10
[ "https://Stackoverflow.com/questions/357122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11995/" ]
357,138
<p>I want to add an ajax:TabContainer to my webpage. I don't get any build errors, but when I try to browse to the page, it gives me the error: "The Controls collection cannot be modified because the control contains code blocks (i.e. &lt;% ... %>).".</p> <p>I re-downloaded the Ajax Control Toolkit for the sample site...
[ { "answer_id": 357592, "author": "Cybis", "author_id": 32998, "author_profile": "https://Stackoverflow.com/users/32998", "pm_score": 1, "selected": false, "text": "<head>" }, { "answer_id": 1058263, "author": "Keith", "author_id": 905, "author_profile": "https://Stack...
2008/12/10
[ "https://Stackoverflow.com/questions/357138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32998/" ]
357,170
<p>I have a project and it needs to access a large amount of proprietary data in ASP.NET. This was done on the Linux/PHP by loading the data in shared memory. I was wondering if trying to use Memory Mapped Files would be the way to go, or if there is a better way with better .NET support. I was thinking of using the...
[ { "answer_id": 357217, "author": "Steven Behnke", "author_id": 42588, "author_profile": "https://Stackoverflow.com/users/42588", "pm_score": 1, "selected": false, "text": "byte[] fileBytes = Cache[\"fileBytes\"];\nif (null == fileBytes) {\n // reload the file and add it to the cache.\n...
2008/12/10
[ "https://Stackoverflow.com/questions/357170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11907/" ]
357,190
<p>I'm trying to find the file size of a file on a server. The following code I got from <a href="http://www.thejackol.com/2005/06/11/aspnet-get-file-size/" rel="nofollow noreferrer">this guy</a> accomplishes that for your own server:</p> <pre><code>string MyFile = "~/photos/mymug.gif"; FileInfo finfo = new FileInfo(...
[ { "answer_id": 357220, "author": "mmx", "author_id": 33708, "author_profile": "https://Stackoverflow.com/users/33708", "pm_score": 4, "selected": true, "text": "WebRequest" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/357190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/557/" ]
357,203
<p>Because I am a newbie I am trying to log out any errors that may occur with stored procedures I write. I understand Try/Catch in SQL 2005 and error_procedure(), ERROR_MESSAGE() and the other built in functions. What I can't figure out how to do is capture what record caused the error on an update.</p> <p>I could ...
[ { "answer_id": 357345, "author": "rlb.usa", "author_id": 449902, "author_profile": "https://Stackoverflow.com/users/449902", "pm_score": -1, "selected": false, "text": "DECLARE @problemClientID INT\nBEGIN TRANSACTION\n\n UPDATE ... --etc\n\n IF @@ERROR <> 0\n BEGIN\n ROLL...
2008/12/10
[ "https://Stackoverflow.com/questions/357203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18068/" ]
357,212
<p>What is the best and easiest way of taking HTML and converting it into a PDF, similar to use CFDOCUMENT on ColdFusion?</p> <p><strong>UPDATE:</strong> I really appreciate all the comments and suggestions that people have given so far, however I feel that people leaving their answers are missing the point.</p> <p>1...
[ { "answer_id": 375689, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": " String content = nextPage.generateResponse().contentString();\n\n content = content.replace(\"Print\", \"\");\n con...
2008/12/10
[ "https://Stackoverflow.com/questions/357212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31278/" ]
357,243
<p>I am inputting a 200mb file in my application and due to a very strange reason the memory usage of my application is more than 600mb. I have tried vector and deque, as well as std::string and char * with no avail. I need the memory usage of my application to be almost the same as the file I am reading, any suggestio...
[ { "answer_id": 357327, "author": "Edouard A.", "author_id": 41363, "author_profile": "https://Stackoverflow.com/users/41363", "pm_score": 4, "selected": true, "text": " HANDLE heaps[1025];\n DWORD nheaps = GetProcessHeaps((sizeof(heaps) / sizeof(HANDLE)) - 1, heaps);\n\n for (DWORD i ...
2008/12/10
[ "https://Stackoverflow.com/questions/357243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28954/" ]
357,244
<p>One of my columns type is DateTime (Date Registered). I cannot create a query that filters all the data for eg. All registrations who registered on the 22/10/2008 between 18:00 and 20:00.</p> <p>Thanks</p>
[ { "answer_id": 357271, "author": "Mitchel Sellers", "author_id": 13279, "author_profile": "https://Stackoverflow.com/users/13279", "pm_score": 4, "selected": true, "text": "SELECT *\nFROM YourTable\nWHERE DateRegistered BETWEEN '10/22/2008 18:00:00' AND '10/22/2008 20:00:00'\n" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/357244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44973/" ]
357,297
<p>The site I'm working on is done in Classic ASP, and I'm trying to do it as best as possible. I've abstracted it out into a Rails-like directory structure:</p> <pre> app_name - app - includes - helpers - lib - partials - public - stylesheets - images - javascripts </pre> <p>I've cr...
[ { "answer_id": 357326, "author": "Jonathan Lonowski", "author_id": 15031, "author_profile": "https://Stackoverflow.com/users/15031", "pm_score": 2, "selected": false, "text": "Server.MapPath" } ]
2008/12/10
[ "https://Stackoverflow.com/questions/357297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40667/" ]
357,307
<p>How do I call the parent function from a derived class using C++? For example, I have a class called <code>parent</code>, and a class called <code>child</code> which is derived from parent. Within each class there is a <code>print</code> function. In the definition of the child's print function I would like to mak...
[ { "answer_id": 357312, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 8, "selected": false, "text": "Parent" }, { "answer_id": 357325, "author": "Andrew Rollings", "author_id": 40410, "author_profile": ...
2008/12/10
[ "https://Stackoverflow.com/questions/357307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17337/" ]
357,314
<p>I am using Cygwin with a dll version of 1.5.19 (yes, out-of-date, I know, but we're doing it for configuration control reasons). All my files (existing and newly created) show up with permissions 644, despite a umask of 022. Also, using chmod doesn't change the permissions. I have ntsec set in the CYGWIN environm...
[ { "answer_id": 357572, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 2, "selected": false, "text": "/etc/passwd" }, { "answer_id": 1599607, "author": "Community", "author_id": -1, "author_profile": "ht...
2008/12/10
[ "https://Stackoverflow.com/questions/357314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5241/" ]
357,315
<p>I'd like to find a Windows batch counterpart to Bash's <code>$@</code> that holds a list of all arguments passed into a script. </p> <p>Or I have to bother with <code>shift</code>?</p>
[ { "answer_id": 357338, "author": "dancavallaro", "author_id": 42891, "author_profile": "https://Stackoverflow.com/users/42891", "pm_score": 7, "selected": false, "text": "%*" }, { "answer_id": 382312, "author": "matt wilkie", "author_id": 14420, "author_profile": "htt...
2008/12/10
[ "https://Stackoverflow.com/questions/357315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15647/" ]