instruction
stringlengths
21
27.8k
chosen
stringlengths
18
28.2k
rejected
stringlengths
18
33.6k
__index_level_0__
int64
0
50k
<p>What type of authentication would you suggest for the service that is:</p> <ul> <li>implemented as WCF and exposed via varios enpoints (including XML-RPC)</li> <li>has to be consumed easily by various cross-platform clients</li> </ul> <p>Why?</p> <p>Options that I'm aware of are:</p> <ul> <li>Forms-based authent...
<p>Noweb will dump out files relative to the current working directory, or at the absolute path you specify. Just don't use * at the end of your filename (to avoid inserting the # preprocessor directives). I would recommend using %def with @ to show where you define and use names.</p> <pre><code>&lt;&lt;/path/to/file...
<p>Literate Programming works its best if the generated intermediate code can point back to the original source file to allow debugging, and analyzing compiler errors. This usually means pre processor support, which Java doesn't support.</p> <p>Additionally Literate Programming is really not necessary for Java, as th...
18,354
<p>As the question says, it just escaped my memory how to display xml in javascript, I want to display some source xml within an div on a page, that sits next to the processed result of the xml in another div.</p> <p>Can't remember if there was an equivalent to javascript's escape to convert entities on the client </p...
<p>If you want the <em>browser to render</em> your <code>XML</code> as <code>XML</code>, it must be in it's own document, like an <code>iframe</code>, or a <code>frame</code>. <code>DIV</code> won't do the job!</p> <p>Besides, in the <code>HTTP</code> header of the request that serves the <code>iframe</code> you shoul...
<p>One technique would be to use two iframe elements with the src attribute set to the corresponding xml file available from the server (assuming it is exposed through a virtual directory):</p> <pre><code>&lt;iframe src="/myapp/Document1.xml"&gt;&lt;iframe src="/myapp/Document2.xml"&gt; </code></pre> <p>Alternatively...
45,443
<p>I'm looking for a wordpress-like blog interface to put inside a Joomla hosted site. The admin interface of Joomla is quirky enough and hard enough to use that daily updates are infeasible. </p> <p>What I am looking for is an easy-to-use posting interface that supports multiple users with different accounts/names,...
<p>Well you could do this - have a wordpress installation. Get the users to post there and then use the RSS feed from it (or the XML RPC Blogging API) to update the Joomla installation. You will have to write the update piece once, but then all the headache is gone.</p>
<p>After doing a bit more research I decided to go with the open source <a href="http://www.joomlify.com/" rel="nofollow noreferrer">MojoBlog</a>. It was quite easy to install and configure and after a few stalls and hang ups that were resolved via perusal of their forums I was up and running. The edit interface is n...
8,937
<p>Is there a way to link to a chm file, and therein to a certain topic, from a Microsoft Word docx document? Something in the lines of:</p> <blockquote> <p>"For more information about this Property see [link ref="./SomeDirectory/somedocument.chm!Sometopic.Somesubtopic" text="MyClass.MyProperty"]</p> </blockquote>
<p>I don't think that simply a file link to the .chm file will do the job.</p> <p>For me, the following link format works (note that the .chm file must be in a trusted location, network shares will not work per default):</p> <p>mk:@MSITStore:C:\SomeDirectory\help.chm::/helppage.htm</p> <p>EDIT</p> <blockquote> <p...
<p>You should be able to do it by setting the hyperlink to the file and use the &quot;#&quot; header anchor (I'm not sure what it is called...) but here is an example:</p> <pre><code>C:\Helpfiles\Help.chm#Topic </code></pre>
39,832
<p>I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn.</p> <p>Having limited time, I really only have time to look learn one of them.</p> <p>Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful i...
<p>Without getting into the relative merits of the languages (which would be an entire pissing contest in itself), IronPython (stable 1.1.1, beta 2.0) is further along in development than IronRuby (alpha)</p>
<p>As other said, IronPython is more stable and mature, and you can find more samples and lots of regular Python code that you will be able to try out.</p> <p>IronRuby is great but beware: to try it you need to get the code right from the SVN and compile it by yourself. Or you can download the <a href="http://www.code...
6,423
<p>I have a class that downloads, examines and saves some large XML files. Sometimes I want the UI to tell me what's going on, but sometimes I will use the class and ignore the events. So I have placed lines of code like this in a dozen places:</p> <pre><code>RaiseEvent Report("Sending request: " &amp; queryString) R...
<p>There is no magic, the code hiding under RaiseEvent does exactly what you'd expect, it iterates through a collection of handlers, and executes each one. The overhead of checking to see are there any handlers is trivial, don't worry about it.</p> <p>If your <strong>REAL</strong> question is "To save time, should I c...
<blockquote> <p>If your REAL question is "To save time, should I check that the events have handlers before raising the events?" . . . then the answer is "No", you'll gain nothing by doing this.</p> </blockquote> <p>In C#, if you don't check the event for null and there are no handlers registered, you will get a...
31,167
<p>Say a class </p> <pre><code>Person +Name: string +Contacts: List&lt;Person&gt; </code></pre> <p>I want to be able to check if a person has a contact with a certain name without having to create a dummy Person instance.</p> <pre><code>person.Contacts.Contains&lt;string&gt;("aPersonName"); </code></pre> <p>Thi...
<p>It's probably easiest to use <a href="http://msdn.microsoft.com/en-us/library/bb534972.aspx" rel="noreferrer">Enumerable.Any</a>:</p> <pre><code> return person.Contacts.Any(person =&gt; person.Name=="aPersonName"); </code></pre> <p>Alternatively, project and then contain:</p> <pre><code> return person.Select(pers...
<p>You could create the extension method</p> <pre><code>public static bool Contains(this IList&lt;Person&gt; list, string name) { return list.Any(c =&gt; c.Name == name); } </code></pre>
36,527
<p>Having a table with a column like: <code>mydate DATETIME</code> ...</p> <p>I have a query such as:</p> <pre><code>SELECT SUM(foo), mydate FROM a_table GROUP BY a_table.mydate; </code></pre> <p>This will group by the full <code>datetime</code>, including hours and minutes. I wish to make the group by, only by the dat...
<p>Cast the datetime to a date, then GROUP BY using this syntax:</p> <pre><code>SELECT SUM(foo), DATE(mydate) FROM a_table GROUP BY DATE(a_table.mydate); </code></pre> <p>Or you can GROUP BY the alias as @orlandu63 suggested:</p> <pre><code>SELECT SUM(foo), DATE(mydate) DateOnly FROM a_table GROUP BY DateOnly; </cod...
<p>this worked for me</p> <pre class="lang-sql prettyprint-override"><code>select CONVERT(date, CONVERT(VARCHAR(10),sd.Date,112)) as Date, sd.CodId as CodId, p.Description , sum(sd.Quantity)as Quantity, sum(sd.TotalQuantityXPriceWithIva) as TotalWithIva from SaleDetails sd join Sales s on sd.SaleId =...
47,847
<p>What are attributes in .NET, what are they good for, and how do I create my own attributes?</p>
<p>Metadata. Data about your objects/methods/properties. </p> <p>For example I might declare an Attribute called: DisplayOrder so I can easily control in what order properties should appear in the UI. I could then append it to a class and write some GUI components that extract the attributes and order the UI elements ...
<p>Attributes are also commonly used for Aspect Oriented Programming. For an example of this check out the <a href="http://www.postsharp.org" rel="nofollow noreferrer">PostSharp</a> project.</p>
4,072
<p>In Eclipse, I often include all project-related material (including documents in PDF, Microsoft, and OpenDocument formats) in the project. Is this possible with Visual Studio, especially to the point where if I attempt to open the file from inside Visual Studio, it will open in the external application?</p>
<p>Yes, just right-click your project in the solution explorer and goto Add > Existing Item...</p> <p>Though -- I'd recommend making a new folder to keep this in.</p> <p>Yes, you can make sure that when you open it it opens with the correct application. Just right-click the file once it's added into the solution exp...
<p>I don't want to take away from Chad's answer. However, I will add that TFS has specific areas for project documentation to be stored in sharepoint. </p>
21,043
<p>I want to start developing for Windows Mobile Devices, as I plan to buy one next week. (pay day)</p> <p>So far most of my PDA experience is with Palm OS (m100, m105, Zire 71 and T3). For Palm there are a few good utilities for programming, mainly <a href="http://www.orbworks.com/pcpalm/index.html" rel="nofollow nor...
<p>hmmm.. So you really want to develop on the device? Why?</p> <p>Anyway, Here are your options:</p> <ul> <li><a href="http://sourceforge.net/project/showfiles.php?group_id=96949" rel="nofollow noreferrer">Pocket GCC</a></li> <li><a href="http://weblogs.asp.net/pleloup/archive/2004/06/09/151853.aspx" rel="nofollow n...
<p>NS Basic/CE allows you to program on the device. It has a built in screen designer and a simple debugger. The language itself is VBScript (a subset of VB), with extensions for Windows Mobile. It also supports external dll's for SQLite, Winsock and lots more. </p>
14,097
<p>There are 2 radiobutton and a hyperlink. if select 'radiobutton1' the hyperlink is enabled. if select 'radiobutton2' the hyperlink is disabled. i can use jquery to disable the hyperlink, but can't enable it. How to enable the hyperlink with jquery?</p>
<p>You could try adding a click event handler and return true or false from the click handler based on the state of the radio buttons. </p> <p>Returning false should cancel the click on the link, something like: </p> <pre><code>$("#hyperlink1").click(function(){ // return true or false ba...
<p>To disable hyperlink you could add onclick handler to it returning false;</p> <p>something like this:</p> <pre><code>$("#radioDisable").click(function() { $(“hyperlink”).click(function(){ return false; }); $(“hyperlink”).addClass(“disabled”); }); $("#radioEnable").click(function() { $(“hyp...
46,760
<p>What would be better practice when giving a function the original variable to work with:</p> <pre><code>unsigned long x = 4; void func1(unsigned long&amp; val) { val = 5; } func1(x); </code></pre> <p>or:</p> <pre><code>void func2(unsigned long* val) { *val = 5; } func2(&amp;x); </code></pre...
<p>My rule of thumb is:</p> <p>Use pointers if you want to do pointer arithmetic with them (e.g. incrementing the pointer address to step through an array) or if you ever have to pass a NULL-pointer.</p> <p>Use references otherwise.</p>
<p>A reference is similar to a pointer, except that you don’t need to use a prefix ∗ to access the value referred to by the reference. Also, a reference cannot be made to refer to a different object after its initialization.</p> <p>References are particularly useful for specifying function arguments.</p> <p>for more ...
13,938
<p>If you need more details, let me know.</p> <p><strong>EDIT</strong>: Changed title for clarity purposes.</p>
<p>If you use Drupal 6 you have access to the <a href="http://api.drupal.org/api/function/hook_menu_alter/6" rel="nofollow noreferrer">menu_alter</a> and <a href="http://api.drupal.org/api/function/hook_menu_link_alter/6" rel="nofollow noreferrer">menu_link_alter</a> hooks. if you can't make the needed changes via the ...
<p>Drupal provides Translations at their website...</p> <p><a href="http://drupal.org/project/Translations" rel="nofollow noreferrer">http://drupal.org/project/Translations</a></p>
14,432
<p>I am developing a Win32 application and I would like to use an RSA encryption library. <strong>Which library would you recommend?</strong></p>
<p>If you're using Win32, why don't you simply use the built-in win32 crypto-API?</p> <p>Here's a little example how it works in practice:</p> <p><a href="http://www.codeproject.com/KB/security/EncryptionCryptoAPI.aspx" rel="noreferrer">http://www.codeproject.com/KB/security/EncryptionCryptoAPI.aspx</a></p>
<p>I would recommend Miracl library <a href="https://certivox.com/solutions/miracl-crypto-sdk/" rel="nofollow">https://certivox.com/solutions/miracl-crypto-sdk/</a> but the price is high.</p>
13,392
<p>I'm using Visual Studio (2005 and up). I am looking into trying out making an application where the user can change language for all menues, input formats and such. How would I go on doing this, as I suppose that there is some complete feature within .Net that can help me with this?</p> <p>I need to take the follow...
<p>I'm not an expert with .NET by any means but Localization is never just as simple as "swapping out String values" or "changing date formats". There is much more to be taken into consideration such as layout, proper text placement.</p> <p>Take Chinese for example. The way you read is top to bottom not left to righ...
<p>For strings you should just separate your strings from your code (having an XML/DLL that will transform string IDs to real strings is one way to go). However you do need to make sure that you are supporting double byte characters for some languages (this is relevant if you use C/C++).</p> <p>For input data what you...
9,169
<p>I have a class that has a Generic type "G"</p> <p>In my class model i have</p> <pre><code>public class DetailElement : ElementDefinition </code></pre> <p>Let's say i have a method like this</p> <pre><code> public void DoSomething&lt;G&gt;(G generic) where G : ElementDefinition { ...
<p>If <code>G</code> was constrained to be a <code>DetailElement</code> (<code>where G : DetailElement</code>) then you can go ahead and cast <code>G</code> to ElementDefinition, i.e., "<code>(ElementDefinition) generic</code>". But because <code>G</code> might be another subclass of <code>ElementDefinition</code> othe...
<p>This will lead to a bit more code if you have a lot of ElementDefinitions you are worried about, but is probably the slickest you will get that doesn't involve is then as nonsense.</p> <pre><code> public void DoSomething&lt;G&gt;(G generic) where G : ElementDefinition { DetailElement detail =...
22,240
<p><a href="http://biochrom.fivesite.co.uk/catalogue4.asp" rel="nofollow noreferrer">http://biochrom.fivesite.co.uk/catalogue4.asp</a></p> <p>On the page above there is an image floated to the left. To the right of it is a list, titled "features". The list items have a background image, however, it isn't appearing. Li...
<p>Your image has a float:left property. The list items are therefore rendered "behind" the image.</p> <pre><code>margin-left:200px; </code></pre> <p>on the UL element will solve your problem.</p> <p>Alternatively, you can apply a float:left on your UL-element. This will make it float right to the image, but will ma...
<p>Alternatively, you could use the list-style-image property instead of background-image. I ran into this very problem the other day: the text-wrapping behaviour that floats exhibit on their 'neighbours' only applies to 'content', not background images (for example).</p>
32,387
<p>Recently I needed to do weighted random selection of elements from a list, both with and without replacement. While there are well known and good algorithms for unweighted selection, and some for weighted selection without replacement (such as modifications of the resevoir algorithm), I couldn't find any good algori...
<p>One of the fastest ways to make many with replacement samples from an unchanging list is the alias method. The core intuition is that we can create a set of equal-sized bins for the weighted list that can be indexed very efficiently through bit operations, to avoid a binary search. It will turn out that, done corr...
<p>Suppose you want to sample 3 elements without replacement from the list ['white','blue','black','yellow','green'] with a prob. distribution [0.1, 0.2, 0.4, 0.1, 0.2]. Using numpy.random module it is as easy as this:</p> <pre><code> import numpy.random as rnd sampling_size = 3 domain = ['white','blue','b...
45,929
<p>When an ASP.NET application is running under IIS6.0 in Windows 2003 Server with impersonation, what user account is relevant for deciding file read/write/execute access privileges? I have two scenarios where I am trying to understand what access to grant/revoke. I thought the most relevant user is probably the ide...
<blockquote> <p>what user account is relevant for [..] file read/write/execute access</p> </blockquote> <p>As a rule: Always the user account the application/page runs under.</p> <p>The IWAM account is pretty limited. I don't think it has permissions to start an external process. File access rights are irrelevant a...
<p>A bit more searching reveals that the IWAM user isn't that well documented and we should stick with NETWORK SERVICE or a manually-supplied identity if we want to specify permissions for that user.</p>
18,714
<p>Suppose I am writing an application in C++ and C#. I want to write the low level parts in C++ and write the high level logic in C#. How can I load a .NET assembly from my C++ program and start calling methods and accessing the properties of my C# classes?</p>
<pre><code>[Guid("123565C4-C5FA-4512-A560-1D47F9FDFA20")] public interface IConfig { [DispId(1)] string Destination{ get; } [DispId(2)] void Unserialize(); [DispId(3)] void Serialize(); } [ComVisible(true)] [Guid("12AC8095-BD27-4de8-A30B-991940666927")] [ClassInterface(ClassInterfaceType.None...
<p>You can wrap the .NET component in a COM component - which is quite easy with the .NET tools - and call it via COM.</p>
13,153
<p>I want to pass some parameters to a Crystal Report like this:</p> <pre><code>ReportDocument.DataDefinition.FormulaFields[parameterName].Text = 'Text'; </code></pre> <p>This workes fine unless I want to pass a multiline textbox from ASPX (containing \n and \r chars.)</p> <p>The reportviewer reports that "The ma...
<p>You have to replace the \r\n pair with something obscure before passing it to the report, then make a crystal formula that converts it back to cr-lf pair in the report.</p> <p>Example with converting cr-lf to three underscores</p> <p>C#</p> <p>ReportDocument.DataDefinition.FormulaFields[somefield].Text = textWith...
<p>Regardless of your parsing technique, you may want to use the Parameter's DefaultValues or CurrentValues collections. The DefaultValues collection populates the list of available values. The CurrentValues collection populates the list of selected values.</p>
42,057
<p>Lately I've been using XPathDocument and XNavigator to parse an XML file for a given XPath and attribute. It's been working very well, when I know in advance what the XPath is. </p> <p>Sometimes though, the XPath will be one of several possible XPath values, and I'd like to be able to test whether or not a given XP...
<p>If you've given valid XPath but it doesn't match anything, <code>SelectSingleNode</code> won't <em>throw</em> a <code>NullReferenceException</code> - it will just return null.</p> <p>If you pass <code>SelectSingleNode</code> some syntactically invalid XPath, that's when it will throw an <code>XPathException</code>...
<p>From memory, may contain errors.</p> <pre><code>XDocument doc = XDocument.Load("foo.xml"); var att = from a in doc.Descendants("bar") select a.Attribute("baz") foreach (var item in att) { if (item != null) { ... } } </code></pre>
30,401
<p>I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\WINDOWS\system32\ and registered it with "regsvr32 vxncom.dll". When I go to projects > add reference and go to the COM tab it shows up in the list of available components/libraries. But, when I select the lib...
<p>Maybe the DLL VB is trying to register depends on another DLL that is not present. You can confirm this (or rule it out) by using the free Dependency Walker tool from <a href="http://www.dependencywalker.com/" rel="nofollow noreferrer">http://www.dependencywalker.com/</a></p> <p>RESPONSE TO UPDATE 1: Sounds like t...
<p>Just a thought - you may get a more detailed error message if you create your own PIA using tlbimp.exe, rather than relying on the IDE to do it for you.</p>
15,665
<p>This is one is for any of you Doctrine users out there. I have a PHP CLI daemon process that checks a table every n seconds to find entries that haven't been processed. It's basically a FIFO. Anyways, I always exceed the memory allocated to PHP becuase Doctrine does not free it's resources. To combat this proble...
<p>The problem is, that <code>free()</code> does not remove the Doctrine objects from memory but just eliminates the circular references on those objects, making it possible for the garbage collector to cleanup those objects. Please see <a href="http://www.doctrine-project.org/documentation/manual/1_0?chapter=improving...
<p>No experience with Doctrine (just some interest as I discovered it this week-end...), so take or leave my guess... ^_^</p> <p>I would try and separate the query creation from its execute part:</p> <pre><code>$query = Doctrine_Query::create() -&gt;from('SubmissionQueue s') -&gt;where('s.time...
37,795
<p>I have this line in a useful Bash script that I haven't managed to translate into Python, where 'a' is a user-input number of days' worth of files to archive:</p> <pre><code>find ~/podcasts/current -mindepth 2 -mtime '+`a`+' -exec mv {} ~/podcasts/old \; </code></pre> <p>I am familiar with the os.name and getpass....
<pre><code>import os import shutil from os import path from os.path import join, getmtime from time import time archive = "bak" current = "cur" def archive_old_versions(days = 3): for root, dirs, files in os.walk(current): for name in files: fullname = join(root, name) if (getmtime...
<pre><code>import os, stat os.stat("test")[stat.ST_MTIME] </code></pre> <p>Will give you the mtime. I suggest fixing those in <code>walk_results[2]</code>, and then recursing, calling the function for each dir in <code>walk_results[1]</code>.</p>
14,436
<p>Thanks for reading this</p> <p>I thought I could use find(), but couldn't make it work. I know I can add IDs or classnames, but would like to know how with the current markup.</p> <p>Thanks</p> <p>Here is the HTML</p> <pre><code>&lt;input name="keywordCheckbox" type="checkbox" value="S" /&gt; &lt;input name="key...
<p>You should be able to chain the attribute selectors:</p> <pre><code> $('input[name="keywordCheckbox"][value="A"]').attr("checked",false); </code></pre> <p>Will set checked to false for the input with name keywordCheckbox and value of A.</p> <pre><code> $('input[name="keywordCheckbox"][value!="A"]').attr("checked"...
<p>Or you could do:</p> <pre><code>$("input[name='keywordCheckbox']").filter("input[value='A']") </code></pre> <p>Then there is no need for an each function.</p>
45,089
<p>I'm trying to fix a broken SSP on a MOSS 2007 site. The problem I am running into manifests itself as follows...</p> <p>In the SSP "Search Settings" page I get this message:</p> <p><i>The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether t...
<p>Maybe you can make sense of this - I'm new to sharepoint, so it makes little sense to me: "Service Shared, after looking for the solution much encontre this forum where a person tapeworm the same problem. After reading a infinity of commentaries, which I made to solve the problem was to create a new shared service, ...
<p>As an additional warning to this, if you do delete your SSP you may find that it doesn't delete cleanly so that you get a bunch of SQL server tasks that still try to run on an empty database, which can cause problems if you have anything else running on the same database server.</p>
44,695
<p>I need to convert SAS data tables into flat files (or "ASCII files" as they were called once, as opposed to binary files). And only one flat file for each original SAS table. The challenging thing is that I want the flat file to contain some structural information of the original SAS table also, specifically:</p> <...
<p>I'm not aware of any easy solutions.</p> <p>Possibly:</p> <ol> <li>Use PROC EXPORT to produce CSV file with the data in it.</li> <li>Use PROC DATASETS with ODS to produce a dataset with the names, types, etc.</li> <li>Produce another CSV file for this dataset.</li> </ol> <p>Now you've got your ASCII description o...
<p>BTW - you haven't said why you need to do this. In this case, there is no good reason (there might be a compelling reason, such as somebody with power saying 'do it, or be fired', but there's no <em>good</em> reason).</p> <p>I'd give up the idea of merging the metadata and data in each file, unless there's some in...
14,584
<p>I have an existing C++ project on a linux environment, and would like to import it into the Eclipse IDE.</p> <p>Not sure if I should start a new Eclipse C++ project, or if there was some way to import the source files?</p>
<p>You can create a new Eclipse C++ project "in-place", i.e. if you have your sources checked out at /home/joe/mysources, you can select that directory in the new project wizard (uncheck the "use default location" checkbox first). All your source files will show up in the Eclipse project.</p>
<p>one solution: just create a new C++ projet (Standard make project), checkout/copy your files in it, then right clic on the directory of the project in the ressource view and choose New > Other > C++ > Convert to C/C++ Make project.</p>
25,005
<p>I am trying to write a stored procedure which selects columns from a table and adds 2 extra columns to the ResultSet. These 2 extra columns are the result of conversions on a field in the table which is a Datetime field.</p> <p>The Datetime format field has the following format 'YYYY-MM-DD HH:MM:SS.S'</p> <p>The 2...
<p>Use DATENAME and wrap the logic in a Function, not a Stored Proc</p> <pre><code>declare @myTime as DateTime set @myTime = GETDATE() select @myTime select DATENAME(day, @myTime) + SUBSTRING(UPPER(DATENAME(month, @myTime)), 0,4) </code></pre> <p>Returns "14OCT"</p> <p>Try not to use any Character / String based...
<p>You're going to need DATEPART here. You can concatenate the results of the DATEPART calls together.</p> <p>To get the month abbreviations, you might be able to use DATENAME; if that doesn't work for you, you can use a CASE statement on the DATEPART.</p> <p>DATEPART also works for the time field.</p> <p>I can thi...
24,721
<p>At the moment I'm creating a <code>DateTime</code> for each month and formatting it to only include the month.<br> Is there another or any better way to do this?</p>
<p>You can use the <a href="http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx" rel="noreferrer"><code>DateTimeFormatInfo</code></a> to get that information:</p> <pre><code>// Will return January string name = DateTimeFormatInfo.CurrentInfo.GetMonthName(1); </code></pre> <p>or to get...
<pre><code>List&lt;string&gt; mnt = new List&lt;string&gt;(); int monthCount = Convert.ToInt32(cbYear.Text) == DateTime.Now.Year ? DateTime.Now.Month : 12; for (int i = 0; i &lt; monthCount; i++) { mnt.Add(CultureInfo.CurrentUICulture.DateTimeFormat.MonthNames[i])...
40,703
<p>Please consider both commercial and free debuggers. Would like to see also the pros and cons for each.</p>
<p>nemiver is a great front end to gdb (looks better than ddd imo even though it might not be as advanced yet).</p>
<p><code>UndoDB</code> sounds interesting, in that it allows &quot;reverse stepping&quot;, however; it's expensive, and I'm well adapted to <code>gdb</code>, so I'm unlikely to change. Others I've seen don't have the extra features required to entice me away from the environment that I know.</p>
10,602
<p>In Java (or any other language with checked exceptions), when creating your own exception class, how do you decide whether it should be checked or unchecked?</p> <p>My instinct is to say that a checked exception would be called for in cases where the caller might be able to recover in some productive way, where as ...
<p>Checked Exceptions are great, so long as you understand when they should be used. The Java core API fails to follow these rules for SQLException (and sometimes for IOException) which is why they are so terrible.</p> <p><strong>Checked Exceptions</strong> should be used for <strong>predictable</strong>, but <strong>...
<p>The rule I use is: never use unchecked exceptions! (or when you don't see any way around it)</p> <p>From the point of view of the developer using your library or the end-user using your library/application it really sucks to be confronted with an application that crashes due to an uncought exception. And counting o...
4,720
<p>I am looking for a way to connect to Facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a Facebook app before, but this is not an app as much as it is a co...
<p>Not answering the question but hopefully providing some insight...</p> <p>It's features like this that teach people that it is ok to enter their username and password for site A on a form from site B. This is most definitely not ok. Please do not make people think it is.</p> <p>But maybe the Facebook API allows yo...
<p>Just import them into Yahoo using FB Connect. All better? No screen scraping, no FB violations. Done.</p>
10,490
<p>can two use cases extend or include each other at the same time? A extend/include B and B extend/include A</p>
<p>I'm pretty sure the answer is "NO".</p> <p>You've just described the digital equivalent fo the chicken and egg problem.</p> <p>Circular references are [almost] always Bad Things (tm). The only place I know it to not be horrible is in the context of a linked list, in which each entry has a pointer to another of its...
<p>It seems likely not, though I'm sure you could do it if you went generic [and useless] enough. Do you have a specific example? There are always exemptions to the rules and I'd be curious to see one.</p>
33,306
<p>I'm seeing conflicting references in <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#i16209" rel="noreferrer">Oracles documentation</a>. Is there any difference between how decimals are stored in a FLOAT and a NUMBER types in the database?</p> <p>As I recall from C, et al, a flo...
<p>Oracle's <code>BINARY_FLOAT</code> stores the data internally using IEEE 754 floating-point representation, like C and many other languages do. When you fetch them from the database, and typically store them in an IEEE 754 data type in the host language, it's able to copy the value without transforming it.</p> <p>...
<p>Oracle's Number is in fact a Decimal (base-10) floating point representation... Float is just an alias for Number and does the exact same thing.</p> <p>if you want Binary (base-2) floats, you need to use Oracle's BINARY_FLOAT or BINARY_DOUBLE datatypes.</p> <p><a href="https://web.archive.org/web/1/http://article...
43,074
<p>Are there any defacto standards for interfacing between common 3D printers and custom extruders or other tooling? I was thinking how it would be good to have switchable nozzle widths mounted on the same heat block and switched between using a solenoid so you could have say a 0.25&nbsp;mm for surface layer and detail...
<h2>Generally: nozzles are not changed, the whole tool head is</h2> <p>While &quot;tool change&quot; is easy to implement in a G-code and could be easily adapted in the firmware, there are several practical issues to hot-swapping nozzles without swapping the whole hotend assembly:</p> <ul> <li>The hotend is a fluid-dyn...
<p>Tool change is M06 (then some value specifying what change to occur). You will need to implement the necessary changes in the firmware to support whatever electronics is required to perform the tool change (eg stepper driver | hobby servo, mosfets to run the solenoid). Once done, your slicer now has to do the work o...
1,641
<p>When using Google Chrome, I want to debug some JavaScript code. How can I do that?</p>
<p>Try adding this to your source:</p> <pre><code>debugger; </code></pre> <p>It works in most, if not all browsers. Just place it somewhere in your code, and it will act like a breakpoint.</p>
<p>From the console in Chrome, you can do <code>console.log(data_to_be_displayed)</code>.</p>
9,192
<p>I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against.</p> <p>I'd like to create some tests that examine the data and ensure it ...
<p>Id say validating xml with a xsd schema is a good idea.<br/> <br/> How to validate a XElement with the loaded schema: As you see in this example you need to validate the XDocument first to get populate the "post-schema-validation infoset" (There might be a solution to do this without using the Validate method on the...
<p>If you're doing some light-weight work and XSDs are overkill, consider also possibly strongly typing your XML data. For example, I have a number of classes in a project that derive from XElement. One is ExceptionXElement, another is HttpHeaderXElement, etc. In them, I inherit from XElement and add Parse and TryParse...
14,257
<p>Ok, so I know that global variables are considered bad, and the singleton pattern is overused. And I have read in many places that a class should do only one task and contain only those variables that allow it to accomplish that one task. However, while working on my latest project, I actually thought about these r...
<p>I find that storing singletons as public data attributes of the main dialog class of an MFC dialog application works OK for a quick and dirty program. However, as the program becomes larger and more complex, things begin to get untidy.</p> <p>The point where storing singletons in the dialog class needs to be refac...
<p>If I am understanding you correctly, it sounds like the lifetime of your dialog objects is too long. Rather than maintaining the dialogs for the duration of your program, you should consider creating and destroying them as they are needed.</p> <p>Also, global variables (or singletons) are OK so long as the thing th...
27,081
<p>There is an executable that is dynamically linked to number of shared objects. How can I determine, to which of them some symbol (imported into executable) belongs ?</p> <p>If there are more than one possibility, could I silmulate ld and see from where it is being taken ?</p>
<p>Have a look at <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?nm" rel="noreferrer">nm(1)</a>, <a href="http://www.digipedia.pl/man/objdump.1.html" rel="noreferrer">objdump(1)</a> and <a href="http://www.digipedia.pl/man/elfdump.1.html" rel="noreferrer">elfdump(1)</a>.</p>
<pre><code>$LD_DEBUG=bindings my_program </code></pre> <p>That would print all the symbol bindings on the console.</p>
42,970
<p>I read a text recently saying the MVC pattern describes the layers in an application. But personally I see MVC showing several key roles in an application.</p> <p>Which word do you think is better, layer or role, to describe the three main pieces of MVC?</p>
<p>I think roles is a better description. The view and the controller are both in the same "layer" and usually the model is described as a layer but is used between layers.</p> <p>Usually my applications are centered around the domain model with stuff like presentation, persistence and file-io around it. Thinking abou...
<p>Why not Both? I see it as 3 separate layers implementing 3 different roles. </p>
14,048
<p>I spent ages learning VML and creating charts for a website once, but since VML only works in Internet Explorer, it's not much good these days.</p> <p>I notice stackoverflow has graphs on my profile page, under 'reputation', but I wasnt able to see how they did it.</p> <p>Can anyone suggest a way to create client-...
<p><a href="http://code.google.com/p/flot/" rel="noreferrer">Flot</a> is excellent.</p>
<p>Check out the <a href="http://code.google.com/apis/chart/" rel="nofollow noreferrer">Google Chart API</a>. You can do all sorts of sophisticated things with minimal effort - by you at design time and by you server at run time. Nice.</p>
35,993
<p>I have to connect my rails app in a legacy Postgre database. It uses schemas so in a SQL its is common to use something like </p> <pre><code>SELECT * FROM "Financial".budget </code></pre> <p>I want to write a Budget model but I don't know how to set the table name in this case. I've tried the following:</p> <ul> ...
<p>Now, this bug seems to be solved in 2-3-stable. Take a look at <a href="http://weblog.rubyonrails.org/2009/4/24/this-week-in-edge-rails" rel="nofollow noreferrer">this post</a></p>
<p>Look at your logs -- what SQL is Rails generating with your various options?</p>
30,802
<p>We are working with some legacy code that accesses a shared drive by the letter (f:\ for example). Using the UNC notation is not an option. Our Java wrapper app will run as a service, and as the first step, I would like to map the drive explicitly in the code. Has anyone done this?</p>
<p>Consider executing the DOS command that maps a network drive as in the following code:</p> <pre><code>String command = "c:\\windows\\system32\\net.exe use f: \\\\machine\\share /user:user password"; Process p = Runtime.getRuntime().exec(command); ... </code></pre> <p>See details on net use command:</p> <pre> The ...
<p>I think the easiest way is to use the Runtime.getRuntime().exec() method and call the "net use" command.</p> <p>For example:</p> <pre><code> try { // Execute a command without arguments String command = "C:\\Windows\\system32\\net.exe use F: \\\\server\\share /user:user password"; Proces...
25,621
<p>I've been trying to figure out how to retrieve the text selected by the user in my webbrowser control and have had no luck after digging through msdn and other resources, So I was wondering if there is a way to actually do this. Maybe I simply missed something.</p> <p>I appreciate any help or resources regarding th...
<p>You need to use the Document.DomDocument property of the WebBrowser control and cast this to the IHtmlDocument2 interface provided in the Microsoft.mshtml interop assembly. This gives you access to the full DOM as is available to Javascript actually running in IE.</p> <p>To do this you first need to add a referenc...
<p>I'm assuming you have a WinForms application which includes a control that opens a website. </p> <p>Check to see if you can inject/run JavaScript inside your webbrowser control. Using JavaScript, you would be able to find out what was selected and return it. Otherwise, I doubt the web browser control has any knowle...
26,711
<p>Is there a way to find the maximum and minimum defined values of an enum in c++?</p>
<p>No, there is no way to find the maximum and minimum defined values of any enum in C++. When this kind of information is needed, it is often good practice to define a Last and First value. For example,</p> <pre><code>enum MyPretendEnum { Apples, Oranges, Pears, Bananas, First = Apples, Last = Banan...
<p>you don't even need them, what I do is just I say for example if you have:</p> <pre><code>enum Name{val0,val1,val2}; </code></pre> <p>if you have switch statement and to check if the last value was reached do as the following:</p> <pre><code>if(selectedOption&gt;=val0 &amp;&amp; selectedOption&lt;=val2){ //co...
19,236
<p>I'm an old hand at embedded programming but new to CE and having a lot of trouble doing reasonably simple things, because I am not familiar with the API and struggling to understand the obscure MSDN docs.</p> <p>All I want to do is minimize and maximise two separate applications that are running from one of the app...
<p>Firstly you will need to locate the window handle (hwnd) using the <a href="http://msdn.microsoft.com/en-us/library/aa453070.aspx" rel="nofollow noreferrer">FindWindow</a> API function or some alternate means. Next use the <a href="http://msdn.microsoft.com/en-us/library/aa453731.aspx" rel="nofollow noreferrer">Show...
<p>You may also find SetForegroundWindow and SetWindowPos useful.</p> <p>This is how I've used them to show and hide applications:</p> <pre><code>SetWindowPos(windowToHide, 0, 0, 0, 0, 0, SWP_HIDEWINDOW); SetWindowPos(windowToShowInFullScreen, HWND_TOP, 0, 0, 240, 320, SWP_SHOWWINDOW); SetForegroundWindow(windowToSho...
32,434
<p>I'm going to propose to a client that I build some batch jobs in Java that will run on their mainframe and/or AS/400s (sorry System z and System i). Both platforms are up to date system software wise. I'm wondering if anyone has done this and can provide any pointer or gotchas to watch out for.</p> <p>The motivatio...
<p>Java is well supported on both machines.</p> <p>On z/OS the whole Webshere application server suite and associated process servers and ESBs have been ported.</p> <p>The main motivation is to get direct access to legacy DB2 (and to a lesser extent IMS) databases from a "modern" application.</p> <p>I have also seen...
<p>This question has already been answered, but Java is well-ported to IBM i (OS/400)--I was using it in 1998--and their is even a <a href="http://www-03.ibm.com/systems/i/software/toolbox/overview.html" rel="nofollow">Java API that exposes most of the i platform</a>. As stated on both <em>z</em> and <em>i</em> the fu...
49,953
<p>Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious.</p>
<p>No Library, No Nothing. Copy This!</p> <p>Using These Two Classes , You can Convert Degree(latitude/longitude) to UTM and Vice Versa!</p> <pre><code>private class Deg2UTM { double Easting; double Northing; int Zone; char Letter; private Deg2UTM(double Lat,double Lon) { Zone= (int) ...
<p>For my projects I've using the library <a href="https://sites.google.com/site/ahmdalitaha2/latlonglib" rel="nofollow">LatLongLib</a>, from Ahmed Taha. I think that it's very easy to convert coordinates from the UTM system to the Latitude-Longitude system and vice-versa. You just need to play with the classes UTMUtil...
21,220
<p>I've been refactoring my models and controllers in an effort to remove code duplication, and so far it seems to be all peachy creamy. Currently I've got a bit of code that is common to two of my controllers, like so:</p> <pre><code>def process_filters # Filter hash we're going to pass to the model filter_to_use ...
<p>I've always been told and read that you should include the <code>LIMIT</code> everytime you only want 1 result. This just tells the DB that it should stop so matter what. In your case, you're probably right it doesn't make a difference, but I think it's better just to always do than always deciding and leaving it ou...
<p>The sql query optimizer should be smart enough to figure this out.</p>
23,060
<p>What is your favorite bug/issue tracking system? And why?</p> <p>(Please answer this question only if you have used at least three different <a href="http://en.wikipedia.org/wiki/Bug_tracking_system" rel="nofollow noreferrer">bug tracking</a> systems for quite a long time. And please mention these systems as well.)...
<p><a href="http://www.fogcreek.com/FogBugz" rel="nofollow noreferrer">FogBugz</a> is actually great, as it's:</p> <ul> <li>simple to use</li> <li>intuitive</li> <li>integrates well</li> <li>featureful</li> </ul>
<p><a href="http://en.wikipedia.org/wiki/Bugzilla" rel="nofollow noreferrer">Bugzilla</a> is not too bad.</p> <p>Bugzilla is very adaptable to various situations. Known uses currently include IT support queues, systems administration deployment management, chip design and development problem tracking (both pre-and-pos...
30,059
<p>In cmd.exe, I can execute the command "copy c:\hello.txt c:\hello2.txt" and it worked fine. But in my C program, I ran this piece of code and got the following error:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { system("copy c:\hello.txt c:\hello2.txt"); system("pause"); ...
<p>Inside C strings (and quite a few other languages that use the same escaping rules), <code>\</code> should be <code>\\</code> since it's the escape character. It allows you to enter, in normal text, non-printable characters such as:</p> <ul> <li>the tab character <code>\t</code>.</li> <li>the carriage-return charac...
<p>Alternatively, all the Windows functions support Unix style slashes</p> <pre><code>system("copy c:/hello.txt c:/hello2.txt"); </code></pre> <p>Some people prefer this since it's easier to spot an odd '\'.<br> But it might confuse Windows users if you display this path in a message.</p>
29,407
<p>I want something simple in order to experiment/hack. I've created a lot interpreters/compilers for c and I just want something simple. A basic BASIC :D</p> <p>If you don't know any (I've done my google search...), yacc/bison is the only way?</p> <p>Thx</p>
<p>None of these listed in <a href="http://www.thefreecountry.com/compilers/basic.shtml" rel="nofollow noreferrer">TheFreeCountry</a> are acceptable? None of them are in Python, but I should think that starting from <a href="http://www.xblite.com/" rel="nofollow noreferrer">XBLite</a> might be more helpful than start...
<p>There is pybasic (python basic), rockit-minibasic (rubybasic).</p> <p>To make these able to use the gui, then one has to develop extensions with kivy and shoes gui toolkits for pybasic and rockit-minibasic respectively and similarly prima gui for perlbasic if ever exists.</p>
48,244
<p>I imagine everyone has seen code like:</p> <pre><code>public void Server2ClientEnumConvert( ServerEnum server) { switch(server) { case ServerEnum.One: return ClientEnum.ABC //And so on. </code></pre> <p>Instead of this badness we could do somthing like:</p> <pre><code>public enum ...
<p>Using almost the same example, you can achieve this directly in the enum:</p> <pre><code>public enum ServerEnum { One = ClientEnum.ABC, } </code></pre> <p>This has the benefit of not requiring Reflection, is easier to read (in my opinion), and overall requires less overhead.</p>
<p>I would probably use struct as the type, and then throw an exception if it isn't an Enum type. I don't see how your (Type, string) option is any safer than using object or struct.</p>
6,129
<p>I need to access an excel spreadsheet and insert the data from the spreadsheet into a SQL Database. However the Primary Keys are mixed, most are numeric and some are alpha-numeric.</p> <p>The problem I have is that when the numeric and alpha-numeric Keys are in the same spreadsheet the alpha-numeric cells return bl...
<p>Solution:</p> <p>Connection String:</p> <blockquote> <p>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FilePath;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";</p> </blockquote> <ol> <li><p><code>HDR=Yes;</code> indicates that the first row contains columnnames, not data. <code>HDR=No;</code> indicates the oppo...
<p>hi all this code is gets alphanumeric values also</p> <pre><code>using System.Data.OleDb; string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filepath + ";" + "Extended Properties="+(char)34+"Excel 8.0;IMEX=1;"+(char)34; string CommandText = "select * from [Sheet1$]"; OleDbConnectio...
38,252
<p>I have an application (ASP.NET 3.5) that allows users to rerun a particular process if required. The process inserts records into an MS SQL table. I have the insert in a Try / Catch and ignore the catch if a record already exists (the error in the Title would be valid). This worked perfectly using ADO but after I co...
<p>For "handle" types (opaque pointers), Microsoft uses the trick of declaring structures and then typedef'ing a pointer to the structure:</p> <pre><code>#define DECLARE_HANDLE(name) struct name##__ { int unused; }; \ typedef struct name##__ *name </code></pre> <p>Then instead of</p> <pr...
<p>Use strong typedef as defined in <a href="http://www.boost.org/doc/libs/1_50_0/boost/strong_typedef.hpp" rel="nofollow noreferrer">BOOST_STRONG_TYPEDEF</a></p>
49,278
<p>I bricked my Tevo Tarantula's controller board, and I've decided to just replace it rather than unbrick it because they are relatively cheap. I recently bought a new MKS GEN L v1.0 board, but I've been unable to flash new firmware onto it. Every time I go to upload the firmware, I get an error just as it begins to u...
<p>Your motherboard is not an MKS GEN L v1.0, it's a <a href="https://github.com/makerbase-mks/Datasheet/blob/master/English%20datasheet/MKS%20SGen%20Datasheet.pdf" rel="nofollow noreferrer">MKS SGEN L</a> - unfortunately, a very very naming scheme.</p> <p>Your board is actually a <strong>32-bit board</strong>, and mus...
<p>Your new board may have a counterfeit FT232R USB-to-serial interface chip, and the Windows update channel has installed hobbled FTDI drivers that won't work with counterfeit chips. The use of counterfeit FT232R chips is very common with budget 3D printer controllers, and FTDI are trying to discourage their use. Beca...
1,775
<p>I have a pretty basic windows form app in .Net. All the code is C#. I'd like to turn it into an Asp.net web app. How can I easily do this?</p> <p>I think there's an easy way since the controls I drag/drop onto the windows form designer are pretty much the same that I drag/drop onto the aspx design page.</p> <p>...
<p>There are two big problems here; first - they might look the same, but they are implemented completely differently - all of the UI work will need to be redone, largely from scratch. You will probably be able to re-use your actual "doing" code, though (i.e. the logic that manipulates the files).</p> <p>Second - defi...
<p>The interface is going to have to change, as the controls are different. If you have supporting business classes, and other items of that nature you can copy those over, but otherwise the UI will need to be re-built.</p>
19,078
<p>How can I validate a SOAP response against an XSD file that defines the response schema. the web service I'm calling has an XMLDocument as input and output, so can't use WSDL for response schema validation.</p>
<p>I case you still need this (valid for SOAP UI version 2.5.1): File, Preferences, Editor Setting, Validate Response.</p>
<p>This not worked me caused try not working</p> <pre><code>import javax.xml.transform.stream.StreamSource; import javax.xml.validation.SchemaFactory; import javax.xml.XMLConstants; //Read your xsd file and get the conten into a variable like below. // trim - XSD SCHEME no spaces def xsdscheme = context.expand('${Prop...
40,943
<p>Right now I am working on a solution to archive older data from a big working database to a separate archive database with the same schema. I move the data using SQL scripts and SQL Server Management Objects (SMO) from a .Net executable written in C#.</p> <p>The archived data should still be accessible and even (oc...
<p>I think if you still want/need the data to be accessible, then partitioning some of your biggest or most-used tables could be an option.</p>
<p>We are in a similar situation. For regulatory reasons we cannot delete data for a set period of time, but many of our tables grow very large and unwieldy and realistically much of the data that is older than a month can be removed with few day-to-day problems. </p> <p>We currently programatically prune the tables,...
5,185
<p>Is there an equivalent to Java's Robot class (java.awt.Robot) for Perl?</p>
<p>Alternatively, you can surely use the <a href="http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm" rel="nofollow noreferrer">WWW::Mechanize</a> module to create an agent as we do here at work. We have a tool called AppMon that is really just a dramatized wrapper around Mechanize. </p> <p>The M...
<p>There is on Linux/Unix:</p> <p><a href="http://sourceforge.net/projects/x11guitest" rel="nofollow noreferrer"><a href="http://sourceforge.net/projects/x11guitest" rel="nofollow noreferrer">http://sourceforge.net/projects/x11guitest</a></a></p> <p>I'm not familiar of anything similar for Windows or Mac that uses Pe...
10,536
<p>How do you get the maximum number of bytes that can be passed to a <code>sendto(..)</code> call for a socket opened as a UDP port?</p>
<p>Use getsockopt(). <a href="http://www.mkssoftware.com/docs/man3/getsockopt.3.asp" rel="noreferrer">This site</a> has a good breakdown of the usage and options you can retrieve.</p> <p>In Windows, you can do:</p> <pre> int optlen = sizeof(int); int optval; getsockopt(socket, SOL_SOCKET, SO_MAX_MSG_SIZE, (int *)&opt...
<p>As UDP is not connection oriented there's no way to indicate that two packets belong together. As a result you're limited by the maximum size of a single IP packet (65535). The data you can send is somewhat less that that, because the IP packet size also includes the IP header (usually 20 bytes) and the UDP header (...
4,543
<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...
<p>You don't actually activate the module. You activate a view in a region. Take a read of this <a href="http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=42862" rel="nofollow noreferrer">article</a>.</p> <p>The Initialize method is only called the once for any module. The fact that you are seeing a view in t...
<p>You should have a ContentControl that will be your region. Then you will need to add all your modules to this region. When you click on the menu you should use Activate(...) method of the region in order to activate the particular module.</p>
47,035
<p>I have a C++ application that uses the Win32 API for Windows, and I'm having a problem with GDI+ dithering, when I don't know why it should be.</p> <p>I have a custom control (custom window). When I receive the WM_PAINT message, I draw some Polygons using FillPolygon on a Graphics device. This Graphics device was c...
<p>This is closely related to your other question about Haskell and quicksort. I think you probably need to read at least the <em>introduction</em> of a book about Haskell. It sounds as if you haven't yet grasped the key point about it which is that it bans you from modifying the values of existing variables.</p> <p>S...
<p>After reading enough in a Haskell book to really understand Earwicker's answer I'd suggest you also read about type classes. I'm not sure what “partial specialization” means, but it sounds like they could come close.</p>
49,371
<p>OpenSCAD has <code>rotate</code> function which rotates the body around its origin axis.</p> <p>Is there a way to specify an arbitrary axis?</p> <p>For example, this rotates a cylinder around its center:</p> <pre><code>rotate(a=[90,0,0]) { cylinder(h=10,r1=10,r2=10); } </code></pre> <p>How to make it rotate ar...
<p><code>rotate()</code> always rotates around the origin of the object following it. What you can do is to move your cylinder <em>away</em> from the origin, like this:</p> <pre><code>rotate(a=[90,0,0]) { translate([0,10,0]) cylinder(h=10,r1=10,r2=10); } </code></pre>
<p>You can use the following module in your code to achieve what you wish:</p> <pre><code>module myrotate(a, orig) { translate(orig) rotate(a) translate(-orig) children(); } myrotate([0,0,90], [0, 10, 0]) { cube([10, 10, 25]); } myrotate([0,0,-90], [0, 10, 0]) { cube([10, 10, 25]); } color([...
1,204
<p>Currently, I don't really have a good method of debugging JavaScript in Internet&nbsp;Explorer and <a href="http://en.wikipedia.org/wiki/Safari_%28web_browser%29" rel="noreferrer">Safari</a>. In Firefox, you can use <a href="http://en.wikipedia.org/wiki/Firebug" rel="noreferrer">Firebug's</a> <a href="http://getfire...
<p>For Safari you need to enable the "Develop" menu via Preferences (in Safari 3.1; see <a href="http://developer.apple.com/internet/safari/faq.html#anchor14" rel="noreferrer">the entry in Apple's Safari development FAQ</a>) or via</p> <pre><code>$ defaults write com.apple.Safari IncludeDebugMenu 1 </code></pre> <p>a...
<p>There is now a <a href="http://getfirebug.com/lite.html" rel="nofollow noreferrer">Firebug Lite</a> that works on other browsers such as Internet&nbsp;Explorer, Safari and Opera built. It does have a limited set of commands and is not as fully featured as the version in Firefox.</p> <p>If you are using <a href="htt...
2,875
<p>I cannot find the translated file after running the solution in BizTalk 2006 Tutorial Lesson 3: Run the EDI-to-XML Solution. </p> <p>It should be placed in the c:\Program Files\Microsoft BizTalk Server 2006 \EDI\Adapter\Getting Started with EDI\Northwind\In folder.</p> <p>The Base EDI adapter picks up the file in ...
<p>Yes, I'm on a 40 hour (actually it's 37.5 hours or so, that's what my contract says) on a project that was run with SCRUM from the beginning. That was about 2 years ago and the first time we implemented SCRUM. It's the project with the least amount of overtime for me personally, and it's also a PC game we're develop...
<p>Certainly. </p> <p>For the me the most important things that helped (in order of importance):</p> <ol> <li>Cross-functional team - having programmers, testers, technical writers and sales/services people in the same team and talking to each other daily (daily call) was great.</li> <li>Regular builds and continuous...
32,899
<p>I recently asked a question about <a href="https://stackoverflow.com/questions/28377/iif-vs-if">IIf vs. If</a> and found out that there is another function in VB called <strong>If</strong> which basically does the same thing as <strong>IIf</strong> but is a short-circuit.</p> <p>Does this <strong>If</strong> functi...
<p>Damn, I really thought you were talking about the operator all along. ;-) Anyway …</p> <blockquote> <p>Does this If function perform better than the IIf function?</p> </blockquote> <p>Definitely. Remember, it's built into the language. Only one of the two conditional arguments has to be evaluated, potentially sa...
<p>One very important distinct between <code>IIf()</code> and <code>If()</code> is that with <code>Option Infer On</code> the later will implicitly cast the results to the same data type in certain cases, as where <code>IIf</code> will return <code>Object</code>. </p> <p>Example: </p> <pre><code> Dim val As Integ...
4,810
<p>How to make sure that all derived C++/CLI classes will override the ICloneable::Clone() method of the base class?</p> <p>Do you think I should worry about this? Or this is not a responsibility of the base class' writer?</p> <p><strong>Amendment:</strong> Sorry, I forgot to mention that the base class is a non-abst...
<p>Declare it pure virtual in the base class.<br></p> <p>class Base<br> {<br> ...<br> vitual void Clone() = 0;<br> };</p>
<p>Thomas is correct but one way you would make that class abstract is to define a pure virtual method.</p> <p>This is done by saying:</p> <p>virtual void Clone() = 0;</p> <p>Unless the derived class implements Clone they won't be able to instantiate it so they'll have little choice if they want their class to be us...
10,460
<p>I'm working on an app that grabs and installs a bunch of updates off an an external server, and need some help with threading. The user follows this process:</p> <ul> <li>Clicks button</li> <li>Method checks for updates, count is returned.</li> <li>If greater than 0, then ask the user if they want to install using ...
<p>Your UI isn't updating because all the work is happening in the user interface thread. Your call to: </p> <pre><code>this.BeginInvoke((MethodInvoker)delegate() {update.Action.Run(); }) </code></pre> <p>is saying invoke update.Action.Run() on the thread that created "this" (your form), which is the user interface ...
<p>Have you tried putting a </p> <pre><code>Application.DoEvents() </code></pre> <p>in here</p> <pre><code>if (dlgRes == DialogResult.Yes) { Application.DoEvents(); ProcessAllUpdates(um2); } </code></pre>
3,134
<p>I'm writing a whitepaper and realized that I am not sure what the official term is for the kind of internal documentation that we put as a comment block before a declaration of definition.</p> <p>The same thing that eventually becomes JavaDoc member documentation.</p> <p>It's not simply internal documentation, and...
<p>This is called a <strong>method specification</strong> or <strong>procedure specification</strong>. That is, it specifies the behaviour of the procedure rather than the implementation details. Some text books refer to it as the contract of the method but that may be a bit ambiguous.</p>
<p>It's often professionally referred to as a "requirements clause", or an "insurance clause".</p>
19,243
<p>For 2 child template files inheriting a block, the <code>{{ block.super }}</code> does not resolve</p> <p>Python 2.5.2, Django 1.0, Windows XP SP3</p> <p>Sample skeleton code for files involved:</p> <ol> <li><code>base.html</code></li> <li><code>item_base.html</code></li> <li><code>show_info_for_all_items.html</c...
<blockquote> <p>Does Django offer something like INCLUDE (...)</p> </blockquote> <p>Yes!, just take a look at the documentation: <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/#include" rel="noreferrer">include</a></p> <p>Put the common code block in <em>foo.html</em>, and then, in each temp...
<p>In addition to the <code>include</code> tag mentioned by DZPM, you might want to consider writing a <a href="http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags" rel="nofollow noreferrer">custom inclusion tag</a>.</p> <p>The main advantage in this case is that the calling template doesn'...
39,953
<p>How do you manage revisions of stored procedures?</p> <p>We have a BI solution on SQL Server 2005 with hundreds of stored procedures. What would be a good way to get these into Subversion? What are your recommended tools to script stored procedures to files?</p>
<p>There are doubtless a bunch of off-the-shelf products you could buy (I think a few RedGate tools might come in handy here), as well as Visual Studio Team Suite - Database Edition.</p> <p>In light of purchasing something, why not consider using <a href="http://msdn.microsoft.com/en-us/library/ms162169.aspx" rel="nof...
<p>See <a href="https://stackoverflow.com/questions/173/how-do-i-version-my-ms-sql-database-in-svn">here</a> and <a href="https://stackoverflow.com/questions/308/is-there-a-version-control-system-for-database-structure-changes">here</a> for a start.</p>
22,141
<p>Using VBA in MS Office, how do I add text to the Windows clipboard so that it will paste into Word as a table?</p>
<p>The Windows clipboard supports multiple formats. When you want to place things in the clipboard, you make one or more calls to RegisterClipboardFormat() telling it the formats of the objects you will be placing on the clipboard, followed by calls to SetClipboardData() which actually places the data into the clipboa...
<p>Have you tried formatting it as a HTML table?</p>
38,021
<p>I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but I'm not sure how to interpret the metadata. I think it appears in t...
<p>rrdtools' <a href="http://oss.oetiker.ch/rrdtool/doc/rrdinfo.en.html" rel="nofollow noreferrer">rrdinfo</a> is your friend!</p> <p>It will tell you how the rrd file's data source(s) and archive(s) were created. Example</p> <pre><code>$ rrdtool info random.rrd filename = "random.rrd" rrd_version = "0001" step = 30...
<p>You can try use the clone script described <a href="http://code.google.com/p/python-rrd-schema-parse/source/browse/rrdinfo-parser.py" rel="nofollow">here.</a> It's very basic but it works for simple rrd files. I used it to figure out a schema that was generated by munin. I needed to insert old data into munin so I r...
20,909
<p>Some people claim that code's worst enemy is its size, and I tend to agree. Yet every day you keep hearing things like</p> <ul> <li>I write blah lines of code in a day.</li> <li>I own x lines of code.</li> <li>Windows is x million lines of code.</li> </ul> <p>Question: When is "#lines of code" useful?</p> <p>ps: ...
<p>I'd say it's when you're <strong>removing</strong> code to make the project run better.</p> <p>Saying you removed "X number of lines" is impressive. And far more helpful than you added lines of code.</p>
<p>I have found it useful under two conditions:</p> <ol> <li><p>Gauging my own productivity on my own new project when it's heads down coding time.</p></li> <li><p>When working with a large company and speaking with a manager that really only understands widgets per day.</p></li> </ol>
22,260
<p>I've been looking at Dojo, and it has some nice tricks, however its quite huge IMHO. Basically when viewing my test my slow machine (600mhz), just loading Dojo was kind of painful, and can imagine lots of mobile devices will also not be happy with it.</p> <p>Is there a slim version or something like that available?...
<p>What do you mean by 'loading Dojo'?<br> If you mean opening a page with a clean cache, and the site takes a long time to load, then it may be because you're using a non-minified version of the library.</p> <p>If you mean loading some Dijits, or <a href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/theme...
<p>What do you mean by 'loading Dojo'?<br> If you mean opening a page with a clean cache, and the site takes a long time to load, then it may be because you're using a non-minified version of the library.</p> <p>If you mean loading some Dijits, or <a href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/theme...
25,670
<p>I have an ASP .NET 2.0 website connected to a SQL Server 2005 database. The site is pretty simple and stores information about staff, including salary. </p> <p>What is the best way to encrypt the salary value so no-one (including myself) can ever see what it is, except for the authorised staff using the web-app?</p...
<p>SSL is probably your best bet to keep someone from sniffing, but be aware that it is still possible.</p> <p>As for the other bit, SQL Server 2005 supports table-level encryption out of the box. <a href="http://blogs.technet.com/keithcombs/archive/2005/11/24/sql-server-2005-data-encryption.aspx" rel="nofollow norefe...
<p>There are many encryption methods you could use here in your code. Make sure you choose one that takes a key and a "salt" (as opposed to just using the same key each time). If you use the same key (without a salt) each time you encrypt a salary, then two employees with the same salary will display the same encrypt...
17,949
<p>While playing around with localization using <a href="http://blog.eworldui.net/post/2008/10/ASPNET-MVC-Simplified-Localization-via-ViewEngines.aspx" rel="nofollow noreferrer">Matt Hawley's</a> approach. I wonder if someone has figured to localize routes. I can do this using global resources per site. But when I woul...
<p>No sure if this is what are you asking, but in this <a href="https://stackoverflow.com/questions/82380/best-way-to-handle-urls-in-a-multilingual-site-in-asp-net">question</a> I present a solution using asp.net routing (the same used in MVC) for dealing with routes and languages.</p>
<p>maybe this is also a help on this topic</p> <p><a href="http://haacked.com/archive/0001/01/01/internationalized-urls.aspx" rel="nofollow noreferrer">http://haacked.com/archive/0001/01/01/internationalized-urls.aspx</a></p>
41,099
<p>We have a collection of photo images sizing a few hundred gigs. A large number of the photos are visually duplicates, but with differing filesizes, resolution, compression etc. </p> <p>Is it possible to use any specific image processing methods to search out and remove these duplicate images?</p>
<p>I recently wanted to accomplish this task for a PHP image gallery. I wanted to be able to generate a "fuzzy" fingerprint for an uploaded image, and check a database for any images that had the same fingerprint, indicating they were similar, and then compare them more closely to determine how similar.</p> <p>I accom...
<p>It sounds like a procedural problem rather than a programming problem. Who uploads the photos? You or the customers? If you are uploading the photo, standardize the dimensions to a fixed scale and file format. That way comparisons will be easier. However, as it stands, unless you have days - or even weeks of free ti...
27,837
<p>How do I implement the WS addressing using WCF?</p>
<p>WCF automatically inserts appropriate WS-Addressing headers into messages created with the wsHttpBinding, and probably with some other bindings too.</p> <p>Did you mean that you want to exert some control over those headers?</p>
<p>You can try adding the following instruction in your binding</p> <pre><code>&lt;textMessageEncoding messageVersion="Soap11WSAddressing10"/&gt; </code></pre>
33,736
<p>I'm working on an ASP.NET project using MVP architecture. We would like to use an object validation framework in the domain, but are not that familiar with available frameworks other than the Castle.Components.Validator namespace. </p> <p>Does anyone have experience with any other light-weight object validation f...
<p><a href="http://msdn.microsoft.com/en-us/library/cc309509.aspx" rel="nofollow noreferrer">Validation Application Block</a> in the Enterprise Library<br> <a href="http://www.codeplex.com/ValidationFramework" rel="nofollow noreferrer">.NET Validation Framework</a> on CodePlex<br> <a href="http://www.codeplex.com/evil"...
<p>I'm not very familiar with the MVP pattern, but this guy seems to know what he's doing. <a href="http://jeffhandley.com/archive/2008/01/15/extended-mvp-pattern---domain-validation.aspx" rel="nofollow noreferrer">Here's how he handles validation with MVP.</a></p>
27,000
<p>I have an html table </p> <pre><code> &lt;table border="0" width="100%"&gt; &lt;tr class="headerbg"&gt; &lt;th width="5%"&gt; No &lt;/th&gt; &lt;th width="30%"&gt; Name &lt;/th&gt; &lt;th width="20%"&gt; ...
<p>Remove BUILTIN/Administrators from the SA group.</p>
<p><strong>Important!</strong> Before you do this make absolutley sure you have either:</p> <ul> <li>the password for the "sa" account or</li> <li>your domain account is a member of the sysadmin server role</li> </ul> <p>Otherwise you might find yourself locked out of the server.. not that this has ever happened to m...
46,060
<p>Is there a way using JSF to group two or more columns under a single parent column in JSF? I have a dataTableEx with hx:columnEx columns inside of it. What I want is something like this:</p> <pre><code> [MAIN HEADER FOR COL1+2 ][Header for Col 3+4] [ COL1 Header][COL2 Header][COL3 ][COL 4 ] Data ...
<p>You can probably achieve what you want with the table header, a panelGrid and a little CSS.</p> <pre><code>&lt;style type="text/css"&gt; .colstyle { width: 25% } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;f:view&gt; &lt;h:dataTable border="1" value="#{columnsBean.rows}" var="row" columnClasses="...
<p>Your best bet is likely to use nested tables for the first header (first header in the outer table, and your second header and data inside a nested table) so that it looks like two headers.</p>
32,390
<p>On my desktop I have written a small Pylons app that connects to Oracle. I'm now trying to deploy it to my server which is running Win2k3 x64. (My desktop is 32-bit XP) The Oracle installation on the server is also 64-bit.</p> <p>I was getting errors about loading the OCI dll, so I installed the 32 bit client int...
<p>sys.path is python's internal representation of the PYTHONPATH, it sounds to me like you want to modify the PATH.</p> <p>I'm not sure that this will work, but you can try:</p> <pre><code>import os os.environ['PATH'] += os.pathsep + "C:\\oracle32\\bin" </code></pre>
<p>You need to append the c:\Oracle32\bin directory to the PATH variable of your environment before you execute python.exe.<br> In Linux, I need to set up the LD_LIBRARY_PATH variable for similar reasons, to locate the Oracle libraries, before calling python. I use wrapper shell scripts that set the variable and then c...
12,150
<p>I'm getting warnings about CSS3.0 properties like text-overflow. Is there a way to validate against 3.0?</p> <hr /> <p>HTML5 and CSS3 support is coming to VS2010 in SP1.</p> <p><a href="https://web.archive.org/web/20120621010521/http://blogs.msdn.com:80/b/webdevtools/archive/2011/01/27/html5-amp-css3-in-visual-stud...
<p>Apparently, you can define your own Visual Studio Intellisense schema for CSS. I’m not sure if VS will then validate against that, or only use it for code completion.</p> <p>Might be worth making a minimal one and seeing if it gets used for validation.</p> <p><a href="http://blogs.msdn.com/mikhailarkhipov/archive/...
<p>I do not believe so. But you can turn the validation off if you want. Go to Tools > Options. Expand Text Editor > HTML > Validation. This screen shows all the different validation targets. Uncheck Show Errors if you want to turn the validation off. </p>
17,974
<p>I have a List&lt; int[] > myList, where I know that all the int[] arrays are the same length - for the sake of argument, let us say I have 500 arrays, each is 2048 elements long. I'd like to sum all 500 of these arrays, to give me a single array, 2048 elements long, where each element is the sum of all the same pos...
<p>Edit: Ouch...This became a bit harder while I wasn't looking. Changing requirements can be a real PITA.</p> <p>Okay, so take each position in the array, and sum it:</p> <pre><code>var sums = Enumerable.Range(0, myList[0].Length) .Select(i =&gt; myList.Select( nums =&gt; nums[i] ...
<p>I would do it as follows … but this solution might actually be very slow so you might want to run a benchmark before deploying it in performance-critical sections.</p> <pre><code>var result = xs.Aggregate( (a, b) =&gt; Enumerable.Range(0, a.Length).Select(i =&gt; a[i] + b[i]).ToArray() ); </code></pre>
40,171
<p>I've looking to find a simple recommended "minimal" c++ makefile for linux which will use g++ to compile and link a single file and h file. Ideally the make file will not even have the physical file names in it and only have a .cpp to .o transform. What is the best way to generate such a makefile without diving into...
<p>If it is a single file, you can type</p> <pre><code>make t </code></pre> <p>And it will invoke</p> <pre><code>g++ t.cpp -o t </code></pre> <p>This doesn't even require a Makefile in the directory, although it will get confused if you have a t.cpp and a t.c and a t.java, etc etc.</p> <p>Also a real Makefile:</p>...
<p>If your issues are because autoconf thinks the .h file is a c file, try renaming it to .hpp or .h++</p>
36,538
<p>Javascript code can be tough to maintain.<br> I am looking for tools that will help me ensure a reasonable quality level.<br> So far I have found <a href="https://github.com/pivotal/jsunit" rel="noreferrer">JsUNit</a>, a very nice unit test framework for javascript. Tests can be run automatically from ant on any bro...
<p>This is an old thread, but if you're interested in running Jasmine for BDD testing in your maven project, I wrote this jasmine-maven-plugin for exactly this purpose (that is, improving JS quality by encouraging TDD of it).</p> <p><a href="http://github.com/searls/jasmine-maven-plugin" rel="noreferrer">http://github...
<p>Sonar and the JavaScript Plugin: <a href="http://docs.codehaus.org/display/SONAR/JavaScript+Plugin" rel="nofollow">http://docs.codehaus.org/display/SONAR/JavaScript+Plugin</a></p>
11,778
<p>I recently started work on a personal coding project using C++ and KDevelop. Although I started out by just hacking around, I figure it'll be better in the long run if I set up a proper unit test suite before going too much further. I've created a seperate test-runner executable as a sub project, and the tests I'v...
<p> Although you <i>could</i> manipulate the default `make` target to run your tests, it is generally not recommended, because every invocation of </p> <pre>make</pre> <p> would run all the tests. You should use the "check" target instead, which is an accepted quasi-standard among software packages. By doing that, th...
<p>I got it working this way:</p> <pre><code>$ cat src/base64.c //code to be tested int encode64(...) { ... } #ifdef UNITTEST #include &lt;assert.h&gt; int main(int argc, char* argv[]) { assert( encode64(...) == 0 ); return 0; } #endif //UNITTEST /* end file.c */ $ cat src/Makefile.am ... check_PROGRAMS = base64...
13,271
<p>I have a base class that has a private static member:</p> <pre><code>class Base { private static Base m_instance = new Base(); public static Base Instance { get { return m_instance; } } } </code></pre> <p>And I want to derive multiple classes from this:</p> <pre><code>class DerivedA : Base...
<p>There's one really icky way of doing this:</p> <pre><code>class Base { // Put common stuff in here... } class Base&lt;T&gt; : Base where T : Base&lt;T&gt;, new() { private static T m_instance = new T(); public static T Instance { get { return m_instance; } } } class DerivedA : Base&lt;DerivedA&gt; {...
<p>Short answer: not that I'm aware of. Static members are always nonvirtual and do not readily support polymorphism.</p> <p>However, you should also ask yourself <em>why</em> you are doing this. Normally, static members are shared resources that every instance of that class (including the derived classes) will find...
44,791
<p>Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object?</p> <p>If there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )?</p>
<p>I wouldn't go with the thread approach. While a sleeping thread doesn't consume user CPU time, it does use Kernel/system CPU time. Secondly, in .NET you can't adjust the Thread's stack size. So even if all it does is sleep, you are stuck with a 2MB hit (I believe that is the default stack size of a new thread) fo...
<p>When a thread is sleeping it consumes no CPU usage. A very simple way would be to have a thread which sleeps until the DateTime. For example</p> <pre><code> DateTime future = DateTime.Now.Add(TimeSpan.FromSeconds(30)); new Thread(() =&gt; { Thread.Sleep(future - DateTime.Now); ...
25,291
<p>I'm trying to write a query for an advanced search page on my document archiving system. I'm attempting to search by multiple optional parameters. I have about 5 parameters that could be empty strings or search strings. I know I shouldn't have to check for each as a string or empty and create a separate stored pr...
<p>You could use COALESCE (or ISNULL) like so:</p> <pre><code>WHERE COALESCE(@var1, col1) = col1 AND COALESCE(@var2, col2) = col2 AND COALESCE(@var3, col3) = col3 </code></pre>
<p>You can pass optional parameters to a stored procedure but the optimizer will build a plan based on the specific calls you make to that proc. There are some tricks in SQL Server 2005 and later to avoid this (parameter sniffing, 'with no compile' hints, etc.)</p> <p>Even with that, tho, I prefer to build a view with...
43,297
<p>I support a third party system that uses COM, classic ASP, and SQL Server. Our company has gone to using TFS as our source control provider - which pushes things through Visual Studio. So, what's the best way to get a classic asp front-end into Visual Studio?</p>
<p>When I had to do this, I created a blank solution in VS and then added the folders from the ASP site one at a time, adding "existing items" to each folder as I created it.</p> <p>In this way I'm able to open the solution which keeps track of what files I had open at last open, plus I get the benefits of intellisens...
<p>Did any of you heard of Visual Web developer 2008 Express edition? Work wonders for me. Most important as soon as you ask to open website in it- it opens each folder of intended website and when you save project it does what you need to do to later open this website in regular visual studio.</p> <p>It have some lim...
4,067
<p>I am wondering how I should properly get rid of branches that no longer have any purpose. Right now even if i delete them and commit they are still listed as branches in the properties windows for a particular branching root (directory). If I select merge I don't get an option to merge to the deleted branch which ob...
<p>The deleted branch is only marked as deleted at a moment in time and it's possible to still get to the code if you sync to a changeset or time before that delete operation.</p> <p>If you do not want to have the file in the branch in the database at all you can use the <code>tf destroy</code> command line:</p> <p><...
<p>Please use following method to destroy branch in your TFS Project you should have permission to delete branch - you should be a part of project collection admin. Open Visual Studio Command prompt with admin previlage. cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE> tf destroy $/MyProject/Main/Bin...
41,927
<p>What would be the best method of automatically generating a Release Notes text file from a Team Foundation Server 2008 nightly build?</p>
<p>We created a TFS report that lists all Work Items associated with a specified Iteration (version). In addition we added a custom field to Work Items to indicate if we wanted the work item included in the release notes report. (Not all Work Items are appropriate for all clients/users.)</p> <p>You could automate thi...
<p><strong>UPDATE</strong>:</p> <p>I uploaded a sample xsl file for transforming the buildlog.xml to get an informative plain releasenotes.txt. Get it here: <a href="http://www.trimagination.info/2009/01/23/automatically-generate-release-notes-textfile-from-team-foundation-build/" rel="nofollow noreferrer">Automatical...
48,138
<p>(Ender 3 Pro with Bigtreetech Board and Touchscreen, BlTouch)</p> <p>Hello everybody, I want to print something for my family but the hotend gets clogged every time in the same part of the print. I tried:</p> <ul> <li>Different Nozzles</li> <li>Different Filaments</li> <li>I cleaned every Part</li> <li>The E-Steps a...
<h1>Conclusion</h1> <p>So I found my mistake: It was the E-Steps I did wrong it over extruded. The best E-Steps per mm are 92 for me. The mistake took place because I took my E-step number from a Video Tutorial about my dual extruder. I found the optimal number by testing out; the formula I got for the E-Steps was in t...
<p>I noticed that on my Ender 3, if the belts aren't tight enough, I have a similar problem, but mostly when I print anything circular.</p>
1,785
<p>I have a community site which has around 10,000 listings at the moment. I am adopting a new url strategy something like</p> <pre><code>example.com/products/category/some-product-name </code></pre> <p>As part of strategy, I am implementing a site map. Google already has a good index of my site, but the URLs will ch...
<p>Unless I'm missing something, I think you don't need to worry about it. I'm assuming that your list of product names doesn't change all <em>that</em> often -- on a scale of a day or so, not every second. The Google site-map should be read in a second or less, and the crawler isn't going to crawl you <em>instantly<...
<p>Not an answer to your main question.</p> <p>You dont have to append .html. You can leave the URLs as they are. If you cant find a better way to redirect to the html file (which does not have ot have an .html suffix), you can output it via PHP with <a href="http://no.php.net/manual/en/function.readfile.php" rel="nof...
45,704