instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I came across this suggestion on the klipper github, <a href="https://www.facebook.com/groups/Hypercube.Evo/permalink/192106034761003/" rel="nofollow noreferrer">https://www.facebook.com/groups/Hypercube.Evo/permalink/192106034761003/</a>. In order to reduce the stretching in the bowden tube you can add fiberglass p...
<p>The question seems to be built on a false premise, namely that the major extrude/retract errors in a Bowden design come from tube stretch. The PTFE tube is <em>not</em> significantly elastic, actually it is reasonably stiff so there is minimal scope for improvement here.</p> <p>A longer tube <em>will</em> contribut...
<p>The <a href="http://La%20solution%20propos%C3%A9e%20dans%20la%20revendication%201%20de%20la%20pr%C3%A9sente%20demande%20ne%20peut%20%C3%AAtre%20consid%C3%A9r%C3%A9e%20comme%20impliquant%20une%20activit%C3%A9%20inventive%20pour%20les%20motifs%20suivants:%2050%20Ohm%20repr%C3%A9sente%20la%20valeur%20ordinaire%20de%20l...
997
<p>I started a project a long time ago and created a <strong>Data Access Layer</strong> project in my solution but have never developed anything in it. What is the purpose of a data access layer? Are there any good sources that I could learn more about the Data Access Layer?</p>
<p>In two words: <a href="http://en.wikipedia.org/wiki/Loose_coupling" rel="noreferrer">Loose Coupling</a></p> <p>To keep the code you use to pull data from your data store (database, flat files, web services, whatever) separate from business logic and presentation code. This way, if you have to change data stores, yo...
<p>I recommend you read up here: <a href="http://msdn.microsoft.com/en-us/practices/default.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/practices/default.aspx</a> Using a DAL will help you isolate your data access from your presentation and business logic. I use it a lot so that I can easily swap ou...
8,471
<p>In my application I have a window which I popup with small messages on it (think similar to tooltip). This window uses the layered attributes to draw alpha backgrounds etc.</p> <p>If I have several of these windows open at once, and I click one with my mouse, when they disappear they cause my application to lose fo...
<p>Multithreaded programming is hard to grasp in the beginning (and veterans still fail sometimes) and BackgroundWorker makes it a bit easier to use. I like the fact that BackgroundWorker has functionality which is easy to implement but even easier to wrongly implement in a subtle way, like cancellation. I use it if I ...
<p>My biggest issue with the background worker class is that there really is no way to know when the worker has finished due to cancellation. The BackgroundWorker does not expose the thread it uses so you can't use the standard techniques for synchronizing thread termination (join, etc.). You also can't just wait in a ...
7,241
<p>I am trying to print an item with a rectangular grid (using PLA on Ultimaker 2+):</p> <p><a href="https://i.stack.imgur.com/RHcqX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RHcqX.png" alt="item with a grid"></a></p> <p>Holes are 4x4 mm, distance between holes (wall thickness): 1mm. I am pri...
<p>Slicers never create a grid by crossing the already printed lines - they print perimeters and thicken them into a shell. So if the picture that is to be printed is a #, it does not lay down first the || and then the = crossing over it, it lays down an inner square and then builds the rest to get to the shape. This o...
<ol> <li>Use the latest stable Cura 3.6.0</li> <li>Ensure that the setting "Wall Line Count" > 1, recommended value is 3-4</li> <li>Uncheck the setting flag "Outer Before Inner Walls"</li> </ol>
1,167
<p>I have a byte array in memory, read from a file. I would like to split the byte array at a certain point (index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation. What I would like is something like this:</p> <pre><code>byte[] largeBy...
<p>This is how I would do that:</p> <pre><code>using System; using System.Collections; using System.Collections.Generic; class ArrayView&lt;T&gt; : IEnumerable&lt;T&gt; { private readonly T[] array; private readonly int offset, count; public ArrayView(T[] array, int offset, int count) { this....
<p>You can't. What you might want is keep a starting point and number of items; in essence, build iterators. If this is C++, you can just use <code>std::vector&lt;int&gt;</code> and use the built-in ones.</p> <p>In C#, I'd build a small iterator class that holds start index, count and implements <code>IEnumerable&lt;&...
4,116
<p>I know in php you can embed variables inside variables, like:</p> <pre><code>&lt;? $var1 = "I\'m including {$var2} in this variable.."; ?&gt; </code></pre> <p>But I was wondering how, and if it was possible to include a function inside a variable. I know I could just write:</p> <pre><code>&lt;?php $var1 = "I\'m i...
<p>Function calls within strings are supported since PHP5 by having a variable containing the name of the function to call:</p> <pre><code>&lt;? function somefunc($stuff) { $output = "&lt;b&gt;{$stuff}&lt;/b&gt;"; return $output; } $somefunc='somefunc'; echo "foo {$somefunc("bar")} baz"; ?&gt; </code></pre> <...
<p>Expanding a bit on what Jason W said:</p> <pre> I find it easier however (and this works in PHP4) to either just call the function outside of the string: &lt;? echo "foo " . somefunc("bar") . " baz"; ?&gt; </pre> <p>You can also just embed this function call directly in your html, like:</p> <pre>&lt;? function...
8,526
<p>I frequently find myself writing code like this:</p> <pre><code>List&lt;int&gt; list = new List&lt;int&gt; { 1, 3, 5 }; foreach (int i in list) { Console.Write("{0}\t", i.ToString()); } Console.WriteLine(); </code></pre> <p>Better would be something like this:</p> <pre><code>List&lt;int&gt; list = new List&lt...
<p>Do this:</p> <pre><code>list.ForEach(i =&gt; Console.Write("{0}\t", i)); </code></pre> <hr> <p>EDIT: To others that have responded - he wants them all on the same line, with tabs between them. :)</p>
<pre><code>public static void WriteLine(this List&lt;int&gt; theList) { foreach (int i in list) { Console.Write("{0}\t", t.ToString()); } Console.WriteLine(); } </code></pre> <p>Then, later...</p> <pre><code>list.WriteLine(); </code></pre>
7,626
<p>What is Thermal Runaway Protection (TRP) and why should I enable it?</p> <p>How does one do so in Marlin?</p>
<h1>What is TRP and how does it work?</h1> <p>Thermal runaway protection is basically self-explaining; it is protection against the temperature getting out of control. Essentially, the firmware checks whether the measured output of the thermistor (<em>What is a thermistor? A thermistor is basically a temperature senso...
<h2>What is Thermal Runaway?</h2> <p>Let's look at a <a href="https://www.youtube.com/watch?v=qVjWg2vuWzk" rel="nofollow noreferrer">Thermal Runaway Test (#2)</a> performed by one Chris Bate.</p> <p>In this video the experimenter drove the heating element non-stop until disaster. The Nichrome wire in the heating elemen...
1,248
<p>I have an XML document with a DTD, and would love to be able to access the XML model, something like this:</p> <pre><code>title = Thing.Items[0].Title </code></pre> <p>Is there a way, in Ruby, to generate this kind of object model based on a DTD? Or am I stuck using REXML?</p> <p>Thanks!</p>
<p>if you include the active_support gem (comes with rails) it adds the method from_xml to the Hash object. You can then call Hash.from_xml(xml_content) and it'll return a hash that you can use to access the data.</p> <p>I don't know of an easy way to map an xml to an object, but you could create a wrapper class that...
<p>You can use the ruby version of xml-simple.</p> <p>You shouldn't need to install the gem as I believe it's already installed with rails. <a href="http://xml-simple.rubyforge.org/" rel="nofollow noreferrer">http://xml-simple.rubyforge.org/</a></p>
4,796
<p>I'm trying to let an <code>&lt;input type="text"&gt;</code> (henceforth referred to as “textbox”) fill a parent container by settings its <code>width</code> to <code>100%</code>. This works until I give the textbox a padding. This is then added to the content width and the input field overflows. Notice that in Firef...
<p>With CSS3 you can use the box-sizing property on your inputs to standardise their box models. Something like this would enable you to add padding and have 100% width:</p> <pre class="lang-css prettyprint-override"><code>input[type="text"] { -webkit-box-sizing: border-box; // Safari/Chrome, other WebKit -moz...
<p>i believe you can counter the overflow with a negative margin. ie</p> <pre><code>margin: -1em; </code></pre>
7,580
<p>Typical scenario. We use old-school XML Web Services <em><code>internally</code></em> for communicating between a server farm and several distributed <em>and</em> local clients. No third parties involved, only our applications used by ourselves and our customers.</p> <p>We're currently pondering moving from <code>X...
<p>In my experience DTOs are most useful for:</p> <ol> <li>Strictly defining what will be sent over the wire and having a type specifically devoted to that definition.</li> <li>Isolating the rest of your application, client and server, from future changes.</li> <li>Interoperability with non-.Net systems. DTOs certain...
<p>Having worked with both approaches (shared domain objects and DTOs) I'd say the big problem with shared domain objects is when you don't control all clients, but from my past experiences I'd usually use DTOs unless it development speed were of the essence.</p> <p>If there's any chance that you won't always be in co...
4,496
<p>Visual Studio 2005 doesn't provide an interface for creating relationships between tables in a SQL Server CE database (I'm using version 3.0) and you can't open a Compact Edition DB using Management Studio as far as I know. Any ideas?</p>
<p>Unfortunately there is currently no designer support (unlike for SQL Server 2005) for building relationships between tables in SQL Server CE. To build relationships you need to use SQL commands such as:</p> <pre><code>ALTER TABLE Orders ADD CONSTRAINT FK_Customer_Order FOREIGN KEY (CustomerId) REFERENCES Customers...
<pre><code>create table employee ( empid int, empname varchar(40), designation varchar(30), hiredate datetime, Bsalary int, depno constraint emp_m foreign key references department(depno) ) </code></pre> <p>We should have an primary key to create foreign key or relationship between two or more table...
6,898
<p>I am building an enclosure for an Ender 3 Pro printer, and am planning on the power supply and LCD unit being outside the enclosure. How important is it to move the printer controller (where the SD card is inserted) outside the enclosure? Would leaving it in place affect its longevity?</p> <p>Answers to the first r...
<p>It depends on what kinds of prints you make, and especially what kind of materials you want to use.</p> <p>Certain materials (ABS especially, but also PETG to some degree) will print <em>much better</em> if the entire build area, which usually includes the printer chassis and controls, is enclosed to protect from dr...
<p>This guy placed the whole Ender in a 100C environment but he emphasises how important it is to leave the electronics cool:</p> <p><div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/79r5D9nCQfM?start=1216"></iframe> </div></div></p>
1,716
<p>Has anyone used Lucene.NET rather than using the full text search that comes with sql server?</p> <p>If so I would be interested on how you implemented it. </p> <p>Did you for example write a windows service that queried the database every hour then saved the results to the lucene.net index?</p>
<p>Yes, I've used it for exactly what you are describing. We had two services - one for read, and one for write, but only because we had multiple readers. I'm sure we could have done it with just one service (the writer) and embedded the reader in the web app and services.</p> <p>I've used lucene.net as a general data...
<p>I used Lucene.NET along with MySQL. My approach was to store primary key of db record in Lucene document along with indexed text. In pseudo code it looks like:</p> <ul> <li><p>Store record: </p> <p>insert text, other data to the table<br> get latest inserted ID<br> create lucene document<br> put (ID, text) into lu...
5,772
<p>Most of my experience is on the MSFT stack, but I am now working on a side project, helping someone with a personal site with cheap hosting that is built on the LAMP stack. My options for installing extras are limited, so I'm wondering about how to write my data access code without embedding raw queries in the .php...
<p>Take a look at the <a href="http://framework.zend.com" rel="nofollow noreferrer">Zend Framework</a>, specifically Zend_Db. It has a Database Abstraction layer that doesn't require anything other than the MySQLi extension to be installed and isn't a full-blown ORM model.</p>
<p>I would try a framework. <em>Zend Framework</em> has been cited. <a href="http://www.symfony-project.org/" rel="nofollow noreferrer">Symfony</a> seems interesting. It's based on ideas from <em>Ruby on Rails</em>.</p>
4,226
<p>Does anyone know if there is a c# Console app, similar to the Python or Ruby console? I know the whole "Compiled versus Interpreted" difference, but with C#'s reflection power I think it could be done.</p> <p><strong>UPDATE</strong> Well, it only took about 200 lines, but I wrote a simple one...It works a lot like ...
<p>Given your mention of "C#'s reflection power", I am unsure whether you're looking for an interactive C# console for small code snippets of your own (à la Ruby's <code>irb</code>), or a means of interacting with an existing, compiled application currently running as a process.</p> <p>In the former case:</p> <ul> <l...
<p>Google reveals a few efforts at this. One in particular illustrates why this is less straightforward than it might seem. <a href="http://www.codeproject.com/KB/cs/csi.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/csi.aspx</a> has a basic interpreter using .NET's built in ability to compile c# co...
6,982
<p>Are there any codes that allow for numerical formatting of data when using string.format?</p>
<p>Loads, stick <code>string.Format</code> into Google :-)</p> <p>A quite good tutorial is at <a href="http://web.archive.org/web/20150303084355/http://idunno.org:80/archive/2004/07/14/122.aspx" rel="nofollow noreferrer">iduno</a></p>
<p>As Keith said above. The most common one I use is currency:</p> <pre><code>String.Format("{0:c}", 12000); </code></pre> <p>Which would output £12,000.00</p>
3,011
<p>In textmate, when there's a current selection, I hit the " key and the selection gets surrounded by quotes. The same thing happens with other balanced characters like (, {, [ and '.</p> <p>Am I missing something obvious in Emacs configuration that would enable similar behaviour when using transient mark mode, or do...
<p>wrap-region.el from <a href="http://sami.samhuri.net/2007/6/23/emacs-for-textmate-junkies" rel="nofollow noreferrer">this guy's blog post</a> will do what you're looking for.</p> <p><a href="http://mumble.net/~campbell/emacs/paredit.el" rel="nofollow noreferrer">Paredit</a> will complete the TextMate-style quoting....
<p>You should check out these older, very similar, questions:</p> <p><a href="https://stackoverflow.com/questions/1023770/automatically-closing-braces-in-emacs/1024531#1024531">Automatically closing braces in Emacs?</a></p> <p><a href="https://stackoverflow.com/questions/848647/emacs-typeover-skeleton-pair-insert-may...
9,835
<p>Suppose that two tables exist: <code>users</code> and <code>groups</code>.</p> <p><strong>How does one provide "simple search" in which a user enters text and results contain both users and groups whose names contain the text?</strong></p> <p>The result of the search must distinguish between the two types.</p>
<p>The trick is to combine a <code>UNION</code> with a literal string to determine the type of 'object' returned. In most (?) cases, UNION ALL will be more efficient, and should be used unless duplicates are required in the sub-queries. The following pattern should suffice:</p> <pre><code> SELECT "group" type, name ...
<p>If you use "UNION ALL" then the db doesn't try to remove duplicates - you won't have duplicates between the two queries anyway (since the first column is different), so UNION ALL will be faster.<br> (I assume that you don't have duplicates inside each query that you want to remove)</p>
8,023
<p>I have a weird problem with a dropdownbox selectedIndex always being set to 0 upon postback. I'm not accidentally rebinding it in my code. In fact I've placed a breakpoint at the very first line of the page_load event and the value is already set to zero. The dropdown is in the master page of my project, I don't kno...
<p>Are you sure you are doing a postback and not a refresh? It is hard to help you without more context into the problem or a chunk of the code.</p>
<p>This may simply be a syntax error, but shouldn't</p> <pre><code> If Page.IsPostBack Then GetUIValues() Else </code></pre> <p>Look like this</p> <pre><code> If NOT Page.IsPostBack Then GetUIValues() Else </code></pre>
9,910
<p>I get this error:</p> <p><code>Can't locate Foo.pm in @INC</code></p> <p>Is there an easier way to install it than downloading, untarring, making, etc?</p>
<p><strong>On Unix</strong>:</p> <p>usually you start <em>cpan</em> in your shell:</p> <p><code>$ cpan</code></p> <p>and type</p> <p><code>install Chocolate::Belgian</code></p> <p>or in short form:</p> <p><code>cpan Chocolate::Belgian</code></p> <p><strong>On Windows</strong>:</p> <blockquote> <p>If you're using Active...
<p>On Windows with the ActiveState distribution of Perl, use the <a href="http://docs.activestate.com/activeperl/5.10/faq/ActivePerl-faq2.html#pkg_operations" rel="nofollow noreferrer">ppm</a> command.</p>
9,152
<p>I want to write a simple colour management framework in C#, Java and AS3. I only want to write the unit tests once though, rather than recreating the unit tests in JUnit, FlexUnit and say NUnit. </p> <p>I have in mind the idea of say an xml file that defines manipulations of "instance" and assertions based on the s...
<p>Would FIT/ <a href="http://fitnesse.org/" rel="nofollow noreferrer">Fitnesse</a> be suitable for what you want?</p> <p>FIT is an acceptance test framework rather than unit test framework, but from what you describe you would want to ensure that the three implementations have the same behavior rather than identical ...
<p>You could also check out Fitnesse with <a href="http://www.fitnesse.org/FitNesse.SliM" rel="nofollow noreferrer">Slim</a>, as Slim should be a lot more lightweight to implement for new languages (AS3). I guess it's more about acceptance/integration testing than unit testing, but it could be worth looking into.</p>
9,545
<p>If I have a separate system with its own concept of users and presence, what is the most appropriate architecture for creating a bridge to an XMPP server network? As far as I can tell there are three primary ways:</p> <ol> <li><p>Act as a server. This creates one touchpoint, but I fear it has implications for com...
<p>The XMPP gateway protocol you've heard of is most likely to do with transports. A transport is a server that connects to both a XMPP server and a non-XMPP server. By running a transport, I can use my Jabber client to talk to someone using, say, MSN Messenger.</p> <p>A transport typically connects once to the remo...
<p>One other approach is to work with your XMPP server vendor. Most have internal APIs that make injecting presence possible from third party applications. For example, <a href="http://www.jabber.com/CE/JabberXCP" rel="nofollow noreferrer">Jabber XCP</a> provides an API for this that's really easy to use.</p> <p>(Di...
5,622
<p>I'm maintaining some code that uses a *= operator in a query to a Sybase database and I can't find documentation on it. Does anyone know what *= does? I assume that it is some sort of a join.</p> <pre><code>select * from a, b where a.id *= b.id</code></pre> <p>I can't figure out how this is different from:</p> ...
<p>From <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc34982_1500/html/mig_gde/mig_gde160.htm" rel="noreferrer">http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc34982_1500/html/mig_gde/mig_gde160.htm</a>:</p> <p>Inner and outer tables</p> <p>The terms outer table and inner tab...
<pre><code>select * from a, b where a.id = b.id</code></pre> <p>Requires that a row exist in where b.id = a.id in order to return an answer</p> <pre><code>select * from a, b where a.id *= b.id</code></pre> <p>Will fill the columns from b with nulls when there wasn't a row in b where b.id = a.id.</p>
6,190
<p>During the load of my cocoa application, my program crashes with the messsage EXC_BAD_ACCESS. The stack trace is not helpful. Any clues to how I can find the problem?</p>
<p>I've seen times where this can happen when you are trying to access a object that you didn't retain properly so its either not pointing to a valid copy of your object or its pointing to an object of another type. Placing breakpoints early and analyzing the objects as you step through startup using po and print in gd...
<p>This is one possible reason. There is a IBOutlet object that isn't being initialized and a message is being invoked on nil. The stack trace might look like this:</p> <pre><code>#0 0x90a594c7 in objc_msgSend #1 0xbffff7b8 in ?? #2 0x932899d8 in loadNib #3 0x932893d9 in +[NSBundle(NSNibLoading) _loadNib...
9,054
<p>I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc".</p> <p>How can I make this work? I'm not averse to canning t...
<p>If you are using Java 6 you can just use the <a href="http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#open(java.io.File)" rel="nofollow noreferrer">open method of java.awt.Desktop</a> to launch the file using the default application for the current platform.</p>
<p>Not sure if this will help you much... I use java 1.5+'s <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html" rel="nofollow noreferrer">ProcessBuilder</a> to launch external shell scripts in a java program. Basically I do the following: ( although this may not apply because you don't wan...
7,849
<p>I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.</p> <p>The produced HTML needs to be standards compliant as well.</p> <p>I have tried <a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html" rel...
<p>Smooth Div Scroll can also be used as a news ticker/stock ticker. It can pause on mouse over or mouse down and it can loop endlessly if you want it to.</p> <p>Here's <a href="http://www.maaki.com/" rel="nofollow noreferrer">the example</a> with a running ticker.</p>
<p>An Alternative solution would also be the <a href="http://jonmifsud.com/web-tools/jquery-webticker/" rel="nofollow">jQuery webTicker</a>; its very similar to liscroll however resolves the problem with the ticker stopping after the whole list completes; whilst also adding some new fancy features like; direction of mo...
6,231
<p>I have my print settings dialed into a real good spot, but there's one obstacle that's preventing them from coming out flawless; somehow, my print has &quot;fuzz&quot; everywhere. Not traditional stringing like you get from filament oozing while travelling from section to section, nor do I mean over-extrusion that c...
<p>That is the print stringing still. Even thought that you have your printer dialed in, the plastic that is still in the nozzle is still grabbing onto your print and pulling out the nozzle just a tad. This, as far as I know, is unavoidable. The best solution that I could think of fixing this (as far as having your pri...
<p>These stringers are common with PETG. You can reduce them by:</p> <ol> <li><p>Increasing retraction reduces the stringers, but too much retraction can cause the filament to jam and stop extruding.</p> </li> <li><p>Lowering the extruder temperature will reduce the stringers, but also reduce adhesion between layers. ...
1,978
<p>What is the best way to record statistics on the number of visitors visiting my site that have set their browser to block ads?</p>
<p>Since programs like AdBlock actually never request the advert, you would have to look the server logs to see if the same user accessed a webpage but didn't access an advert. This is assuming the advert is on the same server.</p> <p>If your adverts are on a separate server, then I would suggest it's impossible to do...
<p>I suppose you could compare the ad prints with the page views on your website (which you can get from your analytics software).</p>
2,455
<p>I recently changed the printhead on my DeltaMaker from stock to an E3D Lite6, and am struggling to get back to my original quality, reliability, and repeatability. I thought I had gotten the recipe pretty close to dialed in and tried a bigger print last night. It turned out pretty good in most respects except for ...
<p>Since you said you don't have a cooling fan, try lowering the temperature on your print head to something like 205. The strings in the first and second picture also occur more often when the print temperature is too high as well. </p> <p>The layer time gets really small at that transition, so make sure the print sp...
<p>It looks like the first layers that are making the vertical transition do not have enough to stick to and are curling up. Are you using a cooling fan?</p>
412
<p>I want to create templates for base new reports on to have common designs. How do you do it?</p>
<p>The need to produce reports with a common starting design and format is key to any project involving clients and their reports. I have been working on reports for over 10 years now. This has not been the largest portion of my jobs through the years but it has been a very import one. The key to any report project ...
<p>Further more, I would suggest wrapping up your template perhaps with externally linked images into an .msi for easier distribution. It is a lot easier to ask people in a department to run an installer than it is to hope they find the right path to put the reporting template in. Make sure you use the proper program...
9,058
<p>I’m thinking about trying some development for the iPhone, is it possible to install Leopard inside VMWare? I already have a pretty high spec PC with a comfy setup that I’d like to use, or do I need to buy a real Mac?</p>
<p>It is <a href="http://blogs.vmware.com/vmtn/2008/01/virtual-leopa-1.html" rel="noreferrer">legal</a> to run Mac OS X <strong>Server</strong> in a virtual machine <em>on Apple hardware</em>. All other forms of Mac OS X virtualization are currently forbidden.</p>
<p>Unfortunately, there's no legal way to run OS X in a virtual machine.</p> <p>For developing iPhone apps you probably don't need a particularly beefy machine, so maybe look into grabbing a <a href="http://store.apple.com/us/browse/home/shop_mac/family/mac_mini?mco=MTE3MTA" rel="nofollow noreferrer">mac mini</a>? Th...
4,265
<p>My MakerBot printer supports only two filaments at the same time.</p> <p>What are techniques to print objects with more than two colors for one object?</p>
<p>The most obvious solution is to pause the print and swap filament for another color.</p> <p>Another option is to <a href="https://www.youtube.com/watch?v=RdlqGR5n9Zk">splice pieces of filament</a> together, though this does not allow very precise control of when the switch happens. There is also a device that can a...
<p>Answering this question fully depends on the type of printer you have. Some printers have a pause capability, while others do not. Some have multiple extruders, while most do not. Some have a tube leading to the extruder and others do not. You specifically are asking about dealing with more than two colors when you ...
87
<p>In a language such as (since I'm working in it now) PHP, which supports procedural and object-oriented paradigms.</p> <p>Is there a good rule of thumb for determining which paradigm best suits a new project? If not, how can you make the decision?</p>
<p>It all depends on the problem you're trying to solve. Obviously you can solve any problem in either style (procedural or OO), but you usually can figure out in the planning stages before you start writing code which style suits you better.</p> <p>Some people like to write up use cases and if they see a lot of the s...
<p>If you're doing something for yourself, or if you're doing just a prototype, or testing an idea... use the free style that script languages gives you. </p> <p>After that: always think in objects, try to organize your work around the OO paradigm even if you're writing procedural stuff. Then, refactorize, refactorize...
2,600
<p>I'm looking for a desktop/embedded database. The two candidates I'm looking at are Microsoft SQL Server CE and Oracle Lite. If anyone's used both of these products, it'd be great if you could compare them. I haven't been able to find any comparisons online.</p> <p>The backend DB is Oracle10g.</p> <p><strong>Update...
<p>If the backend database is Oracle 10g it will probably be easier for you to use Oracle Lite - that way you don't have to use two completely different SQL dialects in the same project.</p> <p>BTW, In my product I use SQLite as the desktop database </p>
<p>You might want to look at Oracle XE. I cannot remember all of the differences, but O-Lite didn't fit my project needs. Oracle XE is a very good database for local development.</p> <p>Brad</p>
7,093
<p>My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development.</p> <p>Most of our other development is done using .NET. I'm trying to make a push to...
<p>I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in:</p> <ol> <li><p>Second mover adva...
<p>Flash Player is available &amp; supported officially in almost all desktop platforms (Windows, Linux, Mac) whereas Silverlight will be supported mainly in Windows.</p> <p>the following <a href="http://www.brighthub.com/internet/web-development/articles/33696.aspx" rel="nofollow noreferrer">article</a> provides compa...
4,127
<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've got a C++ program that uses SQLite. I want to store the SQL queries in a separate file -- a plain-text file, <em>not</em> a source code file -- but embed that file in the executable file like a resource.</p> <p>(This has to run on Linux, so I can't store it as an actual resource as far as I know, though that w...
<p>You can use objcopy to bind the contents of the file to a symbol your program can use. See, for instance, <a href="http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967" rel="noreferrer">here</a> for more information.</p>
<p>I have seen this to be done by converting the resource file to a C source file with only one char array defined containing the content of resource file in a hexadecimal format (to avoid problems with malicious characters). This automatically generated source file is then simply compiled and linked to the project. </...
9,824
<p>I am using an AnyCubic Photon Resin Printer. I have used the (<a href="https://wowmodelviewer.net" rel="nofollow noreferrer">WoW model viewer</a> to export a miniture that I am hoping to 3D print.</p> <p>However, when I look at the model in photon workshop, certain parts appear in a different colour, and those parts...
<p>Aligning build surfaces isn't the main issue with 1 mm thick surfaces when aligning four 200 x 200 mm surfaces to make one 400 x 400 surface. The main issue is slight bucking at the seams from thermal mismatch. Using this with PETG tends to tear up the build surface at the seams. The image shows aligned surfaces....
<p>I haven't tried such a thing, but a speculative answer covering the constraints and expected failure modes may suffice here.</p> <p>Unless the sheets have squared (rather than rounded) corners, the corners will almost certainly be a problem. In particular you'd end up with a hole right at the middle of the bed.</p> ...
1,756
<p>I have an app that I've written in C#/WinForms (<a href="http://www.thekbase.com" rel="nofollow noreferrer" title="TheKBase">my little app</a>). To make it cross-platform, I'm thinking of redoing it in Adobe AIR. Are there any arguments in favor of WinForms as a cross-platform app? Is there a cross-platform future f...
<p>As far as my experience in Flex/AIR/Flash actionscripting goes, Adobe AIR development environment and coding/debugging toolsets are far inferior to the Visual Studio and .NET SDK as of the moment. The UI toolsets are superior though.</p> <p>But as <em>you already have a working C# code</em>, porting it to ActionScr...
<p>I don't think there is a future for WinForms at all. Since it appears to have been a stop-gap solution even in MSFT world ( a very thin wrapper around Win32). And virtually no changes seem to have been made to System.Windows.Forms in both .NET 3.0 and 3.5</p> <pre><code>&lt;/speculation&gt; </code></pre> <p>I woul...
9,821
<p>I've got TotroiseSVN installed and have a majority of my repositories checking in and out from C:\subversion\ <em>and a couple checking in and out from a network share (I forgot about this when I originally posted this question)</em>.</p> <p>This means that I don't have a "subversion" server per-se.</p> <p>How do ...
<p>I've been investigating this issue and have managed to get it working. There are a couple of minor problems but they can be worked-around.</p> <p>There are 3 distinct parts to this problem, as follows:</p> <ol> <li><p><strong>The TortoiseSVN part</strong> - getting TortoiseSVN to insert the Bugid and hyperlink in...
<p>I am not sure I follow you. Do you have the repositories on the network or on your C:\ drive? According to two of your posts, you have both, or neither, or one of them or...</p> <p>You can not get VisualSVN or Apache to safely serve repositories from a network share. Since you originally said you had the repositori...
2,568
<p><code>NSInteger</code>/<code>NSUInteger</code> are Cocoa-defined replacements for the regular built-in types.</p> <p>Is there any benefit to using the NS* types over the built-ins? Which do you prefer and why? Are <code>NSInteger</code> and <code>int</code> the same width on 32-bit / 64-bit platforms?</p>
<p>The way I understand it is that NSInteger et al. are architecture safe versions of the corresponding C types. Basically their size vary depending on the architecture, but NSInteger, for example, is guaranteed to hold any valid pointer for the current architecture.</p> <p>Apple recommends that you use these to work ...
<p>I prefer the standard c style declarations but only because I switch between several languages and I don't have to think too much about it but sounds like I should start looking at nsinteger</p>
3,466
<p>In a JSP page, I created a <code>&lt;h:form enctype="multipart/form-data"&gt;</code> with some elements: <code>&lt;t:inputText&gt;</code>, <code>&lt;t:inputDate&gt;</code>, etc. Also, I added some <code>&lt;t:message for="someElement"&gt;</code> And I wanted to allow the user upload several files (one at a time) wit...
<p>The <em>forceId</em> attribute of the tomahawk components should solve this problem.</p> <p>something like:</p> <pre><code>&amp;lt;t:outputText id="xyz" forceId="true" value="#{mybean.stuff}"/&amp;gt; </code></pre> <p>At the first view of the page, if you press the "CREATE TICKET" button with nothing in any of th...
<p>The <em>forceId</em> attribute of the tomahawk components should solve this problem.</p> <p>something like:</p> <pre><code>&amp;lt;t:outputText id="xyz" forceId="true" value="#{mybean.stuff}"/&amp;gt; </code></pre> <p>At the first view of the page, if you press the "CREATE TICKET" button with nothing in any of th...
9,247
<p>I have an Ender 3 V1 with a glass Creality plate. I was having difficulty using manual levelling and my prints were struggling, so I ordered a 3DTouch. I have installed the 3DTouch and used Creality's BLTouch firmware. But my bed is still not level.</p> <p>So my build is an Ender 3 V1 with:</p> <ul> <li>Extruder upg...
<p>According to <a href="https://github.com/MarlinFirmware/Configurations/pull/633#issuecomment-995206382" rel="nofollow noreferrer">'The-EG' comment</a> in this GitHub issue, <a href="https://github.com/MarlinFirmware/Configurations/pull/633" rel="nofollow noreferrer">Add Creality Ender 2 Pro config #633</a>, you can ...
<p>MS35775 appears to be TMC208 compatible. You can find the data sheet on relmon.com here is the overview:</p> <ul> <li>2-Phase stepping motor peak current of 2A</li> <li>Step / dir interface 2, 4, 8, 16, or 32 microstep</li> <li>Internal 256 micro steps</li> <li>Quiet mode</li> <li>Fast mode</li> <li>HS Rdson 0.29 Ω...
2,074
<p>I've observed printing PETG that the primary if not the only reason for using a high bed temperature seems to be preventing the bed from acting as a huge heat sink and rapidly cooling the initial layers such that they don't bond well to each other. In particulat, the heat is not needed for adhesion-to-the-bed purpos...
<p>You can place a 2-4 mm thick MDF board on the bed and print directly on it, or you can place a 2 mm thick cork foil (IKEA office desk supplies) between magnetic plate and aluminium heater. The magnetic plate should not absorb too much heat and the cork will avoid conduction to the aluminium heater.</p> <p>If you wan...
<p>I’m pretty sure it can be brought separately but usually comes with a lot of heat-beds; It is a type of foam that has adhesive on one side and aluminum foil on the other. <a href="https://www.ebay.com.au/itm/3D-Printer-Parts-Heat-Insulation-Cotton-200-220-300mm-Foil-cotton-3D-printer-/193735774067?_trksid=p2349624.m...
1,945
<p>I am charged with designing a web application that displays very large geographical data. And one of the requirements is that it should be optimized so the PC still on dial-ups common in the suburbs of my country could use it as well.</p> <p>Now I am permitted to use Flash and/or Silverlight if that will help with ...
<p>Is something like <a href="http://gears.google.com/" rel="nofollow noreferrer">Gears</a> acceptable? This will let you store data locally to limit re-requests.</p> <p>I would also stay away from flash and Silverlight and go straight to javascript/AJAX. jQuery is a ton-O-fun.</p>
<p>I believe Microsoft's <a href="http://livelabs.com/seadragon/" rel="nofollow noreferrer">Seadragon</a> is your answer. However, I am not sure if that is available to developers.</p> <p>It looks like some of it has found its way into Silverlight</p>
4,808
<p>Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file. I'm using Visual Studio 2008</p> <p><strong>E...
<p>If you open the .aspx file and switch between design view and html view and back it will prompt VS to check the controls and add any that are missing to the designer file.</p> <p>In VS2013-15 there is a <strong>Convert to Web Application</strong> command under the <strong>Project</strong> menu. Prior to VS2013 th...
<ol> <li>replace your custom tag with a invalid tag name. Save it</li> <li>restore the invalid tag name back to custom tag name. Save it. Then you will be prompted to checkout the *.designer.cs files(or silently modify the designer.cs) and produce correct variable of custom tag control.</li> </ol>
6,717
<p>I know I need to have (although I don't know why) a <code>GROUP BY</code> clause on the end of a SQL query that uses any aggregate functions like <code>count</code>, <code>sum</code>, <code>avg</code>, etc:</p> <pre><code>SELECT count(userID), userName FROM users GROUP BY userName </code></pre> <p>When else would ...
<p>To retrieve the number of widgets from each widget category that has more than 5 widgets, you could do this:</p> <pre><code>SELECT WidgetCategory, count(*) FROM Widgets GROUP BY WidgetCategory HAVING count(*) &gt; 5 </code></pre> <p>The "having" clause is something people often forget about, instead opting to retr...
<p>GROUP BY also helps when you want to generate a report that will average or sum a bunch of data. You can GROUP By the Department ID and the SUM all the sales revenue or AVG the count of sales for each month.</p>
2,479
<p>I am trying to create a web application using Pylons and the resources on the web point to the <a href="http://pylonsbook.com/alpha1/authentication_and_authorization" rel="noreferrer">PylonsBook</a> page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work ea...
<p>Ok, another update on the subject. It seems that the cheeseshop template is broken. I've followed the chapter you linked in the post and it seems that authkit is working fine. There are some caveats:</p> <ol> <li>sqlalchemy has to be in 0.5 version</li> <li>authkit has to be the dev version from svn (easy_install a...
<p>This actually got me interested:<a href="http://groups.google.com/group/pylons-discuss/browse_thread/thread/644deb53612af362?hl=en" rel="nofollow noreferrer">Check out this mailing on the pylons list</a>. So AuthKit is being developed, and I will follow the book and get back on the results.</p>
7,006
<p>I'm thinking of starting a wiki, probably on a low cost LAMP hosting account. I'd like the option of exporting my content later in case I want to run it on <code>IIS/ASP.NET</code> down the line. I know in the weblog world, there's an open standard called BlogML which will let you export your blog content to an <str...
<p>The correct answer is ... "it depends".</p> <p>It depends on which wiki you're using or planning to use. I've used various over the years <a href="http://moinmo.in/" rel="noreferrer">MoinMoin</a> was ok, used files rather than database, <a href="https://help.ubuntu.com/" rel="noreferrer">Ubuntu</a> seem to like it...
<p>I haven't heard of WikiML.</p> <p>I think your biggest obstacle is gonna be converting one wiki markup to another. For example, some wikis use markdown (which is what Stack Overflow uses), others use another markup syntax (e.g. BBCode, ...), etc.. The bottom line is - assuming the contents are databased it's not im...
5,980
<p>I have been trying to print an object that is 4 inches tall. About at 3 inches it falls off the bed. I am using tape on the heated bed and right before the print I am wiping the bed with rubbing alcohol. After the first time I tried hot gluing it to the bed when it was mid way through so that it wouldn't fall off bu...
<p>Even though knowing the model of printer is slightly helpful, it's not critical to making your print work. Your PLA manufacturer should have recommendations for both the bed temperature and the nozzle temperature. Is your print bed glass or metal?</p> <p>As an example, my bed is glass and I set the temperature to 7...
<p>If you have a dual-extruder printer, your second nozzle could be hitting the part. As the print grows taller, each hit with the nozzle has more chance to knock the part off the build plate.</p> <p>This can happen from some of the following reasons:</p> <ul> <li>Nozzles aren't level to each other</li> <li>Build pla...
530
<p>Does anyone know if silverlight plugs into chrome, or when they plan to support it?</p>
<p>This guy have had partial success with silverlight in chrome, but it does not seem to be supported:</p> <p><a href="http://wildermuth.com/2008/09/02/Silverlight_2_and_Google_Chrome" rel="nofollow noreferrer">http://wildermuth.com/2008/09/02/Silverlight_2_and_Google_Chrome</a></p> <p>From The Microsoft Silverlight ...
<p>Silverlight already works with web-kit, and since Google's Chrome is based on web-kit, it shouldn't be too much effort to get it working.</p> <p>Indeed, <a href="http://bits.samiq.net/2008/09/silverlight-and-flash-running-on-google.html" rel="nofollow noreferrer">this</a> gentleman seems to have had some success.</...
7,322
<p>I need to grab the <code>base64-encoded</code> representation of the <code>ViewState</code>. Obviously, this would not be available until fairly late in the request lifecycle, which is OK.</p> <p>For example, if the output of the page includes:</p> <pre><code>&lt;input type="hidden" name="__VIEWSTATE" id="__VIE...
<p>Rex, I suspect a good place to start looking is solutions that <strong>compress the ViewState</strong> -- they're grabbing ViewState on the server before it's sent down to the client and gzipping it. That's exactly where you want to be.</p> <ul> <li><a href="http://www.hanselman.com/blog/CommentView,guid,febce059-7...
<p>See this <a href="http://aspguy.wordpress.com/2008/07/09/reducing-the-page-size-by-storing-viewstate-on-server/" rel="nofollow noreferrer">blog post</a> where the author describes a method for overriding the default behavior for generating the ViewState and instead shows how to save it on the server Session object.<...
2,341
<p>An <a href="https://stackoverflow.com/questions/15241/does-anyone-have-any-real-world-experience-of-csla#15357">answer</a> to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP).</p> <p><strong>Is the Single Responsibility Principl...
<p>Very few rules, if any, in software development are without exception. Some people think there are no place for <em>goto</em> but they're wrong. </p> <p>As far as OOP goes, there isn't a single definition of object-orientedness so depending on who you ask you'll get a different set of hard and soft principles, patt...
<p>SRP is just another expression of ISP :-) . </p> <p>And the "P" means "principle" , not "rule" :D </p>
3,624
<p>I am trying to implement an "out of proc" COM server written in C#. How do I do this?</p> <p>I need the C# code to be "out of proc" from my main C++ application, because I cannot load the .NET runtime into my main process space </p> <p><em>WHY?:</em><br> My C++ code is in a DLL that is loaded into many different ...
<p>You can create COM+ components using System.EnterpriseServices.ServicedComponent. Consequently, you'll be able to create out-of-proc and in-proc (client) component activation as well as all COM+ benefits of pooling, remoting, run as a windows service etc.</p>
<p>I cannot recommend this as <em>the way</em>, but you could create a COM-callable wrapper for your C# library, then create a VB6 ActiveX exe project that delegates calls to your C# library.</p>
5,053
<p>It is very easy to ask questions that only tangentially involve 3D printing, such as:</p> <ul> <li><p>How do I drill a hole in a 3D printed part?</p></li> <li><p>How do I paint 3D printed parts?</p></li> <li><p>How do I sand, smooth, etc...?</p></li> <li><p>How do I take a picture with a 3D printed camera?</p></li>...
<p>The dividing line of "tangentially off topic" is typically when the <em>actual</em> subject of the question being asked is only <strong><em>coincidentally</em></strong> adjacent to 3D printing. </p> <p>Here is a <em>clear</em> example illustrating the "tangential issue:"</p> <blockquote> <p>I printed a crane mec...
<p>The problem with the questions you raised are (except for the camera one) that they are all about dealing with the materials that are used with 3D-printing and not about the mechanics of printing. But when I started 3D-printing, that's certainly where a large part of my questions lay. It's because the materials are ...
7
<p>As <a href="https://blog.stackoverflow.com/2008/09/podcast-20/">Jeff Atwood asked</a>: &quot;What’s your logging philosophy? Should all code be littered with <code>.logthis()</code> and <code>.logthat()</code> calls? Or do you inject logging after the fact somehow?&quot;</p>
<p>My logging philosophy is pretty easily summarized in four parts:</p> <p>Auditing, or business logic logging</p> <blockquote> <p>Log those things that are required to be logged. This comes from the application requirements, and may include logging every change made to any database (as in many financial applications)...
<p>I agree with Adam, but I also would consider logging things of interest or things that you can demonstrate as achievements as a kind of proof of them happening.</p>
6,633
<p>This one has me stumped regularly while creating top level class diagrams for documentation. Methods and attributes/fields are easy to model. I usually end up adding a method named EvChanged to indicate a .Net event Changed.</p> <p>What is the right way to show that a type publishes a specific event?</p>
<p>Just add an «event» stereotype to a classifier attribute.</p>
<p>Not the type of answer that I like to give, but <a href="http://office.microsoft.com/en-us/visio/HP815503691033.aspx" rel="nofollow noreferrer">Microsoft</a> has an answer on the Office website.</p>
7,452
<p>I am playing with Microsoft's TreeView control and I am trying to force a data update of some sorts while editing a node's label, similar to UpdateData for a grid.</p> <p>Basically, in my editor, I have a Save button and this TreeView control: what I want is when I am editing a node's label in the TreeView, if I cl...
<p><code>volatile</code> is needed if you are reading from a spot in memory that, say, a completely separate process/device/whatever may write to.</p> <p>I used to work with dual-port ram in a multiprocessor system in straight C. We used a hardware managed 16 bit value as a semaphore to know when the other guy was don...
<p>One use I should remind you is, in the signal handler function, if you want to access/modify a global variable (for example, mark it as exit = true) you have to declare that variable as 'volatile'.</p>
9,816
<p>I need to display a variable-length message and allow the text to be selectable. I have made the TextBox ReadOnly which does not allow the text to be edited, but the input caret is still shown. </p> <p>The blinking input caret is confusing. How do I hide it?</p>
<p>You can do through a win32 call</p> <pre><code>[DllImport("user32.dll")] static extern bool HideCaret(IntPtr hWnd); public void HideCaret() { HideCaret(someTextBox.Handle); } </code></pre>
<p>AFAIK, this <strong>cannot</strong> be done. The TextBox control is a funny control because it actually has a <em>lot</em> of behaviour that can't be modified due to the way it taps into the operating system. This is why many of the cool custom TextBoxes are written from scratch.</p> <p>I am afraid you may not be a...
6,579
<p>And if you do, can you give some background information on the implementation and the reasons for implementing this pattern?</p> <p>The pattern is described in more detail in these articles:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/ms997506.aspx" rel="nofollow noreferrer">Microsoft Inductive U...
<p>Yes - we had a problem in that many of the administrators of our software found it too difficult to use. To solve this we used Microsoft's WinForms IUI framework build a new configuration and management tool for our software. </p> <p>User feedback has been extremely positive, particularly with everything being task...
<p>You should be careful about making a too simple system. Expert users (bankers, insurers, CRMs, etc) should have as much information an possibilites on the screen as possible. Proceeding through forms that validate slowly has been found to be annyoing if you use that form several times during the workday.</p>
9,620
<p>Is anyone else having trouble running Swing applications from IntelliJ IDEA 8 Milestone 1? Even the simplest application of showing an empty JFrame seems to crash the JVM. I don't get a stack trace or anything, it looks like the JVM itself crashes and Windows shows me a pop-up that says the usual "This process is ...
<p>Ask your question directly on the IDEA website. They always react fast and the problem you have is probably either fixed or documented.</p>
<p>IDEA 8 Milestone 1 is a beta(ish) "based on a new platform". This may have changed the way that swing is handled. Also you are running a beta JDK.</p> <p>You will probably get more help/submit a bug at the Jetbrain forums unless they are on SO also. <a href="http://www.jetbrains.net/jira/browse/IDEA/" rel="nofollow...
4,185
<p>We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE.</p>
<p>It's a bootstrapper that checks to make sure that the .NET Framework is installed, before launching the MSI. It's pretty handy.</p> <p>I suggest using something like SFX Compiler to package the two together into one self-extracting .exe and then launch the extracted setup.exe. This way you retain the benefits of th...
<p>I think the EXE is just a wrapper/bootstrapper for the MSI in case you don't have Window Installer. If you have the requisite Windows Installer version installed then the MSI should work fine on its own.</p>
6,381
<p>I have a method in .NET (C#) which returns <code>string[][]</code>. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning:</p> <blockquote> <p>WARNING: There is no marshaling support for nested arrays.</p> </blockquote> <p>This w...
<p>Even if you were to return an Object (which maps to a Variant in COM Interop), that doesn't solve your problem. VB will be able to "hold" onto it and "pass it around", but it won't be able to do anything with it.</p> <p>Technically, there is no exact equivalent in VB for a string[][]. However, if your array is not ...
<p>The equivalent of variant in C# is System.Object. So you might want to try to return the result cast to object and pick it back up on the other side as a variant.</p> <p>VB doesn't have any facilities that C# lacks, so I doubt it would be better or easier if the .NET side was written in VB.</p>
9,590
<p>I am writing a DDL script to drop a number of tables but need to identify all dependencies for those tables first. Those dependencies include foreign key constraints, stored procedures, views, etc. Preferably, I want to programmatically script out dropping those dependencies using the system tables/views before drop...
<p>This is extremely messy to write from scratch. Have you considered a 3rd party tool like <a href="http://www.red-gate.com/products/SQL_Dependency_Tracker/index.htm" rel="nofollow noreferrer" title="Red-Gate SQL Dependency Tracker">Red-Gate SQL Dependency Tracker</a>?</p>
<p>You can use the sp_depends stored procedure to do this:</p> <p><code>USE AdventureWorks GO EXEC sp_depends @objname = N'Sales.Customer' ;</code></p> <p><a href="http://msdn.microsoft.com/en-us/library/ms189487(SQL.90).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms189487(SQL.90).aspx</a>...
7,648
<p>I'm working on some code to colorize an image in Java. Basically what I'd like to do is something along the lines of GIMP's colorize command, so that if I have a BufferedImage and a Color, I can colorize the Image with the given color. Anyone got any ideas? My current best guess at doing something like this is to ge...
<p>Let <code>Y = 0.3*R + 0.59*G + 0.11*B</code> for each pixel in the image, then set them to be</p> <p><code>((R1+Y)/2,(G1+Y)/2,(B1+Y)/2)</code></p> <p>if <code>(R1,G1,B1)</code> is what you are colorizing with.</p>
<p>I wanted to do the exact same thing as the question poster wanted to do but the above conversion did not remove colors like the GIMP does (ie green with a red overlay made an unpleasant brown color etc). So I downloaded the source code for GIMP and converted the c code over to Java.</p> <p>Posting it in this thread...
4,362
<p>I have issues with this overhang:</p> <p><a href="https://i.stack.imgur.com/7dMhQ.jpg" rel="nofollow noreferrer" title="Damaged overhang"><img src="https://i.stack.imgur.com/7dMhQ.jpg" alt="Damaged overhang" title="Damaged overhang"></a></p> <p>The whole part always breaks in this overhang during the print.</p> <...
<p>When you get upwards facing things failing it can be because the slicer has too few top layers which makes angled faces have gaps. While you may think it is a wall the slicer sees it as top layer. Try increasing the number of top layers and check in the preview how it appears.</p> <p>Infill will normally support th...
<p>As @r-ahlskog pointed out, it was due to the top layers count being too low. Adding some, now it looks perfect:</p> <p><a href="https://i.stack.imgur.com/DEdbO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DEdbO.jpg" alt="enter image description here"></a></p>
1,383
<p>Surprisingly as you get good at vim, you can code even faster than standard IDEs such as Eclipse. But one thing I really miss is code completion, especially for long variable names and functions.</p> <p>Is there any way to enable code completion for Perl in vim?</p>
<p><kbd>Ctrl</kbd>-<kbd>P</kbd> (Get Previous Match) and <kbd>Ctrl</kbd>-<kbd>N</kbd> (Get Next Match) are kind of pseudo code completion. They basically search the file (Backwards for <kbd>Ctrl</kbd>-<kbd>P</kbd>, Forwards for <kbd>Ctrl</kbd>-<kbd>N</kbd>) you are editing (and any open buffers, and if you are using T...
<p><kbd>Ctrl</kbd>+<kbd>N</kbd></p> <p>This is explained in the Perl Hacks book, along with how to do Package completion. Highly recommended.</p>
7,771
<p>I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory.</p> <p>To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know which dependency in my pom.xml brings that.</p>
<p>To add to @David Crow, here's <a href="http://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html" rel="noreferrer">a dependency:tree example</a> from the Maven site:</p> <pre><code>mvn dependency:tree -Dincludes=velocity:velocity </code></pre> <p>might output</p> <pre><co...
<p>The dependency information is also included in the Project Information/Dependencies report if you have maven generate a site for the project, using mvn site.</p>
5,432
<p>Say you have 2 database servers, one database is the 'master' database where all write operations are performed, it is treated as the 'real/original' database. The other server's database is to be a mirror copy of the master database (slave?), which will be used for read only operations for a certain part of the ap...
<p>What you want is called Transactional Replication in SQL Server 2005. It will replicate changes in near real time as the publisher (i.e. "master") database is updated.</p> <p><a href="http://blogs.techrepublic.com/howdoi/?p=123" rel="nofollow noreferrer">Here is a pretty good walk through of how to set it up.</a><...
<p>The answer to this will vary depending on the database server you are using to do this.</p> <p>Edit: Sorry, maybe i need to learn to look at the tags and not just the question - i can see you tagged this as sqlserver.</p>
3,403
<p>We're looking at moving from a check-out/edit/check-in style of version control system to Subversion, and during the evaluation we discovered that when you perform an Update action in TortoiseSVN (and presumably in any Subversion client?), if changes in the repository that need to be applied to files that you've bee...
<p>The best way around this is to educate the developers. After you do an update in TortoiseSVN it shows you a list of affected files. Simply double clicking each file will give you the diff between them. Then you'll be able to see what changed between your version and the latest repository version.</p>
<p>This is why automated (unit) testing is a fundamental part of distributed software development. In the example you give, at least one unit test should fail on svn update and alert you to the error.</p> <p>Remember what Subversion is: a version control system, not a perfectly-working-code-merging-tool.</p>
7,735
<p>Right up front: I do <em>not</em> want to start a religious war.</p> <p>I've used <em>vi</em> for as long as I can remember, and the few times I've tried to pick up <em>Emacs</em> I've been so lost that I've quickly given up. Lots of people find Emacs very powerful, however. Its programmability is somewhat legendar...
<p>I prefer emacs to vi, but I'm comfortable in both. </p> <p>There are some things that you can do in emacs that make it more powerful than vi, but not all of them are even programming-related. (Can you send email or read news from within vi? No, but who cares?) If you're comfortable with lisp (I'm not), you might be...
<p>I really see no reason to switch. I've used vi for a long time and am quite comfortable with it; about every six months I would install emacs to give it a go, then quickly just switch back. Yes there were things I much preferred about vi, but the main reason I never stuck with it is because the time investment to ...
7,036
<p>What is the best way to use multiple EVAL fields in a GridView ItemTemplate?</p> <p>Looking to have some control over formatting for appearance as well as setting up hyperlinks/javascript etc.</p>
<p>Even clearer, IMO, is:</p> <pre><code>&lt;%# String.Format("{0} - {1}", Eval("Name1"), Eval("Name2")) %&gt; </code></pre>
<p>I have a easiest way to do this same thing...</p> <pre><code>&lt;asp:Label ID="lblName" runat="server" Text='&lt;%#Eval("FirstName").ToString() +", "+ Eval("LastName").ToString() %&gt;'&gt;&lt;/asp:Label&gt; </code></pre> <p>.</p> <pre><code>&lt;%#Eval("FirstName").ToString() +", "+ Eval("LastName").ToString() %&...
7,941
<p>Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python.</p>
<p>Use <a href="http://lxml.de/" rel="nofollow noreferrer">lxml</a> which is the best xml/html library for python.</p> <pre><code>import lxml.html t = lxml.html.fromstring("...") t.text_content() </code></pre> <p>And if you just want to sanitize the html look at the lxml.html.clean <a href="http://lxml.de/lxmlhtml.ht...
<p>Regular expressions are not scary, but writing your own regexes to strip HTML is a sure path to madness (and it won't work, either). Follow the path of wisdom, and use one of the many good HTML-parsing libraries.</p> <p>Lucas' example is also broken because "sub" is not a method of a Python string. You'd have to ...
5,819
<p>What is the best approach to define additional data for typedef enums in C?</p> <p>Example:</p> <pre><code>typedef enum { kVizsla = 0, kTerrier = 3, kYellowLab = 10 } DogType; </code></pre> <p>Now I would like to define names for each, for example <code>kVizsla</code> should be "vizsla". I currently use a f...
<p>@dmckee: I think the suggested solution is good, but for simple data (e.g. if only the name is needed) it could be augmented with auto-generated code. While there are lots of ways to auto-generate code, for something as simple as this I believe you could write a simple XSLT that takes in an XML representation of the...
<p>That's kind of an open ended question, but one suggestion would be to use a map with the enum as the key type and the extra information in the value. (If your indices are continuous, unlike the example, you can use a sequence container instead of a map).</p>
5,657
<p>I'm working on a program that will be processing files that could potentially be 100GB or more in size. The files contain sets of variable length records. I've got a first implementation up and running and am now looking towards improving performance, particularly at doing I/O more efficiently since the input file g...
<p>I was trying to find the final word on mmap / read performance on Linux and I came across a nice post (<a href="http://marc.info/?l=linux-kernel&amp;m=95496636207616&amp;w=2" rel="noreferrer">link</a>) on the Linux kernel mailing list. It's from 2000, so there have been many improvements to IO and virtual memory in...
<p>I think the greatest thing about mmap is potential for asynchronous reading with:</p> <pre><code> addr1 = NULL; while( size_left > 0 ) { r = min(MMAP_SIZE, size_left); addr2 = mmap(NULL, r, PROT_READ, MAP_FLAGS, 0, pos); if (addr1 != NULL) { ...
6,800
<p>I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page. </p> <p>I think my header control which displays static content and my footer control could benefit from being cached. </p> <p>How can I go about caching just those controls?</p>
<p>Take a look <a href="https://web.archive.org/web/20081207012138/http://asp.dotnetheaven.com/aspnet/doc/caching/fragment.aspx" rel="nofollow noreferrer">here</a><br> You can use <code>VaryByParam</code> and <code>VaryByControl</code> in the output cache.</p>
<p>I think you can specify OutputCache in the control's markup file like you'd do on an ASPX page. And it'd get properly cached automatically.</p> <p>Just read up on OutputCache page directive on MSDN and get the parameters right and it should do what you want it to.</p> <p>It's been a long time since I write classic...
6,649
<p>When double-probing, sometimes the BLTouch will hit the bed before the z-axis goes down:</p> <ol> <li>The BLTouch deploys </li> <li>The bed goes up</li> <li>The sensor triggers</li> <li>The BLTouch stows</li> <li>The BLTouch deploys and crashes the bed before the z-axis goes down for the second probe</li> </ol> <p...
<p>First, make sure to check if stow, deploy and the trigger are working correctly.</p> <p>Second, check the pins files to make sure you put it in the correct pins. Black and White probe pin might need to go to Z-min or probe pin depending on. Make sure to check that.</p> <p>Third, add "BLTOUCH delay". It might be tr...
<p>This sounds like the firmware setting for your BLtouch is not set up properly. Look at the line in Config H where it deploys the BLtouch. make sure nothing is commented out and that the 2nd deploy is shown. </p>
1,224
<p>I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they need to do, and then come back to the pages w/ links, they are at the same (x-y) location in the browser they were before. How do I do that?</p> <p>I'm a DOM Newbie so I don't know too much about how to do this. </p> <...
<p>To get the x-y location of where a user clicked on a page, use the following jQuery code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function(){ ...
<p>you can use offsetLeft and offsetTop</p>
9,323
<p>I have a column which is of type nvarchar(max). How do I find the length of the string (or the number of bytes) for the column for each row in the table?</p>
<blockquote> <p>SELECT LEN(columnName) AS MyLength FROM myTable</p> </blockquote>
<p>If you want to find out the max there should be a way for you to get the schema of the table. Normally you can do something like <a href="http://dev.mysql.com/doc/refman/5.0/en/show-columns.html" rel="nofollow noreferrer">SHOW COLUMNS</a> in SQL or a <a href="http://dev.mysql.com/doc/refman/5.0/en/describe.html" re...
5,719
<p>I have a directory with PDF files that I need to create an index for. It is a PHP page with a list of links:</p> <pre><code>&lt;A HREF="path to file"&gt;filename&lt;/A&gt; </code></pre> <p>The filenames can be complicated:</p> <pre><code>LVD 2-1133 - Ändring av dumpningslina (1984-11-20).pdf </code></pre> <p>Wha...
<p>You can use <a href="http://php.net/manual/en/function.rawurlencode.php" rel="nofollow noreferrer">rawurlencode()</a> to convert a string according to the RFC 1738 spec. This function replaces all non-alphanumeric characters by their associated code.</p> <p>The difference with <a href="http://php.net/manual/en/func...
<p><a href="http://se.php.net/manual/en/function.urlencode.php" rel="nofollow noreferrer">urlencode()</a> should probably do what you want.</p> <p><strong>Edit</strong>: urlencode() works fine on swedish characters.</p> <pre><code> &lt;?php echo urlencode("åäö"); ?&gt; </code></pre> <p>converts to...
5,547
<p>As part of improvements to our build process, we are currently debating whether we should have separate project/solution files on our CI production environment from our local development environments.</p> <p>The reason this has come about is because of reference problems we experienced in our previous project. On ...
<p>In our largest project (a system comprising of many applications) we have the following structure</p> <blockquote> <p>/3rdPartyAssemblies<br/> /App1<br/> /App2<br/> /App3<br/> /.....</p> </blockquote> <p>All external assemblies are added to 3rdPartyAssemblies/Vendor/Version/...</p> <p>We have a CoreBuild.sln fi...
<p>Usually, you would be creating Build projects/scripts in some form or another for your Production, and so putting together another Solution file doesn't come in the picture.</p> <p>It would be easier to train everyone to use project references, and create a directory under the project file structure for external as...
3,547
<p>I downloaded and installed the Aptana Studio free version. But apparently, to install the Radrails plugin for ruby on rails development you have to connect to the internet. I don't have internet on my machine right now. So is there a way I could download the installer from another machine and copy it over my existin...
<p>I wrote down <a href="http://madcoderspeak.blogspot.com/2008/02/showmethemoney-15-aptana-radrails-hell.html" rel="nofollow noreferrer">my duel with Aptana Rails</a> - See if this helps you. There is a link on manual installation that may be what you're looking for.</p>
<p>If you're able to actually install it on the machine with the Internet connection, then you can simply copy over the directory you installed it in. Eclipse installations are completely self-contained in their installation directories.</p>
5,418
<p>I am printing a print using PLA on a Prusa i3 printer and an MK8 extruder, at 210 degrees celsius, 60 mm/sec, sliced with slic3r. The print consists of a base, with 4 tower-like projections that then join with a near-vertical overhang slope that isn't posing a problem for my printer.</p> <p>However, even before the...
<p>Stringing is often a result of too-high a temperature, or insufficient retraction. When there is highly liquid filament in the nozzle tip, it can adhere to the remainder of the print while dripping as the nozzle moves, leading to a thin string of the filament forming. As further travel moves are performed in each la...
<p>Here's just a few of the things you might want to look into.</p> <ul> <li>plastic - some plastic types are more stringy than others and there's also variation between brands and colors.</li> <li>moisture in filament - water turning to steam tends to cause the extruder to ooze when it isn't printing, which can cause...
99
<p>I want to get my Ender 5 plus to print at 300 °C. As such, I've edited the firmware and increased the <code>HEATER_0_MAXTEMP</code> to 315 °C.</p> <p>In my slicer, I can slice and print at 300 °C, however, I cannot manually adjust the temperature on the LCD screen past the stock setting of 260 °C.</p> <p>Any help in...
<p>Your formula doesn't seem to take into account two important factors: layer height and average speed.</p> <p>Do the math differently:</p> <p>voumetric flow rate [mm^3/s] = layer height [mm] * line width [mm] * speed [mm/s]</p> <p>For example, 0.2 * 0.45 * 70 = 6.3 mm^3/s</p> <p>which is realistic, the extruder on th...
<p>Your math looks correct, and is also a good approximation for what I've seen in the first few weeks with my own Ender 3.</p> <p>Another way to calculate (to check yourself) is to calculate the volume extruded (nozzle area times extrusion percentage times print speed -- be sure you convert everything to the same unit...
1,951
<p>Using Oracle 10g, accessed via Perl DBI, I have a table with a few tens of million rows being updated a few times per second while being read from much more frequently form another process.</p> <p>Soon the update frequency will increase by an order of magnitude (maybe two). Someone suggested that committing every N...
<p>A commit results in Oracle writing stuff to the disk - i.e. in the redo log file so that whatever the transaction being commited has done can be recoverable in the event of a power failure, etc. Writing in file is slower than writing in memory so a commit will be slower if performed for many operations in a row rath...
<blockquote> <p>Faster/Slower? </p> </blockquote> <p>It will probably be a little faster. However, you run a greater risk of running into deadlocks, losing uncommitted changes should something catastrophic happen (cleaning lady unplugs the server), FUD, Fire, Brimstone, etc.</p> <blockquote> <p>Why would it help...
5,319
<p>I just finish building a Graber i3 printer from mixed parts (a MDF clone of Prusa i3 MK2). For the hotend, I've bought the Greetech MK8 extruder. However, the temperature sensor is driving me up the wall.</p> <p>I've already checked the wires and connections, but the darn thing keeps showing a steady 500 degrees Ce...
<p>A brand new thermistor shows about 95-105k ohm (depends on the multimeter quality), so it looks like that one is out of the range. To be sure that it is a thermistor, you could connect a 100k potentiometer, play with it and see readings on the lcd. If the readings are OK, then mainboard is good so replace the thermi...
<p>If your printer is a cheap one that uses a ribbon cable or other combined cables, verify your thermal sensor's polarity. I know, I know - it's a resistor (in most cases) and that means there's no such thing as polarity. Bear with me - I just helped a friend diagnose his printer (Geeetech, for the record) for showing...
850
<p>We're working on an application that displays information through a Direct3D visualisation. A late client request is the ability to view this application via some Remote Desktop solution.</p> <p>Has anyone done anything similar? What options are available / unavailable? I'm thinking RDC, VNC, Citrix...</p> <p>Any ...
<p>I think you can still use all of the normal D3D tools, but you won't be able to render to a surface associated with the screen. You'll have to render to a DIB (or some such) and Blt it with GDI to a normal window HDC. RDC/VNC/Citrix should all work with this technique.</p> <p>Performance will definitely suffer - bu...
<p>The build-in remote desktop works. (You don't have to do anything special)</p> <p>But it is extremely slow, because when in doubt, it just sends the contents of a window as a bitmap.</p>
5,720
<p>In my ASP.NET User Control I'm adding some JavaScript to the <code>window.onload</code> event:</p> <pre><code>if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), onloadScriptName)) Page.ClientScript.RegisterStartupScript(this.GetType(), onloadScriptName, "window.onload = function() {myFunction()...
<p>Most of the "solutions" suggested are Microsoft-specific, or require bloated libraries. Here's one good way. This works with W3C-compliant browsers and with Microsoft IE.</p> <pre><code>if (window.addEventListener) // W3C standard { window.addEventListener('load', myFunction, false); // NB **not** 'onload' } els...
<p>I don't know a lot about ASP.NET, but why not write a custom function for the onload event that in turn calls both functions for you? If you've got two functions, call them both from a third script which you register for the event.</p>
3,085
<p>I'm building small web site in Java (Spring MVC with JSP views) and am trying to find best solution for making and including few reusable modules (like "latest news" "upcoming events"...).</p> <p>So the question is: Portlets, tiles or some other technology?</p>
<p>If you are using Spring MVC, then I would recommend using Portlets. In Spring, portlets are just lightweight controllers since they are only responsible for a fragment of the whole page, and are very easy to write. If you are using Spring 2.5, then you can enjoy all the benefits of the new annotation support, and th...
<p><a href="http://tapestry.apache.org" rel="nofollow noreferrer">Tapestry</a> is a Java web app framework with an emphasis on easily creating reusable components.</p> <p>I have used sitemesh, and it is good for wrapping a set of pages in standard headers and footers, but Tapestry is better for creating components whi...
9,721
<p>I have a databound TextBox in my application like so: (The type of <code>Height</code> is <code>decimal?</code>)</p> <pre class="lang-xml prettyprint-override"><code> &lt;TextBox Text=&quot;{Binding Height, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ...
<p>You can force the keyboard focus to stay on the <code>TextBox</code> by handling the <code>PreviewLostKeyBoardFocus</code> event like this:</p> <pre class="lang-xml prettyprint-override"><code> &lt;TextBox PreviewLostKeyboardFocus=&quot;TextBox_PreviewLostKeyboardFocus&quot; /&gt; </code></pre> <pre class="lang...
<p>It sounds to me that you'll want to handle two events:</p> <p>GotFocus: Will trigger when the textbox gains focus. You can store the initial value of the box.</p> <p>LostFocus: Will trigger when the textbox loses focus. At this point you can do your validation and decide if you want to roll back or not.</p>
6,605
<p>I'm using MySQL in particular, but I'm hoping for a cross-vendor solution. I'm using the NOW() function to add a timestamp as a column for each record.</p> <pre><code>INSERT INTO messages (typeId, messageTime, stationId, message) VALUES (?, NOW(), ?, ?) </code></pre>
<pre><code>SELECT * FROM messages WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY) &lt;= messageTime </code></pre>
<p>There is no cross database solution, as most of them have their own date handling (and mainly interval representation) syntax and semantics. </p> <p>In <code>PostgreSQL</code> it would be</p> <pre><code>SELECT * FROM messages WHERE messagetime &gt;= messagetime - interval '1 day' </code></pre>
8,401
<p>So I want to get a project on a distributed version control system, such as mercurial, git, or bazaar. The catch is that I need the Windows support to be good, i.e. no instructions that start off with "install cygwin...". Now I've <em>heard</em> that git's Windows support is decent these days, but don't have any f...
<p>I use <a href="http://code.google.com/p/msysgit/" rel="nofollow noreferrer">msys-git</a> on windows every single day. Works fast and flawlessly.</p> <p>Although the newer build has some problems with git-svn, <a href="http://msysgit.googlecode.com/files/Git-1.5.5-preview20080413.exe" rel="nofollow noreferrer">this ...
<p>In my experience using GIT on windows is a major pain. But I have been using Fossil SCM for some time now, and I think it actually fits your needs exactly.</p> <p>It also has a built in Ticket system and a Wiki. And the whole program is contained in 1 file and it works right out of the box.</p> <p>I totally reco...
2,669
<p>How does the compiler know the prototype of sleep function or even printf function, when I did not include any header file in the first place?</p> <p>Moreover, if I specify <code>sleep(1,1,"xyz")</code> or any arbitrary number of arguments, the compiler still compiles it. But the strange thing is that gcc is able t...
<p>Lacking a more specific prototype, the compiler will assume that the function returns int and takes whatever number of arguments you provide.</p> <p>Depending on the CPU architecture arguments can be passed in registers (for example, a0 through a3 on MIPS) or by pushing them onto the stack as in the original x86 ca...
<p>Depends on the compiler, but with gcc (for example, since that's the one you referred to), some of the standard (both C and POSIX) functions have builtin "compiler intrinsics". This means that the compiler library shipped with your compiler (libgcc in this case) contains an implementation of the function. The comp...
9,436
<p>A problem I ran into a while back I never found a good solution for...</p> <p>Say you have a working copy checked out from subversion at revision 7500, and the disk holding the current repository dies. You've got a backup of the repository at, say, revision 7450. It's easy to restore the repository backup, but any ...
<p>You could check out a rev.7450 copy somewhere, then export your 7500 copy (to remove the .svn folders). Drag the exported copy (which is the latest copy) over the 7450 copy. All the new files should simply overwrite the older ones, leaving the .svn folders the same. </p> <p>Subversion will assume you just made a bu...
<p>If you are positive you've got the latest version in your directory, then do this:</p> <ol> <li>Delete the item from the repository</li> <li>Delete the SVN references from your copy</li> <li>Check your code in as a new copy.</li> <li>Check out the code you just checked in</li> </ol>
8,047
<p>I have an SKR PRO control board with a dead (shorted, it's burning hot) main processor. I ordered a new board, it was my mistake.</p> <p>The voltage regulators work, so I ordered a replacement STM32F407 processor from STM (a free sample actually) and I'll repair the board in my free time.</p> <p>How can I test all p...
<p>&quot;Completely&quot; is always relative, but for water at the pressures involved it's probably achievable. Normally you need some sort of <em>gasket</em> (material that can bend/compress to slight imperfections in the mating surfaces), and a means of holding the two surfaces tight against the gasket, to get such a...
<p>I know this sounds obvious, but given the box has holes in the top – does it only need to be watertight when it's the right way up? If not, you could just do something like:</p> <p><a href="https://i.stack.imgur.com/JXft9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JXft9.jpg" alt="enter image...
1,765
<p>I am trying to control a laser with the fan (D9) and ran into problems. So I tried P44, no good then P6 also not good.\ What my problem is I am trying to "burn" a group of vertical lines spaced about 0.75" apart, and randomly the drive to the laser power supply is either "skipping" (missing the control pulse) or str...
<p>Thank you all for your suggestions and help.</p> <p>It appears that I was just running the printer too fast and slowing it down to about 10% of my original speed "fixed" my problem. I don't know where i got the rediculous speed from, but 1200 mm/min is WAY too fast. More like 150 to maybe 200 mm/min is what it shou...
<p>This is a stab in the dark but maybe the Arduino (clone or genuine) and RAMPS1.4 combination is not powerful enough to handle the calculations required to control the laser and printing simultaneously (although I can't really see why the additional processing to control a laser would be over taxing the processor. Ho...
650
<p>As an example take the following code:</p> <pre><code>public enum ExampleEnum { FooBar, BarFoo } public class ExampleClass : INotifyPropertyChanged { private ExampleEnum example; public ExampleEnum ExampleProperty { get { return example; } { /* set and notify */; } } } </code></pre> <p>I want a to d...
<p>You can create a custom markup extension.</p> <p>Example of usage:</p> <pre><code>enum Status { [Description(&quot;Available.&quot;)] Available, [Description(&quot;Not here right now.&quot;)] Away, [Description(&quot;I don't have time right now.&quot;)] Busy } </code></pre> <p>At the top of y...
<p>Try using </p> <pre><code>&lt;ComboBox ItemsSource="{Binding Source={StaticResource ExampleEnumValues}}" SelectedValue="{Binding Path=ExampleProperty}" /&gt; </code></pre>
8,317
<p>I have a start of a webapp that I wrote without using the Object Oriented features of PHP.</p> <p>I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app?</p>
<p>Given that you have an incomplete app I would say that reworking it into an Object based app will probably be helpful. </p> <p>One thing to consider is the expected size of the end application. Below a certain complexity Object based may be overkill except for the learning experience.</p> <p>I started out avoiding...
<p>I would say try and go OO just because what you have can be reused much easier than procedural <em>if done right</em> </p> <p>I will also say that OO is much more organized then procedural. When your at a small scale it's easy to get away with sloppy code OO or not. But when you get to larger projects your procedur...
8,197
<p>I want to get the results of a stored procedure and place them into a CSV file onto an FTP location.</p> <p>The catch though is that I cannot create a local/temporary file that I can then FTP over.</p> <p>The approach I was taking was to use an SSIS package to create a temporary file and then have a FTP Task withi...
<p>This step-by-step example is for others who might stumble upon this question. This example uses <em>Windows Server 2008 R2 server</em> and <em>SSIS 2008 R2</em>. Even though, the example uses <em>SSIS 2008 R2</em>, the logic used is applicable to <em>SSIS 2005</em> as well. Thanks to <code>@Kev</code> for the <em>FT...
<p>Try using a CLR stored procedure. You might be able to come up with something, but without first creating a temporary file, it might still be difficult. Could you set up a share on another machine and write to that, and then ftp from there?</p>
4,092