qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
300,669
<p>How do I launch an app and capture the output via stdout and maybe stderr?</p> <p>I am writing an automated build system and I need to capture the output to analyze. I'd like to update the svn repo and grab the revision number so I can move the files in autobuild/revNumber/ if successful. I also would like to build...
[ { "answer_id": 300680, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 5, "selected": true, "text": "program arg1 arg2 >/tmp/log.file 2>&1\n 2>&1 LOG=${TMPDIR:-/tmp}/log.$$.$(date +%Y%m%d-%H%M%S)\nprogram arg1 arg2 ...
2008/11/19
[ "https://Stackoverflow.com/questions/300669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
300,671
<p>How do i parse a text file in c#?</p>
[ { "answer_id": 300704, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 3, "selected": false, "text": "IEnumerable<string> file.ReadLine()" }, { "answer_id": 447046, "author": "Perica Zivkovic", "au...
2008/11/19
[ "https://Stackoverflow.com/questions/300671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
300,673
<p>I was told this a few times in this very site, but I wanted to make sure this is really the case.</p> <p>I was expecting to be able to sprinkle NSLog function calls throughout my code, and that Xcode/gcc would automatically strip those calls out when building my Release/Distribution builds.</p> <p>Should I avoid u...
[ { "answer_id": 300783, "author": "e.James", "author_id": 33686, "author_profile": "https://Stackoverflow.com/users/33686", "pm_score": 4, "selected": false, "text": "DEBUG_MODE DEBUG_MODE" }, { "answer_id": 302246, "author": "Marc Charbonneau", "author_id": 35136, "au...
2008/11/19
[ "https://Stackoverflow.com/questions/300673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35478/" ]
300,674
<p>I'm trying to trouble shoot a web service client in my current project. I'm not sure of the platform of the Service Server (Most likely LAMP). I believe there is a fault on their side of the fence as i have eliminated the potential issues with my client. The client is a standard ASMX type web reference proxy auto...
[ { "answer_id": 300821, "author": "John Lemp", "author_id": 12915, "author_profile": "https://Stackoverflow.com/users/12915", "pm_score": 5, "selected": false, "text": "public class SoapLoggerExtension : SoapExtension\n{\n private static readonly ILog log = LogManager.GetLogger(MethodB...
2008/11/19
[ "https://Stackoverflow.com/questions/300674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30576/" ]
300,685
<p>I would like to generate documentation for a RESTful web service API that is written in Python. Ideally it would look like Yahoo's RESTful web service docs. Does anyone have any ideas or references?</p>
[ { "answer_id": 5044368, "author": "stw_dev", "author_id": 206484, "author_profile": "https://Stackoverflow.com/users/206484", "pm_score": 2, "selected": false, "text": "restapi.py src src conf.py import sys, os\nsys.path.append(os.path.abspath('sphinxext'))\nextensions = ['sphinx.ext.aut...
2008/11/19
[ "https://Stackoverflow.com/questions/300685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14311/" ]
300,692
<p>I'd like to know how to convert Perforce depot locations to client view locations for the purpose of script writing.</p> <p>I have a script that first checks out a file for edit in perforce and then interacts with the file. I need to have the depot location (i.e. \Projects\Project6) converted to the client view l...
[ { "answer_id": 300701, "author": "Graeme Perrow", "author_id": 1821, "author_profile": "https://Stackoverflow.com/users/1821", "pm_score": 2, "selected": false, "text": "p4 have" }, { "answer_id": 300772, "author": "bk1e", "author_id": 8090, "author_profile": "https:/...
2008/11/19
[ "https://Stackoverflow.com/questions/300692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38774/" ]
300,705
<p>I have the following code:</p> <pre><code>for attribute in site.device_attributes device.attribute end </code></pre> <p>where I would like the code to substitute the value of "attribute" for the method name.</p> <p>I have tried <code>device."#{attribute}"</code> and various permutations.</p> <p>Is this complet...
[ { "answer_id": 300723, "author": "Matt Campbell", "author_id": 27043, "author_profile": "https://Stackoverflow.com/users/27043", "pm_score": 4, "selected": false, "text": "object = \"upcase me!\"\nmethod = \"upcase\"\nobject.send(method.to_sym) # => \"UPCASE ME!\"\n" }, { "answer...
2008/11/19
[ "https://Stackoverflow.com/questions/300705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757/" ]
300,746
<p>I've been attempting to write embedded SQL statements for DB2 that ultimately gets compiled in C. </p> <p>I couldn't find a tutorial or manual on the embedded SQL syntax for C for reference. One case I would like to do is to insert data into a table. I know most embedded sql statements need the initalizer <code>EXE...
[ { "answer_id": 301082, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 2, "selected": false, "text": "EXEC SQL INSERT INTO SomeTable(Col1, Col2, Col3) VALUES(:hv1, :hv2, :hv3);\n EXEC SQL INSERT INTO SomeTable VALUE...
2008/11/19
[ "https://Stackoverflow.com/questions/300746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38781/" ]
300,749
<p>Is it possible to protect flv files from download? I'd like to protect my files from download but I don't have the money for a streaming server which I think provides some sort of protection. The files are streamed via PHP and are located in an upload folder on my server.</p> <p>I've used PHP to ensure that only su...
[ { "answer_id": 1650655, "author": "Stu Thompson", "author_id": 2961, "author_profile": "https://Stackoverflow.com/users/2961", "pm_score": 5, "selected": false, "text": "FLV FLV" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/300749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
300,755
<p>Ok... I'm new to WPF, but I kind of know how to do things using DataTriggers and Converters.</p> <p>But, what I want to seems a little more complex than that. Let me give you the details:</p> <p>The DataContext for the ListView control is an IList of objects (object=Room). These are the available rooms. I've go...
[ { "answer_id": 302113, "author": "Bryan Anderson", "author_id": 21186, "author_profile": "https://Stackoverflow.com/users/21186", "pm_score": 0, "selected": false, "text": "<TextBox Name=\"Room\" Text=\"{Binding ElementName=RoomsList.SelectedItem, Path=Picture}\" />\n" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/300755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21807/" ]
300,757
<p>I have a Flex application with multiple modules.</p> <p>When I redeploy the application I was finding that modules (which are deployed as separate swf files) were being cached in the browser and the new versions weren't being loaded. </p> <p>So i tried the age old trick of adding <code>?version=xxx</code> to all t...
[ { "answer_id": 2916434, "author": "user349449", "author_id": 349449, "author_profile": "https://Stackoverflow.com/users/349449", "pm_score": 1, "selected": false, "text": " function AC_FL_RunContent(){\n var ret = AC_GetArgs(arguments, \".swf?ts=\" + getTS(), \"movie\", \n ...
2008/11/19
[ "https://Stackoverflow.com/questions/300757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16940/" ]
300,786
<p>We have an application that generates simulated data for one of our services for testing purposes. Each data item has a unique Guid. However, when we ran a test after some minor code changes to the simulator all of the objects generated by it had the same Guid.</p> <p>There was a single data object created, then ...
[ { "answer_id": 303936, "author": "Robert Wagner", "author_id": 10784, "author_profile": "https://Stackoverflow.com/users/10784", "pm_score": 5, "selected": true, "text": "for( int i = 0; i < _numOrders; i++ )\n{\n OrderTicket ticket = new OrderTicket(... );\n ticket.CacheId = Guid....
2008/11/19
[ "https://Stackoverflow.com/questions/300786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29021/" ]
300,793
<p>Building an iPhone project results in: </p> <blockquote> <p>Failed to launch simulated application: SpringBoard failed to launch application with error: 7</p> </blockquote> <p>And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?</p>
[ { "answer_id": 548034, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "sudo mkdir /usr/local/iphone-dirs sudo chmod 777 /usr/local/iphone-dirs mkdir /usr/local/iphone-dirs/my-dir cd \"~/Library/App...
2008/11/19
[ "https://Stackoverflow.com/questions/300793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
300,808
<p>I have been working on a legacy C++ application and am definitely outside of my comfort-zone (a good thing). I was wondering if anyone out there would be so kind as to give me a few pointers (pun intended).</p> <p>I need to cast 2 bytes in an unsigned char array to an unsigned short. The bytes are consecutive. </p>...
[ { "answer_id": 300812, "author": "arul", "author_id": 15409, "author_profile": "https://Stackoverflow.com/users/15409", "pm_score": 1, "selected": false, "text": "unsigned short *myShort = static_cast<unsigned short*>(&packetBuffer[1]);\n" }, { "answer_id": 300837, "author": ...
2008/11/19
[ "https://Stackoverflow.com/questions/300808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38784/" ]
300,840
<p>We have some integer arithmetic which for historical reasons has to work the same on PHP as it does in a few statically typed languages. Since we last upgraded PHP the behavior for overflowing integers has changed. Basically we are using following formula:</p> <pre><code>function f($x1, $x2, $x3, $x4) { return...
[ { "answer_id": 300857, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 2, "selected": false, "text": "echo (-1580033017 + -2072974554) & 0xffffffff\n function s32add($a, $b) {\n return ($a + $b) & 0xffffffff;\n}\n" }, {...
2008/11/19
[ "https://Stackoverflow.com/questions/300840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3798/" ]
300,841
<p>How do you globally set the date format in ASP.NET?</p> <p>My local machine and servers have Regional Settings set to "English (New Zealand)".</p> <p>When I format a date with <code>dd/MM/yyyy</code> I expect to see <code>19/11/2008</code> for today for example.</p> <p>Until recently, that is what I did in fact g...
[ { "answer_id": 300853, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 8, "selected": true, "text": "using System.Globalization;\nusing System.Threading;\n\n//...\nprotected void Application_BeginRequest(Object se...
2008/11/19
[ "https://Stackoverflow.com/questions/300841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19377/" ]
300,849
<p>I'm creating a small app in ASP.NET MVC that generates ics (iCal) files based on certain criterias. The generated files are accessible through a permanent URL (<a href="http://myserver/some/criterias.ics" rel="noreferrer">http://myserver/some/criterias.ics</a>).</p> <p>I am looking for a way to display the calendar...
[ { "answer_id": 700183, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "Other Calenders" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/300849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5903/" ]
300,854
<p>Okay, I guess this is entirely subjective and whatnot, but I was thinking about entropy sources for random number generators. It goes that most generators are seeded with the current time, correct? Well, I was curious as to what other sources could be used to generate perfectly valid, random (The loose definition) n...
[ { "answer_id": 523971, "author": "klew", "author_id": 58877, "author_profile": "https://Stackoverflow.com/users/58877", "pm_score": 0, "selected": false, "text": "int Random() {\n return Universe.object_id % MAX_INT;\n}\n" }, { "answer_id": 10201602, "author": "pr1268", ...
2008/11/19
[ "https://Stackoverflow.com/questions/300854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31389/" ]
300,855
<p>I've looked into and considered many JavaScript unit tests and testing tools, but have been unable to find a suitable option to remain fully TDD compliant. So, is there a JavaScript unit test tool that is fully TDD compliant?</p>
[ { "answer_id": 680713, "author": "gregers", "author_id": 44643, "author_profile": "https://Stackoverflow.com/users/44643", "pm_score": 12, "selected": true, "text": "assert(!...) expect(...).not... refute(...) Buster.JS Buster.js" }, { "answer_id": 7660264, "author": "kolen",...
2008/11/19
[ "https://Stackoverflow.com/questions/300855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38792/" ]
300,871
<p>Given a point (pX, pY) and a circle with a known center (cX,cY) and radius (r), what is the shortest amount of code you can come up with to find the point on the circle closest to (pX, pY) ?</p> <p>I've got some code kind of working but it involves converting the circle to an equation of the form (x - cX)^2 + (y - ...
[ { "answer_id": 300894, "author": "Mike Dunlavey", "author_id": 23771, "author_profile": "https://Stackoverflow.com/users/23771", "pm_score": 7, "selected": true, "text": "V = (P - C); Answer = C + V / |V| * R;\n double vX = pX - cX;\ndouble vY = pY - cY;\ndouble magV = sqrt(vX*vX + vY*vY...
2008/11/19
[ "https://Stackoverflow.com/questions/300871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
300,911
<p>For a deleted file what's the command to use to view the content of a old revision</p> <pre><code>E:\Downloads\eeli\eel\eel&gt;svn cat eel-scalable-font.h -r 2 svn: warning: 'eel-scalable-font.h' is not under version control </code></pre>
[ { "answer_id": 300928, "author": "Brian Gianforcaro", "author_id": 3415, "author_profile": "https://Stackoverflow.com/users/3415", "pm_score": 2, "selected": false, "text": "svn cat eel-scalable-font.h@2\n" }, { "answer_id": 301001, "author": "nobody", "author_id": 19405,...
2008/11/19
[ "https://Stackoverflow.com/questions/300911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30546/" ]
300,929
<p>EDIT: For the inner queries, there could be more than one match per inner query. It grabs a bunch of tags with the same game_ID. Thats why .First or .Max won't work.</p> <p>Need some help, I have a query in LINQ that looks like this:</p> <pre><code>from yy in Tags_Lookups where yy.Tag_ID == (from xx in Tags_Loo...
[ { "answer_id": 300932, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": "from yy in Tags_Lookups\nwhere (from xx in Tags_Lookups\n where xx.Game_ID == new Guid(\"4962d645-711c-4db8-a7ce-a...
2008/11/19
[ "https://Stackoverflow.com/questions/300929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
300,935
<p>I'm trying to find the definition of a binary search tree and I keep finding different definitions everywhere. </p> <p>Some say that for any given subtree the left child key is less than or equal to the root.</p> <p>Some say that for any given subtree the right child key is greater than or equal to the root.</p> ...
[ { "answer_id": 300962, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 5, "selected": false, "text": " 14\n / \\\n 13 22\n / / \\\n1 16 29\n / \\\n 28 29\n def hasVal (node, srchv...
2008/11/19
[ "https://Stackoverflow.com/questions/300935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36706/" ]
300,950
<p>I have a label function like :</p> <pre><code>private function formatDate (item:Object, column:DataGridColumn):String { var df:DateFormatter = new DateFormatter(); df.formatString = "MM/DD/YY"; if (column.dataField == "startDate") { return df.format(item.startDate); } return "ERR"; } <...
[ { "answer_id": 301295, "author": "Theo", "author_id": 1109, "author_profile": "https://Stackoverflow.com/users/1109", "pm_score": 5, "selected": true, "text": "partial function partial( func : Function, ...boundArgs ) : Function {\n return function( ...dynamicArgs ) : * {\n return fu...
2008/11/19
[ "https://Stackoverflow.com/questions/300950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16940/" ]
300,957
<p>My question is similar to Engram's <a href="https://stackoverflow.com/questions/223149/how-do-you-handle-the-output-of-a-dynamically-generated-form-in-aspnet-mvc">here</a>, but my question goes a bit further. The way i intend it to work is I have a textbox asking how many entries a user is going to make. After the...
[ { "answer_id": 301005, "author": "Scott", "author_id": 29640, "author_profile": "https://Stackoverflow.com/users/29640", "pm_score": 3, "selected": true, "text": "<form action=\"/Demo01/Create\" method=\"post\">\nNumber of Exercises:\n<%= Html.TextBox(\"tbxNumberOfExercises\") %>\n<br />...
2008/11/19
[ "https://Stackoverflow.com/questions/300957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30816/" ]
300,971
<p>I am using several NSButtonCell objects in an NSTableView. They are simple square buttons with custom images on them.</p> <p>These buttons draw properly when they are not highlighted: all that is visible is the image, and the rest of the button rectangle is transparent. However, when I click on them, the entire but...
[ { "answer_id": 301106, "author": "Peter Hosey", "author_id": 30461, "author_profile": "https://Stackoverflow.com/users/30461", "pm_score": 4, "selected": true, "text": "highlightsBy NSContentsCellMask awakeFromNib" }, { "answer_id": 27085790, "author": "Community", "autho...
2008/11/19
[ "https://Stackoverflow.com/questions/300971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33686/" ]
300,986
<p>Is there ever a good reason to <em>not</em> declare a virtual destructor for a class? When should you specifically avoid writing one?</p>
[ { "answer_id": 301023, "author": "Jay Conrod", "author_id": 1891, "author_profile": "https://Stackoverflow.com/users/1891", "pm_score": 3, "selected": false, "text": "delete B A A *x = new B;\ndelete x; // ~B() called, even though x has type A*\n delete" }, { "answer_id": 302...
2008/11/19
[ "https://Stackoverflow.com/questions/300986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10606/" ]
301,004
<p>To calculate a top position for an element of variable height, I was thinking of doing the following:</p> <ol> <li>Move the element 1000px off the top of the viewport</li> <li>Set the element to display: block</li> <li>Get the height of the element</li> <li>Set the element to display: none</li> <li>Continue on as i...
[ { "answer_id": 301014, "author": "wombleton", "author_id": 22419, "author_profile": "https://Stackoverflow.com/users/22419", "pm_score": 3, "selected": true, "text": "getDimensions display:none" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11577/" ]
301,008
<p>We were using stringstream to prepare select queries in C++. But we were strongly advised to use QUERY PARAMETERS to submit db2 sql queries to avoid using of stringstream. Can anyone share what exactly meant by query parameter in C++? Also, share some practical sample code snippets.</p> <p>Appreciate the help in ad...
[ { "answer_id": 301015, "author": "vfilby", "author_id": 24279, "author_profile": "https://Stackoverflow.com/users/24279", "pm_score": 3, "selected": true, "text": "\"SELECT * FROM Customers WHERE CustomerId = \" + _customerId; \n \"SELECT * FROM Customers where CustomerId = @CustomerId\"...
2008/11/19
[ "https://Stackoverflow.com/questions/301008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18657/" ]
301,039
<p>I have a bash shell script that loops through all child directories (but not files) of a certain directory. The problem is that some of the directory names contain spaces. </p> <p>Here are the contents of my test directory:</p> <pre><code>$ls -F test Baltimore/ Cherry Hill/ Edison/ New York City/ Philadelphi...
[ { "answer_id": 301059, "author": "Charles Duffy", "author_id": 14122, "author_profile": "https://Stackoverflow.com/users/14122", "pm_score": 8, "selected": true, "text": "find -exec # this is safe\nfind test -type d -exec echo '{}' +\n -print0 # this is safe\nwhile IFS= read -r -d '' n; ...
2008/11/19
[ "https://Stackoverflow.com/questions/301039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094969/" ]
301,045
<p>For background see my question <a href="https://stackoverflow.com/questions/291761/converting-a-fairly-simple-c-class-library-into-a-com-object">here</a>.</p> <p>So the problem now isn't that I can't send a <code>DataSet</code> to classic ASP but that it can't do anything with it. So I found some code to create a ...
[ { "answer_id": 378770, "author": "Gregg", "author_id": 18266, "author_profile": "https://Stackoverflow.com/users/18266", "pm_score": 0, "selected": false, "text": "theStream = (MemoryStream)theWriter.BaseStream;\n MemoryStream theWriter.Close();\ntheStream.Position = 0; // So you can sta...
2008/11/19
[ "https://Stackoverflow.com/questions/301045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29650/" ]
301,053
<p>Is it possible to re-assign the <kbd>Win</kbd>+<kbd>L</kbd> hotkey to another executable/shortcut?</p> <p>Use-case - I would like to switch off the monitor of my laptop as soon as it is locked. I know of a executable which can lock and turn off the monitor but I do not want to change the way the system is locked (b...
[ { "answer_id": 317550, "author": "efotinis", "author_id": 12320, "author_profile": "https://Stackoverflow.com/users/12320", "pm_score": 4, "selected": false, "text": "WH_KEYBOARD_LL LRESULT CALLBACK LowLevelKeyboardProc(int code, WPARAM wparam, LPARAM lparam) {\n KBDLLHOOKSTRUCT& kllh...
2008/11/19
[ "https://Stackoverflow.com/questions/301053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26090/" ]
301,054
<p>How can I determine if a Win32 thread has terminated?</p> <p>The documentation for <strong><a href="http://msdn.microsoft.com/en-us/library/ms683190(VS.85).aspx" rel="noreferrer">GetExitCodeThread</a></strong> warns to not to use it for this reason since the error code STILL_ACTIVE can be returned for other reasons...
[ { "answer_id": 301067, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 3, "selected": false, "text": "STILL_ACTIVE" }, { "answer_id": 301098, "author": "Michael Burr", "author_id": 12711, "author_profile": "htt...
2008/11/19
[ "https://Stackoverflow.com/questions/301054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19129/" ]
301,060
<p>say I want to find the latest added rows (UPDATE by any user, not necessarily the one which is executing UPDATE) in XX table.</p>
[ { "answer_id": 301088, "author": "Mitch Wheat", "author_id": 16076, "author_profile": "https://Stackoverflow.com/users/16076", "pm_score": 2, "selected": false, "text": " DBCC LOG(<database name>[,{0|1|2|3|4}]).\n" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38819/" ]
301,066
<p>I'm trying to measure height of some text for table printing purpose.</p> <p>Here's the code. In my case it prints different numbers in preview and on actual page. I can't try on any printers other than Microsoft Office Document Image Writer right now, but I'm pretty sure it isn't a printer issue.</p> <p>Perhaps s...
[ { "answer_id": 354285, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 1, "selected": false, "text": "SizeF hT = TextRenderer.MeasureText(s, new Font(\"Arial\", 24));\n" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,068
<p>I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:</p> <pre><code>&gt;&gt;&gt; foo = 'baz "\"' &gt;&gt;&gt; foo 'baz ""' </code></pre> <p>So instead o...
[ { "answer_id": 301075, "author": "Charles Duffy", "author_id": 14122, "author_profile": "https://Stackoverflow.com/users/14122", "pm_score": 8, "selected": true, "text": ">>> foo = 'baz \"\\\\\"'\n>>> foo\n'baz \"\\\\\"'\n>>> print(foo)\nbaz \"\\\"\n >>> print(r'baz \"\\\"')\nbaz \"\\\"\...
2008/11/19
[ "https://Stackoverflow.com/questions/301068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
301,085
<p>Anyone knows a way to define refactoring in a more formal way?</p> <p>UPDATE.</p> <blockquote> <p>A refactoring is a pair R = (pre; T) where pre is the precondition that the program must satisfy, and T is the program transformation.</p> </blockquote>
[ { "answer_id": 301150, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 2, "selected": false, "text": "given program P implies R\nrefactoring transformation T(P) produces P'\nwhere (P' implies R') and (R' is equivalent t...
2008/11/19
[ "https://Stackoverflow.com/questions/301085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20915/" ]
301,108
<p>I realize that this could probably be done easier in any number of other scripting languages but started to do it quick in cmd and now Im curious.</p> <p>Looking to start a process at an offset to the time that another process started. Lets say 5 minutes to keep it simple. Is there a way to add to the %TIME% vari...
[ { "answer_id": 301141, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 4, "selected": false, "text": "set/? set h=%TIME:~0,2%\nset m=%TIME:~3,2%\nset/a m2=\"m+5\"\nset t2=%h%:%m2%\nset t2\n" }, { "answer_id": 1254897,...
2008/11/19
[ "https://Stackoverflow.com/questions/301108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,109
<p>How would I implement "close all other tabs" function for a tab control using Context menu strip?</p>
[ { "answer_id": 301257, "author": "Guge", "author_id": 37771, "author_profile": "https://Stackoverflow.com/users/37771", "pm_score": 2, "selected": false, "text": " private void closeAllOtherToolStripMenuItem_Click(object sender, EventArgs e)\n {\n for (int i = 0; i < thi...
2008/11/19
[ "https://Stackoverflow.com/questions/301109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,129
<p>In C++, how can I establish an SQL connection to store data in an SQL database?</p>
[ { "answer_id": 301462, "author": "João Augusto", "author_id": 6909, "author_profile": "https://Stackoverflow.com/users/6909", "pm_score": 0, "selected": false, "text": "#import \"c:\\Program Files\\Common Files\\System\\ADO\\msado15.dll\" no_namespace rename( \"EOF\", \"EndOfFile\" )\n /...
2008/11/19
[ "https://Stackoverflow.com/questions/301129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34588/" ]
301,132
<p>I would like to know the procedure to adopt to parse and obtain text content from Microsoft word (.doc and .docx) documents . programming language used should be plain "C" (should be gcc).</p> <p>Are there any libraries that already do this job,</p> <p>extension : can i use the same procedure to parse text from Mi...
[ { "answer_id": 301462, "author": "João Augusto", "author_id": 6909, "author_profile": "https://Stackoverflow.com/users/6909", "pm_score": 0, "selected": false, "text": "#import \"c:\\Program Files\\Common Files\\System\\ADO\\msado15.dll\" no_namespace rename( \"EOF\", \"EndOfFile\" )\n /...
2008/11/19
[ "https://Stackoverflow.com/questions/301132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34590/" ]
301,134
<p>I'm writing a Python application that takes a command as an argument, for example:</p> <pre><code>$ python myapp.py command1 </code></pre> <p>I want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree look...
[ { "answer_id": 301139, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 4, "selected": false, "text": "exec exec(\"import myapp.commands.%s\" % command)\n" }, { "answer_id": 301146, "author": "Harley Holcombe", ...
2008/11/19
[ "https://Stackoverflow.com/questions/301134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15061/" ]
301,143
<p>My program works already, I have Perl (GUI Window) where I can input data, data passed to the webpage (using to Tomcat server, JSP) and then <strong>saved</strong> it to oracle database. What I want is to make search parameter (webapp) that <strong>retrieve/extract</strong> data from the Oracle database using Perl C...
[ { "answer_id": 301761, "author": "draegtun", "author_id": 12195, "author_profile": "https://Stackoverflow.com/users/12195", "pm_score": 3, "selected": false, "text": "BEGIN {\n $ENV{ORACLE_HOME} = '/home/oracle/product/10.x.x';\n $ENV{TWO_TASK} = 'DB';\n}\n$dbh = DBI->connect('dbi:O...
2008/11/19
[ "https://Stackoverflow.com/questions/301143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28607/" ]
301,147
<p>I want to show a table of fixed width at the center of browser window. Now I use</p> <pre><code>&lt;table width="200" align="center"&gt; </code></pre> <p>But Visual Studio 2008 gives warning on this line:</p> <p><em>Attribute 'align' is considered outdated. A newer construct is recommended.</em></p> <p>What CSS...
[ { "answer_id": 301152, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 0, "selected": false, "text": "style=\"text-align:center;\" \n" }, { "answer_id": 301161, "author": "jalbert", "author_id": 1360388,...
2008/11/19
[ "https://Stackoverflow.com/questions/301147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11256/" ]
301,149
<p>I am working on my website, and I am trying to get the url parameter "page" which is an integer that tells which entry to read in the MySQL database that hols the HTML for all the pages. Here is my code, with the MySQL username and password removed for security reasons:</p> <pre><code> if ($_GET["page"]) { $con ...
[ { "answer_id": 301163, "author": "andy.gurin", "author_id": 22388, "author_profile": "https://Stackoverflow.com/users/22388", "pm_score": 0, "selected": false, "text": "SELECT SHOW DESCRIBE EXPLAIN mysql_query() INSERT UPDATE DELETE DROP mysql_query() mysql_fetch_array()" }, { "a...
2008/11/19
[ "https://Stackoverflow.com/questions/301149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/60881/" ]
301,158
<p>I need rich UI designer for editing the web.config for ASP.net application. From the designer We can edit the tags in config files</p> <p>It may be any windows application going to edit my config files.</p>
[ { "answer_id": 301656, "author": "Martin Kool", "author_id": 216896, "author_profile": "https://Stackoverflow.com/users/216896", "pm_score": 1, "selected": false, "text": "C:\\Program Files\\Microsoft Visual Studio 9.0\\Xml\\Schemas\n <configuration xmlns=\"http://schemas.microsoft.com/....
2008/11/19
[ "https://Stackoverflow.com/questions/301158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
301,160
<p>Can someone explain the difference between:</p> <ul> <li>lock (someobject) {}</li> <li>Using Mutex</li> <li>Using Semaphore</li> <li>Using Monitor</li> <li>Using Other .Net synchronization classes</li> </ul> <p>I just can't figure it out. It seems to me the first two are the same?</p>
[ { "answer_id": 301175, "author": "arul", "author_id": 15409, "author_profile": "https://Stackoverflow.com/users/15409", "pm_score": 4, "selected": false, "text": "object obj = x;\nSystem.Threading.Monitor.Enter(obj);\ntry {\n …\n}\nfinally {\n System.Threading.Monitor.Exit(obj);\n}\n...
2008/11/19
[ "https://Stackoverflow.com/questions/301160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38834/" ]
301,162
<p>Aside from using the region to infer which carrier the user is under.</p>
[ { "answer_id": 8797144, "author": "Louie", "author_id": 270760, "author_profile": "https://Stackoverflow.com/users/270760", "pm_score": 2, "selected": false, "text": "#import <CoreTelephony/CTTelephonyNetworkInfo.h> CTTelephonyNetworkInfo *phoneInfo = [[CTTelephonyNetworkInfo alloc] init...
2008/11/19
[ "https://Stackoverflow.com/questions/301162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38836/" ]
301,168
<p>Is there a way to define the timezone for an application in ASP.NET such that all times read from/compared to current server time are implicitly converted, or do I need to put in conversion statements as each and every DateTime.Now call?</p>
[ { "answer_id": 24683327, "author": "Matt Johnson-Pint", "author_id": 634824, "author_profile": "https://Stackoverflow.com/users/634824", "pm_score": 1, "selected": false, "text": "DateTime.Now DateTime.UtcNow DateTimeOffset DateTimeOffset.Now DateTimeOffset.UtcNow TimeZoneInfo" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
301,174
<p>How to delete a file which is in use/open by some process in runtime. I am using vb.net for my project and a image is shown in picturebox, and that should be deleted, without closing that file.</p>
[ { "answer_id": 301188, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "MoveFileEx() MOVEFILE_DELAY_UNTIL_REBOOT NULL DeleteFile()" }, { "answer_id": 24577825, "author": "SomeD...
2008/11/19
[ "https://Stackoverflow.com/questions/301174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,176
<p>I need to use a byte array as a profile property in a website. Normally I would declare the type as system.string or system.int32 but I have no idea what the type if for a byte array.</p> <p>EDIT: I need to use this as profile property that is declared in the web.config like below:</p> <pre><code>&lt;profile defau...
[ { "answer_id": 301188, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "MoveFileEx() MOVEFILE_DELAY_UNTIL_REBOOT NULL DeleteFile()" }, { "answer_id": 24577825, "author": "SomeD...
2008/11/19
[ "https://Stackoverflow.com/questions/301176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23230/" ]
301,193
<p>how do I get information about a photo like the author, the license using PHP?</p>
[ { "answer_id": 558508, "author": "Jeff Winkworth", "author_id": 1306, "author_profile": "https://Stackoverflow.com/users/1306", "pm_score": 2, "selected": false, "text": "$query = \"http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=\" . API_KEY . \"&photo_id=\" . ...
2008/11/19
[ "https://Stackoverflow.com/questions/301193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,203
<p>Although I'm doubtful, I'm curious as to whether it's possible to extract primitive-type template parameters from an existing type, perhaps using RTTI.</p> <p>For example:</p> <pre><code>typedef std::bitset&lt;16&gt; WordSet; </code></pre> <p>Would it be possible to extract the number 16 in the above code without...
[ { "answer_id": 301228, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 1, "selected": false, "text": "std::bitset size() size_t sz = oh_my_word.size(); // sz is now 16\n template <int N>\nclass Foo\n{\npublic:\n int ...
2008/11/19
[ "https://Stackoverflow.com/questions/301203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594/" ]
301,215
<p>How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more.</p> <p>Edit: I think I found it. [NSUserDefaults standardUserDefaults] mentioned at <a href="http://lists.apple.com/archives/student-dev/2004/Aug/msg00140.html" rel="noreferrer">http://lists.apple.com/archives/studen...
[ { "answer_id": 301573, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 4, "selected": true, "text": "/Users/<current-user>/Application Support/Dock/desktoppicture.db \n sqlite3 \"/Application Support/Dock/desktoppicture.db\"\n...
2008/11/19
[ "https://Stackoverflow.com/questions/301215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8005/" ]
301,221
<p>I am executing a <code>diff</code> command in <code>perl</code>.</p> <pre><code>my @lines = `/usr/local/bin/diff -udr \"$expected_file\" \"$gen_file\"`; if ($? != 0) { print ERRFILE "Diff between $expected_file and $gen_file failed\n"; return $diff_err; } </code></pre> <p>Here the <code>diff</code> might ...
[ { "answer_id": 301428, "author": "brian d foy", "author_id": 2766176, "author_profile": "https://Stackoverflow.com/users/2766176", "pm_score": 5, "selected": true, "text": "2>file.txt" }, { "answer_id": 301764, "author": "xdg", "author_id": 11800, "author_profile": "h...
2008/11/19
[ "https://Stackoverflow.com/questions/301221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18657/" ]
301,230
<p>I'm trying to create routes which follow the structure of a tree navigation system, i.e I want to include the entire path in the tree in my route. So if I had a tree which looked like this</p> <ul> <li>Computers <ul> <li>Software <ul> <li>Development</li> <li>Graphics</li> </ul></li> <li>Hardware <ul> <li>CPU</l...
[ { "answer_id": 5308946, "author": "Robert Koritnik", "author_id": 75642, "author_profile": "https://Stackoverflow.com/users/75642", "pm_score": 2, "selected": false, "text": "GreedyRoute {segment}/{segment}/{*greedy} Route {segment}/{*greedy}/{segment} {*greedy}/{segment}/{segment}" } ...
2008/11/19
[ "https://Stackoverflow.com/questions/301230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25319/" ]
301,233
<p>I am using Xcode to develop a GUI application. I have a model class and a controller class. I have a NSTextView data member in my controller class. How do I access this variable from the model class?</p>
[ { "answer_id": 301565, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 4, "selected": false, "text": "MyController * c = [[MyController alloc] init];\n// c has a member name textView, let's access it\n[c->textView ...];\n // T...
2008/11/19
[ "https://Stackoverflow.com/questions/301233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,234
<p>I have a question regarding an update function I created...</p> <pre><code>CREATE OR REPLACE FUNCTION rm_category_update(icompany bpchar, iraw_mat_cat_code bpchar, iraw_mat_cat_desc bpchar) RETURNS character AS $BODY$ DECLARE loc_result CHAR(50); BEGIN UPDATE rm_category SET raw_mat_cat_code = ...
[ { "answer_id": 301565, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 4, "selected": false, "text": "MyController * c = [[MyController alloc] init];\n// c has a member name textView, let's access it\n[c->textView ...];\n // T...
2008/11/19
[ "https://Stackoverflow.com/questions/301234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,239
<p>Well I testing my jython program, that does some neat [".xls", ".doc", ".rtf", ".tif", ".tiff", ".pdf" files] -> pdf (intermediary file) -> tif (final output) conversion using Open Office. We moved away from MS Office due to the problems we had with automation. Now it seems we have knocked down many bottles relate...
[ { "answer_id": 301565, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 4, "selected": false, "text": "MyController * c = [[MyController alloc] init];\n// c has a member name textView, let's access it\n[c->textView ...];\n // T...
2008/11/19
[ "https://Stackoverflow.com/questions/301239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21537/" ]
301,241
<p>I am getting a web host and i have projects with teammats. I thought it be a nice idea to have my own paste site that has no expiry date on paste (i know <a href="http://pastie.org/" rel="nofollow noreferrer">http://pastie.org/</a> exist) and other things. i wanted to know. Whats a simple highlight lib i can use on...
[ { "answer_id": 301300, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "$cpplex = '/\n (?<string>\"(?:\\\\\\\\\"|.)*?\")|\n (?<char>\\'(?:\\\\\\\\\\'|.)*?\\')|\n (?<comment>\\\\/\\...
2008/11/19
[ "https://Stackoverflow.com/questions/301241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,247
<p>The <strong><code>fuser</code></strong> command lets me know which processes are using a file or directory.</p> <p>I'm looking for command that does the opposite: lets me know which files are being used by a process.</p> <hr> <h2>Update</h2> <p>Forgot to mention that it's for a Solaris system.</p>
[ { "answer_id": 301255, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 5, "selected": false, "text": "lsof -p <pid>\n" }, { "answer_id": 301332, "author": "Kent Fredric", "author_id": 15614, ...
2008/11/19
[ "https://Stackoverflow.com/questions/301247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15884/" ]
301,283
<p>I am developing a Java desktop application and would like to have an external configuration.xml.<br> I am developing the application using Netbeans and tried to add the configuration.xml file in the dist directory so that it resides in the application work folder. But when Netbeans executes its clean operation it de...
[ { "answer_id": 301405, "author": "Michel", "author_id": 7198, "author_profile": "https://Stackoverflow.com/users/7198", "pm_score": 5, "selected": true, "text": "<target name=\"-post-jar\">\n <copy todir=\"${dist.jar.dir}\">\n <fileset dir=\"resources\" includes=\"**\"/>\n </co...
2008/11/19
[ "https://Stackoverflow.com/questions/301283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34145/" ]
301,284
<p>I have example of code below. </p> <pre><code>&lt;script type="text/javascript" src="assets/scripts/somescript.php"&gt;. &lt;/script&gt; </code></pre> <p>So, will my browser still cache this just by not setting this scripts headers meta tag cache to must-revalidate?</p>
[ { "answer_id": 301299, "author": "Stefan Gehrig", "author_id": 11354, "author_profile": "https://Stackoverflow.com/users/11354", "pm_score": 0, "selected": false, "text": "Content-type: text/javascript; charset=\"your_charset\" header()" }, { "answer_id": 301316, "author": "K...
2008/11/19
[ "https://Stackoverflow.com/questions/301284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24744/" ]
301,290
<p>I want to increase the I/O priority of a process. Answers for both .NET and Windows Vista would be nice. processexplorer is ok as well.</p>
[ { "answer_id": 301333, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 6, "selected": true, "text": "FILE_IO_PRIORITY_HINT_INFO priorityHint;\npriorityHint.PriorityHint = IoPriorityHintLow;\nresult = SetFileInformatio...
2008/11/19
[ "https://Stackoverflow.com/questions/301290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35012/" ]
301,302
<p>I'm using RSACryptoServiceProvider in .NET 2 and it seems that the Private part of a Public/Private key pair always contains the Public part as well.</p> <p>I need to encrypt some info using my Public key, and allow the other party to ONLY DECRYPT what I encrypted. I don't want them to be able to know how I encrypt...
[ { "answer_id": 301313, "author": "Stefan Schultze", "author_id": 6358, "author_profile": "https://Stackoverflow.com/users/6358", "pm_score": 4, "selected": false, "text": " public static string Sign(string data, string privateAndPublicKey)\n {\n byte[] dataBytes = Encoding.U...
2008/11/19
[ "https://Stackoverflow.com/questions/301302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,312
<p>Is there a way to execute a query(containing built in DB function) using PreparedStatement?</p> <p>Example: insert into foo (location) values (pointfromtext('12.56666 13.67777',4130)) Here pointfromtext is a built in function.</p>
[ { "answer_id": 301368, "author": "alexmeia", "author_id": 36587, "author_profile": "https://Stackoverflow.com/users/36587", "pm_score": 0, "selected": false, "text": " PreparedStatement bar = connection.prepareStatement(\"insert into foo (location) values (pointfromtext('? ?',4130)))\");...
2008/11/19
[ "https://Stackoverflow.com/questions/301312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38857/" ]
301,330
<p>If I have a template function, for example like this:</p> <pre><code>template&lt;typename T&gt; void func(const std::vector&lt;T&gt;&amp; v) </code></pre> <p>Is there any way I can determine within the function whether T is a pointer, or would I have to use another template function for this, ie:</p> <pre><code>t...
[ { "answer_id": 301338, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 7, "selected": false, "text": "template<typename T>\nstruct is_pointer { static const bool value = false; };\n\ntemplate<typename T>\nstru...
2008/11/19
[ "https://Stackoverflow.com/questions/301330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,339
<p>I wonder if <a href="http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx" rel="nofollow noreferrer">MailMessage</a> class is protected from <a href="http://en.wikipedia.org/wiki/E-mail_injection" rel="nofollow noreferrer">e-mail injection</a>. For example, should I check values before passing th...
[ { "answer_id": 1000932, "author": "SLaks", "author_id": 34397, "author_profile": "https://Stackoverflow.com/users/34397", "pm_score": 3, "selected": true, "text": "MailAddress MailBnfHelper MailMessage" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11256/" ]
301,345
<p>I use the Autocomplete extender feature to get the list of suggestions from my database. There is no scroll bar for this control, so I have added a scroll bar in a panel (MS .net 2.0) which i attach to my autocomplete extender.Now the issue is with the srcoll bar. like this </p> <pre><code>&lt;asp:Panel ID="autocom...
[ { "answer_id": 314150, "author": "Richard Ev", "author_id": 39709, "author_profile": "https://Stackoverflow.com/users/39709", "pm_score": 1, "selected": false, "text": "MinimumPrefixLength" }, { "answer_id": 565554, "author": "BigOmar", "author_id": 2442689, "author_p...
2008/11/19
[ "https://Stackoverflow.com/questions/301345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,354
<p>I am probably doing something wrong -- but cant figure why. I have a DateTime field in my DB keeping a UTC time </p> <p>My server is in the US, and the browser is in Europe. </p> <p>The PageLoad Code is as follow:</p> <pre><code>DateTime t = DateTime.SpecifyKind((DateTime)rdr["startTime"], DateTimeKind.Utc); labe...
[ { "answer_id": 301380, "author": "J c", "author_id": 25837, "author_profile": "https://Stackoverflow.com/users/25837", "pm_score": 3, "selected": false, "text": "alert((new Date()).getTimezoneOffset());\n" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37955/" ]
301,357
<p>I know that I am supposed to use <code>delete []</code> after I use <code>new []</code>, so using <code>auto_ptr</code> with <code>new []</code> is not such a bright idea.</p> <p>However, while debugging <code>delete []</code> (using Visual Studio 2005), I noticed that the call went into a function that looked like...
[ { "answer_id": 301370, "author": "CAdaker", "author_id": 30579, "author_profile": "https://Stackoverflow.com/users/30579", "pm_score": 2, "selected": false, "text": "delete delete[]" }, { "answer_id": 301612, "author": "Andreas Magnusson", "author_id": 5811, "author_p...
2008/11/19
[ "https://Stackoverflow.com/questions/301357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1398/" ]
301,365
<p>My team is responsible for the development of an API for a large system that we also write. We need to provide example code so that other developers using our API can learn how to use it. We have been documenting the code using the xml document comments. eg.</p> <pre><code>/// &lt;summary&gt;Summary here&lt;/summar...
[ { "answer_id": 301415, "author": "Robert Gould", "author_id": 15124, "author_profile": "https://Stackoverflow.com/users/15124", "pm_score": 0, "selected": false, "text": "#include \"samples/sampleA.h\"\n\nvoid main()\n{\n SomeFunction();\n}\n" }, { "answer_id": 301423, "auth...
2008/11/19
[ "https://Stackoverflow.com/questions/301365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33125/" ]
301,366
<p>I am using Oracle form 10 I want to know how can I access the parameters of URL in oracle form </p> <p>Ex: whenever I run the form it opens in a browser and the URL for the same is</p> <p><a href="http://112.10.0.10:7778/forms/frmservlet?config=pkamble" rel="nofollow noreferrer">http://112.10.0.10:7778/forms/frmse...
[ { "answer_id": 340000, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "http://112.10.0.10:7778/forms/frmservlet?config=pkamble&otherparams=name=value\n if :PARAMETER.name = 'value' then\n message('...
2008/11/19
[ "https://Stackoverflow.com/questions/301366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,369
<p>How do I declare a session variable in PL/SQL - one that will persist for the duration of the session only, without me having to store it in the database itself?</p>
[ { "answer_id": 301418, "author": "WW.", "author_id": 14663, "author_profile": "https://Stackoverflow.com/users/14663", "pm_score": 4, "selected": false, "text": "CREATE OR REPLACE PACKAGE my_package\nAS\n FUNCTION get_a RETURN NUMBER;\nEND my_package;\n/\n\nCREATE OR REPLACE PACKAGE B...
2008/11/19
[ "https://Stackoverflow.com/questions/301369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38871/" ]
301,371
<p>In most programming languages, dictionaries are preferred over hashtables. What are the reasons behind that?</p>
[ { "answer_id": 301379, "author": "gius", "author_id": 19712, "author_profile": "https://Stackoverflow.com/users/19712", "pm_score": 8, "selected": false, "text": "Dictionary Dictionary<TKey, TValue> Object Hashtable var customers = new Dictionary<string, Customer>();\n...\nCustomer custo...
2008/11/19
[ "https://Stackoverflow.com/questions/301371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34588/" ]
301,372
<p>Suppose I have a .NET assembly, A, which uses reflection to load assemblies B and C (also .NET). These two assemblies both implement a number of large interfaces (the same for both). When a method is called in A it tries to make B do the work. However, B is unreliable and might throw exceptions. Now A has two modes,...
[ { "answer_id": 301389, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 2, "selected": false, "text": "public class BErrorWrapper : I1, I2, I3{\n ...\n public int DoSomeWork(int num){\n try\n {\n ...
2008/11/19
[ "https://Stackoverflow.com/questions/301372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4055/" ]
301,374
<p>In a PHP application I am writing, I would like to have users enter in text a mix of HTML and text with pointed-brackets, but when I display this text, I want to let the HTML tags be rendered by the non-HTML tags be shown literary, e.g. a user should be able to enter:</p> <pre><code>&lt;b&gt; 5 &gt; 3 = true&lt;/b&...
[ { "answer_id": 301387, "author": "philistyne", "author_id": 16597, "author_profile": "https://Stackoverflow.com/users/16597", "pm_score": 3, "selected": true, "text": "[b]This is bold[/b]\n[i]this is italic with a > 'greater than' sign there[/i]\n" }, { "answer_id": 301457, "...
2008/11/19
[ "https://Stackoverflow.com/questions/301374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
301,376
<p>I have the following markup for buttons (can be changed, but I really don't want to):</p> <pre><code>&lt;a href="#" class="button"&gt; Button text &lt;img src="someimage.png" /&gt; &lt;/a&gt; </code></pre> <p>This is styled using CSS to become a rather neat button with an icon on it. I am using jQuery to round...
[ { "answer_id": 301397, "author": "redsquare", "author_id": 6440, "author_profile": "https://Stackoverflow.com/users/6440", "pm_score": 5, "selected": true, "text": "$('a.button:has(img)')\n\n$('a.button:not(:has(img))')\n" }, { "answer_id": 301421, "author": "Russ Cam", "...
2008/11/19
[ "https://Stackoverflow.com/questions/301376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606/" ]
301,386
<p>Should I use textbox.text.Trim() function every time when I insert any data from web page to database.</p> <p>I just have a habit of using the trim function? Does it effect the performance any way? Should I use everytime or just when needed?</p>
[ { "answer_id": 301404, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 0, "selected": false, "text": "mysql_real_escape_string();\n" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,392
<p>How do you traverse a folder structure using C# without falling into the trap of <a href="http://en.wikipedia.org/wiki/NTFS_junction_point" rel="nofollow noreferrer">junction points</a>? </p>
[ { "answer_id": 301398, "author": "Pieter Breed", "author_id": 24172, "author_profile": "https://Stackoverflow.com/users/24172", "pm_score": 4, "selected": true, "text": "given folder /a/b\nlet /a/b/c point to /a\nthen\n/a/b/c/b/c/b becomes valid folder locations.\n private void FindFiles...
2008/11/19
[ "https://Stackoverflow.com/questions/301392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24172/" ]
301,400
<p>I am working with Rails fixtures for testing my rails application. It is all good except one of my database columns is supposed to hold YAML content. But, I am sure how to put the YAML markup I want to load into my database inside the YAML file. Here is an example:</p> <pre><code>mvnforum: name: mvnforum ...
[ { "answer_id": 301476, "author": "JesperE", "author_id": 13051, "author_profile": "https://Stackoverflow.com/users/13051", "pm_score": 4, "selected": true, "text": "url: \"src: test username: admin\"\n mvnforum:\n name: mvnforum\n abstraction_type: SVN\n url: \"\nsrc: test\\n\nuser...
2008/11/19
[ "https://Stackoverflow.com/questions/301400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5004/" ]
301,425
<p>I have a method to return a group of objects as a generic list which I then bind to a Repeater. I want to implement paging on the repeater using the PagedDataSource class but I'm not sure that this is possible as it doesn't seem to work.</p> <p>Will I have to change the return type of my method or is it possible to...
[ { "answer_id": 301440, "author": "Kieron", "author_id": 5791, "author_profile": "https://Stackoverflow.com/users/5791", "pm_score": 3, "selected": true, "text": "void PopulateNewsItems (int? pageNo)\n{\n var model = ModelFactory.GetNewsModel ();\n var searchResults = model.GetNewsI...
2008/11/19
[ "https://Stackoverflow.com/questions/301425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2913/" ]
301,429
<p>I have a table in Access 2003 VBA with 164 columns but the data I get has 181 column and it is possible that it will get bigger in the future. I need to know how to resize my table an to add extra colums during the runtime I know how to check how many colums I need so I just need to know how to resize my own table....
[ { "answer_id": 301913, "author": "Patrick Cuff", "author_id": 7903, "author_profile": "https://Stackoverflow.com/users/7903", "pm_score": 2, "selected": false, "text": " ID\n FirstName\n LastName\n ...\n Amount\n\n 1 Joe Smith ... $123\n 2 Bob Roberts ... $214\n 3 Jim B...
2008/11/19
[ "https://Stackoverflow.com/questions/301429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,430
<p>I'm trying to use some extension methods that I use to apply consistent formatting to DateTime and Int32 - which works absolutely fine in code behind, but I'm having issues with databinding.</p> <p>I get:</p> <pre><code>'System.DateTime' does not contain a definition for 'ToCustomShortDate' </code></pre> <p>for</...
[ { "answer_id": 301477, "author": "Rohan West", "author_id": 38686, "author_profile": "https://Stackoverflow.com/users/38686", "pm_score": 0, "selected": false, "text": "namespace Formatting\n{\n\n public static class DateTimeExtender\n {\n public static string ToCustomShortD...
2008/11/19
[ "https://Stackoverflow.com/questions/301430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5777/" ]
301,435
<p>I have a form I am submitting via AJAX (using prototype and the built-in rails 'form_remote_tag' helper).<br> What I would like is to update one div (a status area) if there are form validation errors but a different div (the div where the form lives) if the submit goes through sucessfully.</p> <p>My code looks som...
[ { "answer_id": 301477, "author": "Rohan West", "author_id": 38686, "author_profile": "https://Stackoverflow.com/users/38686", "pm_score": 0, "selected": false, "text": "namespace Formatting\n{\n\n public static class DateTimeExtender\n {\n public static string ToCustomShortD...
2008/11/19
[ "https://Stackoverflow.com/questions/301435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/151/" ]
301,438
<p>...or am I stuck rolling my own "XML chopping" functions. I'd like to create a small tasktray app so I can quickly re-point a Virual Directory to one of several of folders on my harddisk.</p> <p><strong>Bit of background:</strong> </p> <p>I have 3 different svn branches of our code base on my dev machine.</p> <pr...
[ { "answer_id": 301724, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 3, "selected": true, "text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.DirectoryServices;\n\nnamesp...
2008/11/19
[ "https://Stackoverflow.com/questions/301438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30155/" ]
301,442
<p>I want to create a compiled JavaScript file for my website. For development I would prefer to keep the JavaScript in separate files and just as part of my automated scripts concatenate the files into one and run the compressor over it.</p> <p>My problem is that if I use the old DOS copy command it also puts in th...
[ { "answer_id": 301488, "author": "eugensk", "author_id": 17495, "author_profile": "https://Stackoverflow.com/users/17495", "pm_score": 4, "selected": false, "text": "copy /B *.js compiled.js /Y\n copy /A *.js compiled.js /B /Y\n copy /A *.js /B compiled.js /Y \n" }, { "answer_id...
2008/11/19
[ "https://Stackoverflow.com/questions/301442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24459/" ]
301,466
<p>This has always bugged me. When I ssh or telnet to a Unix server (whatever flavour) it always manages to guess correctly the terminal type I am logging in from and so the keyboard always acts 'normally' ... i.e. the backspace key works. </p> <p>But then when I have successfully logged in, it often guesses incorrect...
[ { "answer_id": 301535, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 1, "selected": false, "text": "stty erase '^H' stty erase 'X'" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21544/" ]
301,468
<p>I am currently migrating one of my clients sites to a windows server 2008 and SQL 2008 setup, but I am having massive problems with connecting to the database from the site.</p> <p>I have restored the database from a SQL 2k backup into the SQL 2008 server, I have setup the user correctly and can login as that user ...
[ { "answer_id": 2391722, "author": "shrikant", "author_id": 287633, "author_profile": "https://Stackoverflow.com/users/287633", "pm_score": 0, "selected": false, "text": "myConnection.ConnectionString = \"Driver={SQL Server};Server=xxx.xxx.xxx.xxx,1533;Database=mydb;Uid=user123;Pwd=user12...
2008/11/19
[ "https://Stackoverflow.com/questions/301468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,471
<p>I'm trying to load javascript code with a user web control into a page via a the Page.LoadControl method during an asyncron post back of an update panel.</p> <p>I've tried the specially for that scenario designed methods of the scriptmanager, but the javascript just doens't get returned to the user.</p> <p>To expl...
[ { "answer_id": 301972, "author": "rams", "author_id": 3635, "author_profile": "https://Stackoverflow.com/users/3635", "pm_score": 2, "selected": false, "text": "Page.ClientScript.RegisterStartUpScript(GetType(Page), \"key\", <your script here>, addSctiptTags:=true)\n" }, { "answe...
2008/11/19
[ "https://Stackoverflow.com/questions/301471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36475/" ]
301,473
<p>I have several input and option elements on my page, each (well almost) have an event attached to update some text on the page once they change. I use jQuery which is really really cool :) </p> <p>I also use Microsofts <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="noreferrer">Ajax</a> framework...
[ { "answer_id": 301489, "author": "Phil Jenkins", "author_id": 35496, "author_profile": "https://Stackoverflow.com/users/35496", "pm_score": 7, "selected": true, "text": "pageLoad function pageLoad(sender, args)\n{\n if (args.get_isPartialLoad())\n {\n //Specific code for partia...
2008/11/19
[ "https://Stackoverflow.com/questions/301473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11619/" ]
301,479
<p>Here is new C# future in version 4.0 known as dynamic. Show me the way i can use it in my code and how this future can help me?</p> <hr> <p>Related questions:</p> <ul> <li><a href="https://stackoverflow.com/questions/298277/does-the-new-dynamic-c-40-keyword-deprecate-the-var-keyword">Does the new ‘dynamic’ C# 4.0...
[ { "answer_id": 301498, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 2, "selected": false, "text": "HtmlPage.Window.Invoke(\"HelloWorldFunction\");\n HtmlPage.Window.HelloWorldFunction();\n" }, { "answer_i...
2008/11/19
[ "https://Stackoverflow.com/questions/301479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/208062/" ]
301,482
<p>I have a ListBox control that I want to change into having a toggle selection. i.e. Click once on an item selects it, click again it deselects it. Also, clicking another item in the list should do the default action of deselecting the previous item and selecting the new one.</p> <p>What's the best way of achieving ...
[ { "answer_id": 301852, "author": "Bijington", "author_id": 32348, "author_profile": "https://Stackoverflow.com/users/32348", "pm_score": 0, "selected": false, "text": "Point newPoint = e.GetPosition(backgroundImage);\n\nHitTestResult result = VisualTreeHelper.HitTest(this, newPoint);\n\n...
2008/11/19
[ "https://Stackoverflow.com/questions/301482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
301,484
<p>I am trying to create a dialog box that will appear only if the browser selected is IE (any version) however I get this error:</p> <blockquote> <p>Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)</p> </blockquote> <p>That's all in "Line/Char...
[ { "answer_id": 301677, "author": "some", "author_id": 36866, "author_profile": "https://Stackoverflow.com/users/36866", "pm_score": 2, "selected": false, "text": "<!--[if IE]>\n<script type=\"text/javascript\"> \n showDialog('¡Aviso Importante!','message','warning',10);\n </script>\n<![e...
2008/11/19
[ "https://Stackoverflow.com/questions/301484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28586/" ]
301,490
<p>I have a class like so:</p> <pre><code>public class ClassA { public bool MethodA() { //do something complicated to test requiring a lot of setup } public bool MethodB() { if (MethodA()) //do something else //do something else endif }...
[ { "answer_id": 301677, "author": "some", "author_id": 36866, "author_profile": "https://Stackoverflow.com/users/36866", "pm_score": 2, "selected": false, "text": "<!--[if IE]>\n<script type=\"text/javascript\"> \n showDialog('¡Aviso Importante!','message','warning',10);\n </script>\n<![e...
2008/11/19
[ "https://Stackoverflow.com/questions/301490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
301,493
<p>We have developers with knowledge of these languages - Ruby , Python, .Net or Java. We are developing an application which will mainly handle XML documents. Most of the work is to convert predefined XML files into database tables, providing mapping between XML documents through database, creating reports from databa...
[ { "answer_id": 301630, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": ".ini .properties \"\"\"A particular XML parser. Formats change, so sometimes this changes, too.\"\"\"\n\nimport xml.etree.E...
2008/11/19
[ "https://Stackoverflow.com/questions/301493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
301,502
<p>I just installed an application on a win2003 server and I'm getting this error:</p> <pre><code>Line 149: &lt;roleManager&gt; Line 150: &lt;providers&gt; Line 151: &lt;add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, ...
[ { "answer_id": 301630, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": ".ini .properties \"\"\"A particular XML parser. Formats change, so sometimes this changes, too.\"\"\"\n\nimport xml.etree.E...
2008/11/19
[ "https://Stackoverflow.com/questions/301502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7277/" ]
301,504
<p>A follow up to an earlier question, showing the part that fails when I try to get the error message from my target library:</p> <pre><code>require 'gt4r' @@test_environment = "INCLUDE=C:\\graphtalk\\env\\aiadev\\config\\aiadev.ini" @@normal_user = "BMCHARGUE" describe Gt4r do it 'initializes' do rv = Gt4r...
[ { "answer_id": 301774, "author": "a2800276", "author_id": 27408, "author_profile": "https://Stackoverflow.com/users/27408", "pm_score": 2, "selected": false, "text": "Gt4r.gTD_get_error_message rv, @msg\n" }, { "answer_id": 301781, "author": "a2800276", "author_id": 27408...
2008/11/19
[ "https://Stackoverflow.com/questions/301504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32322/" ]
301,510
<p>I have an offline paper based form. I need to convert it into a software that people can use on their computers to fill and submit information. Since the form (it is a tax return) requires considerable time in filling, it is not convenient to have it online. I would much rather have a simple exe which gathers inform...
[ { "answer_id": 301521, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 1, "selected": false, "text": "/main" } ]
2008/11/19
[ "https://Stackoverflow.com/questions/301510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22009/" ]
301,525
<p>What are the expert debugging hints for your favourite language, you think everyone should use?</p> <p>As an example, I'll provide my C++ debugging hints, that between them help me shake out most of the bugs I come across, in this often hard-to-debug language.</p> <p><B>C++</B></p> <ul> <li><p>Increase the warnin...
[ { "answer_id": 301857, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "echo '<pre>'; print_r($GLOBALS); echo '</pre>';\n" }, { "answer_id": 301900, "author": "user38329", "author_id...
2008/11/19
[ "https://Stackoverflow.com/questions/301525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27074/" ]