qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
261,580
<p>This declaration causes an overflow in VBA:</p> <pre><code>Const OVERFLOWS As Long = 10 * 60 * 60 </code></pre> <p>whereas setting the value directly is fine:</p> <pre><code>Const COMPILES_OK As Long = 36000 </code></pre> <p>How do you persuade VBA to treat literal integers as longs?</p> <p>Thanks</p>
[ { "answer_id": 261615, "author": "xsl", "author_id": 11387, "author_profile": "https://Stackoverflow.com/users/11387", "pm_score": 5, "selected": true, "text": "long & Const OVERFLOWS As Long = 10& * 60 * 60\n CLNG long" }, { "answer_id": 261680, "author": "dbb", "author_...
2008/11/04
[ "https://Stackoverflow.com/questions/261580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1518/" ]
261,591
<p>I'm currently writing a C# application that does a lot of digital signal processing, which involves a lot of small fine-tuned memory xfer operations. I wrote these routines using unsafe pointers and they seem to perform much better than I first thought. However, I want the app to be as fast as possible.</p> <p>Woul...
[ { "answer_id": 261819, "author": "Andreas Magnusson", "author_id": 5811, "author_profile": "https://Stackoverflow.com/users/5811", "pm_score": 3, "selected": false, "text": "for each n do t´[n] = h(g(f(t[n])))\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7839/" ]
261,594
<p>In C# Is there a way of getting a finer granularity with SQL exceptions?</p> <p>I'm aware that an aweful lot can go wrong but I want to deal with certain cases differently and parsing the Error message doesn't seem to be very elegant.</p> <p>Also Are the error messages created by the framework or are they db speci...
[ { "answer_id": 261608, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": true, "text": "SqlException .Number InfoMessage" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
261,599
<p>This code always works, even in different browsers:</p> <pre><code>function fooCheck() { alert(internalFoo()); // We are using internalFoo() here... return internalFoo(); // And here, even though it has not been defined... function internalFoo() { return true; } //...until here! } fooCheck(); </code></pre>...
[ { "answer_id": 261682, "author": "bobince", "author_id": 18936, "author_profile": "https://Stackoverflow.com/users/18936", "pm_score": 9, "selected": true, "text": "function function var internalFoo = function() { return true; };\n" }, { "answer_id": 262643, "author": "Andrew...
2008/11/04
[ "https://Stackoverflow.com/questions/261599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21648/" ]
261,601
<p>I need to hide a Windows form from the taskbar but I can't use <code>WS_EX_TOOLWINDOW</code> because I need the system menu and min/max buttons on the form's title bar. </p> <p>If I switch the form to a tool window at runtime the form skinning is stuffed up. From searching on the Web I see that VB has a ShowInTaskb...
[ { "answer_id": 261619, "author": "Toon Krijthe", "author_id": 18061, "author_profile": "https://Stackoverflow.com/users/18061", "pm_score": 1, "selected": false, "text": "procedure TForm1.FormCreate(Sender: TObject);\nbegin\n ShowWindow(Application.Handle, SW_HIDE);\n SetWindowLong(App...
2008/11/04
[ "https://Stackoverflow.com/questions/261601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
261,622
<p>Is it possible to replace the standard broken image via CSS or using another technique? All my images are the same size and my have transparency.</p> <p>I've tried to wrap all images with a div's background:</p> <pre><code>&lt;div class="no_broken"&gt; &lt;img src="http://www.web.com/found.gif"/&gt; &lt;/div&gt;...
[ { "answer_id": 261651, "author": "schnaader", "author_id": 34065, "author_profile": "https://Stackoverflow.com/users/34065", "pm_score": 7, "selected": true, "text": "<img src=\"some.jpg\" onerror=\"this.src='alternative.jpg';\">\n" }, { "answer_id": 22946052, "author": "broo...
2008/11/04
[ "https://Stackoverflow.com/questions/261622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28150/" ]
261,625
<p>I am using ehCache to store larges amount of data. This cache is accessed about 3 times every second and must be kept up to date. I have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachemanager also). What i want to do is copy t...
[ { "answer_id": 261871, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 0, "selected": false, "text": "CacheFactory" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11612/" ]
261,638
<p>I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time-restricted license file.</p> <p>If we distribute the <code>.py</code> files or even <code>.pyc</code> files it will be easy to (decompile and) remove the...
[ { "answer_id": 261797, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 3, "selected": false, "text": ".pyc #" }, { "answer_id": 30121460, "author": "Lmwangi", "author_id": 458878, "author_profile": "https://Stack...
2008/11/04
[ "https://Stackoverflow.com/questions/261638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6759/" ]
261,648
<p>I'm developing an application which has a lot of text and also different modules which can be included or not in every build.</p> <p>For each saved project we generate automatically a report with all the details (i.e. description of algorithms used in that project and so on). Currently we embed all text as strings ...
[ { "answer_id": 261720, "author": "Adam", "author_id": 1366, "author_profile": "https://Stackoverflow.com/users/1366", "pm_score": 1, "selected": false, "text": "#textId \"the actual text\"\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3373/" ]
261,655
<p>I have a list of tuples like this:</p> <pre><code>[ ('a', 1), ('a', 2), ('a', 3), ('b', 1), ('b', 2), ('c', 1), ] </code></pre> <p>I want to iterate through this keying by the first item, so, for example, I could print something like this:</p> <pre><code>a 1 2 3 b 1 2 c 1 </code></pre> <p>How would I go about do...
[ { "answer_id": 261665, "author": "Ned Batchelder", "author_id": 14343, "author_profile": "https://Stackoverflow.com/users/14343", "pm_score": 7, "selected": true, "text": "l = [\n('a', 1),\n('a', 2),\n('a', 3),\n('b', 1),\n('b', 2),\n('c', 1),\n]\n\nd = {}\nfor x, y in l:\n d.setdefau...
2008/11/04
[ "https://Stackoverflow.com/questions/261655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18909/" ]
261,660
<p>I have a <code>TreeView</code> windows forms control with an <code>ImageList</code>, and I want some of the nodes to display images, but the others to not have images.</p> <p>I <em>don't</em> want a blank space where the image should be. I <em>don't</em> want an image that looks like the lines that the TreeView wo...
[ { "answer_id": 262396, "author": "Martin Brown", "author_id": 20553, "author_profile": "https://Stackoverflow.com/users/20553", "pm_score": 4, "selected": true, "text": "ImageKey ImageIndex ImageIndex treeView.ImageKey = \"Value\";\nDebug.WriteLine(treeView.ImageIndex);\ntreeView.ImageKe...
2008/11/04
[ "https://Stackoverflow.com/questions/261660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
261,663
<p>Is it possible to define an implicit conversion of enums in c#?</p> <p>something that could achieve this?</p> <pre><code>public enum MyEnum { one = 1, two = 2 } MyEnum number = MyEnum.one; long i = number; </code></pre> <p>If not, why not?</p>
[ { "answer_id": 261676, "author": "Ash", "author_id": 31128, "author_profile": "https://Stackoverflow.com/users/31128", "pm_score": 2, "selected": false, "text": "public enum MyEnum : long\n{\n one = 1,\n two = 2,\n}\n\nMyEnum number = MyEnum.one;\nlong i = (long)number;\n zero = 0"...
2008/11/04
[ "https://Stackoverflow.com/questions/261663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17540/" ]
261,683
<p>Does it mean that two threads can't change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple threads are executing that code segment?</p>
[ { "answer_id": 261729, "author": "Marcus Downing", "author_id": 1000, "author_profile": "https://Stackoverflow.com/users/1000", "pm_score": 5, "selected": false, "text": "StringBuffer StringBuilder StringBuffer StringBuffer StringBuilder" }, { "answer_id": 262495, "author": "...
2008/11/04
[ "https://Stackoverflow.com/questions/261683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
261,709
<p>I have the following code:</p> <pre><code>using System; using System.Linq; using System.Linq.Expressions; public class Program { public static void Main() { Descendant d = new Descendant(); d.TestMethod(); } } public class Base { protected void FigureItOut&lt;TClass, TMember&gt;(Ex...
[ { "answer_id": 261742, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": "protected internal this. source this TClass public class Base\n{\n protected internal void FigureItOut<TClass, TMem...
2008/11/04
[ "https://Stackoverflow.com/questions/261709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
261,717
<p>I have a query on my database as such:</p> <pre><code>SELECT * FROM expenses WHERE user_id = ? AND dated_on = ? </code></pre> <p>I have added an index to the table on both the <code>user_id</code> and <code>dated_on</code> columns. When I inspect the indexes using <code>SHOW INDEXES FROM expenses</code>, there ar...
[ { "answer_id": 261761, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 4, "selected": true, "text": "SELECT * FROM expenses WHERE user_id = ? SELECT * FROM expenses WHERE dated_on = ? WHERE A = ? AND B = ? WHERE A = ? AND C = ?...
2008/11/04
[ "https://Stackoverflow.com/questions/261717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174/" ]
261,721
<p>Do you know a way to organize boolean expressions in a database while allowing infinite nesting of the expressions?</p> <p>Example:</p> <pre><code>a = 1 AND (b = 1 OR b = 2) </code></pre> <p>The expression as a whole shouldn't be stored as varchar to preserve data integrity.</p>
[ { "answer_id": 261770, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 2, "selected": false, "text": "a b Table Nodes\nid\ntype (Variable|Literal)\nname (nullable for literal)\nvalue\n\nTable Operators\nid\nname (=, AND, OR...
2008/11/04
[ "https://Stackoverflow.com/questions/261721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
261,731
<p>I've got a large source tree (> 2 GB, WINCE build tree) that I would like to start managing with Subversion. Up to this point, 'versioning' has been managed through keeping multiple copies of the tree, and using Beyond Compare to find differences.</p> <p>The last big stumbling block I see to using Subversion is tha...
[ { "answer_id": 261836, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 3, "selected": true, "text": "use-commit-times\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5378/" ]
261,735
<p>I'm looking for a dummy SQL statement that will work from a C# SQL connection to check for connectivity.</p> <p>Basically I need to send a request to the database, I don't care what it returns I just want it to be successful if the database is still there and throw an exception if the database isn't.</p> <p>The sc...
[ { "answer_id": 261748, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 4, "selected": true, "text": "select * from sysibm.sysdummy1\n select * from dual\n" }, { "answer_id": 261771, "author": "Amy B", "auth...
2008/11/04
[ "https://Stackoverflow.com/questions/261735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
261,738
<p>One of my co-workers has resigned and was made to leave the premises before checking in all of his code to TFS. I have access to the physical files. Is there a way for me to access his workspace and check in some of the changes that are still left unchecked in? From tfs I can see which files he has checked out but n...
[ { "answer_id": 8878963, "author": "granth", "author_id": 11210, "author_profile": "https://Stackoverflow.com/users/11210", "pm_score": 4, "selected": false, "text": "tf workspace /collection:http://yourserver:8080/tfs/yourCollection WorkspaceName;domain\\CurrentWorkspaceOwner /permission...
2008/11/04
[ "https://Stackoverflow.com/questions/261738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32313/" ]
261,752
<p>is it somehow possible to call a rails function or to access a rails object from within jQuery? I'd like to do something like:</p> <pre><code>jQuery(document).ready(function($) { $('#mydiv').html("&lt;%= @object.name %&gt;"); }); </code></pre> <p>OR</p> <pre><code>jQuery(document).ready(function($) { $('#mydiv')....
[ { "answer_id": 261913, "author": "changelog", "author_id": 5646, "author_profile": "https://Stackoverflow.com/users/5646", "pm_score": 3, "selected": true, "text": "<script type=\"text/javascript\">\n<%= yield :footerjs %>\n</script> <% content_for :footerjs do %>\njQuery(document).ready...
2008/11/04
[ "https://Stackoverflow.com/questions/261752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29909/" ]
261,780
<p>I'm trying to parse dates using the user's date preferences</p> <pre><code>[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4]; NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateStyle:NSDateFormatterShortStyle]; NSDate *date = [ dateFormatter ...
[ { "answer_id": 263027, "author": "Peter Hosey", "author_id": 30461, "author_profile": "https://Stackoverflow.com/users/30461", "pm_score": 2, "selected": false, "text": "%@ NSLog" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14343/" ]
261,783
<p>I am debugging some code and have encountered the following SQL query (simplified version):</p> <pre><code>SELECT ads.*, location.county FROM ads LEFT JOIN location ON location.county = ads.county_id WHERE ads.published = 1 AND ads.type = 13 AND ads.county_id = 2 OR ads.county_id = 5 OR ads.county_id = 7 OR ads.c...
[ { "answer_id": 261788, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 8, "selected": true, "text": "SELECT ads.*, location.county \nFROM ads\nLEFT JOIN location ON location.county = ads.county_id\nWHERE ads.published = 1 \nAND...
2008/11/04
[ "https://Stackoverflow.com/questions/261783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319/" ]
261,793
<p>i have a server - client application that runs on java 1.3; i want to change to java 1.6 step by step, meaning first few clients, than rest of the clients and finally server... i was wondering could you direct me to some common problems that can come along and what should i look after?</p>
[ { "answer_id": 261803, "author": "Yuval", "author_id": 2819, "author_profile": "https://Stackoverflow.com/users/2819", "pm_score": 2, "selected": false, "text": "enum assert" }, { "answer_id": 261814, "author": "Mnementh", "author_id": 21005, "author_profile": "https:...
2008/11/04
[ "https://Stackoverflow.com/questions/261793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15878/" ]
261,801
<p>I have use IlMerge to merge all the dlls of my projects in one exe. I use a targets file which is referenced in the "import" of the main csproj.</p> <p>The ExecCommand in the targets is:</p> <pre><code> &lt;Exec Command="&amp;quot;$(ProgramFiles)\Microsoft\Ilmerge\Ilmerge.exe&amp;quot; /out:@(MainAssembly) &amp;q...
[ { "answer_id": 271959, "author": "netadictos", "author_id": 31791, "author_profile": "https://Stackoverflow.com/users/31791", "pm_score": 2, "selected": true, "text": "<Project \n DefaultTargets=\"Build\" \n xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\n <Import Proje...
2008/11/04
[ "https://Stackoverflow.com/questions/261801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31791/" ]
261,807
<p>we have a old and dying dedicated server. we want a new one at a new datacenter. we have a bunch of sites using the current server and don't have control of all their DNS. is there an easy way to redirect all the traffic from xx.xx.xx.xx to zz.zz.zz.zz without updating DNS records?</p> <p>Thanks.</p>
[ { "answer_id": 261847, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": -1, "selected": false, "text": "208.69.34.231 87.248.113.14 xx.xx.xx.xx zz.zz.zz.zz xx.xx.xx.xx client->xx.xx.xx.xx.->zz.zz.zz.zz zz.zz.zz.zz->xx.xx.x...
2008/11/04
[ "https://Stackoverflow.com/questions/261807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34133/" ]
261,809
<p>If an interface inherits IEquatable the implementing class can define the behavior of the Equals method. Is it possible to define the behavior of == operations?</p> <pre><code>public interface IFoo : IEquatable {} public class Foo : IFoo { // IEquatable.Equals public bool Equals(IFoo other) ...
[ { "answer_id": 261838, "author": "Luc Touraille", "author_id": 20984, "author_profile": "https://Stackoverflow.com/users/20984", "pm_score": 0, "selected": false, "text": "abstract class IFoo : IEquatable<IFoo> \n{\n public static bool operator ==(IFoo i1, IFoo i2) { return i1.Equals(...
2008/11/04
[ "https://Stackoverflow.com/questions/261809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11367/" ]
261,815
<p>What is the upper limit for an autoincrement primary key in SQL Server? What happens when an SQL Server autoincrement primary key reaches its upper limit?</p>
[ { "answer_id": 261840, "author": "Fred", "author_id": 33630, "author_profile": "https://Stackoverflow.com/users/33630", "pm_score": 0, "selected": false, "text": "BIGINT Integer data from -2^63 through 2^63 - 1\n\nINT Integer data from -2^31 through 2^31 - 1\n\nSMALLINT Integer...
2008/11/04
[ "https://Stackoverflow.com/questions/261815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407003/" ]
261,829
<p>I have three closely related applications that are build from the same source code - let's say APP_A, APP_B, and APP_C. APP_C is a superset of APP_B which in turn is a superset of APP_A.</p> <p>So far I've been using a preprocessor define to specify the application being built, which has worked like this.</p> <pre...
[ { "answer_id": 261893, "author": "Pieter", "author_id": 5822, "author_profile": "https://Stackoverflow.com/users/5822", "pm_score": 1, "selected": false, "text": "namespace AppA {\n // application A specific\n}\n\nnamespace AppB {\n // application B specific\n}\n #if compiler_opti...
2008/11/04
[ "https://Stackoverflow.com/questions/261829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737/" ]
261,845
<p>I want to use jQuery with asp.net webfoms. Do I need to get a special toolkit so the .net controls spit out friendly Control ID's?</p> <p>Reason being, I don't want to write javascript referencing my html ID's like control_123_asdfcontrol_234.</p> <p>Has this been addressed in version 3.5? (I remember reading yo...
[ { "answer_id": 261857, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 3, "selected": false, "text": "myControlId = \"<%= myControl.ClientID %>\";" }, { "answer_id": 261917, "author": "ullmark", "author_id...
2008/11/04
[ "https://Stackoverflow.com/questions/261845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
261,867
<p>I'm unable to make a remote connection to an Oracle XE install (through TOAD / SQL Developer). Here's the deal.</p> <p>I set up a new server (windows 2003). The goal was to make a new image with several applications preinstalled, Oracle XE being one of them. Got Oracle installed no problem, connected locally, re...
[ { "answer_id": 263673, "author": "Gary Myers", "author_id": 25714, "author_profile": "https://Stackoverflow.com/users/25714", "pm_score": 2, "selected": false, "text": "SQLPLUS / AS SYSDBA SQLPLUS user/pass@XE sqlplus user/pass@127.0.0.1:1521/XE\n sqlplus user/pass@box_a:1521/XE\n" }, ...
2008/11/04
[ "https://Stackoverflow.com/questions/261867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34142/" ]
261,873
<p>Here is my problem. I have a website in ASP.NET / C# which receives some data via GET/POST</p> <p>This is "user filled" data, but not through a web page, it's a software that contacts my server.</p> <p>Problem is, this software is sending data encoded in ISO-8859-1 (so Café would be sent as Caf%e9 ) and the rest o...
[ { "answer_id": 264658, "author": "Georg", "author_id": 30776, "author_profile": "https://Stackoverflow.com/users/30776", "pm_score": 1, "selected": false, "text": "<configuration>\n <system.web>\n <globalization\n fileEncoding=\"utf-8\"\n requestEncoding=\"utf-8\"\n re...
2008/11/04
[ "https://Stackoverflow.com/questions/261873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
261,904
<p>I'm playing about with <a href="http://en.wikipedia.org/wiki/Lighttpd" rel="nofollow noreferrer">lighttpd</a> on a small virtual private server. I two domains pointing to the server. I am using the latest version of lighttpd and mod_evhost on Ubuntu 8.10.</p> <ol> <li><p>I'm trying to set up a rule such that if any...
[ { "answer_id": 261940, "author": "Anders", "author_id": 25515, "author_profile": "https://Stackoverflow.com/users/25515", "pm_score": 1, "selected": false, "text": "^\\b([wW]{3}\\.)?[\\w\\d]*\\.com\\b$" }, { "answer_id": 261955, "author": "Tomalak", "author_id": 18771, ...
2008/11/04
[ "https://Stackoverflow.com/questions/261904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135/" ]
261,920
<p>Which method is preferred?</p> <pre><code>Session.Remove("foo"); Session["foo"] = null; </code></pre> <p>Is there a difference?</p>
[ { "answer_id": 261980, "author": "splattne", "author_id": 6461, "author_profile": "https://Stackoverflow.com/users/6461", "pm_score": 4, "selected": false, "text": "Session.Remove" }, { "answer_id": 262095, "author": "Buu", "author_id": 17815, "author_profile": "https...
2008/11/04
[ "https://Stackoverflow.com/questions/261920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2469/" ]
261,924
<p>I'll simplify the problem as much as possible:</p> <p>I have an oracle table:</p> <pre><code>row_priority, col1, col2, col3 0, .1, 100, {null} 12, {null}, {null}, 3 24, .2, {null}, {null} </code></pre> <p>Desired result:</p> <pre><code>col1, col2, col3 .2, 100, 3 </code></pre> <p>So according to the priority of...
[ { "answer_id": 261941, "author": "Alan", "author_id": 5878, "author_profile": "https://Stackoverflow.com/users/5878", "pm_score": -1, "selected": false, "text": "select first_value(coalesce(col1,0) ignore nulls) over () col1,\n first_value(coalesce(col2,0) ignore nulls) over () col...
2008/11/04
[ "https://Stackoverflow.com/questions/261924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18941/" ]
261,927
<p>I have been running Apache HTTPD in 64bit mode by stripping out the 32bit architecture from the binary (along with the ppc parts). I did this to make it more compatible for python and mysql.</p> <p>However I have another machine that needs it to be run in 32bit mode (it has all four original architectures still in ...
[ { "answer_id": 263200, "author": "Dave Dribin", "author_id": 26825, "author_profile": "https://Stackoverflow.com/users/26825", "pm_score": 3, "selected": true, "text": "arch(1) % arch -i386 -ppc /usr/sbin/httpd\n" }, { "answer_id": 726389, "author": "Michael Cramer", "aut...
2008/11/04
[ "https://Stackoverflow.com/questions/261927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3431280/" ]
261,938
<p>If everything that can be accomplished in <a href="http://en.wikipedia.org/wiki/MXML" rel="nofollow noreferrer">MXML</a> can also be accomplished in ActionScript and many things are easier to accomplish in ActionScript (loops, conditionals, etc) why take the time to learn MXML?</p> <p>The best reasons I have at thi...
[ { "answer_id": 522572, "author": "Matt Guest", "author_id": 62230, "author_profile": "https://Stackoverflow.com/users/62230", "pm_score": 4, "selected": false, "text": "<mx:Panel xmlns:mx=\"http://www.adobe.com/2006/mxml\" layout=\"absolute\" width=\"290\" height=\"148\" title=\"Login\">...
2008/11/04
[ "https://Stackoverflow.com/questions/261938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
261,963
<p>I just noticed that you can not use standard math operators on an <code>enum</code> such as <code>++</code> or <code>+=</code>.</p> <p>So what is the best way to iterate through all of the values in a C++ <code>enum</code>?</p>
[ { "answer_id": 261986, "author": "andreas buykx", "author_id": 19863, "author_profile": "https://Stackoverflow.com/users/19863", "pm_score": 9, "selected": true, "text": "enum Foo {\n One,\n Two,\n Three,\n Last\n};\n\nfor ( int fooInt = One; fooInt != Last; fooInt++ )\n{\n Foo foo...
2008/11/04
[ "https://Stackoverflow.com/questions/261963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1366/" ]
261,978
<p>I have the following JavaScript code to pop up a window in Internet Explorer. The code is executed from a page within a Microsoft CRM modal dialog box. (RequestID is a string that is always the same in the test system - at the moment it contains "abcdefg" - without the quotes).</p> <pre><code>var cancelUrl = "Cance...
[ { "answer_id": 262005, "author": "zendar", "author_id": 25732, "author_profile": "https://Stackoverflow.com/users/25732", "pm_score": 0, "selected": false, "text": "window.open() RequestId" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/261978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21862/" ]
261,985
<p>I have the following </p> <pre><code>var id='123'; newDiv.innerHTML = "&lt;a href=\"#\" onclick=\" TestFunction('"+id+"', false);\"&gt;&lt;/a&gt;"; </code></pre> <p>Which renders <code>&lt;a href="#" onclick="return Testfunction('123',false);"&gt;&lt;/a&gt;</code> in my HTML.</p> <p>The problem I have is that I ...
[ { "answer_id": 261999, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 2, "selected": false, "text": "&quot; \" \\\" NewDiv.innerHTML = \"<a href=\\\"#\\\" onclick=\\\"StepTwo(&quot;TestFunction('\"+id+\"', false);&quot;,true)\...
2008/11/04
[ "https://Stackoverflow.com/questions/261985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28871/" ]
261,998
<p>I have a list of elements (the <em>X</em> in the following examples) displayed either in a row or in a column of an HTML table.</p> <p>In HTML code point of view, I have either (horizontal display):</p> <pre><code>&lt;table id="myTable"&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;B&lt;/td&gt; &lt...
[ { "answer_id": 262083, "author": "Prestaul", "author_id": 5628, "author_profile": "https://Stackoverflow.com/users/5628", "pm_score": 1, "selected": false, "text": "$('#myTable tr').each(function() {\n $('<td/>').append( \n $(this).find('td input') \n ).appendTo(this);\n });\...
2008/11/04
[ "https://Stackoverflow.com/questions/261998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26457/" ]
262,000
<p>What would be the best way to check that a <code>std::vector</code> is sorted? Is there something faster than a loop checking that <code>v[i]&lt;=v[i+1]</code>? Is it faster/cleaner with iterators? Or is it actually better to just call <code>sort</code> every time (though the "v is already sorted" case is quite comm...
[ { "answer_id": 262088, "author": "ShreevatsaR", "author_id": 4958, "author_profile": "https://Stackoverflow.com/users/4958", "pm_score": 5, "selected": false, "text": "std::is_sorted is_sorted(v.begin(), v.end())\n" }, { "answer_id": 262105, "author": "endian", "author_id...
2008/11/04
[ "https://Stackoverflow.com/questions/262000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20055/" ]
262,012
<p>I'm just starting to pick up ASP.Net MVC and find myself writing a lot of &lt;%= %> in the views. Intellisense does supply the closing %>, but I find that typing the introductory &lt;%= to be burdensome (they are tough for me to type :-)).</p> <p>I've dabbled around a bit with Rails and the NetBeans IDE where I wa...
[ { "answer_id": 262262, "author": "plinth", "author_id": 20481, "author_profile": "https://Stackoverflow.com/users/20481", "pm_score": 0, "selected": false, "text": "Imports System\nImports EnvDTE\nImports EnvDTE80\nImports EnvDTE90\nImports System.Diagnostics\n\nPublic Module Module1\n\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7961/" ]
262,015
<p>I need to modify a (xml-)file from Apache Ant. "loadfile" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification?</p> <p>Of course I could write custom task to perform this operation but I would like to know if there's some existi...
[ { "answer_id": 262064, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 5, "selected": true, "text": "<echo file=\"${fileName}\" message=\"${xmlProperty}\"/>\n" }, { "answer_id": 9478786, "author": "Jarekczek", ...
2008/11/04
[ "https://Stackoverflow.com/questions/262015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15647/" ]
262,022
<p>Is there a website I can create an HTML final four bracket?</p> <p>Or is there just HTML out there that will create it automatically and I can just fill in the specifics?</p>
[ { "answer_id": 262584, "author": "Brad", "author_id": 26130, "author_profile": "https://Stackoverflow.com/users/26130", "pm_score": 3, "selected": false, "text": "table.bracket {\n border-collapse: collapse;\n border: none;\n}\n\n.bracket td {\n vertical-align: middle;\n widt...
2008/11/04
[ "https://Stackoverflow.com/questions/262022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
262,024
<p>Is it possible to obtain the maximum column length for a VARCHAR, CHAR etc?</p>
[ { "answer_id": 262060, "author": "TcKs", "author_id": 20382, "author_profile": "https://Stackoverflow.com/users/20382", "pm_score": 1, "selected": false, "text": "select max_length from sys.columns as c inner join sys.objects o on c.object_id = o.object_id where o.name = 'myTable' and c....
2008/11/04
[ "https://Stackoverflow.com/questions/262024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,025
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/176775/big-integers-in-c-sharp">Big integers in C#</a> </p> </blockquote> <p>I want to be able to process arbitrarily large numbers in C#.<br> I can live with just integers. </p> <p>Are there established algo...
[ { "answer_id": 262041, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 1, "selected": false, "text": "long decimal long decimal" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7211/" ]
262,026
<p>I have an application which get copied and run on client machines. The program is in the form of an Adobe Projector file. I want to write a process that checks when the program starts running whether or not the license is still active, and if not, delete the entire program. </p> <p>The program itself knows the real...
[ { "answer_id": 262041, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 1, "selected": false, "text": "long decimal long decimal" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23249/" ]
262,036
<p>Just wondering where is best to put functionality in an MFC application that is triggered when the whole window is resized. I was thinking mainfrm but I couldn't seem to capture any OnSize messages... </p> <p>Can someone tell me what I am doing wrong?</p>
[ { "answer_id": 262260, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 3, "selected": true, "text": "WM_SIZE WM_WINDOWPOSCHANGED WM_SIZE" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
262,043
<p>I am trying to do something like this:</p> <pre><code>while @nrOfAuthlevels &gt;= @myAuthLevel begin set @myAuthLevel = @myAuthLevel + 1 SELECT Role.name, Role.authorityLevel FROM [dbo].[Role] ORDER BY Role.authorityLevel end </code></pre> <p>The result of this stored procedure shall be ...
[ { "answer_id": 262057, "author": "Biri", "author_id": 968, "author_profile": "https://Stackoverflow.com/users/968", "pm_score": 1, "selected": false, "text": "create table #tmp (\n Name type,\n authorityLevel type\n)\n\nwhile @nrOfAuthlevels >= @myAuthLevel\nbegin\n set @myAuthLev...
2008/11/04
[ "https://Stackoverflow.com/questions/262043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,075
<p>The following doesn't work, but something like this is what I'm looking for.</p> <pre><code>select * from Products where Description like (@SearchedDescription + %) </code></pre> <p>SSRS uses the @ operator in-front of a parameter to simulate an 'in', and I'm not finding a way to match up a string to a list of str...
[ { "answer_id": 278959, "author": "Pulsehead", "author_id": 2156, "author_profile": "https://Stackoverflow.com/users/2156", "pm_score": 0, "selected": false, "text": "select * from Products where Description like (@SearchedDescription + '%')" }, { "answer_id": 296817, "author"...
2008/11/04
[ "https://Stackoverflow.com/questions/262075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26938/" ]
262,090
<p>Calling all PHP gurus!</p> <p>I understand that you can use getimagesize() to get the actual pixel height and width of an image in PHP. However, if you open an image in photoshop and look at the image size dialog, you notice that there is a resolution value that determines the print size of the image.</p> <p>Given...
[ { "answer_id": 262393, "author": "Rafe", "author_id": 27497, "author_profile": "https://Stackoverflow.com/users/27497", "pm_score": 2, "selected": false, "text": "<?php\n\ninclude_once(\"./JPEG.php\");\ninclude_once(\"./JFIF.php\");\n\n$image_header = get_jpeg_header_data(\"./myImage.jpg...
2008/11/04
[ "https://Stackoverflow.com/questions/262090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27497/" ]
262,106
<p>What happen when SQL Server 2005 happen to reach the maximum for an IDENTITY column? Does it start from the beginning and start refilling the gap? </p> <p>What is the behavior of SQL Server 2005 when it happen?</p>
[ { "answer_id": 262123, "author": "xsl", "author_id": 11387, "author_profile": "https://Stackoverflow.com/users/11387", "pm_score": 5, "selected": true, "text": "9,223,372,036,854,775,807 Msg 220, Level 16, State 2, Line 10\nArithmetic overflow error for data type tinyint, value = 256.\n"...
2008/11/04
[ "https://Stackoverflow.com/questions/262106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24975/" ]
262,108
<p>I am creating an application which displays some messages and its directions in the DataGridView. I would like to replace some columns content with pictures. For example I would like to replace number 0 which represents the incoming call with a green arrow (some .jpg image).</p> <p>Does anyone know how this could b...
[ { "answer_id": 813815, "author": "JJO", "author_id": 99141, "author_profile": "https://Stackoverflow.com/users/99141", "pm_score": 2, "selected": true, "text": " private void messageInfoDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)\n {\n /...
2008/11/04
[ "https://Stackoverflow.com/questions/262108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22996/" ]
262,110
<p>Ok, the more I use LINQ, the more I like it! I recently found myself working in some legacy code at work. It is your classic DataSet and DataTable rich application. Well, when adding a bit of functionality I found myself <em>really</em> wanting to just query the rows of a DataTable for the results I was looking for....
[ { "answer_id": 262167, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 5, "selected": true, "text": "Field<> var customerOrderIds = table.Rows.Cast<DataRow>()\n .Where(x => x.Field<string>(\"CUSTOMER_ID\") == ...
2008/11/04
[ "https://Stackoverflow.com/questions/262110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2595/" ]
262,141
<p>I have a image button. I wanted to add a text "Search" on it. I am not able to add it because the "imagebutton" property in VS 2008 does not have text control in it. Can anyone tell me how to add text to a image button?? </p> <pre><code> &lt;asp:ImageButton ID="Searchbutton" runat="server" AlternateText="Se...
[ { "answer_id": 262171, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 5, "selected": true, "text": "<button runat=\"server\" \n style=\"background-image:url('/Content/Img/stackoverflow-logo-250.png')\" >\n your text here<b...
2008/11/04
[ "https://Stackoverflow.com/questions/262141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,143
<p>I have a html string held in memory after transforming to my desired template with XSLT. What is the best mechanism to the send this to the client printer? </p> <p>In previous projects I have shamelessly cheated and created a print preview screen, which was essentially an ASPX page with white background that I then...
[ { "answer_id": 262199, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": ".showwhenprinting {position:absolute; display:none;}\n@media print\n{\n .hidewhenprinting {position:absolute; display:none;}\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11802/" ]
262,150
<p>I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than</p> <pre><code>&lt;select id="field-component" name="field_component"&gt; &lt;option selected="selected"&gt;1&lt;/option...
[ { "answer_id": 263654, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 3, "selected": false, "text": "<input type=text list=listid>\n<datalist id=listid>\n <select><option>1<option>2</select>\n</datalist>\n" }, { "an...
2008/11/04
[ "https://Stackoverflow.com/questions/262150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
262,156
<p>I try to get rounded corners on a UIImage, what I read so far, the easiest way is to use a mask images. For this I used code from TheElements iPhone Example and some image resize code I found. My problem is that resizedImage is always nil and I don't find the error...</p> <pre><code>- (UIImage *)imageByScalingPropo...
[ { "answer_id": 262545, "author": "Lounges", "author_id": 8918, "author_profile": "https://Stackoverflow.com/users/8918", "pm_score": 0, "selected": false, "text": "- (void)drawRect:(CGRect)rect \n{\n // Drawing code\n [backgroundImage drawInRect:rect];\n [buttonOverlay drawInRec...
2008/11/04
[ "https://Stackoverflow.com/questions/262156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23028/" ]
262,158
<p>The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone).</p> <p>In Firefox both border and text have the same color (<code>#880000</code>), but in Safari the text gets a bit lighter (as if it had some transparency applied to it).</p> <p>Can I somehow f...
[ { "answer_id": 262478, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <title></title>\n <style type=\"text/css\">\n button:disabled...
2008/11/04
[ "https://Stackoverflow.com/questions/262158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34187/" ]
262,160
<p>I've got menu items that look like this</p> <pre><code>&lt;ul&gt; &lt;li&gt;Item1&lt;span class="context-trigger"&gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;Item2&lt;span class="context-trigger"&gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;Item3&lt;span class="context-trigger"&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; </co...
[ { "answer_id": 262193, "author": "Huibert Gill", "author_id": 1254442, "author_profile": "https://Stackoverflow.com/users/1254442", "pm_score": 5, "selected": true, "text": "white-space: nowrap;\n" }, { "answer_id": 262209, "author": "patmortech", "author_id": 19090, ...
2008/11/04
[ "https://Stackoverflow.com/questions/262160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24197/" ]
262,192
<p>In our project we have a large number (hundreds) of FLA files created by the artists in CS3, from which we compile SWFs to use in our Flex/AS3 application.</p> <p>As part of a streamlined build/deploy system, it would be really handy to be able to automate publishing all these FLAs, and ideally deploying the SWFs t...
[ { "answer_id": 488306, "author": "D. Starr", "author_id": 1144394, "author_profile": "https://Stackoverflow.com/users/1144394", "pm_score": 3, "selected": false, "text": "\"c:\\program files\\macromedia\\flash 8\\flash.exe\" myscript.jsfl open myscript.jsfl var importFolder = fl.browseFo...
2008/11/04
[ "https://Stackoverflow.com/questions/262192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13220/" ]
262,201
<p>How can I write a C++ function returning true if a real number is exactly representable with a double?</p> <pre><code>bool isRepresentable( const char* realNumber ) { bool answer = false; // what goes here? return answer; } </code></pre> <p>Simple tests:</p> <pre><code>assert( true==isRepresentable( "0.5...
[ { "answer_id": 262236, "author": "Richard Poole", "author_id": 26003, "author_profile": "https://Stackoverflow.com/users/26003", "pm_score": 0, "selected": false, "text": "bool isRepresentable(const char *realNumber)\n{\n double value = strtod(realNumber, NULL);\n\n char test[20];\...
2008/11/04
[ "https://Stackoverflow.com/questions/262201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15485/" ]
262,211
<p>GNU gcc 4.3 partially supports the upcoming c++0x standard: among the implemented features the rvalue reference. By means of the rvalue reference it should be possible to move a non-copyable object or return it from a function. </p> <p>Are std::streams already movable <strong>by means of rvalue reference</strong> o...
[ { "answer_id": 263435, "author": "Nicola Bonelli", "author_id": 19630, "author_profile": "https://Stackoverflow.com/users/19630", "pm_score": 1, "selected": false, "text": "struct noncopyable\n{\n noncopyable()\n {}\n\n // move constructor\n noncopyable(noncopyable &&)\n {...
2008/11/04
[ "https://Stackoverflow.com/questions/262211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19630/" ]
262,215
<p>I have read about a technique involving writing to disk a rendered dynamic page and using that when it exists using mod_rewrite. I was thinking about cleaning out the cached version every X minutes using a cron job.</p> <p>I was wondering if this was a viable option or if there were better alternatives that I am no...
[ { "answer_id": 262345, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "php index.php > (location of static file)" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32141/" ]
262,217
<p>How would you design a content voting mechanism that could be applied polymorphically to multiple models / classes. (in a ruby on rails context preferably, but others are fine)</p> <p>Given that instances of these classes can be voted on: - Article - Question - Product</p> <p>Voters should not be required to regis...
[ { "answer_id": 268857, "author": "Ian Terrell", "author_id": 9269, "author_profile": "https://Stackoverflow.com/users/9269", "pm_score": 1, "selected": false, "text": "create_table :orders do |t|\n t.string :votable_type\n t.integer :votable_id\n t.integer :vote\n t.timestamps\nend\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34210/" ]
262,232
<p>I am trying to come up with the best data structure for use in a high throughput C++ server. The data structure will be used to store anything from a few to several million objects, and no sorting is required (though a unique sort key can be provided very cheaply).</p> <p>The requirements are that it can support ef...
[ { "answer_id": 262564, "author": "coppro", "author_id": 16855, "author_profile": "https://Stackoverflow.com/users/16855", "pm_score": 3, "selected": false, "text": "std::list std::list" }, { "answer_id": 1678486, "author": "Kiril", "author_id": 28760, "author_profile"...
2008/11/04
[ "https://Stackoverflow.com/questions/262232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631/" ]
262,238
<p>I have a <code>contacts</code> table which contains fields such as <code>postcode</code>, <code>first name</code>, <code>last name</code>, <code>town</code>, <code>country</code>, <code>phone number</code> etc, all of which are defined as <code>VARCHAR(255)</code> even though none of these fields will ever come clos...
[ { "answer_id": 262476, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 8, "selected": true, "text": "VARCHAR(255) CHAR(255) VARCHAR CHAR VARCHAR GROUP BY VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR VARCHAR VARCHAR" ...
2008/11/04
[ "https://Stackoverflow.com/questions/262238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174/" ]
262,249
<p>I have a debug app I've been writing which receives data from a C-based process via UDP. One of the strings sent to me contains a <code>°</code> character - <a href="http://en.wikipedia.org/wiki/Degree_symbol" rel="nofollow noreferrer">Unicode U+00B0</a> (which incidentally breaks the StackOverflow search function!)...
[ { "answer_id": 262433, "author": "pdc", "author_id": 8925, "author_profile": "https://Stackoverflow.com/users/8925", "pm_score": 1, "selected": false, "text": "'123\\xB0' UnicodeDecodeError s = message.get_string()\n s = message.get_string().decode('ISO8859-1')\n get_string()" }, { ...
2008/11/04
[ "https://Stackoverflow.com/questions/262249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15369/" ]
262,254
<p>How can I use CRTP in C++ to avoid the overhead of virtual member functions?</p>
[ { "answer_id": 262276, "author": "user23167", "author_id": 23167, "author_profile": "https://Stackoverflow.com/users/23167", "pm_score": -1, "selected": false, "text": "template <class Derived> struct Base\n{\n void interface()\n {\n // ...\n static_cast<Derived*>(thi...
2008/11/04
[ "https://Stackoverflow.com/questions/262254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,264
<p>I have a list of cities, states/provinces, and countries and I need to find their respective timezones easily. Specifically, I need to know which Windows TimeZone they map to. So far this has been a difficult process, because there's no easy way to pass a city to something and get a timezone back (a timezone being ...
[ { "answer_id": 40160417, "author": "Anestis Kivranoglou", "author_id": 850980, "author_profile": "https://Stackoverflow.com/users/850980", "pm_score": 2, "selected": false, "text": "CountryName\n2LetterIsoCountryCode\n3LetterIsoCountryCode\nIANATimezones\nWindowsTimezones\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30881/" ]
262,267
<p>How do I create a toolbar for Excel using an XLA document?</p>
[ { "answer_id": 262319, "author": "BradC", "author_id": 21398, "author_profile": "https://Stackoverflow.com/users/21398", "pm_score": 3, "selected": true, "text": "Dim myBar As CommandBar, myButt As CommandBarControl \n\n'Delete the toolbar if it already exists'\nOn Error Resume Next \nCo...
2008/11/04
[ "https://Stackoverflow.com/questions/262267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16794/" ]
262,273
<p>In the iPhone is there a way I can use JavaScript to close the browser and return to the home screen? After the last page a wizard I am calling out to another iPhone app (ex: maps) and I do NOT what the user to come back to the browser screen when they are done. My backup plan is to have a "Complete" page but that i...
[ { "answer_id": 262356, "author": "Anders", "author_id": 25515, "author_profile": "https://Stackoverflow.com/users/25515", "pm_score": 0, "selected": false, "text": "javascript:self.close();\nwindow.close();\n window.opener='x';\nwindow.close();\n" }, { "answer_id": 262374, "a...
2008/11/04
[ "https://Stackoverflow.com/questions/262273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30099/" ]
262,279
<p>Model Driven Software Development.</p> <p>As I understand it it raises the abstraction level of the design to better reflect the domain the software will attempt to run in. That's alot to say in just one sentence.</p> <p>The communication between the domain experts (customer) and the developers is crucial to make...
[ { "answer_id": 320332, "author": "jbandi", "author_id": 32749, "author_profile": "https://Stackoverflow.com/users/32749", "pm_score": 1, "selected": false, "text": "class Firm < ActiveRecord::Base\n has_many :clients\n has_one :account\n belongs_to :conglomorate\nend\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2894/" ]
262,280
<p>When I get a reference to a <code>System.Diagnostics.Process</code>, how can I know if a process is currently running?</p>
[ { "answer_id": 262291, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 9, "selected": true, "text": "Process[] pname = Process.GetProcessesByName(\"notepad\");\nif (pname.Length == 0)\n MessageBox.Show(\"nothing\...
2008/11/04
[ "https://Stackoverflow.com/questions/262280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30717/" ]
262,330
<p>Is there a common or established algorithm for peer-nodes in a network to decide on a unique "network-channel" (or any other form of semi-secret identifier)?</p> <p>The environment I'm working in is SecondLife. I am trying to figure out how to get many identical peer scripted objects to agree on a "channel" number...
[ { "answer_id": 671632, "author": "Domchi", "author_id": 29192, "author_profile": "https://Stackoverflow.com/users/29192", "pm_score": 1, "selected": false, "text": "integer time = llGetUnixTime();\ninteger channel = time - (time % 1000);\n" }, { "answer_id": 1029730, "author"...
2008/11/04
[ "https://Stackoverflow.com/questions/262330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,338
<p>In oracle, I want to create a delete sproc that returns an integer based on the outcome of the deletion.</p> <p>this is what i have so far.</p> <pre><code>create or replace PROCEDURE Testing ( iKey IN VARCHAR2 ) AS BEGIN delete from MyTable WHERE TheKey = iKey; END Testing; </code></pre> <p>i've tried p...
[ { "answer_id": 262370, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 4, "selected": false, "text": "CREATE OR REPLACE PROCEDURE test_proc (\n p_iKey IN VARCHAR2,\n p_retVal OUT INTEGER\n)\nAS\nBEGIN\n DELETE FROM...
2008/11/04
[ "https://Stackoverflow.com/questions/262338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21180/" ]
262,339
<p>I'd like to use the ADO.NET Entity Framework for data access, extend its objects for my business logic, and bind those objects to controls in my UI.</p> <p>As explained in <a href="https://stackoverflow.com/questions/260233/how-do-i-extend-adonet-entity-framework-objects-with-partial-classes">the answers to another...
[ { "answer_id": 262375, "author": "CubanX", "author_id": 27555, "author_profile": "https://Stackoverflow.com/users/27555", "pm_score": 2, "selected": false, "text": "public class Location\n{\n public string City { get; set; }\n public string State { get; set; }\n}\n public static cl...
2008/11/04
[ "https://Stackoverflow.com/questions/262339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
262,341
<p>I have a requirement to allow a user of this ASP.NET web application to upload a specifically formatted Excel spreadsheet, fill arrays with data from the spreadsheet, and bind the arrays to a Oracle stored procedure for validation and insertion into the database. I must be able to read the data from the Excel sprea...
[ { "answer_id": 262646, "author": "hearn", "author_id": 30096, "author_profile": "https://Stackoverflow.com/users/30096", "pm_score": 0, "selected": false, "text": "Workbook.Load(stream)" }, { "answer_id": 269515, "author": "gabe", "author_id": 34315, "author_profile":...
2008/11/04
[ "https://Stackoverflow.com/questions/262341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,351
<p>I have several identical elements with different attributes that I'm accessing with SimpleXML:</p> <pre><code>&lt;data&gt; &lt;seg id="A1"/&gt; &lt;seg id="A5"/&gt; &lt;seg id="A12"/&gt; &lt;seg id="A29"/&gt; &lt;seg id="A30"/&gt; &lt;/data&gt; </code></pre> <p>I need to remove a specific <stro...
[ { "answer_id": 262556, "author": "Stefan Gehrig", "author_id": 11354, "author_profile": "https://Stackoverflow.com/users/11354", "pm_score": 7, "selected": true, "text": "SimpleXMLElement DOMElement $data='<data>\n <seg id=\"A1\"/>\n <seg id=\"A5\"/>\n <seg id=\"A12\"/>\n <se...
2008/11/04
[ "https://Stackoverflow.com/questions/262351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33739/" ]
262,361
<p>I've been trying to design a database schema for a side project but I havent been able to produce anything that I'm comfortable with. I'm using ASP.Net with LINQ for my data access:</p> <p>I'm going to allow users to specify up to 10 "items" each with 2 numeric properties, and 1 referential property, the item name....
[ { "answer_id": 262412, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": true, "text": "CREATE TABLE Items (\n user_id INTEGER NOT NULL,\n item_id INTEGER NOT NULL DEFAULT 1,\n ...
2008/11/04
[ "https://Stackoverflow.com/questions/262361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30816/" ]
262,362
<p>On Ubuntu Linux with Gnome, running my Swing application by double clicking on the jar file in Gnomes file browser leads to errors because required libraries that are dynamically loaded via the Java Plugin Framework (residing in subdirectories) are not found.</p> <p>The base libraries for the framework itself are r...
[ { "answer_id": 262600, "author": "shyam", "author_id": 7616, "author_profile": "https://Stackoverflow.com/users/7616", "pm_score": 0, "selected": false, "text": "Class-Path" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25141/" ]
262,363
<p>I'm working on a stripes app that uses a bit of jQuery to make the UI more dynamic/usable.</p> <p>I set up an Error Resolution, so if an error is thrown, the user is redirected to an error.jsp page.</p> <p>However, if an error is thrown during a jQuery Ajax call, instead of redirecting to the error.jsp page, I get...
[ { "answer_id": 262449, "author": "Craig Stuntz", "author_id": 7714, "author_profile": "https://Stackoverflow.com/users/7714", "pm_score": 3, "selected": true, "text": "$(document).ajaxError(function(event, XMLHttpRequest, ajaxOptions, thrownError) {\n // redirect here.\n}\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/262363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31172/" ]
262,367
<p>In my spring application context file, I have something like:</p> <pre><code>&lt;util:map id=&quot;someMap&quot; map-class=&quot;java.util.HashMap&quot; key-type=&quot;java.lang.String&quot; value-type=&quot;java.lang.String&quot;&gt; &lt;entry key=&quot;some_key&quot; value=&quot;some value&quot; /&gt; &lt;...
[ { "answer_id": 262416, "author": "MetroidFan2002", "author_id": 8026, "author_profile": "https://Stackoverflow.com/users/8026", "pm_score": 9, "selected": true, "text": "HashMap private Map<String, String> someMap = (HashMap<String, String>)getApplicationContext().getBean(\"someMap\");\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37740/" ]
262,376
<p>After "check-in" of a <code>.docx</code> file to <code>SharePoint</code> and editing it the <code>RevNum</code> property is set to <code>2</code>.</p> <p>This does not make sense, can someone explain why this is?</p>
[ { "answer_id": 262416, "author": "MetroidFan2002", "author_id": 8026, "author_profile": "https://Stackoverflow.com/users/8026", "pm_score": 9, "selected": true, "text": "HashMap private Map<String, String> someMap = (HashMap<String, String>)getApplicationContext().getBean(\"someMap\");\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,379
<p>I've been trying to understand the strict aliasing rules as they apply to the char pointer.</p> <p><a href="http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html#cast_to_char_pointer" rel="nofollow noreferrer">Here</a> this is stated:</p> <blockquote> <p>It is always presumed th...
[ { "answer_id": 262401, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "-fstrict-aliasing union\n{\n SocketMsgToRecv msg;\n char msgBuff[100];\n};\n\nrecv(socket, msgBuff, 100);\n\nprint...
2008/11/04
[ "https://Stackoverflow.com/questions/262379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8123/" ]
262,380
<p>How to make a shadow to main window widget on windows using Qt?</p>
[ { "answer_id": 262401, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "-fstrict-aliasing union\n{\n SocketMsgToRecv msg;\n char msgBuff[100];\n};\n\nrecv(socket, msgBuff, 100);\n\nprint...
2008/11/04
[ "https://Stackoverflow.com/questions/262380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,392
<p>In an actionscript function (method) I have access to arguments.caller which returns a Function object but I can't find out the name of the function represented by this Function object. Its toString() simply returns [Function] and I can't find any other useful accessors that give me that... Help :-/</p>
[ { "answer_id": 294462, "author": "Ran", "author_id": 10272, "author_profile": "https://Stackoverflow.com/users/10272", "pm_score": 2, "selected": true, "text": "39: /**\n40: * Checks that cond is true. Use this method to validate that condition\n41: * cond holds.\n42: * If con...
2008/11/04
[ "https://Stackoverflow.com/questions/262392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10272/" ]
262,425
<p>In short - How do I translate a NETBIOS domain to a FQDN ?</p> <p>Details: Assuming I'm in domain A and I have user credentials for domain B which has a trust relationship with domain A (I can authenticate the credentials). How do I get domain B's FQDN when all I have are the credentials of some authenticated user ...
[ { "answer_id": 2005257, "author": "Per", "author_id": 170150, "author_profile": "https://Stackoverflow.com/users/170150", "pm_score": 1, "selected": false, "text": "DirectoryEntry rootDSE = new DirectoryEntry(\"LDAP://10.11.12.13/rootDSE\", @\"DOMAIN\\Username\", \"Password\");\nConsole....
2008/11/04
[ "https://Stackoverflow.com/questions/262425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11519/" ]
262,427
<p>From the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="noreferrer">Mozilla Developer Network</a>:</p> <pre><code>[1,4,9].map(Math.sqrt) </code></pre> <p>will yield:</p> <pre><code>[1,2,3] </code></pre> <p>Why then does this:</p> <pre><code>['1','2','3'...
[ { "answer_id": 262468, "author": "Peter Bailey", "author_id": 8815, "author_profile": "https://Stackoverflow.com/users/8815", "pm_score": 4, "selected": false, "text": "// Works fine\nparseInt( 4 );\nparseInt( 9 );\n\n// Breaks! Why?\n[1,4,9].map( parseInt );\n\n// Fixes the problem\...
2008/11/04
[ "https://Stackoverflow.com/questions/262427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/208/" ]
262,431
<p>What are the best algorithms for sorting data in C#? </p> <p>Is there one sorting algorithm that can handle 80% of sorts well? </p> <p>Please give code examples if applicable.</p>
[ { "answer_id": 262464, "author": "CubanX", "author_id": 27555, "author_profile": "https://Stackoverflow.com/users/27555", "pm_score": 7, "selected": true, "text": ".Sort" }, { "answer_id": 262604, "author": "Keltex", "author_id": 28260, "author_profile": "https://Stac...
2008/11/04
[ "https://Stackoverflow.com/questions/262431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19020/" ]
262,439
<p>I am trying to create wrapper functions for <code>free</code> and <code>malloc</code> in C to help notify me of memory leaks. Does anyone know how to declare these functions so when I call <code>malloc()</code> and <code>free()</code> it will call my custom functions and not the standards lib functions?</p>
[ { "answer_id": 262481, "author": "Alex B", "author_id": 23643, "author_profile": "https://Stackoverflow.com/users/23643", "pm_score": 6, "selected": false, "text": "glibc gcc malloc free malloc free malloc dlsym RTLD_NEXT -ldl #define _GNU_SOURCE\n#include <dlfcn.h>\n#include <stdio.h>\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,443
<p>I am having an issue with IEMobile accessing my site. A certain redirect I use has a 302 response code, and the headers (yep, that's app-engine):</p> <pre>Server Development/1.0 Python/2.5.2 Date Tue, 04 Nov 2008 16:47:02 GMT Content-Type text/html; charset=utf-8 Cache-Control no-cache Locatio...
[ { "answer_id": 262481, "author": "Alex B", "author_id": 23643, "author_profile": "https://Stackoverflow.com/users/23643", "pm_score": 6, "selected": false, "text": "glibc gcc malloc free malloc free malloc dlsym RTLD_NEXT -ldl #define _GNU_SOURCE\n#include <dlfcn.h>\n#include <stdio.h>\n...
2008/11/04
[ "https://Stackoverflow.com/questions/262443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/96/" ]
262,448
<p>Quick add on requirement in our project. A field in our DB to hold a phone number is set to only allow 10 characters. So, if I get passed "(913)-444-5555" or anything else, is there a quick way to run a string through some kind of special replace function that I can pass it a set of characters to allow?</p> <p>Re...
[ { "answer_id": 262466, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 9, "selected": true, "text": "string CleanPhone(string phone)\n{\n Regex digitsOnly = new Regex(@\"[^\\d]\"); \n return digitsOnly.Replace(ph...
2008/11/04
[ "https://Stackoverflow.com/questions/262448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232/" ]
262,450
<p>Why is using '*' to build a view bad ?</p> <p>Suppose that you have a complex join and all fields may be used somewhere.</p> <p>Then you just have to chose fields needed.</p> <pre><code>SELECT field1, field2 FROM aview WHERE ... </code></pre> <p>The view "aview" could be <code>SELECT table1.*, table2.* ... FROM ...
[ { "answer_id": 262484, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 2, "selected": false, "text": "Select * From dbname..tablename\n" }, { "answer_id": 262509, "author": "Bill Karwin", "author_id": 20860, ...
2008/11/04
[ "https://Stackoverflow.com/questions/262450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14673/" ]
262,451
<p>ShellExecute() allows me to perform simple shell tasks, allowing the system to take care of opening or printing files. I want to take a similar approach to sending an email attachment programmatically.</p> <p>I don't want to manipulate Outlook directly, since I don't want to assume which email client the user uses ...
[ { "answer_id": 264725, "author": "Jeff Hillman", "author_id": 3950, "author_profile": "https://Stackoverflow.com/users/3950", "pm_score": 4, "selected": true, "text": "#include <tchar.h>\n#include <windows.h>\n#include <mapi.h>\n#include <mapix.h>\n\nint _tmain( int argc, wchar_t *argv[]...
2008/11/04
[ "https://Stackoverflow.com/questions/262451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8424/" ]
262,460
<p>Is there any way to make a function (the ones I'm thinking of are in the style of the simple ones I've made which generate the fibonnacci sequence from 0 to a point, and all the primes between two points) run indefinitely. E.g. until I press a certain key or until a time has passed, rather than until a number reac...
[ { "answer_id": 262474, "author": "Davide", "author_id": 25891, "author_profile": "https://Stackoverflow.com/users/25891", "pm_score": 1, "selected": false, "text": "while True:\n # check what you want and eventually break\n print nextValue()\n yield return nextValue()" }, { "an...
2008/11/04
[ "https://Stackoverflow.com/questions/262460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33061/" ]
262,469
<p>How is it possible that .NET is finding the wrong 'MyType' in this scenario?</p> <p>I have a type A.B.C.D.MyType in a project that I'm working on, and I'm referencing a DLL that has a type A.B.MyType? I do not have any 'using A.B;' statements anywhere in my code, and I do have 'using A.B.C.D;'. When I compile, the ...
[ { "answer_id": 262532, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": false, "text": "A.B A.B.C using TheTypeIWant = A.B.C.D.MyType;\n TheTypeIWant using MyType=A.B.C.D.MyType" }, { "answer_id": 262...
2008/11/04
[ "https://Stackoverflow.com/questions/262469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7529/" ]
262,480
<p>what's the quickest way to extract a 5 digit number from a string in c#. </p> <p>I've got </p> <pre><code>string.Join(null, System.Text.RegularExpressions.Regex.Split(expression, "[^\\d]")); </code></pre> <p>Any others?</p>
[ { "answer_id": 262501, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": false, "text": "text int? value = null;\nstring pat = @\"\\d{5}\"\nRegex r = new Regex(pat);\nMatch m = r.Match(text);\nif (m.Success)\...
2008/11/04
[ "https://Stackoverflow.com/questions/262480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9948/" ]
262,493
<p>What would be the best way of inserting functionality into a binary application (3d party, closed source).</p> <p>The target application is on OSX and seems to have been compiled using gcc 3+. I can see the listing of functions implemented in the binary and have debugged and isolated one particular function which I...
[ { "answer_id": 275216, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "otool -l dyld: bad external relocation length fork()" }, { "answer_id": 23497928, "author": "jar", "author_id"...
2008/11/04
[ "https://Stackoverflow.com/questions/262493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
262,508
<p>I am using some code which was originally taken from the Apple sample ViewTransitions to swap two views with each other.</p> <pre><code>CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setType:kCATransitionFade]; [animation setDuration:0.3f]; [animation setTimingFunction:...
[ { "answer_id": 275216, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "otool -l dyld: bad external relocation length fork()" }, { "answer_id": 23497928, "author": "jar", "author_id"...
2008/11/04
[ "https://Stackoverflow.com/questions/262508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4496/" ]