qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
360,232
<p>Building on <a href="https://stackoverflow.com/questions/318553/getting-emacs-to-untabify-when-saving-files">Getting Emacs to untabify when saving certain file types (and only those file types)</a> , I'd like to run a hook to untabify my C++ files when I start modifying the buffer. I tried adding hooks to untabify t...
[ { "answer_id": 360396, "author": "Alex B", "author_id": 6180, "author_profile": "https://Stackoverflow.com/users/6180", "pm_score": 1, "selected": false, "text": "(defun untabify-buffer ()\n \"Untabify current buffer\"\n (interactive)\n (untabify (point-min) (point-max)))\n\n(defun un...
2008/12/11
[ "https://Stackoverflow.com/questions/360232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45425/" ]
360,234
<p>I want to read an specific xml node and its value for example</p> <pre><code>&lt;customers&gt; &lt;name&gt;John&lt;/name&gt; &lt;lastname&gt;fetcher&lt;/lastname&gt; &lt;/customer&gt; </code></pre> <p>and my code behind should be some thing like this (I don't know how it should be though):</p> <pre><code>Response.Wr...
[ { "answer_id": 360250, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 2, "selected": false, "text": "document.Descendant(\"name\").Value\n" }, { "answer_id": 360258, "author": "Rich", "author_id": 13449, ...
2008/12/11
[ "https://Stackoverflow.com/questions/360234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44852/" ]
360,241
<p>I have a visual studio 2005 solution which has a web application and a class library project. The web application has a reference to the library project. I'd like the library project's code documentation XML to output to the web application's bin folder, along with the library's DLL. I can't seem to find any easy...
[ { "answer_id": 369002, "author": "Mike Strother", "author_id": 21320, "author_profile": "https://Stackoverflow.com/users/21320", "pm_score": 0, "selected": false, "text": "copy \"$(TargetDir)$(TargetName).xml\" \"$(SolutionDir)MyWebProject1\\bin\\$(TargetName).xml\"\ncopy \"$(TargetDir)$...
2008/12/11
[ "https://Stackoverflow.com/questions/360241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21320/" ]
360,254
<p>If I try to use a closure on an event handler the compiler complains with :</p> <p>Incompatible types: "method pointer and regular procedure"</p> <p>which I understand.. but is there a way to use a clouser on method pointers? and how to define if can?</p> <p>eg : </p> <pre><code>Button1.Onclick = procedure( send...
[ { "answer_id": 388690, "author": "Hans-Eric", "author_id": 39348, "author_profile": "https://Stackoverflow.com/users/39348", "pm_score": 3, "selected": false, "text": "Button1.OnClick := procedure( sender : tobject ) of object begin\n ...\nend;\n" }, { "answer_id": 410745, "...
2008/12/11
[ "https://Stackoverflow.com/questions/360254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45439/" ]
360,259
<p>Can anyone recommend a decent SFTP library for use with Windows C++ apps? If a cross-platform one is available then all the better, but it's not essential. It's for use with a commercial application, so paying for something isn't an issue.</p> <p>I am using the superb <a href="http://www.codeproject.com/KB/MFC/Ul...
[ { "answer_id": 26006716, "author": "Desphilboy", "author_id": 2023625, "author_profile": "https://Stackoverflow.com/users/2023625", "pm_score": 3, "selected": false, "text": "main()\n{\npSFTPConnector sshc = new SFTPConnector(L\".\\\\\", L\"127.0.0.1\", 22, L\"sftpuser\",L\"sftppasswor...
2008/12/11
[ "https://Stackoverflow.com/questions/360259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
360,265
<p><a href="http://leepoint.net/notes-java/data/expressions/22compareobjects.html" rel="nofollow noreferrer">http://leepoint.net/notes-java/data/expressions/22compareobjects.html</a></p> <blockquote> <p>It turns out that defining equals() isn't trivial; in fact it's moderately hard to get it right, especially in...
[ { "answer_id": 360301, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 1, "selected": false, "text": "Integer a = Integer.valueOf( 2 );\nInteger b = Integer.valueOf( 2 );\n\na == b \n" }, { "answer_id": 360305, ...
2008/12/11
[ "https://Stackoverflow.com/questions/360265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
360,273
<p>Is there a built in way in SQL Server 2005 to audit things specifically like deleting a stored procedure? Is there a history table that I can query? We have a mystery sproc that has disappeared a few times now.</p>
[ { "answer_id": 28206602, "author": "Daniel Calbimonte", "author_id": 4504629, "author_profile": "https://Stackoverflow.com/users/4504629", "pm_score": 0, "selected": false, "text": " CREATE TRIGGER ddl_drop_procedure \n ON DATABASE \n FOR DROP_PROCEDURE\n AS \n RAISERROR ('Yo...
2008/12/11
[ "https://Stackoverflow.com/questions/360273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12064/" ]
360,277
<p>So for viewing a current object's state at runtime, I really like what the Visual Studio Immediate window gives me. Just doing a simple</p> <pre><code>? objectname </code></pre> <p>Will give me a nicely formatted 'dump' of the object. </p> <p><strong>Is there an easy way to do this in code, so I can do somethin...
[ { "answer_id": 360302, "author": "Ricardo Villamil", "author_id": 19314, "author_profile": "https://Stackoverflow.com/users/19314", "pm_score": 3, "selected": false, "text": "MyObject\n Property1 = value\n Property2 = value2\n OtherObject\n OtherProperty = value ...\n" }...
2008/12/11
[ "https://Stackoverflow.com/questions/360277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19020/" ]
360,288
<p>Has anyone attempted this? Is it possible, and if so, what kind of problems will I run into if I try to accomplish it?</p>
[ { "answer_id": 18719053, "author": "alecho", "author_id": 1112785, "author_profile": "https://Stackoverflow.com/users/1112785", "pm_score": 2, "selected": false, "text": "$components" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39086/" ]
360,289
<p>I a have a multithread application (MIDAS) that makes uses of windows messages to communicate with itself.</p> <p>MAIN FORM</p> <p>The main form receives windows messages sent by the RDM LogData(‘DataToLog’) </p> <p>Because windows messages are used they have the following attributes </p> <ol> <li>Received messa...
[ { "answer_id": 360613, "author": "gabr", "author_id": 4997, "author_profile": "https://Stackoverflow.com/users/4997", "pm_score": 2, "selected": false, "text": "OtlComm.pas" }, { "answer_id": 360819, "author": "Mick", "author_id": 12458, "author_profile": "https://Sta...
2008/12/11
[ "https://Stackoverflow.com/questions/360289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17560/" ]
360,307
<p>I was reading a review of the new Intel Atom 330, where they noted that Task Manager shows 4 cores - two physical cores, plus two more simulated by Hyperthreading.</p> <p>Suppose you have a program with two threads. Suppose also that these are the only threads doing any work on the PC, everything else is idle. What...
[ { "answer_id": 3358040, "author": "bart", "author_id": 230899, "author_profile": "https://Stackoverflow.com/users/230899", "pm_score": 3, "selected": false, "text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Diagnostics;\nusing System.Runtime.Inte...
2008/12/11
[ "https://Stackoverflow.com/questions/360307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5987/" ]
360,321
<p>Do you write <code>createSomething()</code> or <code>addSomething()</code>?</p> <p>Do you write <code>readSomething()</code>, <code>getSomething()</code> or <code>fetchSomething()</code>?</p> <p>This is totally a petty gripe. In the meeting room we refer to it as CRUD, but in actual code, it's becoming AGUD.</p> ...
[ { "answer_id": 7358359, "author": "Bilal Ahmad", "author_id": 936265, "author_profile": "https://Stackoverflow.com/users/936265", "pm_score": 2, "selected": false, "text": "readXXXX()" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45441/" ]
360,334
<p>Hey I was wondering if there were any way to upload images in ASP? I am working on my school's server and I don't really know what is installed and what isn't I Googled a little and came up with "Persits.Upload.1" I tried to instantiate the object with this line:</p> <p><code>Set Upload = Server.CreateObject("Per...
[ { "answer_id": 360363, "author": "Xetius", "author_id": 274, "author_profile": "https://Stackoverflow.com/users/274", "pm_score": 1, "selected": false, "text": "<INPUT type=file name=filename>" }, { "answer_id": 15159844, "author": "Matteo Bononi 'peorthyr'", "author_id":...
2008/12/11
[ "https://Stackoverflow.com/questions/360334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27620/" ]
360,338
<p>As the question states, i am a C#/Java programmer who is interested in (re)learning C++. As you know C#/Java have a somewhat strict project file structure (especially Java). I find this structure to be very helpful and was wondering if it is a) good practice to do a similar structure in a C++, b) if so, what is the ...
[ { "answer_id": 360372, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 3, "selected": true, "text": "namespace foo { \nnamespace bar {\n // declare/define the stuff (classes, functions) here\n} } // foo::ba...
2008/12/11
[ "https://Stackoverflow.com/questions/360338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18811/" ]
360,348
<p>I have an existing bare git repository located in /home/myaccount/git/project. I am currently using it over ssh from my local machine without any problems. I want to add a second user on the server which only shall access to this git repository (maybe move the repo outside my account folder?). How? Using latest vers...
[ { "answer_id": 361164, "author": "orip", "author_id": 37020, "author_profile": "https://Stackoverflow.com/users/37020", "pm_score": 4, "selected": false, "text": "~/.ssh/authorized_keys" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50718/" ]
360,365
<p>Currently I am saving a UIImage to the photos album using UIImageWriteToSavedPhotosAlbum, which works fine.</p> <p>Is there a way to then open the Photos app showing the just-saved photo? (I assume my app must close before opening Photos, which is fine.)</p> <p>Simply opening the Photos app to the Saved Photos Alb...
[ { "answer_id": 380862, "author": "lostInTransit", "author_id": 46297, "author_profile": "https://Stackoverflow.com/users/46297", "pm_score": 2, "selected": false, "text": "UIImagePickerViewController" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44003/" ]
360,368
<p>There must be an easy way to do this, but somehow I can wrap my head around it. The best way I can describe what I want is a lambda function for a class. I have a library that expects as an argument an uninstantiated version of a class to work with. It then instantiates the class itself to work on. The problem is th...
[ { "answer_id": 360403, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": "__call__" }, { "answer_id": 360415, "author": "Moe", "author_id": 3051, "author_profile": "https://St...
2008/12/11
[ "https://Stackoverflow.com/questions/360368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27478/" ]
360,369
<p>Hey. I have an object that has a string property called BackgroundColor. This string is the hexidecimal representation of a color. I cannot change this object.</p> <p>I'm binding a collection of these objects to a listView. What I would like to do is bind the background of the listview's row to the BackgroundColor ...
[ { "answer_id": 360579, "author": "Robert Macnee", "author_id": 19273, "author_profile": "https://Stackoverflow.com/users/19273", "pm_score": 3, "selected": false, "text": "<Grid xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:sys=\"clr-namespace:System;as...
2008/12/11
[ "https://Stackoverflow.com/questions/360369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20518/" ]
360,373
<p>I remember seeing in a sample a while ago that it is possible to break up a windsor configuration file into multiple ones and reference them from the app.config in a way that they get parsed automatically.</p> <p>Of course I didn't bookmark it and now I can't find it and my Windsor.Config.xml file is creeping up on...
[ { "answer_id": 360394, "author": "Watson", "author_id": 25807, "author_profile": "https://Stackoverflow.com/users/25807", "pm_score": 2, "selected": true, "text": "<include uri=\"file://Configurations/facilities.xml\">\n<include uri=\"file://Configurations/services.xml\">\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
360,378
<p>This relates to Composite Application Guidance for WPF, or Prism.</p> <p>I have one "MainRegion" in my shell. My various modules will be loaded into this main region. I can populate a list of available modules in a menu and select them to load. On the click of the menu I do:</p> <pre><code>var module = moduleEnume...
[ { "answer_id": 897219, "author": "NJE", "author_id": 90576, "author_profile": "https://Stackoverflow.com/users/90576", "pm_score": 3, "selected": true, "text": "// Get a view from the container.\nvar view = Container.Resolve<MyView>();\n\n// Get the region.\nvar region = RegionManager.Re...
2008/12/11
[ "https://Stackoverflow.com/questions/360378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28029/" ]
360,392
<p>We are scheduling a task programatically. However, the executable to be scheduled could be installed in a path that has spaces. ie c:\program Files\folder\folder\folder program\program.exe</p> <p>When we provide this path as a parameter to the Tasjk Scheduler it fails to start because it cannot find the executable....
[ { "answer_id": 360690, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 3, "selected": true, "text": "string args = \"/CREATE /RU SYSTEM /SC \" + taskSchedule + \" /MO \" + taskModifier + \" /SD \" + taskStartDate + \...
2008/12/11
[ "https://Stackoverflow.com/questions/360392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42518/" ]
360,402
<p>I have a csv imported into my Hyperion v8.3 bqy file. I have some custom columns and a pivot already created. I just want to refresh the data. In the past, I would hit Process Current and it would direct me to my computer and I could select the csv file to update from. Now it will not do that. It doesn't go to...
[ { "answer_id": 360690, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 3, "selected": true, "text": "string args = \"/CREATE /RU SYSTEM /SC \" + taskSchedule + \" /MO \" + taskModifier + \" /SD \" + taskStartDate + \...
2008/12/11
[ "https://Stackoverflow.com/questions/360402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
360,409
<p>I have a XML File like that</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Configurations&gt; &lt;EmailConfiguration&gt; &lt;userName&gt;xxxx&lt;/userName&gt; &lt;password&gt;xxx&lt;/password&gt; &lt;displayName&gt;xxxxx&lt;/display...
[ { "answer_id": 360518, "author": "NerdFury", "author_id": 6146, "author_profile": "https://Stackoverflow.com/users/6146", "pm_score": 4, "selected": true, "text": "public class Options\n{\n public string UserName { get; set; }\n public string Password { get; set; }\n public stri...
2008/12/11
[ "https://Stackoverflow.com/questions/360409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44852/" ]
360,421
<p>Is there a way to define styles for a combination of classes? For example, I'd like my HTML to look like this, but the output to render in the appropriate color:</p> <pre><code>&lt;span class="red"&gt;Red Text&lt;/span&gt;&lt;br/&gt; &lt;span class="green"&gt;Green Text&lt;/span&gt;&lt;br/&gt; &lt;span class="red ...
[ { "answer_id": 360450, "author": "ieure", "author_id": 45224, "author_profile": "https://Stackoverflow.com/users/45224", "pm_score": 4, "selected": true, "text": "span.red.green { color: yellow; }\n" }, { "answer_id": 360451, "author": "Tarik", "author_id": 44852, "au...
2008/12/11
[ "https://Stackoverflow.com/questions/360421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
360,422
<p>I'm trying to use reflection to get a property from a class. Here is some sample code of what I'm seeing:</p> <pre><code> using System.Reflection; namespace ConsoleApplication { class Program { static void Main(string[] args) { PropertyInfo[] tmp2 = typeof(TestClass).GetProperti...
[ { "answer_id": 360427, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 5, "selected": true, "text": "BindingFlags.Instance" }, { "answer_id": 360438, "author": "bruno conde", "author_id": 31136, "...
2008/12/11
[ "https://Stackoverflow.com/questions/360422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8169/" ]
360,431
<p>For this dropdownlist in HTML:</p> <pre><code>&lt;select id="countries"&gt; &lt;option value="1"&gt;Country&lt;/option&gt; &lt;/select&gt; </code></pre> <p>I would like to open the list (the same as left-clicking on it). Is this possible using JavaScript (or more specifically jQuery)?</p>
[ { "answer_id": 360448, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 2, "selected": false, "text": "onclick" }, { "answer_id": 360474, "author": "ieure", "author_id": 45224, "author_profile": "htt...
2008/12/11
[ "https://Stackoverflow.com/questions/360431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/343/" ]
360,449
<p>I'm trying to run a 3d array but the code just crashes in windows when i run it, here's my code;</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main(){ int myArray[10][10][10]; for (int i = 0; i &lt;= 9; ++i){ for (int t = 0; t &lt;=9; ++t){ for (int x ...
[ { "answer_id": 360463, "author": "David Norman", "author_id": 34502, "author_profile": "https://Stackoverflow.com/users/34502", "pm_score": 5, "selected": true, "text": "for (int x = 0; x <= 9; ++t){\n" }, { "answer_id": 360595, "author": "JohnMcG", "author_id": 1674, ...
2008/12/11
[ "https://Stackoverflow.com/questions/360449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33061/" ]
360,454
<p>Back in college, only the use of pseudo code was evangelized more than OOP in my curriculum. Just like commenting (and other preached 'best practices'), I found that in crunch time psuedocode was often neglected. So my question is...who actually uses it a lot of the time? Or do you only use it when an algorithm is r...
[ { "answer_id": 360490, "author": "Chris Cudmore", "author_id": 18907, "author_profile": "https://Stackoverflow.com/users/18907", "pm_score": 1, "selected": false, "text": "public void doBigJob( params )\n{\n doTask1( params);\n doTask2( params);\n doTask3( params);\n}\nprivate v...
2008/12/11
[ "https://Stackoverflow.com/questions/360454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25664/" ]
360,466
<p>This UpdatePanel is contained by an UserControl. When the LinkButton is pressed arow should be added in another GridView. When an user is logged in this control is working well. The problems appears when an user is not logged in and try to push that button. No event triggers. Someone suggested me to give a permissio...
[ { "answer_id": 365009, "author": "Ionel Bratianu", "author_id": 45468, "author_profile": "https://Stackoverflow.com/users/45468", "pm_score": 2, "selected": true, "text": " <Columns>\n <asp:ButtonField Text=\"Add\" CommandName=\"Select\" /> \n <asp:TemplateField>\n ...
2008/12/11
[ "https://Stackoverflow.com/questions/360466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45468/" ]
360,467
<p>I have a table that looks a bit like this actors(forename, surname, stage_name);</p> <p>I want to update stage_name to have a default value of</p> <pre><code>forename." ".surname </code></pre> <p>So that</p> <pre><code>insert into actors(forename, surname) values ('Stack', 'Overflow'); </code></pre> <p>would pr...
[ { "answer_id": 360484, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 2, "selected": false, "text": "CURRENT_TIMESTAMP" }, { "answer_id": 360493, "author": "Bill Karwin", "author_id": 20860, "author_profile...
2008/12/11
[ "https://Stackoverflow.com/questions/360467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33604/" ]
360,473
<p>What's the most natural way to model a group of objects that form a set? For example, you might have a bunch of user objects who are all subscribers to a mailing list.</p> <p>Obviously you could model this as an array, but then you have to order the elements and whoever is using your interface might be confused as ...
[ { "answer_id": 360485, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": true, "text": "set" }, { "answer_id": 360500, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://...
2008/12/11
[ "https://Stackoverflow.com/questions/360473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25068/" ]
360,476
<p>How can I write a semi transparent text on an Image (Jpg,Bmp), or a transparent text (color as same background Image) but with a shadow, something I want to do to watermark the images.</p> <p>I want to accomplish that using Delphi win32.</p>
[ { "answer_id": 360495, "author": "X-Ray", "author_id": 14031, "author_profile": "https://Stackoverflow.com/users/14031", "pm_score": 2, "selected": false, "text": "img.Canvas.Brush.Style:=bsClear;\nimg.Canvas.Font.Color:=clBlack;\nimg.Canvas.TextOut(0, 0, 'hi there');\n" }, { "an...
2008/12/11
[ "https://Stackoverflow.com/questions/360476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24462/" ]
360,480
<p>It seems that there're 6 variations to CBC-MAC algorithm. I've been trying to match the MAC algorithm on the PINPad 1000SE [which per manual is ISO 9797-1 Algorithm 1].</p> <p>I got an excellent start from <a href="http://bytes.com/topic/net/answers/654069-iso-iec-9797-1-cbc-mac-using-vb-net" rel="nofollow norefer...
[ { "answer_id": 1459874, "author": "Aleksander Adamowski", "author_id": 171960, "author_profile": "https://Stackoverflow.com/users/171960", "pm_score": 2, "selected": false, "text": "DESEDEISO9797ALG1MACWITHISO7816-4PADDING" }, { "answer_id": 1459901, "author": "leppie", "...
2008/12/11
[ "https://Stackoverflow.com/questions/360480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28413/" ]
360,491
<p>I'm wanting to use jQuery to wrap a mailto: anchor around an email address, but it's also grabbing the whitepace that the CMS is generating.</p> <p>Here's the HTML I have to work with, the script as I have it and a copy of the output.</p> <p>HTML</p> <pre><code>&lt;div class="field field-type-text field-field-ema...
[ { "answer_id": 360496, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 9, "selected": true, "text": "replace" }, { "answer_id": 360533, "author": "Tuxmentat", "author_id": 15963, "author_profile": "...
2008/12/11
[ "https://Stackoverflow.com/questions/360491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16124/" ]
360,492
<p>I'm fooling around with <a href="http://pipes.yahoo.com" rel="nofollow noreferrer">Yahoo! pipes</a> and I'm hitting a wall with some regular expression. Now I'm familiar with regular expressions from Perl but the rules just seem to be different in Yahoo! pipes.</p> <p><a href="https://i.stack.imgur.com/6I6Ok.png" r...
[ { "answer_id": 360610, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": true, "text": "(?i).*?<i>([^<]*).* [ ] g [x] s [ ] m [ ] i\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3848/" ]
360,507
<p>I wonder if there is a less verbose way to do Input Verification in my methods. For example, i commonly write stuff like this:</p> <pre><code>public string SomeFunction(string param1, int param2) { if(string.IsNullOrEmpty(param1)){ throw new ArgumentException("bla", "param1"); } if(param2 &lt; 0...
[ { "answer_id": 360548, "author": "Drejc", "author_id": 6482, "author_profile": "https://Stackoverflow.com/users/6482", "pm_score": 2, "selected": false, "text": "public string SomeFunction(string param1, int param2)\n{\n CheckParameterNotNull(param1);\n CheckParameterRange(param2, ...
2008/12/11
[ "https://Stackoverflow.com/questions/360507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
360,520
<p>My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security module to determine if it's something we can/should use. </p> <p>Our security requirements are pretty basic; a user just needs ...
[ { "answer_id": 396029, "author": "Pavel", "author_id": 48340, "author_profile": "https://Stackoverflow.com/users/48340", "pm_score": 5, "selected": false, "text": "public class MyUserDetails implements UserDetails {\n // this is your custom UserDetails implementation to serve as a pri...
2008/12/11
[ "https://Stackoverflow.com/questions/360520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4249/" ]
360,530
<p>I would like to know how to change the colour of the equality sign and double quotes for html documents in the eclipse PDT IDE. I can change most colours in Preferences -> Web &amp; XML -> HTML Files -> syntax coloring, but can't change the characters <code>=</code> or <code>"</code> e.g. in an anchor tag <code>&lt;...
[ { "answer_id": 396029, "author": "Pavel", "author_id": 48340, "author_profile": "https://Stackoverflow.com/users/48340", "pm_score": 5, "selected": false, "text": "public class MyUserDetails implements UserDetails {\n // this is your custom UserDetails implementation to serve as a pri...
2008/12/11
[ "https://Stackoverflow.com/questions/360530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/69346/" ]
360,597
<p>I have a class hierarchy, this one:</p> <pre><code>type TMatrix = class protected //... public constructor Create(Rows, Cols: Byte); //... type TMinMatrix = class(TMatrix) private procedure Allocate; procedure DeAllocate; public constructor Create(Rows, Cols: Byte...
[ { "answer_id": 360693, "author": "Toon Krijthe", "author_id": 18061, "author_profile": "https://Stackoverflow.com/users/18061", "pm_score": 2, "selected": false, "text": "type\n TMatrix = class\n protected\n //...\n public\n constructor Create(Rows, Cols: Byte);\n //...\ntype...
2008/12/11
[ "https://Stackoverflow.com/questions/360597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28298/" ]
360,612
<p>I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested?</p> <p>What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LT...
[ { "answer_id": 361351, "author": "Brian Carper", "author_id": 23070, "author_profile": "https://Stackoverflow.com/users/23070", "pm_score": 3, "selected": false, "text": "hello-world" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
360,615
<p>In postgres I am fairly sure you can do something like this</p> <pre><code>SELECT authors.stage_name, count(select id from books where books.author_id = authors.id) FROM authors, books; </code></pre> <p>Essentially, in this example I would like to return a list of authors and how many books each has wri...
[ { "answer_id": 360647, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 0, "selected": false, "text": "SELECT authors.stage_name, count(*) \nFROM authors INNER JOIN books on books.author_id = authors.id\nGROUP BY author...
2008/12/11
[ "https://Stackoverflow.com/questions/360615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33604/" ]
360,628
<p>I'm trying to embed an xsl into a XML file. The reason for doing this is to create a single file that could be moved to different computers, this would prevent the need to move the xsl file. </p> <p>The xsl file is creating a table and grabbing a test step from the xml and whether it passed or failed, pretty simp...
[ { "answer_id": 361237, "author": "Dimitre Novatchev", "author_id": 36305, "author_profile": "https://Stackoverflow.com/users/36305", "pm_score": 4, "selected": false, "text": "<xsl:template>" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7617/" ]
360,643
<p>I used to have one class for one file. For example <em>car.cs</em> has the class <em>car</em>. But as I program more classes, I would like to add them to the same file. For example <em>car.cs</em> has the class <em>car</em> and the <em>door</em> class, etc.</p> <p>My question is good for Java, C#, PHP or any other ...
[ { "answer_id": 360735, "author": "Ryan Lundy", "author_id": 5486, "author_profile": "https://Stackoverflow.com/users/5486", "pm_score": 5, "selected": false, "text": "public class Customer { /* whatever */ }\n\npublic class CustomerCollection : List<Customer> { /* whatever */ }\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21386/" ]
360,649
<p>Is there a way to vertically stack selected td elments? I would like to have the same table, though display it differently using only css. Would this be possible, or do I have to have separate html markups? I would like to try to have the same html markup, though use different css for different sites/looks.</p> <pr...
[ { "answer_id": 360674, "author": "Eduardo Molteni", "author_id": 2385, "author_profile": "https://Stackoverflow.com/users/2385", "pm_score": 3, "selected": true, "text": "<table>\n <tr>\n <td class=\"vertical\">i'm</td>\n <td class=\"horizontal\" rowspan=\"3\">i'm horizontal</td...
2008/12/11
[ "https://Stackoverflow.com/questions/360649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20641/" ]
360,673
<p>Is there a way to do gradients in css/html/javascript only that will work across all the major browsers? (MS IE 5+, Firefox, Opera, Safari)?</p> <p>Edit: I would like to do this for backgrounds (header, main panel, side panels). Also, would like to have vertical line gradients as well.</p> <p>Edit: after reading t...
[ { "answer_id": 360811, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 2, "selected": false, "text": "var parent = document.getElementByID('foo');\nfor(var i=0; i< count; i++) {\n var div = document.createElement('div');\n ...
2008/12/11
[ "https://Stackoverflow.com/questions/360673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20641/" ]
360,694
<p>If you have a web application that will run inside a network, it makes sense for it to support windows authentication (active directory?).</p> <p>Would it make sense to use AD security model as well, or would I make my own roles/security module that some admin would have to configure for each user?</p> <p>I've ne...
[ { "answer_id": 360717, "author": "Ian G", "author_id": 31765, "author_profile": "https://Stackoverflow.com/users/31765", "pm_score": 4, "selected": true, "text": "web.config" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
360,725
<p>I am fetching an array of floats from my database but the array I get has converted the values to strings.</p> <p>How can I convert them into floats again without looping through the array?<br /> Alternatively, how can I fetch the values from the database without converting them to strings?</p> <hr /> <h3>EDIT:</h3>...
[ { "answer_id": 360736, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 6, "selected": true, "text": "$floats = array_map('floatval', $nonFloats);\n" }, { "answer_id": 360744, "author": "Kris", "author_id": 18565...
2008/12/11
[ "https://Stackoverflow.com/questions/360725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11995/" ]
360,748
<p>I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence:</p> <pre><code>int Fibonacci(int n) { if (n &lt;= 1) return n; else return Fibonacc...
[ { "answer_id": 360768, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 7, "selected": false, "text": "F(n)" }, { "answer_id": 360773, "author": "mmx", "author_id": 33708, "author_profile": "https://Stac...
2008/12/11
[ "https://Stackoverflow.com/questions/360748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40516/" ]
360,751
<p>I would like to have an app include a custom font for rendering text, load it, and then use it with standard <code>UIKit</code> elements like <code>UILabel</code>. Is this possible?</p>
[ { "answer_id": 361613, "author": "August", "author_id": 30966, "author_profile": "https://Stackoverflow.com/users/30966", "pm_score": 4, "selected": false, "text": "fontWithName:size:" }, { "answer_id": 370257, "author": "Genericrich", "author_id": 39932, "author_prof...
2008/12/11
[ "https://Stackoverflow.com/questions/360751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18017/" ]
360,753
<p>So I'm a newbie to TDD, and I successfully created a nice little sample app using the MVP pattern. The major problem to my current solution is that its blocking the UI thread, So I was trying to setup the Presenter to use the SynchronizationContext.Current, but when I run my tests the SynchronizationContext.Current...
[ { "answer_id": 360780, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": " public FtpPresenter() : this(null) { }\n\n public FtpPresenter( SynchronizationContext context )\n {\n this...
2008/12/11
[ "https://Stackoverflow.com/questions/360753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37881/" ]
360,758
<p>I have a server that hosts my Subversion code base. That server is currently a <a href="http://en.wikipedia.org/wiki/Windows_Server_2003" rel="noreferrer">Windows Server 2003</a> box, and my IT administrator wants to update it to <a href="http://en.wikipedia.org/wiki/Windows_Server_2008" rel="noreferrer">Windows Ser...
[ { "answer_id": 360919, "author": "alexandrul", "author_id": 19756, "author_profile": "https://Stackoverflow.com/users/19756", "pm_score": 5, "selected": false, "text": "svnadmin create repository-name --fs-type fsfs\nsvnadmin load repository-name --force-uuid < repository-name.dmp\n" ...
2008/12/11
[ "https://Stackoverflow.com/questions/360758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10420/" ]
360,766
<p>I'd like to define a generic type, whose actual type parameter can only be</p> <ol> <li>One of the numeric primitive wrapper classes (<code>Long</code>, <code>Integer</code>, <code>Float</code>, <code>Double</code>)</li> <li><code>String</code></li> </ol> <p>I can meet the first requirement with a definition like ...
[ { "answer_id": 360796, "author": "Dave L.", "author_id": 3093, "author_profile": "https://Stackoverflow.com/users/3093", "pm_score": 4, "selected": false, "text": "public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll)\n" }, { "answer_id": 36...
2008/12/11
[ "https://Stackoverflow.com/questions/360766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
360,777
<p>I have an animation and I want it to play it just only once. From where can I set so when I export to SWF the default will be AUTO LOOPING disabled.</p> <p>Thanks</p>
[ { "answer_id": 24054393, "author": "Khadka Pushpendra", "author_id": 2318637, "author_profile": "https://Stackoverflow.com/users/2318637", "pm_score": 0, "selected": false, "text": "<param name='loop' value='false' />\n\n<object type='application/x-shockwave-flash' data='sourcefile' widt...
2008/12/11
[ "https://Stackoverflow.com/questions/360777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44973/" ]
360,782
<p>Given either the binary or string representation of an IPv6 address and its prefix length, what's the best way to extract the prefix in Python?</p> <p>Is there a library that would do this for me, or would I have to:</p> <ol> <li>convert the address from string to an int (inet_ntop)</li> <li>Mask out the prefix</l...
[ { "answer_id": 360989, "author": "Martin v. Löwis", "author_id": 33006, "author_profile": "https://Stackoverflow.com/users/33006", "pm_score": 3, "selected": true, "text": "py> p=ipaddr.IPv6(\"2001:888:2000:d::a2\")\npy> p.SetPrefix(64)\npy> p\nIPv6('2001:888:2000:d::a2/64')\npy> p.netwo...
2008/12/11
[ "https://Stackoverflow.com/questions/360782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
360,789
<p>I want to otherwise block code execution on the main thread while still allowing UI changes to be displayed.</p> <p>I tried to come up with a simplified example version of what I'm trying to do; and this is the best I could come up with. Obviously it doesn't demonstrate the behavior I'm wanting or I wouldn't be pos...
[ { "answer_id": 360944, "author": "Maghis", "author_id": 45355, "author_profile": "https://Stackoverflow.com/users/45355", "pm_score": 2, "selected": false, "text": "private void button1_Click(object sender, EventArgs e)\n{\n // this is the UI thread\n\n ThreadPool.QueueUserWorkItem...
2008/12/11
[ "https://Stackoverflow.com/questions/360789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16260/" ]
360,816
<p>For some reason I can't use <code>runat="server"</code> as an attribute for the input tag in order for the jQuery to display the image button and work. Is something wrong without <code>runat="server"</code>? It works fine. And I want the format to be "yyyy/mm/dd" and also I need it for the server because this is whe...
[ { "answer_id": 360832, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 4, "selected": true, "text": "<input id='datepicker' runat='server' class='datepicker' />\n\n$(document).ready(function(){\n$(\".datepicker\").datepicker({ s...
2008/12/11
[ "https://Stackoverflow.com/questions/360816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39809/" ]
360,830
<p>I'm trying to retrieve data from an SQL Server 2000 server, and place into Excel. Which sounds simple I know. I'm currently Copying, and Pasting into Excel, from Management Studio</p> <p>The problem is one of the columns is an address, and it’s not retaining the newlines. These new lines have to stay in the same ce...
[ { "answer_id": 360886, "author": "Tmdean", "author_id": 45084, "author_profile": "https://Stackoverflow.com/users/45084", "pm_score": 2, "selected": true, "text": "Sub FixNewlines()\n For Each Cell In UsedRange\n Cell.FormulaR1C1 = Replace(Cell.FormulaR1C1, Chr(13), \"\")\n ...
2008/12/11
[ "https://Stackoverflow.com/questions/360830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18405/" ]
360,831
<p>I have a scenario in which I'm going to need an arbitrary number of servers to provide the same SOAP web service. I would like to generate one set of proxy classes and be able to supply them with a location to point them at the different servers at runtime. Unfortunately, it looks as though the <code>wsdl:port</code...
[ { "answer_id": 360967, "author": "rbrayb", "author_id": 9922, "author_profile": "https://Stackoverflow.com/users/9922", "pm_score": 2, "selected": false, "text": "Service svc = new Service ();\nsvc.url = \"Value read from config. file or some such\"\noutput = svc.method (input);\n" }, ...
2008/12/11
[ "https://Stackoverflow.com/questions/360831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2327/" ]
360,836
<p>Now this is all way simplified, but here goes:</p> <p>I have a User Control that consists only of a single *.ascx file. The control has no code-behind: it's just a script with a few functions, like this:</p> <pre><code>&lt;%@ Control Language="VB" EnableViewState="False" ClassName="MyControlType" %&gt; &lt;script...
[ { "answer_id": 361052, "author": "BigJump", "author_id": 8542, "author_profile": "https://Stackoverflow.com/users/8542", "pm_score": 0, "selected": false, "text": "<script ruant=\"server\"> \n" }, { "answer_id": 361078, "author": "BigJump", "author_id": 8542, "author_...
2008/12/11
[ "https://Stackoverflow.com/questions/360836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3043/" ]
360,844
<p>I'd like to implement a <a href="http://en.wikipedia.org/wiki/Bloom_filter" rel="noreferrer">bloom filter</a> using MySQL (other a suggested alternative).</p> <p>The problem is as follows:</p> <p>Suppose I have a table that stores 8 bit integers, with these following values:</p> <pre><code>1: 10011010 2: 00110101...
[ { "answer_id": 361093, "author": "Alexei Tenitski", "author_id": 45508, "author_profile": "https://Stackoverflow.com/users/45508", "pm_score": 4, "selected": false, "text": "number\n\n154\n53\n148\n38\n59\n106\n" }, { "answer_id": 28498755, "author": "cWarren", "author_id...
2008/12/11
[ "https://Stackoverflow.com/questions/360844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43005/" ]
360,849
<p>From what I understand, in TDD you have to write a failing test first, then write the code to make it pass, then refactor. But what if your code already accounts for the situation you want to test?</p> <p>For example, lets say I'm TDD'ing a sorting algorithm (this is just hypothetical). I might write unit tests for...
[ { "answer_id": 360875, "author": "David Norman", "author_id": 34502, "author_profile": "https://Stackoverflow.com/users/34502", "pm_score": 2, "selected": false, "text": "assertTrue(x = 1);\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32998/" ]
360,851
<p>What is the syntax to concatenate text into a binding expression for an asp.net webpage (aspx).</p> <p>For example if I had a hyperlink that was being bound like this:</p> <pre><code>&lt;asp:HyperLink id="lnkID" NavigateUrl='&lt;%# Bind("Link") %&gt;' Target="_blank" Text="View" runat="ser...
[ { "answer_id": 360865, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 2, "selected": false, "text": "String.Format(\"{0}{1}\"" }, { "answer_id": 360936, "author": "TheEmirOfGroofunkistan", "author_id...
2008/12/11
[ "https://Stackoverflow.com/questions/360851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1874/" ]
360,877
<pre><code>private static final GridLayout layout = new GridLayout( 3, 1, 1, 0 ); </code></pre> <p>in this line of code what do the numbers represent and how do you use them to arrange the checkboxes and buttons in the window?</p>
[ { "answer_id": 361593, "author": "Joe Liversedge", "author_id": 4552, "author_profile": "https://Stackoverflow.com/users/4552", "pm_score": 3, "selected": false, "text": "public GridLayout(int rows,\n int cols,\n int hgap,\n int vgap)\n\...
2008/12/11
[ "https://Stackoverflow.com/questions/360877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
360,889
<p>I'm looking for a tool (or a set of tools) for Windows that will perform the following:</p> <ol> <li>Capture UDP packets from a specific network interface to a file.</li> <li>Play a stream of packets from a file through a network interface.</li> <li>In addition to 2: replay the original packets to a different host ...
[ { "answer_id": 13054921, "author": "spxl", "author_id": 1207973, "author_profile": "https://Stackoverflow.com/users/1207973", "pm_score": 3, "selected": true, "text": "bittwiste" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33982/" ]
360,899
<p>I have been working on this for the greater part of the day and I cant seem to make this part of my code work. The intent of the code is to allow the user to input a set of values in order to calculate the missing value. As an additional feature I placed a CheckBox on the form to allow the user to do further calcula...
[ { "answer_id": 360946, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 2, "selected": false, "text": "int y, b;\n" }, { "answer_id": 360952, "author": "Programmin Tool", "author_id": 21691, "author_profile": ...
2008/12/11
[ "https://Stackoverflow.com/questions/360899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45151/" ]
360,912
<p>If an application† crashes,</p> <p><a href="https://i.stack.imgur.com/o8DiZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o8DiZ.png" alt="enter image description here"></a></p> <p>I hit "Debug" and Visual Studio is my currently registered Just-In-Time (JIT) debugger:</p> <p><a href="https://i...
[ { "answer_id": 2464489, "author": "i_am_jorf", "author_id": 74815, "author_profile": "https://Stackoverflow.com/users/74815", "pm_score": 1, "selected": false, "text": "http://msdl.microsoft.com/download/symbols" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
360,913
<p>How do I update my subversion repository so it can accept updates to the log message field? I've got a Windows installation and I changed the pre-revprop-change.tmpl file name to a batch file, but now when I try to update a the log message property my tortoise svn just hangs and the property isn't updated. Am I doin...
[ { "answer_id": 2464489, "author": "i_am_jorf", "author_id": 74815, "author_profile": "https://Stackoverflow.com/users/74815", "pm_score": 1, "selected": false, "text": "http://msdl.microsoft.com/download/symbols" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18927/" ]
360,928
<p>I have a table (SQL 2000) with over 10,000,000 records. Records get added at a rate of approximately 80,000-100,000 per week. Once a week a few reports get generated from the data. The reports are typically fairly slow to run because there are few indexes (presumably to speed up the INSERTs). One new report coul...
[ { "answer_id": 361403, "author": "jmucchiello", "author_id": 44065, "author_profile": "https://Stackoverflow.com/users/44065", "pm_score": 0, "selected": false, "text": " select top 10000 \n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1664/" ]
360,935
<p>I have a menu of report links in my master page. I need to append an ID to the end of each whenever the user changes a value on the child page. What's a good way to accomplish this?</p> <p>UPDATE: I should have mentioned that the child update is happening inside an UpdatePanel, meaning the master page is not reload...
[ { "answer_id": 361010, "author": "jrcs3", "author_id": 3819, "author_profile": "https://Stackoverflow.com/users/3819", "pm_score": 2, "selected": false, "text": "public partial class _default : System.Web.UI.MasterPage\n{\n protected string m_myString = string.Empty;\n public strin...
2008/12/11
[ "https://Stackoverflow.com/questions/360935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23935/" ]
360,943
<p>I have a problem on how to read text from file and perform operations on it for example</p> <p>i have this text file that include</p> <p>//name-//sex---------//birth //m1//m2//m3</p> <pre><code>fofo, male, 1986, 67, 68, 69 momo, male, 1986, 99, 98, 100 Habs, female, 1988, 99, 100, 87 toto, male, 198...
[ { "answer_id": 360996, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 1, "selected": false, "text": "List<T>" }, { "answer_id": 361033, "author": "Tim Jarvis", "author_id": 10387, "author_profile": ...
2008/12/11
[ "https://Stackoverflow.com/questions/360943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
360,961
<p>I've got a table, called faq_questions with the following structure:</p> <pre><code>id int not_null auto_increment, question varchar(255), sort_order int </code></pre> <p>I'm attempting to build a query that given a sort order, selects the row with the next highest sort order. </p> <p>Example:</p> <pre><code>id...
[ { "answer_id": 360975, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 6, "selected": true, "text": "SELECT id,question FROM `questions` \nWHERE `sort_order` > sort_order_variable\nORDER BY sort_order ASC \nLIMIT 1\n" ...
2008/12/11
[ "https://Stackoverflow.com/questions/360961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1742702/" ]
360,968
<p>I'm seeing some code I've inherited that looks like the following:</p> <pre><code>@interface SomeClass (private) </code></pre> <p>This is within <code>SomeClass.m</code>, the implementation file. There is an accompanying header file which doesn't suggest that the class is using a category. Is <code>(private)</code...
[ { "answer_id": 361140, "author": "Abizern", "author_id": 41116, "author_profile": "https://Stackoverflow.com/users/41116", "pm_score": 6, "selected": true, "text": "@interface NSString (Capitals)\n\n-(NSString *)alternateCaps:(NSString *)aString;\n\n@end\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/360968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
360,982
<p>I was searching here about converting a string like "16:20" to a DateTime type without losing the format, I said I dont want to add dd/MM/yyy or seconds or AM/PM, because db just accept this format.</p> <p>I tried with Cultures yet</p> <p>Thanks in Advance</p>
[ { "answer_id": 360998, "author": "MartinHN", "author_id": 2972, "author_profile": "https://Stackoverflow.com/users/2972", "pm_score": 2, "selected": false, "text": "DateTime dt = new DateTime(2008, 12, 11, Convert.ToInt32(\"16\"), Convert.ToInt32(\"32\"), 0);\n" }, { "answer_id":...
2008/12/11
[ "https://Stackoverflow.com/questions/360982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388553/" ]
360,990
<p>I am looking to get a list of the column names returned from a Model. Anyone know how this would be done, any help would be greatly appreciated.</p> <p>Example Code:</p> <pre><code>var project = db.Projects.Single(p =&gt; p.ProjectID.Equals(Id)); </code></pre> <p>This code would return the Projects object, how wo...
[ { "answer_id": 361201, "author": "shahkalpesh", "author_id": 23574, "author_profile": "https://Stackoverflow.com/users/23574", "pm_score": 2, "selected": true, "text": "DataContext" }, { "answer_id": 362745, "author": "tsquillario", "author_id": 45509, "author_profile...
2008/12/11
[ "https://Stackoverflow.com/questions/360990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45509/" ]
360,992
<p>Can anyone explain the differences between <strong>Protocols</strong> and <strong>Categories</strong> in Objective-C? When do you use one over the other?</p>
[ { "answer_id": 361067, "author": "mipadi", "author_id": 28804, "author_profile": "https://Stackoverflow.com/users/28804", "pm_score": 8, "selected": true, "text": "NSObject" }, { "answer_id": 361072, "author": "e.James", "author_id": 33686, "author_profile": "https://...
2008/12/11
[ "https://Stackoverflow.com/questions/360992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
361,002
<p>For fun, I'm trying to write one of my son's favorite board games as a piece of software. Eventually I expect to build a WPF UI on top of it, but right now I'm building the machine that models the games and its rules.</p> <p>As I do this, I keep seeing problems that I think are common to many board games, and perh...
[ { "answer_id": 361254, "author": "Stefan", "author_id": 19307, "author_profile": "https://Stackoverflow.com/users/19307", "pm_score": 3, "selected": false, "text": "1 2 3 \n4 (5) 6 BoardArray 5 = row 2, col 2\n7 8 9 \n" }, { "answer_id": 558437, "author": "Andrew Top",...
2008/12/11
[ "https://Stackoverflow.com/questions/361002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5314/" ]
361,049
<p>I have a web application deployed in an internet hosting provider. This web application consumes a WCF Service deployed at an IIS server located at my company’s application server, in order to have data access to the company’s database, the network guys allowed me to expose this WCF service through a firewall for se...
[ { "answer_id": 362108, "author": "Mitch Baker", "author_id": 37896, "author_profile": "https://Stackoverflow.com/users/37896", "pm_score": 4, "selected": true, "text": "[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/361049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45516/" ]
361,066
<p>I recently <a href="https://stackoverflow.com/questions/353912/functional-programming-state-vs-reassignment">asked a question</a> about functional programming, and received (good!) answers that prompted more questions (as seems to be the case with learning, sometimes). Here are a couple examples:</p> <ol> <li><p>On...
[ { "answer_id": 361379, "author": "tsimon", "author_id": 1685, "author_profile": "https://Stackoverflow.com/users/1685", "pm_score": 3, "selected": false, "text": "String s1 = \"there\";\nString s2 = s1.Insert(0, \"hello \");\n\nConsole.Writeline(\"string 1: \" + s1);\nConsole.Writeline(\...
2008/12/11
[ "https://Stackoverflow.com/questions/361066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38803/" ]
361,069
<p>An answer and subsequent <a href="https://stackoverflow.com/questions/360899/c-math-problem#360931">debate in the comments</a> in another thread prompted me to ask:</p> <p>In C# || and &amp;&amp; are the short-circuited versions of the logical operators | and &amp; respectively.<br /></p> <p>Example usage:</p> <p...
[ { "answer_id": 361085, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 7, "selected": true, "text": "bool nullorempty = str == null || str.Length == 0;\n" }, { "answer_id": 361106, "author": "Grant Wagner", ...
2008/12/11
[ "https://Stackoverflow.com/questions/361069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33226/" ]
361,077
<p>Today I ran into a problem were I needed to remote-debug a program. The program was launched from another system, so I really don't have an opportunity to interact with it on the command line. I could change its source easily though.</p> <p>What I needed to happen was for the program to start normally, and then w...
[ { "answer_id": 361124, "author": "Steven Behnke", "author_id": 42588, "author_profile": "https://Stackoverflow.com/users/42588", "pm_score": 3, "selected": false, "text": "System.Diagnostics.Debugger.Break()" }, { "answer_id": 361125, "author": "Arron S", "author_id": 166...
2008/12/11
[ "https://Stackoverflow.com/questions/361077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8173/" ]
361,097
<p>I have a service that sometimes calls a batch file. The batch file takes 5-10 seconds to execute:</p> <pre><code>System.Diagnostics.Process proc = new System.Diagnostics.Process(); // Declare New Process proc.StartInfo.FileName = fileName; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.H...
[ { "answer_id": 361121, "author": "kemiller2002", "author_id": 1942, "author_profile": "https://Stackoverflow.com/users/1942", "pm_score": 6, "selected": true, "text": "proc.StartInfo.FileName = target;\nproc.StartInfo.RedirectStandardError = true;\nproc.StartInfo.Redir...
2008/12/11
[ "https://Stackoverflow.com/questions/361097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
361,115
<p>I tried to make a dynamic 2D array of <code>char</code> as follow:</p> <pre><code>char** ppMapData = (char**)malloc(sizeof(char*)*iMapHeight); for (int i=0; i&lt; iMapHeight; i++) { ppMapData[i] = (char*)malloc(sizeof(char)*iMapWidth); //do something } // do something for (int i=0; i&lt;iMapHeight; i++) ...
[ { "answer_id": 361131, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 2, "selected": false, "text": "vector<vector<char> >" }, { "answer_id": 361246, "author": "jmucchiello", "author_id": 44065, "au...
2008/12/11
[ "https://Stackoverflow.com/questions/361115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
361,130
<p>When selecting a block of text (possibly spanning across many DOM nodes), is it possible to extract the selected text and nodes using Javascript?</p> <p>Imagine this HTML code:</p> <pre><code>&lt;h1&gt;Hello World&lt;/h1&gt;&lt;p&gt;Hi &lt;b&gt;there!&lt;/b&gt;&lt;/p&gt; </code></pre> <p>If the user initiated a m...
[ { "answer_id": 364476, "author": "Borgar", "author_id": 27388, "author_profile": "https://Stackoverflow.com/users/27388", "pm_score": 5, "selected": true, "text": "// selection objects will differ between browsers\nfunction getSelection () {\n return ( msie ) \n ? document.selection\...
2008/12/11
[ "https://Stackoverflow.com/questions/361130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45435/" ]
361,135
<p>I have a table where I store customer sales (on periodicals, like newspaper) data. The product is stored by issue. Example</p> <pre> custid prodid issue qty datesold 1 123 2 12 01052008 2 234 1 5 01022008 1 123 1 5 01012008 2 444 2 ...
[ { "answer_id": 361146, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "SELECT prodid, max(issue) FROM sales WHERE custid = ? GROUP BY prodid;\n" }, { "answer_id": 361183, "author": "Pat...
2008/12/11
[ "https://Stackoverflow.com/questions/361135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23667/" ]
361,137
<p>Is it possible to bypass the Freemarker cache when certain templates are requested? I realise that I'll probably have to implement my own TemplateLoader in order to do this, but even so, I can't see a way to check the cache when say template A is requested, but bypass it when template B is requested?</p> <p>If this...
[ { "answer_id": 361242, "author": "Dan Vinton", "author_id": 21849, "author_profile": "https://Stackoverflow.com/users/21849", "pm_score": 2, "selected": false, "text": "configuration.setTemplateUpdateDelay(0);\n" }, { "answer_id": 972122, "author": "toluju", "author_id": ...
2008/12/11
[ "https://Stackoverflow.com/questions/361137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
361,151
<p>I made an html file called test.html then I navigated to it as "<a href="http://site.com/test.html?test1=a" rel="nofollow noreferrer">http://site.com/test.html?test1=a</a>" but the textbox stayed blank. Why is this? </p> <p>Super simple code</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Test&lt;/title&gt; ...
[ { "answer_id": 361158, "author": "Sydius", "author_id": 43496, "author_profile": "https://Stackoverflow.com/users/43496", "pm_score": 3, "selected": true, "text": "<html>\n<head>\n <title>Test</title>\n</head>\n<body>\n <input type=\"text\" name=\"test1\" value=\"<?php echo htmlspe...
2008/12/11
[ "https://Stackoverflow.com/questions/361151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39143/" ]
361,161
<p>I have a Rails app that lets a user construct a database query by filling out an extensive form. I wondered the best practice for checking form parameters in Rails. Previously, I have had my <code>results</code> method (the one to which the form submits) do the following:</p> <pre><code>if params[:name] &amp;&amp...
[ { "answer_id": 361699, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "class MyForm < ActiveForm\n validates_presence_of :name\n validates_presence_of :graph_size, :if => # ...blah blah \nend\n\nf...
2008/12/11
[ "https://Stackoverflow.com/questions/361161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38743/" ]
361,163
<p>I want to use pretty 3d button images on my website. However, currently the way this works is the text is part of the image.</p> <p>So, when I want to change the text (or make a new button) it's a 10 minute editing chore instead of a 20 second text change.</p> <p>I've seen a few websites that have a blank button w...
[ { "answer_id": 361171, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 0, "selected": false, "text": "a { \n width: something ; \n height: something; \n display: block; \n background: url('hi.png'); \n }\n" }, { ...
2008/12/11
[ "https://Stackoverflow.com/questions/361163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4906/" ]
361,175
<p>Been using the code below to return a single record from the database. I have read that ExecuteScalar is the right way to return a single record. I have never been able to get ExecuteScalar to work though. How would I change this to return a single value in VB.Net using ExecuteScalar?</p> <pre><code> Dim oracl...
[ { "answer_id": 372242, "author": "Brian Schmitt", "author_id": 30492, "author_profile": "https://Stackoverflow.com/users/30492", "pm_score": 0, "selected": false, "text": "oracleConnection.Open\nDim obj as object 'Object to hold our return value\nobj = cmd.ExecuteScalar()\noracleConnecti...
2008/12/11
[ "https://Stackoverflow.com/questions/361175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38349/" ]
361,193
<p>I'm the developer of twittertrend.net, I was wondering if there was a faster way to get headers of a URL, besides doing curl_multi? I process over 250 URLs a minute, and I need a really fast way to do this from a PHP standpoint. Either a bash script could be used and then output the headers or C appliation, anything...
[ { "answer_id": 361263, "author": "Pras", "author_id": 45435, "author_profile": "https://Stackoverflow.com/users/45435", "pm_score": 1, "selected": false, "text": "curl_setopt ($ch, CURLOPT_HEADER, 1);\ncurl_setopt ($ch, CURLOPT_NOBODY, 1);\ncurl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);\n...
2008/12/11
[ "https://Stackoverflow.com/questions/361193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45530/" ]
361,204
<p>I am trying to use ASP to create a connection to my database and i have the following connection code:</p> <pre><code>Set objConn = ConnectDB() Set objRS = objConn.Execute(query) </code></pre> <p>I have an include file that I have at the top of my page:</p> <pre><code>&lt;!--#include FILE=dbcano.inc--&gt; </cod...
[ { "answer_id": 361263, "author": "Pras", "author_id": 45435, "author_profile": "https://Stackoverflow.com/users/45435", "pm_score": 1, "selected": false, "text": "curl_setopt ($ch, CURLOPT_HEADER, 1);\ncurl_setopt ($ch, CURLOPT_NOBODY, 1);\ncurl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);\n...
2008/12/11
[ "https://Stackoverflow.com/questions/361204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
361,209
<p>I've got two controls, a TextBlock and a PopUp. When the user clicks (MouseDown) on the textblock, I want to display the popup. I would think that I could do this with an EventTrigger on the Popup, but I can't use setters in an EventTrigger, I can only start storyboards. I want to do this strictly in XAML, because t...
[ { "answer_id": 361302, "author": "bendewey", "author_id": 37881, "author_profile": "https://Stackoverflow.com/users/37881", "pm_score": 3, "selected": false, "text": "<Window x:Class=\"WpfApplication1.Window1\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n ...
2008/12/11
[ "https://Stackoverflow.com/questions/361209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4572/" ]
361,225
<p>I'd like to create a custom loading screen for a JavaFX application. Don't want the user to see the Java coffee cup icon, I want to put my own graphic there!</p> <p>I've found out how to provide a static image, or even an animated GIF, but I'm more interested in a Flash-like screen where I can specify what the sta...
[ { "answer_id": 23728365, "author": "ufukomer", "author_id": 3650955, "author_profile": "https://Stackoverflow.com/users/3650955", "pm_score": -1, "selected": false, "text": "stage.getIcons().add(new Image(\"images/myimage.png\"));\n" }, { "answer_id": 24479931, "author": "dro...
2008/12/11
[ "https://Stackoverflow.com/questions/361225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2197/" ]
361,231
<p>I have a cookie which is generated from a servlet and that I would like to be persistent - that is, set the cookie, close down IE, start it back up, and still be able to read the cookie. The code that I'm using is the following:</p> <pre><code>HttpServletResponse response = (HttpServletResponse) FacesContext...
[ { "answer_id": 4187173, "author": "Briguy37", "author_id": 508537, "author_profile": "https://Stackoverflow.com/users/508537", "pm_score": 0, "selected": false, "text": "public static String encodeString(String s) {\n String encodedString = s;\n\n try{\n encodedString = URLE...
2008/12/11
[ "https://Stackoverflow.com/questions/361231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322/" ]
361,247
<p>I have some data that I want to store somewhere in my Rails app because I use it for generating form fields, checking a submitted form to ensure its values are valid, etc. Basically, I want the data in one location because I make use of it in several places.</p> <p>Previously, I was defining an <code>initialize</c...
[ { "answer_id": 362247, "author": "Daniel Lucraft", "author_id": 11951, "author_profile": "https://Stackoverflow.com/users/11951", "pm_score": 2, "selected": false, "text": "GRAPH_TYPES" }, { "answer_id": 364712, "author": "user37011", "author_id": 37011, "author_profi...
2008/12/11
[ "https://Stackoverflow.com/questions/361247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38743/" ]
361,248
<p>Does VbScript have a native implementation for Regex? I need to validate e-mail addresses on an old ASP application.</p> <p>Any pointers would be great.</p>
[ { "answer_id": 361273, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 4, "selected": true, "text": "Function ValidEmail(ByVal emailAddress) \n\n'this function will use regular expressions to check an '\n'email address for v...
2008/12/11
[ "https://Stackoverflow.com/questions/361248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
361,258
<p>I was going through some code and came across a scenario where my combobox has not been initialized yet. This is in .NET 2.0 and in the following code, this.cbRegion.SelectedValue is null.</p> <pre><code>int id = (int)this.cbRegion.SelectedValue; </code></pre> <p>This code threw a null reference exception instead...
[ { "answer_id": 361303, "author": "liggett78", "author_id": 19762, "author_profile": "https://Stackoverflow.com/users/19762", "pm_score": 3, "selected": false, "text": "object o = null;\nint a = (int)o;\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/361258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23502/" ]
361,266
<p>If I have a base class such that</p> <pre><code>public abstract class XMLSubscription &lt;T extends XMLMessage&gt; </code></pre> <p>Is it possible to write a method in XMLSubscription that returns a class object of T?</p> <p>The only possible solution that I came up with is to have each descendant of XMLSubscript...
[ { "answer_id": 361288, "author": "Greg Case", "author_id": 462, "author_profile": "https://Stackoverflow.com/users/462", "pm_score": 3, "selected": true, "text": "Class" }, { "answer_id": 361308, "author": "kdgregory", "author_id": 42126, "author_profile": "https://St...
2008/12/11
[ "https://Stackoverflow.com/questions/361266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7949/" ]
361,285
<p>I'm writing a basic crawler that simply caches pages with PHP.</p> <p>All it does is use <code>get_file_contents</code> to get contents of a webpage and regex to get all the links out <code>&lt;a href="URL"&gt;DESCRIPTION&lt;/a&gt;</code> - at the moment it returns:</p> <pre><code>Array { [url] =&gt; URL [desc] =&...
[ { "answer_id": 361320, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 3, "selected": true, "text": "foreach(DOMDocument::loadHTML($source)->getElementsByTagName('a') as $a)\n{\n $a->getAttribute('href');\n}\n" } ]
2008/12/11
[ "https://Stackoverflow.com/questions/361285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24416/" ]
361,301
<p>Is there any way I can vary caching by a controller action parameter using the <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.outputcacheattribute(v=vs.108).aspx" rel="nofollow noreferrer">outputcache</a> attribute? We have <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.outputcachea...
[ { "answer_id": 865003, "author": "Simon_Weaver", "author_id": 16940, "author_profile": "https://Stackoverflow.com/users/16940", "pm_score": 3, "selected": false, "text": "[OutputCache(CacheProfile = \"ContentPage\", VaryByParam = \"mode\")]\npublic ActionResult Index(string key, string m...
2008/12/11
[ "https://Stackoverflow.com/questions/361301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33764/" ]