instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>Prior to C# generics, everyone would code collections for their business objects by creating a collection base that implemented IEnumerable</p> <p>IE:</p> <pre><code>public class CollectionBase : IEnumerable </code></pre> <p>and then would derive their Business Object collections from that.</p> <pre><code>public...
<p>I am generally in the camp of just using a List directly, unless for some reason I need to encapsulate the data structure and provide a limited subset of its functionality. This is mainly because if I don't have a specific need for encapsulation then doing it is just a waste of time.</p> <p>However, with the aggre...
<p>this is the way:</p> <p>return arrays, accept <code>IEnumerable&lt;T&gt;</code></p> <p>=)</p>
4,183
<p>Can anyone give me some pointers on how to display the results of an XPath query in a textbox using code (C#)? My datascource <i>seems</i> to (re)bind correctly once the XPath query has been applied, but I cannot find how to get at the resulting data.<br /><br /> Any help would be greatly appreciated.</p>
<p>XMLDataSource is designed to be used with data-bound controls. ASP.NET's TextBox is not a data-bound control. So to accomplish what you want you either have to find a textbox control with data binding or display the result in some other way. </p> <p>For example, you could use a <a href="http://msdn.microsoft.com/en...
<p>Some more information would be nice to have to be able to give you a decent answer. Do you have any existing code snippets you could publish here?</p> <p>The general idea is to use the XmlDataSource.XPath property as a filter on the XmlDataSource.Data property. Did you try displaying the contents of the Data prop i...
7,448
<p>I frequently have problems dealing with <code>DataRows</code> returned from <code>SqlDataAdapters</code>. When I try to fill in an object using code like this:</p> <pre><code>DataRow row = ds.Tables[0].Rows[0]; string value = (string)row; </code></pre> <p>What is the best way to deal with <code>DBNull's</code> in ...
<p>Nullable types are good, but only for types that are not nullable to begin with.</p> <p>To make a type "nullable" append a question mark to the type, for example: </p> <pre><code>int? value = 5; </code></pre> <p>I would also recommend using the "<code>as</code>" keyword instead of casting. You can only use the...
<p>If you are concerned with getting DBNull when expecting strings, one option is to convert all the DBNull values in the DataTable into empty string.</p> <p>It is quite simple to do it but it would add some overhead especially if you are dealing with large DataTables. Check this <a href="http://www.ddejan.com/post/20...
4,640
<p>Is it possible to cache database connections when using PHP like you would in a J2EE container? If so, how?</p>
<p>There is no <strong>connection pooling</strong> in php.<br> <strong>mysql_pconnect</strong> and <strong>connection pooling</strong> are two different things. There are many problems connected with <code>mysql_pconnect</code> and first you should read the manual and carefully use it, but this is not connection poolin...
<p>You cannot instantiate connection pools manually.</p> <p>But you can use the "built in" connection pooling with the <a href="http://de.php.net/manual/en/function.mysql-pconnect.php" rel="nofollow noreferrer">mysql_pconnect</a> function.</p>
6,090
<p>How much traffic can one web server handle? What's the best way to see if we're beyond that?</p> <p>I have an ASP.Net application that has a couple hundred users. Aspects of it are fairly processor intensive, but thus far we have done fine with only one server to run both SqlServer and the site. It's running Window...
<p>What you need is some info on <a href="http://msdn.microsoft.com/en-us/library/ms979198.aspx" rel="noreferrer">Capacity Planning</a>..</p> <p>Capacity planning is the process of planning for growth and forecasting peak usage periods in order to meet system and application capacity requirements. It involves extensiv...
<p>On that hardware, a .NET application should be able to serve about 200-400 requests per second. If you have only a few hundred users, I doubt you are seeing even 2 requests per second, so I think you have a lot of capacity on that box, even with SQL server running.</p> <p>Without know all of the details, I would sa...
8,496
<p>I am intentionally leaving this quite vague at first. I'm looking for discussion and what issues are important more than I'm looking for hard answers.</p> <p>I'm in the middle of designing an app that does something like portfolio management. The design I have so far is</p> <ul> <li>Problem: a problem that needs...
<p>Hmm, sounds kind of like this site...</p> <p>As far as a database design would go, a versioning system kind of like SVN, where you never actually do any updates, just inserts (with a version number) when things change, might be what you need. This is called MVCC, Multi-Value Concurrency Control. A wiki is another...
<p>I suppose there's</p> <h2>Option 4: the hybrid</h2> <p>Move the common Thing attributes into a single-inheritance table, then add an <code>custom_attributes</code> table. This makes foreign-keys simpler, reduces duplication, and allows flexibility. It doesn't solve the problems of type-safety for the additional ...
3,277
<p>I have a PLA 3D-printed object made of several rings with a diameter of 150 mm and a thickness of 6 mm. The height of each ring is about 30-35 mm but it does not matter so much.</p> <p>I'm looking for a way to keep the rings together (one on top of another). I cannot place anything inside the ring (like a thicker ar...
<h2>[Extruder] feed rate [modifier] is used synonymous to extrusion multiplier</h2> <p>The feed rate of the extruder is the rate at which filament is pushed (fed) into the hotend. An overwrite value that modifies that rate from the normal rate is in most slicers called &quot;extrusion multiplier&quot;.</p> <p>It is a <...
<p>In the context of the linked source (in German <em>&quot;Die Feeding Rate sollte mit 105 % eingestellt werden&quot;</em>), with <em>&quot;a feeding rate of 105 %&quot;</em> is meant the extrusion multiplier (there is no reference in the source to Cura). This is explained in <a href="https://3dprinting.stackexchange....
2,212
<p>I have a generic method defined like this:</p> <pre><code>public void MyMethod&lt;T&gt;(T myArgument) </code></pre> <p>The first thing I want to do is check if the value of myArgument is the default value for that type, something like this:</p> <pre><code>if (myArgument == default(T)) </code></pre> <p>But this d...
<p>To avoid boxing, the best way to compare generics for equality is with <code>EqualityComparer&lt;T&gt;.Default</code>. This respects <code>IEquatable&lt;T&gt;</code> (without boxing) as well as <code>object.Equals</code>, and handles all the <code>Nullable&lt;T&gt;</code> "lifted" nuances. Hence:</p> <pre><code>if(...
<p>Don't know if this works with your requirements or not, but you could constrain T to be a Type that implements an interface such as IComparable and then use the ComparesTo() method from that interface (which IIRC supports/handles nulls) like this:</p> <pre><code>public void MyMethod&lt;T&gt;(T myArgument) where T :...
9,109
<p>I have two spreadsheets... when one gets modified in a certain way I want to have a macro run that modifies the second in an appropriate manner. I've already isolated the event I need to act on (the modification of any cell in a particular column), I just can't seem to find any concrete information on accessing and...
<p>In Excel, you would likely just write code to open the other worksheet, modify it and then save the data.</p> <p>See <a href="http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=302" rel="noreferrer">this tutorial</a> for more info.</p> <p>I'll have to edit my VBA later, so pretend this is pseudocode, but...
<p>You can open a spreadsheet in a single line:</p> <pre><code>Workbooks.Open FileName:="\\the\share\file.xls" </code></pre> <p>and refer to it as the active workbook:</p> <pre><code>Range("A1").value = "New value" </code></pre>
7,398
<p>A Bowden tube extruder (like the stock one on an Ender 3) is known to have issues with printing the most flexible TPU, and with filaments that (either due to composition or condition) don't take well to too much retraction -- though the latter can be ameliorated somewhat with slicer settings. Direct drive extruders...
<p>There are really no reasons not to convert to direct drive, <em>provided you use a good one</em>. Many of the direct drive kits, especially the ones that reuse the existing giant NEMA-17 stepper, are not very good and have tradeoffs due to excessive mass on the toolhead, imbalanced mass, interference with frame redu...
<p>Other than higher carriage mass as you already noted, the only other reason to not go with Direct Drive over Bowden is the higher level of maintenance required. In most cases Direct Drive will provide advantages such as increasing the maximum flow speed, enabling the use of Linear/Pressure Advance, shortening Retrac...
1,977
<p>I am interested in references to designs which use a customized support instead of the slicer's default normal/tree support.</p> <p>The background is this: I am making a hubcap with a 3D logo. I do not want to place the logo on the print bed because the logo will become very messy. So, I place the rim of the hubcap ...
<p>Your question may be closed for being somewhat vague and outside the scope of the SE, but consider to view <a href="https://www.youtube.com/watch?v=RPijCjz9G1w" rel="nofollow noreferrer">Maker's Muse video</a> about creating alternatives to slicer-generated supports.</p> <p>The video suggests creating primitives in ...
<p>In this situation I probably wouldn't use supports at all.</p> <p>I'd put something round on the bed that fits the space instead.</p>
2,191
<p>I'm looking for a builder for <a href="http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html" rel="noreferrer">HQL</a> in Java. I want to get rid of things like:</p> <pre><code>StringBuilder builder = new StringBuilder() .append("select stock from ") .append( Stock.class.getName() ) .append(...
<p>@<a href="https://stackoverflow.com/questions/56843/looking-for-an-hql-builder-hibernate-query-language#57001">Sébastien Rocca-Serra</a><br> Now we're getting somewhere concrete. The sort of join you're trying to do isn't really possible through the Criteria API, but a sub-query should accomplish the same thing. Fir...
<p>Now are also available the standard <a href="http://www.ibm.com/developerworks/library/j-typesafejpa/" rel="nofollow">JPA Type Safe</a> query and an less standard but also good <a href="https://www.objectquery.org/" rel="nofollow">Object Query</a></p> <p>Examples:</p> <p>JPA Type Safe</p> <pre><code>EntityManager...
8,095
<p>In general, what kinds of design decisions help an application scale well?</p> <p>(Note: Having just learned about <a href="http://en.wikipedia.org/wiki/Big_O_notation" rel="nofollow noreferrer">Big O Notation</a>, I'm looking to gather more principles of programming here. I've attempted to explain Big O Notation b...
<p>The only thing I would say is write your application so that it can be deployed on a cluster from the very start. Anything above that is a premature optimisation. Your first job should be getting enough users to have a scaling problem. </p> <p>Build the code as simple as you can first, then profile the system secon...
<p>One good idea is to determine how much work each additional task creates. This can depend on how the algorithm is structured.</p> <p>For example, imagine you have some virtual cars in a city. At any moment, you want each car to have a map showing where all the cars are.</p> <p>One way to approach this would be:</p...
6,265
<p>When I adjust the probe offset to get the proper layer height and adhesion, one side is set right but the other doesn't work. If I decrease the probe offset (say -1.100 to -1.050) the right side seems to print better; if I increase the probe offset (-1.050 to -1.125) the left side will adhere to the plate properly.<...
<p>I have had exactly the same experiences as you did with a inductive sensor on a Prusa i3 clone. It looks as though the bed leveling is not executed, or the level/mesh tilted. Please do note that automatic bed leveling is <strong><em>not magic</em></strong>, you still need to provide a <strong><em>build platform as l...
<p>From the looks of your test print, this is unlikely all or only due to levelling unless the glass plate is abnormally uneven. You may have to check your extrusion (speed, temp, feed) parameters and/or adhesion (clean with aceton and/or prepare with hairspray or glue stck)</p>
1,088
<p>I'm trying to optimize several bottlenecks on an application which is supposed to run on a really wide range of CPUs and architectures (some of them very close to embeded devices).</p> <p>The results of my profiler, however, aren't really significant because of the speed of my CPU. Is there any way (preferably unde...
<p>This works well and supports multicore. <a href="http://www.cpukiller.com/" rel="nofollow noreferrer">http://www.cpukiller.com/</a></p>
<p>There was an app on Downloadsquad.com recently. I dont remember the name of it but it did some fun stiff woth processors and task manager. It may have only been to manage what apps are on what cpu but maybe it would give you this. I will try to look for it this afternoon, and respond back if I find it.</p>
7,843
<p>I work for a company that makes items from plastics.<br> Many or our current runs are between 500 and 5000 copies, but knowing the company, if we find a good method to do smaller runs, they are willing to see if it is a good commercial option.</p> <p>At the moment we do use several different methods but the technic...
<p>From an electrical standpoint, a two-phase stepper motors (what most 3D printers use) works the same backwards and forwards, the phase just reverses. If you are stalling on only one direction, I would look to see if you have a mechanical bind in that direction. Generally a wiring issue will cause the motor to eith...
<p>Sounds like you are configured for NC switches but are using NO switches, causing them to invert their reported state. Issue a <strong>M119</strong> command and see if the endstop statuses are correct when none are triggered.</p>
774
<p>We have a number of users with Windows Mobile 6 and need to apply minor changes. eg. update a registry setting. One option is push and execute an executable file using our device management software.</p> <p>I'd like this to be a little more friendly for the admins who are familiar with scripting in VBScript/JScript...
<p>I work on windows mobile full time and have never really come across a good Windows Mobile scripting implementation unfortunately. For some reason MS has never seen the need for it. For example, even though you can actually get a command console on WM, it does not support running batch files, even though all the c...
<p>There is also a <a href="http://www.cebeans.com/" rel="nofollow noreferrer">Visual Basic Runtime</a> to run VBScript</p>
4,844
<p>I had a couple of recent nozzle/bed crashes, so I now frequently do a manual bed levelling. I do these while the bed is heated to allow for expansion.</p> <p>Today I found, after levelling, a subsequent print could vary from having too much clearance (paper moves very freely) to less than no clearance (which left de...
<p>This was killing me on mine. My problem wasn't the z-axis, it was the x-axis arm. On the right side, opposite the extruder gear, it had a lot of give (wobble). I could level my bed four times before starting a print and would still have problems, especially with the nozzle making deep grooves in the magnetic bed. Th...
<p>I'm having the same issue with Ender 3 V2. Everything tightened, Z-axis coupler not &quot;slipping&quot;... I noticed, that the error is made by the Z-axis end switch itself. I am not sure how that is possible but try homing several times and you'll see that the loud click when the switch is triggered occurs in a sp...
1,087
<p>I purchased a glass bed to use with my still-in-transit Ender 3. Since the bed came in before the printer, I pulled it out and used a flat edge ruler to see how flat the glass surface is. </p> <p>It appears the glass is slightly "dished" in the center from one side and "raised" in the center on the other side. I am...
<p>Glass will not change its shape you can watch this interesting video: <a href="https://www.youtube.com/watch?v=0j9fa86jiv0" rel="nofollow noreferrer">YouTube - Fix Your Bowed Glass Build Surface - CR-10 3D Printer </a>.</p> <p>Or simply change your glass. </p>
<p>Yes, glass will warp. Think about it this way: the edges cannot be as hot as the centre if you use uniform heating, because they lose heat more quickly.</p> <p>If the edges are colder, they are also shorter than the hotter centre, which expands more.</p> <p>If the centre is longer than the edges, it will bend to a...
989
<p>For the following HTML:</p> <pre><code>&lt;form name=&quot;myForm&quot;&gt; &lt;label&gt;One&lt;input name=&quot;area&quot; type=&quot;radio&quot; value=&quot;S&quot; /&gt;&lt;/label&gt; &lt;label&gt;Two&lt;input name=&quot;area&quot; type=&quot;radio&quot; value=&quot;R&quot; /&gt;&lt;/label&gt; &l...
<pre><code>$( function() { $("input:radio") .click(radioClicks) .filter("[value='S']") .attr("checked", "checked"); }); </code></pre>
<p>I think something like this should work (but it's untested):</p> <pre><code>$("input[@type='radio']").each(function(i) { if (this.val() == 'E') { radioClicks(); this.get().checked = true; } } $("input[@type='radio']").click(radioClicks); </code></pre>
6,888
<p>I keep hearing that Lisp is a really productive language, and I'm enjoying <a href="http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/" rel="noreferrer">SICP</a>. Still, I'm missing something useful that would let me replace PHP for server-side database interaction in web applications.</p> <p>...
<p>newLisp has support for mysql5 and if you look at <a href="http://www.newlisp.org/code/modules/mysql5.lsp.html" rel="nofollow noreferrer">the mysql5 function calls</a>, you'll see that it's close to PDO.</p>
<p>We use SBCL, UCW, CL-SQL and MySQL as our back-end for <a href="http://paragent.com" rel="nofollow noreferrer">Paragent.com</a>. It has worked very well for us. We also have a number of clients using UCW/CL-SQL/MySQL for custom sites we have built them through our consulting arm <a href="http://bitfauna.com" rel="no...
9,062
<p>I would like to make my web control more readable in design mode, basically I want the tag declaration to look like:</p> <pre><code>&lt;cc1:Ctrl ID="Value1" runat="server"&gt; &lt;Values&gt;string value 1&lt;/Value&gt; &lt;Values&gt;string value 2&lt;/Value&gt; &lt;/cc1:Ctrl&gt; </code></pre> <p>...
<p>I think what you are searching for is the attribute:</p> <pre><code>[PersistenceMode(PersistenceMode.InnerProperty)] </code></pre> <p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.persistencemode.aspx" rel="nofollow noreferrer">Persistence Mode</a></p> <p>Remember that you have to register your n...
<p>I see two options, but both depend on your web control implementing some sort of collection for your values. The first option is to just use the control's collection instead of your private variable. The other option is to copy the control's collection to your private variable at run-time (maybe in the Page_Load e...
8,717
<p>Using <a href="http://en.wikipedia.org/wiki/JQuery" rel="noreferrer">jQuery</a>, how can I dynamically set the size attribute of a select box?</p> <p>I would like to include it in this code:</p> <pre><code>$("#mySelect").bind("click", function() { $("#myOtherSelect").children().remove(); var op...
<p>Oops, it's</p> <pre><code>$('#mySelect').attr('size', value) </code></pre>
<pre><code>$("#mySelect").bind("click", function(){ $("#myOtherSelect").children().remove(); var myArray = [ "value1", "value2", "value3" ]; for (var i = 0; i &lt; myArray.length; i++) { $("#myOtherSelect").append( '&lt;option value="' + myArray[i] + '"&gt;' + myArray[i] + '&lt;/option&gt;' ); }...
9,099
<p>I am running </p> <ul> <li>OS X 10.5, </li> <li>Ruby 1.8.6, </li> <li>Rails 2.1, </li> <li>sqlite3-ruby 1.2.2 </li> </ul> <p>and I get the following error when trying to rake <code>db:migrate</code> on an app that works find connected to MySQL.</p> <blockquote> <p>rake aborted! no such file to load -- sqlite3...
<p>You have to store in UTC - if you don't, your historic reporting and behaviour during things like Daylight Savings goes... funny. GMT is a local time, subject to Daylight Savings relative to UTC (which is not).</p> <p>Presentation to users in different time-zones can be a real bastard if you're storing local time....
<p>I like storing in GMT and showing only relative ("about 10 seconds ago", "5 months ago"). Users don't need to see actual timestamps for most use cases.</p> <p>There are certainly exceptions, and an individual application might have many of them, so it can't be a 'one-true-way' answer. Things that need strong audi...
3,310
<p>When I run prints on my Creality CR-10S Pro 3D printer (using Ultimaker Cura as slicer), I set the heated bed to around 70&nbsp;&deg;C for PETG. after the first few layers, the heated bed set point changes to 0&nbsp;&deg;C. </p> <p>Is it normal for a 3D printer to turn the heated bed off during a print, or is this ...
<p><strong>No</strong>, this is not common behavior, and <strong>yes</strong> this can cause your prints to warp or detach from the build plate.</p> <p>The question is whether you instructed this (by accident) or not (e.g. it can be a result from slicing or some economy mode of the printer). This should be clear if yo...
<p>That is not normal behavior for the heated beds. I don't have that exact model, but when I print the heated bed will stay to whatever temp was set in the slicer program. Unless you override it manually on the printer itself during the print. I would check slicer settings ensuring temp doesn't change after it's first...
1,205
<p>I have the following arrays:</p> <pre><code>$artist = array("the roots", "michael jackson", "billy idol", "more", "and more", "and_YET_MORE"); $count = array(5, 3, 9, 1, 1, 3); </code></pre> <p>I want to generate a tag cloud that will have artists with a higher number in <code>$count</code> enclosed in <code>h6</c...
<p>You will want to add a logarithmic function to it too. (taken from tagadelic, my Drupal module to create tag clouds <a href="http://drupal.org/project/tagadelic" rel="noreferrer">http://drupal.org/project/tagadelic</a>):</p> <pre><code>db_query('SELECT COUNT(*) AS count, id, name FROM ... ORDER BY count DESC'); $s...
<p>As a helper in Rails:</p> <pre><code>def tag_cloud (strings, counts) max = counts.max strings.map { |a| "&lt;span style='font-size:#{((counts[strings.index(a)] * 4.0)/max).ceil}em'&gt;#{a}&lt;/span&gt; " } end </code></pre> <p>Call this from the view:</p> <pre><code>&lt;%= tag_cloud($artists, $counts) %&...
2,271
<p>I am writing some G-code for my DIY 3D printer. From what I understand, <code>G4</code> is dwell and its expressed in milliseconds. So my extruder takes about 30 seconds to heat up. Do I just type </p> <pre><code>G04 30000 </code></pre>
<p>You are correct about needing to specify the dwell value in milliseconds. However, the RepRap Wiki indicates that you need to use the <code>Pn</code> argument, and not just an unadorned number as the argument to the command. To adapt the Wiki's own example, you will need to use:</p> <pre><code>G4 P30000 </code></pr...
<p>Depending on your G-code flavor you may be able to use <a href="https://reprap.org/wiki/G-code#M109:_Set_Extruder_Temperature_and_Wait" rel="nofollow noreferrer"><code>M109</code></a> (heat and wait) instead. If supported M109 will wait until the target temperature is achieved.</p>
716
<p>I need to remotely install windows service on number of computers, so I use CreateService() and other service functions from winapi. I know admin password and user name for machines that I need access to. In order to gain access to remote machine I impersonate calling process with help of LogonUser like this: </p...
<p>You can do it , the account needs to exist on the remote machine and you need to use the machine name for the domain name in the LogonUser call.</p>
<p>Rather than rolling your own, why not just use the SC built-in command?</p>
8,794
<p>a little new to the windows workflow stuff so go easy :)</p> <p>I wish to design a workflow host environment that has high availability - a minimum of 2 WF runtime hosts on separate hardware both pointing to the same persistance or tracking SQL database.</p> <p>I am looking for a pattern whereby I can asynchronous...
<p>If you use a WCF service with a netMsmqBinding, you can receive queued messages without having to poll. Messages will wait if there is no service running to pick them up. You would want to make sure to use a clustered queue for reliability in case the main queuing machine goes down. </p> <p>Also be aware when upgra...
<p>I would go with MSMQ/event table. Polling is only dirty if you do it wrong.</p> <p>One thing to keep in mind: you say you want multiple WF servers for high availability, <em>but both of them use the same SQL backend</em>? High availability only works if you remove <em>all</em> single points of failure, not just som...
3,234
<p>I tried printing something after 7 weeks of not using the printer (before it worked greatly) and I think it doesn't extrude properly (although I'm not sure about it).</p> <p>When I tell the printer to extrude filament it works just fine, but during the print there seems to be a problem with it (see image below). Whe...
<p>I would first check that your nozzle temperature is correct for the PLA you are using. If it is correct, try increasing it 5-10 °C. I experienced an identical issue and found that it was an incorrect nozzle temperature.</p>
<p>This has happened to me before. As suggested in another answer by @HandyHowie I would try to increase the nozzle temp. PLA usually requires around 190-210 °C however I have found this usually varies from PLA type. I would try using something like 230 °C as this seems to work for me.</p> <p>Another issue could be wit...
2,102
<p>I have a set of multiple assemblies (one assembly is to be used as an API and it depends on other assemblies). I would like to merge all assemblies into one single assembly but prevent all assemblies except the API one to be visible from the outside.</p> <p>I will then obfuscate this assembly with Xenocode. From wh...
<p>I know Xenocode can merge assemblies into one but I am not sure if it will internalize other non-primary assemblies.</p> <p>I have found the /internalize switch in ILMerge that "internalize" all assemblies except the primary one. Pretty useful!</p>
<p>I suggest you look at the <code>InternalsVisibleTo</code> attribute on <a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" rel="nofollow noreferrer" title="MSDN">MSDN</a>.</p> <p>You can mark everything in all the assemblies (except the API assembly) as...
4,627
<p>I have a <a href="https://www.monoprice.com/product?c_id=107&amp;cp_id=10724&amp;cs_id=1072403&amp;p_id=21711" rel="nofollow noreferrer">Monoprice Select Mini V2</a> and I’ve recently been having issues with little strings that are thick and sturdy sticking off of models:</p> <p><a href="https://i.stack.imgur.com/x...
<p>The Monoprice Select Mini V2 uses a Bowden style extrusion system. Bowden extruders compress the filament in the tube where the gap between the filament and inner tube diameter allow for the filament to buckle slightly and compress causing a pressure build-up in the hotend. Without retraction this implies that the f...
<p>The Monoprice Select Mini V2 uses a Bowden style extrusion system. Bowden extruders compress the filament in the tube where the gap between the filament and inner tube diameter allow for the filament to buckle slightly and compress causing a pressure build-up in the hotend. Without retraction this implies that the f...
1,049
<p>When using <code>G1</code> command in G-code, what is the difference between <code>Z</code>- axis and <code>E</code>- axis?</p> <p>I see all <code>E</code>, <code>F</code> and <code>Z</code> in</p> <pre><code>G1 Z0.350 F7800.000 G1 E-2.00000 F2400.00000 G92 E0 G1 X96.753 Y95.367 F7800.000 G1 E2.00000 F2400.00000 <...
<p>G-CODE can be confusing as historically it was <a href="http://ws680.nist.gov/publication/get_pdf.cfm?pub_id=823374" rel="noreferrer">developed for machining tools</a> rather than FDM printers, and thus:</p> <ul> <li>not all available commands make sense for a 3D printer</li> <li>some of the command do slightly dif...
<p>z-axis refers typically to vertical movement</p> <p>F references are feed rates/movement rates</p> <p>E references are for the extruder, referencing the amount and speed to eject filament, negative e-values are retraction commands</p>
816
<p>I have an Anet A8 and I currently try to improve the y-axis (with a tensioner and a frame to support the structure). Now after I dis- and reassembled the y-axis, I get a loud rattling noise when homing the y-axis (and also when moving it stepwise from within the firmware). After the rattling goes on for a second or ...
<p>From your video, it sounds to me as though the stepper motor is fighting against the bed movement. That would indicate to me the bed rails on the X-axis are not square to the bed movement, which would cause binding of the linear bearings on the bed.</p> <p>To see if this is the issue, loosen the threaded rods in al...
<p>With the second video and the photos I could identify, that the sound in part stems from the belt:</p> <ul> <li>It is too loose and swing <strong>sideways</strong> as it pulls.</li> </ul> <p>Tighten the belt till it sounds <em>at least</em> like a C<sub>3</sub> or D<sub>3</sub> (130/146 Hz) and possibly higher. My...
1,145
<p>I can't find an answer to this question on the "mother" meta website; hope this is not related to my choice of words in the search box. </p> <p>The statistics of the <a href="https://3dprinting.stackexchange.com/">3D Printing</a> on <a href="http://area51.stackexchange.com/proposals/82438/3d-printing">Area51</a> sh...
<p>This post, <a href="https://3dprinting.meta.stackexchange.com/questions/197/3d-printing-se-beta-status">3D Printing SE Beta Status</a>, by tbm0115 highlights the <em>three main</em> sticking points (IMHO clearer than the Area 51 page):</p> <ul> <li>Questions per day</li> <li><strike>Users vs Reputation</strike></li>...
<p>One thing that I noticed about the stats for this site when I first came across it was how high the number of registered users and visits is, compared with the number of active users and questions.</p> <p>For some time, I felt the site had either picked up some bad stats, or was in the final stages of fading away. ...
47
<p>How do I calculate the CRC32 (Cyclic Redundancy Checksum) of a string in .NET?</p>
<p>This guy seems to have your answer.</p> <blockquote> <p><a href="https://damieng.com/blog/2006/08/08/calculating_crc32_in_c_and_net" rel="noreferrer">https://damieng.com/blog/2006/08/08/calculating_crc32_in_c_and_net</a></p> </blockquote> <p>And in case the blog ever goes away or breaks the url, here's the githu...
<p>Using the logic from the previous answer, this was my take:</p> <pre><code>public class CRC32 { private readonly uint[] ChecksumTable; private readonly uint Polynomial = 0xEDB88320; public CRC32() { ChecksumTable = new uint[0x100]; for (uint index = 0; index &lt; 0x100; ++index) ...
2,960
<p>I've always been wondering about the actual accuracy of 3D printing devices. When looking for the perfect machine to buy, I looked at the speed, price, filaments supported etc, but also accuracy. I once asked somebody who could give me some advice on what to look at. </p> <p>One of the things I was told about was t...
<p>There's not a simple answer to this question, or if there is, it's "no". However the situation is a lot more complicated. When printer specs cite accuracy like this, they're usually basing the claim on the nominal size of the smallest movements on each axis by one "microstep" of the stepper motors. There's a great a...
<p>Tom's answer is correct, most printers will operate properly with a layer height <em>resolution</em> of 50 micron, using a 0.4mm nozzle. The resulting surface finish will probably be better than at a coarser layer setting, and at finer layer heights the print quality is likely to deteriorate.</p> <p>Layer height is...
1,374
<p>I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what else do you lose? Are there performance factors...
<p>Typed datasets are by far an upgrade from the world of classic ADO disconnected recordsets. I have found that they are still nice to use in simple situations where you need to perform some sort task that's row oriented -- i.e. you still want to work in the context of a database paradigm of rows, columns, constraint...
<p>Datasets are nice for quickly slapping something together with visual studio, if all the issues mentioned previously are ignored. One problem I did not see mentioned is the visual scalability of datasets within the design surface of Visual Studio. As the system grows, the size of the datasets inevitably becomes unwi...
7,673
<p>I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful?</p> <p><strong>Update</strong>: ...
<p><strong><a href="http://www.jetbrains.com/resharper/" rel="nofollow noreferrer">Resharper</a></strong> is definitely a great tool. It has a moderate learning curve but is easy to pick up for some simple things and add mastery later. It is a good price for students and kinda expensive for the rest of us. Resharper...
<p>I have Resharper and SQL Prompt, both are excellent.</p>
6,331
<p>How can one determine, in code, how long the machine is locked?</p> <p>Other ideas outside of C# are also welcome.</p> <hr> <p>I like the windows service idea (and have accepted it) for simplicity and cleanliness, but unfortunately I don't think it will work for me in this particular case. I wanted to run this on...
<p>I hadn't found this before, but from any application you can hookup a SessionSwitchEventHandler. Obviously your application will need to be running, but so long as it is:</p> <pre><code>Microsoft.Win32.SystemEvents.SessionSwitch += new Microsoft.Win32.SessionSwitchEventHandler(SystemEvents_SessionSwitch); void Sys...
<p>Below is the 100% working code to find if the PC is locked or not.</p> <p>Before using this use the namespace <code>System.Runtime.InteropServices</code>.</p> <pre><code>[DllImport("user32", EntryPoint = "OpenDesktopA", CharSet = CharSet.Ansi,SetLastError = true, ExactSpelling = true)] private static extern Int32 ...
6,677
<p>Can one be simulated by periodicly syncing with GPS and in the meen while working with the accelerometer? I know for example that the N95 accelerometer is invarient to rotation on the Y axis (while beeing face up/down).</p>
<p>The original iPhone and the iPhone 3G use GPS to calculate the heading, however the iPhone 3GS now has a 3-dimensional magnetometer compass in it.</p> <p>This can only be done taking two GPS coordinates (while moving) and determining the direction from point A to B.</p>
<p>Extra info: The IPHONE 1 did not have GPS or compass.</p>
6,431
<p>I'd like to script FlexBuilder so that I can run debug or profile without having to switch to FlexBuilder and manually clicking the button (or using the key combo). Is this possible without writing an extension?</p> <p>To be more specific, this is exactly what I want to do: I want to create a TextMate command that ...
<p>When compiling I use Ant and have full control over that from TextMate, what I want is to be able to launch the <em>debugger</em> and the <em>profiler</em>. The command line debugger is unusable and there is no other profiler available than the one in FlexBuilder.</p>
<p>Since FlexBuilder essentially is an extended version of Eclipse, any tools/scripts for doing the same in Eclipse should work for FlexBuilder aswell. I couldn't find any tools like this googling it, have you considered doing away with FlexBuilder completely, there are plenty of guides for using the mxmlc (or fcsh) co...
3,114
<p>I use my mobile phone for connection to the internet on my laptop, I also have a wired connection to a LAN which doesn't have internet conectivity, it just has our TFS server on it.</p> <p>The problem is that I can't use the internet (from the phone) with the LAN cable plugged in. Is there a way to set the default ...
<p>There's many OS specific ways to force routing over specific interfaces. What OS are you using? XP? Vista? *nix?</p> <p>The simplest way is to configure your network card with a static IP and NO GATEWAY, the only gateway (ie. internet access) your laptop will find is then via the mobile.</p> <p>The disadvantage of...
<p>You can actually configure what you want to be the default gateway globally using the "routes" command as described here: <a href="https://stackoverflow.com/questions/17785/default-internet-connection-on-dual-lan-workstation">Default Internet connection on Dual LAN Workstation</a></p> <p>I admit though, on windows ...
4,957
<p>If I add 3-400 databases to a single SQL Server instance will I encounter scaling issues introduced by the large number of databases?</p>
<p>This is one of those questions best answered by: Why are you trying to do this in the first place? What is the concurrency against those databases? Are you generating databases when you could have normalized tables to do the same functionality?</p> <p>That said, yes MSSQL 2005 will handle that level of database per...
<p>I have never tried this in 2005. But a company I used to work for tried this on 7.0 and it failed miserably. With 2000 things got a lot better but querying across databases was still painfully slow and took too many system resources. I can only imagine things improved again in 2005.</p> <p>Are you querying acros...
9,334
<p>What are the basic necessities needed to build a 3d printing machine.</p> <ul> <li>Workforce</li> <li>Technology</li> <li>Money</li> <li>etc.</li> </ul> <p>I'm an undergrad and my friends and I would like to make a printer for a project. We wanted to get an idea of the prerequisites for this work. </p>
<p>Prints could end up on tray for couple of reasons. </p> <ul> <li>Vacuum force on early layers - Usually you should lose pieces on the center of platform <ul> <li>Put holes or channels on platform</li> <li>Very slow speed on early layers</li> <li>Use smaller platform</li> <li>Use tilt mechanism</li> <li>Use larger ...
<p>I also had issues with the first layer sticking to the build plate and I did not want to sand the plate. As most people will mention you need to make sure that your plate is perfectly level and the z height is right (lots of friction on the paper). You also need the correct exposure times for your resin and the firs...
647
<p>The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128. It works great, except that the transparent areas in the original image are being replaced with a solid color- black in my case. </p> <p>Even though <code>imagesavealpha</code> is set, something isn't quite right.</p> <p>What's the...
<pre><code>imagealphablending( $targetImage, false ); imagesavealpha( $targetImage, true ); </code></pre> <p>did it for me. Thanks ceejayoz.</p> <p>note, the target image needs the alpha settings, not the source image.</p> <p>Edit: full replacement code. See also answers below and their comments. This is not guarant...
<p>Here is my total test code. It works for me</p> <pre><code>$imageFileType = pathinfo($_FILES["image"]["name"], PATHINFO_EXTENSION); $filename = 'test.' . $imageFileType; move_uploaded_file($_FILES["image"]["tmp_name"], $filename); $source_image = imagecreatefromjpeg($filename); $source_imagex = imagesx($source_im...
5,217
<p>Is there any software/methods to automatically splice objects into multiple pieces sort of like a jig saw puzzle so that I can combine them together and bypass the build plate size limit?</p> <p>As an example I have this 2D image that I want to print out but my printers size limit is roughly the size of the blue "s...
<p>From what I understand, you're trying to partition your object into smaller pieces with the hopes of putting them back together in a manner similar to a Jigsaw puzzle.</p> <p>There are two options that I know of to do this, which requires using OpenSCAD:</p> <ul> <li>The <a href="https://www.thingiverse.com/thing:...
<p>Sorry to put it that way, but does 3D printing the best "tool" for your case? </p> <p>it seems you want to generate a huge flat file when a CnC would be the best to generate a clean and solid part.</p> <p>Otherwise, as others suggets you are looking for a tooling tool.</p>
713
<p>On a Cartesian printer movements are really simple. If we assume the printer has 100 steps/mm on each axis, then a move of 10mm on a axis is just 1000 Steps on that axis.</p> <p>Movements that are not aligned with one axis are also simple. Moving from x,y = 0,0 to 10,10 would be 1000 steps on x and y.</p> <p>On de...
<p>There are two main special steps to the technique used by most open-source 3d printer controllers:</p> <ol> <li>Divide each linear gcode segment into lots of very small subsegments ("Segmentation")</li> <li>Use some basic trigonometry or the pythagorean theorem to tie extruder position to carriage height for each o...
<p>I am describing how this is done in the Marlin firmware.</p> <p>The first step is to split a linear movement from (x, y, z) to (x', y', z') into many discrete segments. To this end, the amount of time the move would take at a given speed is calculated, and the value <em>delta_segments_per_second</em> is used to cal...
199
<p>I just did a merge using something like:</p> <pre><code>svn merge -r 67212:67213 https://my.svn.repository/trunk . </code></pre> <p>I only had 2 files, one of which is a simple <code>ChangeLog</code>. Rather than just merging my <code>ChangeLog</code> changes, it actually pulled mine plus some previous ones that ...
<p>This only happens with conflicts - basically svn tried to merge the change in, but (roughly speaking) saw the change as:</p> <p>Add</p> <pre><code>2008-08-06 Mike Stone &lt;myemail&gt; * changed_file: Details. </code></pre> <p>before</p> <pre><code>2008-08-06 Someone Else &lt;their_email&gt; </code></pre> ...
<p>There's not really enough information to go on here.</p> <pre><code>svn merge -r 67212:67213 https://my.svn.repository/trunk . </code></pre> <p>will merge any files changed in the revision 67212 in the folder /trunk on the repository and merge them into your current working directory. If you do:</p> <pre><code>sv...
2,609
<p>I want Windows Update to automatically download and install updates on my Vista machine, however I don't want to be bothered by the system tray reboot prompts (which can, at best, only be postponed by 4 hours).</p> <p>I have performed the registry hack described <a href="http://www.howtogeek.com/howto/windows-vista...
<p>Not sure if it is the same for vista, but worth a try. </p> <p>On Windows XP, you can modify a group policy setting to change how frequently it re-prompts you. (start -> run type gpedit.msc)</p> <p>Look under Computer Configuration/Administrative Templates/Windows Components/Windows Update</p> <p>The setting you ...
<p>I will risk some down-votes here by saying: this seems a little bit schizophrenic, though a lot of people ask for it.</p> <p>If you want Windows to download and install the updates, but <strong>not</strong> complete the install process by rebooting - what's the point? Why not simply turn of AutoUpdates in the first...
8,072
<p>It would be helpful to me if I knew in advance how much the <strong><em>empty</em></strong> filament spool weighs. </p> <p>Not having emptied any spool yet, I can't contribute data points, but has anyone compiled a list of empty weights from various manufacturers and sizes?</p>
<p>Yes, there is a table on <a href="https://www.reddit.com/r/3Dprinting/comments/4hlwse/empty_spool_weights_for_estimating_remaining/" rel="nofollow noreferrer">Reddit - Empty spool weights for estimating remaining filament</a> which suggests that the norm (in 2015) was between 170 and 330 grams for a 1&nbsp;kg spool,...
<p>Following on from <a href="https://3dprinting.stackexchange.com/questions/6558/is-there-a-table-or-list-of-tare-weights-of-empty-spools-of-various-manufacturer/6560#6560">Sean's excellent answer</a>, here is the (out of date) table in question: </p> <p><a href="https://i.stack.imgur.com/9Mdi0.png" rel="nofollow nor...
987
<p>In a silverlight application, I want to access the page the silverlight .xap file from an HTTP subdomain, but have the web services access a different subdomain for sensitive information over HTTPS.</p> <p>I set up clientaccesspolicy.xml at the root of the subdomain and it lets the silverlight app access its servic...
<p>Check out:<a href="http://silverlight.net/forums/t/12741.aspx" rel="nofollow noreferrer">http://silverlight.net/forums/t/12741.aspx</a></p> <blockquote> <p>You can either make https calls to the same domain or http cross-domain calls, but not https cross-domain calls.</p> <p>This is described in <a h...
<p>The important thing to note here that is not in the above information clearly is you must have access to the "ROOT" level of the domain request, and the clientaccesspolicy.xml must reside at that level.</p> <p>If for example you have a production environment that your application is behind a load balancer that dire...
9,922
<p>In my PHP web app, I want to be notified via email whenever certain errors occur. I'd like to use my Gmail account for sending these. How could this be done?</p>
<p>Gmail's SMTP-server requires a very specific configuration.</p> <p>From <a href="http://mail.google.com/support/bin/answer.py?answer=13287" rel="noreferrer">Gmail help</a>:</p> <pre><code>Outgoing Mail (SMTP) Server (requires TLS) - smtp.gmail.com - Use Authentication: Yes - Use STARTTLS: Yes (some clients call...
<p>You could use PEAR's mail function with Gmail's SMTP Server</p> <p>Note that when sending e-mail using Gmail's SMTP server, it will look like it came from your Gmail address, despite what you value is for $from.</p> <p>(following code taken from <a href="http://email.about.com/od/emailprogrammingtips/qt/et073006.h...
5,672
<p>What I am trying to do is change the background colour of a table cell &lt;td&gt; and then when a user goes to print the page, the changes are now showing.</p> <p>I am currently using an unobtrusive script to run the following command on a range of cells:</p> <pre><code>element.style.backgroundColor = "#f00" </cod...
<p>Is it not recommended to do this with stylesheets? You can change the media type in the LINK statement in your HTML, so when the page is printed, it will revert to the different style?</p>
<p>Have you tried hard-coding the values just to see if background-colors are showing on the print-preview at all? I think it is a setting in the Browser.</p>
4,973
<p>I'm looking for a performant, reasonably robust RNG using no special hardware. It can use mathematical methods (Mersenne Twister, etc), it can "collect entropy" from the machine, whatever. On Linux/etc we have a <code>drand48()</code> which generates 48 random bits. I'd like a similar function/class for C++ or C# wh...
<p>For C++, <a href="http://www.boost.org/libs/random/" rel="noreferrer">Boost.Random</a> is probably what you're looking for. It has support for MT (among many other algorithms), and can collect entropy via the <code>nondet_random</code> class. Check it out! :-)</p>
<p><code>Boost.Random</code> is my first choice for RNG</p> <p><a href="http://www.boost.org/doc/libs/random" rel="nofollow">http://www.boost.org/doc/libs/random</a></p>
2,302
<p>I searched for this subject on Google and got some website about an experts exchange...so I figured I should just ask here instead.</p> <p>How do you embed a <code>JApplet</code> in HTML on a webpage?</p>
<p>Here is an example from <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html" rel="nofollow noreferrer">sun's website</a>:</p> <pre><code>&lt;applet code="TumbleItem.class" codebase="examples/" archive="tumbleClasses.jar, tumbleImages.jar" width="600" height="95"&...
<p>Use the &lt;applet&gt; tag. For more info: <a href="http://java.sun.com/docs/books/tutorial/deployment/applet/html.html" rel="nofollow noreferrer">http://java.sun.com/docs/books/tutorial/deployment/applet/html.html</a></p>
6,356
<p>I am looking for a way to create an int\long representation of an arbitrary alpha-numeric String. Hash codes won't do it, because I can't afford hash collisions i.e. the representation must be unique and repeatable. </p> <p>The numeric representation will be used to perform efficient (hopefully) compares. The creat...
<p>Unless your string is limited in length, you can't avoid collisions. </p> <p>There are 4294967296 possible values for an integer (2^32). If you have a string of more than 4 ASCII characters, or more than two unicode characters, then there are more possible string values than possible integer values. You can't have ...
<p>How long are your strings? Unless you choose an int representation that's longer than the string, collisions will always be possible no matter what conversion you're using. So if you're using a 32 bit integer, you can only uniquely represent strings of up to 4 bytes.</p>
6,823
<p>Without local access to the server, is there any way to duplicate/clone a MySQL db (with content and without content) into another without using <code>mysqldump</code>?</p> <p>I am currently using MySQL 4.0.</p>
<p>I can see you said you didn't want to use <code>mysqldump</code>, but I reached this page while looking for a similar solution and others might find it as well. With that in mind, here is a simple way to duplicate a database from the command line of a windows server:</p> <ol> <li>Create the target database using My...
<p>Mysqldump isn't bad solution. Simplest way to duplicate database:</p> <p><code>mysqldump -uusername -ppass dbname1 | mysql -uusername -ppass dbname2</code></p> <p>Also, you can change storage engine by this way:</p> <p><code>mysqldump -uusername -ppass dbname1 | sed 's/InnoDB/RocksDB/' | mysql -uusername -ppass d...
4,539
<p>I'm having a weird issue with Visual Studio 2008. Every time I fire it up, the solution explorer is about an inch wide. It's like it can't remember it's layout settings.</p> <p>Every un-docked window is in the position I place it. But if I dock a window, it's position is saved, but it's size will be reset to very-n...
<p>I had the same problem. It turned out that if the VS window was non-maximized, it was really small. So after making the non-maximized wider, the problem disappeared.</p>
<p>Maybe you're closing Visual Studio while some other instance is still alive. The settings of the last instance that is closed is the one that will be applied.</p>
3,097
<p>I've read different things about PLA and heat-bed. Some say it is not needed, others recommend 60-70°C, but not for the first layers.</p> <p>For larger objects I often have the problem that the object does not stick to the blue-painters-tape-covered aluminium print plate. Instead the print "curls" up on one or more...
<p>Heating the bed helps me, even with PLA. I print with a 60&nbsp;°C bed. The bed is 3/8" 6061 alloy aluminum, sanded with 600 grit sandpaper, coated with Elmer's purple glue stick, and dried.</p> <p>The brim will help. You might make the brim thicker than one layer (like 2-3 layers).</p> <p>If you look at the bo...
<p>Heated bed definitely helps with PLA adhesion, it also helps depending the surface, for example PEI offers better adhesion than glass. Another option is to try to overextrude the first layer (125&nbsp;%) and make sure it is squeezed out, so basically you get a wavy effect on the first layer. This should help a bit e...
455
<p>Name the design considerations in deciding between use of a <a href="http://en.wikipedia.org/wiki/Singleton_pattern" rel="noreferrer">singleton</a> versus a static class. In doing this, you're kind of forced to contrast the two, so whatever contrasts you can come up with are also useful in showing your thought proce...
<ul> <li>Singletons can implement interfaces and inherit from other classes.</li> <li>Singletons can be lazy loaded. Only when it is actually needed. That's very handy if the initialisation includes expensive resource loading or database connections.</li> <li>Singletons offer an actual object.</li> <li>Singletons can b...
<p>When the single class needs state. Singletons maintain a global state, static classes do not.</p> <p>For instance, making a helper around a registry class: If you have changable hive (HKey Current User vs. HKEY Local Machine) you could go:</p> <pre><code>RegistryEditor editor = RegistryEditor.GetInstance(); edi...
6,869
<p>I have a problem with some models like this (trim_tabs version) : <a href="https://www.thingiverse.com/thing:3401852" rel="nofollow noreferrer">https://www.thingiverse.com/thing:3401852</a></p> <p>When I import the model on simplify, the tabs are sticky to the model (see pic3.png) but when I slice it, on the previe...
<p>I've tried that item as well. In fact, other than the heart, I built a <a href="https://www.thingiverse.com/thing:3825323" rel="nofollow noreferrer">remix</a> which works better but is still difficult to free up after printing. Those tabs you're concerned about will print better at a very low (thin) layer setting...
<p>It's not uncommon that different slicers have different effects on different models. The techniques used to slice the models differs. If the model you slice works fine in one and not in the other it's sometimes a setting but sometimes just the slicer. Just use the slicer that works :)</p>
1,574
<p>I am planning on creating a small website for my personal book collection. To automate the process a little bit, I would like to create the following functionality:</p> <p>The website will ask me for the ISBN number of the book and will then automatically fetch the title and add it to my database.</p> <p>Although ...
<p>This is the LibraryThing founder. We have nothing to offer here, so I hope my comments will not seem self-serving.</p> <p>First, the comment about Amazon, ASINs and ISBN numbers is wrong in a number of ways. In almost every circumstance where a book has an ISBN, the ASIN and the ISBN are the same. ISBNs are not now...
<p>As an alternative to isbndb (which seems like the perfect answer) I had the impression that you could pass an ISBN into an Amazon product URL to go straight to the Amazon page for the book. While this doesn't programmatically return the book title, it might have been a useful extra feature in case you wanted to link...
6,277
<p>I am developing an <strong>Isolated Shell</strong> that caters to "<strong>designers/special content creators</strong>" performing specific tasks, using the Shell. As they operate on files, they need to be able to use TFS for source control. This is mainly due to the fact that Developers will also operate on the sam...
<p>It sounds like you are trying to allow the "special content creators" save files in TFS Source Control without having to buy them a license to a Visual Studio Team Edition -- correct me if I'm wrong.</p> <p>If that's the case, unfortunately I believe that you can't quite do that. Your users still need a Client Acce...
<p>It sounds like you are trying to allow the "special content creators" save files in TFS Source Control without having to buy them a license to a Visual Studio Team Edition -- correct me if I'm wrong.</p> <p>If that's the case, unfortunately I believe that you can't quite do that. Your users still need a Client Acce...
4,156
<p>I wrote a windows service using VB that read some legacy data from Visual Foxpro Databases to be inserted in SQL 2005. The problem is this use to run fine in Windows server 2003 32-Bits, but the client recently moved to Windows 2003 64-Bits and now the service won't work. I'm getting a message the the VFP .NET OLEdb...
<p>Have you tried changing the target CPU to <code>x86</code> instead of <code>"Any CPU"</code> in the advanced compiler options? I know that this solves some problems with other <code>OLEDB</code> providers by forcing the use of the 32-bit version.</p>
<p><code>Sybase Anywhere</code> has a <code>OLEDB provider</code> for <code>VFP</code> tables. It states in the page that the server supports <code>64 bit Windows</code>, don't know about the <code>OLEDB provider</code>:</p> <blockquote> <p>Support 64-bit Windows and Linux Servers</p> <p>In order to further enhance sca...
2,314
<p>I see plans for various spool holders, either for PLA in the open, or for whatever filament in a dry box, that use 608 bearings. Elsewhere, I see warnings not to oil your filament to make it go through the extruder better, because problems going through mean something else is wrong, and it's better to fix the other ...
<p>Typically, oiling a filament would mean to use a vegetable based or non-petroleum type of lubricant, possibly even PTFE (teflon) or silicone. Those materials will not damage PLA filament. </p> <p>Oiling filament is not the haphazard application of lubricant, however. One drop on the filament sponge guide will last ...
<p>Typically, oiling a filament would mean to use a vegetable based or non-petroleum type of lubricant, possibly even PTFE (teflon) or silicone. Those materials will not damage PLA filament. </p> <p>Oiling filament is not the haphazard application of lubricant, however. One drop on the filament sponge guide will last ...
988
<p>I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord?</p> <p><em>Later:</em></p> <p>I appreciate all the suggestions to use other databases, but trust me: I've tried convincing them. There is an "approved" list, ...
<p>It's a long shot but there's an <a href="http://odbc-rails.rubyforge.org/" rel="nofollow noreferrer">ODBC adapter for ActiveRecord</a> that might work.</p>
<p>You should really talk them into allowing SQLite. It is super-simple to setup, and operates like Access would (as a file sitting next to the app on the same server).</p>
4,039
<p>Which of these will heat a bed fastest?</p> <ul> <li><p>A. 12&nbsp;V, 10&nbsp;A power supply</p></li> <li><p>B. 24&nbsp;V, 5&nbsp;A power supply</p></li> <li><p>C. Both A and B will be the same (only total watts matter)</p></li> <li><p>D. Depends on the situation</p></li> </ul> <p>I originally thought Amperage was...
<p>It depends on whether you are re-using the bed or not, it is actually the resistance of the bed that determines this in conjunction with the voltage (the current you get for free).</p> <p>Let's say that the heatbed resistance is 1.2&nbsp;&ohm; (depending on the heated bed make and model the resistance is typically ...
<p>Bed heaters look like this <a href="https://i.stack.imgur.com/A9Gqn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9Gqn.jpg" alt="enter image description here"></a></p> <p>They are rated for use with 12V or 24V supplies. 12V supply would take longer to warm it up, as P = V^2/R. Say it was a 2...
1,473
<p>We have an external service that is currently accessible via the http (port 80, non-SSL) and https (port 443, SSL) addresses.</p> <p>What is the best way to limit connections to only the https address? Is it something we can do via IIS or does it have to be done via code.</p> <p>Additional info: Regular ASP.NET we...
<ol> <li>Require SSL on the application</li> <li>In a custom error page for the 403 redirect the browser to the incoming URL, changing http to https along the way.</li> </ol> <p>Note: Keep port 80 open for this - or there won't be a server to listen for requests to redirect.</p>
<p>Is just not accepting any connections on port 80 an option? I'm a complete web server noob so I don't know if the server can operate without an unsecured listen port but if the server can operate only listen on port 443 that would seem to be simplest option.</p> <p>Another option would be a redirect from the unsec...
5,082
<p>Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding content: </p> <ul> <li>Development team adding code. </li> <li>Business team adding simple web pages. </li> </ul> <p>For sanity and organization, we would like for the business team to add their web pages to a sub-folder in the project: </p> ...
<p>Since the extensions will be ASPX, ASP.NET will pick up the request... you can write an HttpModule that checks for pages that yield a 404 and then check the subfolder also.</p> <p>If you know that all pages with a certain format will be coming from that folder, then you can just rewrite the URL in ASP.NET (either i...
<p>Since the extensions will be ASPX, ASP.NET will pick up the request... you can write an HttpModule that checks for pages that yield a 404 and then check the subfolder also.</p> <p>If you know that all pages with a certain format will be coming from that folder, then you can just rewrite the URL in ASP.NET (either i...
6,780
<p><a href="https://e3d-online.com/blogs/news/are-abrasives-killing-your-nozzle" rel="nofollow noreferrer">E3D-Online</a> and <a href="http://makezine.com/2015/09/11/carbon-fiber-filament-ruins-nozzles/" rel="nofollow noreferrer">Make Magazine</a> have written about the potential damage printing carbon fiber and glow i...
<p>I believe the little experiment made by E3D - the same link you provide - answers your question very well. Several points about wear can be found in this article. After printing only 250 grams of ColorFabb XT-CF20 (carbon fiber filament):</p> <ul> <li>The nozzle diameter had increased markedly</li> <li>The inner wa...
<p>You can check for shortened nozzle length using a set of feeler gauges to measure the gap from bed to nozzle. <a href="https://en.wikipedia.org/wiki/Feeler_gauge" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Feeler_gauge</a></p>
163
<p>We can successfully consume a .NET 2.0 web service from a Flex/AS3 application. Aside from SSL, how else can we make the security more robust (i.e., authentication)?</p>
<p>You can leverage ASP.Net's built in session management by decorating your webmethods with </p> <blockquote> <p><code>&lt;EnableSession()&gt;</code></p> </blockquote> <p>Then, inside your method, you can check that the user still has a valid session.</p>
<p>If you're talking about <strong>securing the information</strong> going over the wire, you can use Web Service Extensions (WSE) to encrypt the body of the soap message so that you don't have to secure the channel. This way the message can get passed around from more than one endpoint (ie. it can get forwarded) and y...
8,472
<p>I'm doing some PHP stuff on an Ubuntu server.</p> <p>The path I'm working in is <strong>/mnt/dev-windows-data/Staging/mbiek/test_list</strong> but the PHP call <code>getcwd()</code> is returning <strong>/mnt/dev-windows/Staging/mbiek/test_list</strong> (notice how it's dev-windows instead of dev-windows-data).</p> ...
<p>Which file are you calling the getcwd() in and is that file is included into the one you are running (e.g. running index.php, including startup.php which contains gwtcwd()).</p> <p>Is the file you are running in /dev-windows/ or /dev-windows-data/? It works on the file you are actually running.</p> <hr> <p>Here's...
<p><a href="https://stackoverflow.com/questions/30307/why-would-getcwd-return-a-different-directory-than-a-local-pwd#30313">@Ross</a></p> <p>I thought that getcwd() was returning a filesystem path rather than a relative url path.</p> <p>Either way, the fact remains that the path /mnt/dev-windows <strong>doesn't</stro...
5,020
<p>I am looking for a method of reading emails using Pop3 in C# 2.0. Currently, I am using code found in <a href="http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx?fid=341657" rel="noreferrer">CodeProject</a>. However, this solution is less than ideal. The biggest problem is that it doesn't support emails written in...
<p>I've successfully used <a href="http://sourceforge.net/projects/hpop/" rel="noreferrer">OpenPop.NET</a> to access emails via POP3. </p>
<p>call me old fashion but why use a 3rd party library for a simple protocol. I've implemented POP3 readers in web based ASP.NET application with System.Net.Sockets.TCPClient and System.Net.Security.SslStream for the encryption and authentication. As far as protocols go, once you open up communication with the POP3 s...
6,614
<p>Here's the scenario. I'm using myopenid for, among other things, StackOverflow. When I initially set up my openid account with myopenid, I decided to try out Cardspace because they had support.</p> <p>I later wanted to access Stackoverflow from another machine so I chose to back up my card. I gave it a password and...
<p>It <em>should</em> work; however if you have 3.5SP1 on one machine and 3.5 or less on another there was an (unannounced) breaking change with the code to generate the unique ID from the card; which may explain why it doesn't work.</p> <p>I would try sending a test transaction to <a href="https://sharpsts.com/demos/...
<p>In Cardspace, the card is locked to the computer. You can move it around by exporting/importing. The next version "Geneva" will allow you to store your cards in a directory service which is useful for those running Active Directory.</p>
8,136
<p>How do you use the the org.springframework.ws.transport.jms.WebServiceMessageDrivenBean class from the Java Spring Framework - Spring-WS project?</p> <p>There is very little documentation or examples available on the web.</p>
<p>From what I gather from reading the <a href="http://static.springframework.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/transport/jms/WebServiceMessageDrivenBean.html" rel="nofollow noreferrer">javadocs</a> it looks like this allows a Spring <a href="http://static.springframework.org/spring-ws/sites/1.5/ap...
<p>Using the WebServiceMessageDrivenBean is very similar to the Spring support for Message Driven Beans (MDBS).</p> <p>First you create a MDB:</p> <pre><code>public class HelloWorldMessageDrivenBean extends WebServiceMessageDrivenBean { private static final long serialVersionUID = -2905491432314736668L; } </code>...
5,874
<p>I want to include a batch file rename functionality in my application. A user can type a destination filename pattern and (after replacing some wildcards in the pattern) I need to check if it's going to be a legal filename under Windows. I've tried to use regular expression like <code>[a-zA-Z0-9_]+</code> but it doe...
<p>You can get a list of invalid characters from <a href="http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidpathchars.aspx" rel="noreferrer"><code>Path.GetInvalidPathChars</code></a> and <a href="http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidfilenamechars.aspx" rel="noreferrer"><code>G...
<p>One liner for verifying illigal chars in the string:</p> <pre><code>public static bool IsValidFilename(string testName) =&gt; !Regex.IsMatch(testName, "[" + Regex.Escape(new string(System.IO.Path.InvalidPathChars)) + "]"); </code></pre>
8,825
<p>I'm looking for real world best practices, how other people might have implemented solutions with complex domains.</p>
<p>Any time you consider using an <code>IEqualityComparer&lt;T&gt;</code>, pause to think if the class could be made to implement <code>IEquatable&lt;T&gt;</code> instead. If a <code>Product</code> should always be compared by ID, just define it to be equated as such so you can use the default comparer.</p> <p>That sa...
<p>I would say that the best use would be when you need to plug in different equality rules for a certain algorithm. Much in the same way that a sorting algorithm might accept an <code>IComparer&lt;T&gt;</code>, a finding algorithm might accept an <code>IEqualityComparer&lt;T&gt;</code></p>
9,975
<p>Suppose you're developing a software product that has periodic releases. What are the best practices with regard to branching and merging? Slicing off periodic release branches to the public (or whomever your customer is) and then continuing development on the trunk, or considering the trunk the stable version, tagg...
<p>I have tried both methods with a large commercial application. </p> <p>The answer to which method is better is highly dependent on your exact situation, but I will write what my overall experience has shown so far. </p> <p><strong>The better method overall (in my experience): The trunk should be always stable.</s...
<p>There's no one-size-fits-all answer for the subversion convention question IMHO.</p> <p>It really depends on the dynamics of the project and company using it. In a very fast-paced environment, when a release might happen as often as every few days, if you try to religiously tag and branch, you'll end up with an unm...
5,619
<p>I am working on a web application, where I transfer data from the server to the browser in XML.</p> <p>Since I'm danish, I quickly run into problems with the characters <code>æøå</code>.</p> <p>I know that in html, I use the <code>"&amp;amp;aelig;&amp;amp;oslash;&amp;amp;aring;"</code> for <code>æøå</code>.</p> <...
<p>Just specifying UTF-8 in the header is not enough. I'd bet you haven't saved your file as UTF-8. Any reasonably advanced text editor will have this option. Try that and I'm sure it'll work!</p>
<p>This works as expected for me:</p> <pre><code>alert("&amp;aelig;&amp;oslash;&amp;aring;"); </code></pre> <p>... creates an alert containing the string "&amp;aelig;&amp;oslash;&amp;aring;" whereas</p> <pre><code>alert("æøå"); </code></pre> <p>... creates an alert with the non-ascii characters.</p> <p>Javascript ...
8,587
<p>I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using iframes so that you incur the load time only once? Is there a CSS alternative to the iframe?</p> <p>Feel free to <a href="http://csm.dev11.com" rel="nofollow noreferrer">preview the site</a>.</p>...
<blockquote> <p>I should also have mentioned that I would like the banner rotation to keep moving. When the visitor clicks on a link, the banner rotation starts over. It would be nice if the "animation" kept rotating, regardless of the page the user visits.Blockquote</p> </blockquote> <p>Well, in that case I would s...
<p>I find the main challenge with iFrame headers is resizing. Since the font in your header is of static size, I don't see a problem with using an iFrame. Although I'm not sure if it's really intensive enough to be worth it.</p>
3,797
<blockquote> <p>Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are:</p> <ul> <li>Running the tests becomes automate-able and repeatable</li> <li>You can test at a much more granular level than point-and-click testing via a GUI</li> </...
<p>Ok here's some best practices from some one who doesn't unit test as much as he should...cough.</p> <ol> <li>Make sure your tests test <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=35578" rel="noreferrer" title="one">one</a> thing and one thing only.</li> <li>Write unit tests as you go. Preferably <a h...
<p>NUnit is a good tool for any of the .NET languages.</p> <p>Unit tests can be used in a number of ways: </p> <ol> <li>Test Logic</li> <li>Increase separation of code units. If you can't fully test a function or section of code, then the parts that make it up are too interdependant.</li> <li>Drive development, some...
3,755
<p>MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows the creation of sequential workflows whos activities have native access to CRM entities.</p> <p>Is it possible to:</p> <ul> <li>Create a state machine workflow outside of CRM (i.e. in visual studio) and import it into CRM? </li> <li>H...
<ul> <li>It is NOT possible to create a state machine workflow for use in MSCRM.</li> <li>It is also not supported to create any workflow outside of MSCRM and import it.</li> <li>As a work around you could write either all the logic you need into a custom workflow activity and import that into MSCRM and have it called ...
<p>I don't know the answer to your specific question, but hopefully this information will point you in the right direction.</p> <p>The "native" format for WF workflows is ".xoml" files. These are basically identical to XAML files, and both are nothing more than generic persistence formats for a .NET object tree. If ...
5,427
<p>Is it possible to create images with PHP (as opposed to simply linking to them via HTML) and if so, where should I go first to learn about such a thing?</p>
<p>I prefer the <a href="http://www.php.net/gd" rel="nofollow noreferrer">GD library</a> - check out <a href="http://www.php.net/manual/en/image.examples.php" rel="nofollow noreferrer">the Examples</a>, and this example:</p> <pre><code>&lt;?php header ("Content-type: image/png"); $im = @imagecreatetruecolor(120, 20) ...
<p>MagickWand is pretty good for that as well, and pretty powerful.</p> <p><a href="http://www.bitweaver.org/doc/magickwand/index.html" rel="nofollow noreferrer">http://www.bitweaver.org/doc/magickwand/index.html</a></p> <p>This snippet will take an image, wrie the 'rose' in Vera, or whatever fonts are available, and...
4,473
<p>To start with, as stated in the title, I am very new to 3D printing.</p> <p>We're a toy/boardgame shop and we're experimenting with 3D printing because it could open up a huge market for us. To this end, I'm asked to try to get this off the ground, but also for me it's a big experiment.</p> <h2>General Information</...
<p>There are several issue at hand here, first you have an adhesion problem.</p> <p><a href="https://i.stack.imgur.com/2CU9L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2CU9L.png" alt="enter image description here" /></a></p> <p>This print shows that the print (as it is printed upright) has come ...
<p><strong>Adhesion</strong></p> <p>Try raising your bed temperature a couple of degrees at a time. Presumably your filament has some &quot;suggested temperatures&quot; on the spool, but they sometimes only give a hotend's temp. For PLA some people get good results with a 50 degree C bed, I find nothing less than 60...
2,173
<p>I have a listening port on my server that I'm connecting to using a Java class and the <code>Socket</code> interface, i.e.</p> <pre><code>Socket mySocket = new Socket(host,port); </code></pre> <p>I then grab an <code>OutputStream</code>, decorate with a <code>PrintWriter</code> in autoflush mode and I'm laughing -...
<p>Set a short timeout?</p> <p>Does <code>isOutputShutdown()</code> not get you what you want?</p> <p>You could always build a <code>SocketWatcher</code> class that spins up in its own <code>Thread</code> and repeatedly tries to write empty strings to the <code>Socket</code> until that raises a <code>SocketClosedExce...
<p>Set a different thread to reading from the socket. It will block until the socket is closed, and then an exception will be thrown. Catch that exception to detect the close immediately.</p>
4,276
<p>Being new to Objective-C (but a long term C/++) programmer I'm looking for advice/recommendations on naming conventions for variables.</p> <p>My personal preference would be to utilize a prefix for instance variables both for clarity within functions and to prevent shadowing of function parameters. However I'm a fa...
<p>Most Cocoa projects use underbar as a non-<code>IBOutlet</code> instance variable prefix, and use no prefix for <code>IBOutlet</code> instance variables.</p> <p>The reason I don't use underbars for <code>IBOutlet</code> instance variables is that when a nib file is loaded, if you have a setter method for a connecte...
<p>I don't like using underscores as prefixes for any identifiers, because C and C++ both reserve certain underscore prefixes for use by the implementation.</p> <p>I think using "self.variable" is ugly.</p> <p>In general, I use unadorned identifiers (that is, no prefixes nor suffixes) for instance variables. If your...
3,155
<p>Can you specialize a template method within a template class without specializing the class template parameter?</p> <p>Please note that the specialization is on the <em>value</em> of the template parameter, not its type.</p> <p>This seems to compile under Visual Studio 2008 SP1 complier, but not GCC 4.2.4.</p> <p...
<p>It is not supported in the standard (and it is apparently a known bug with Visual Studio that you <em>can</em> do it).</p> <p>The standard doesn't allow an inner template (member function <em>or</em> class) to be specialized without the outer template being specialized as well. One of the reasons for this is that ...
<p>I've never heard of that being possible; it would make sense to me if it was <em>not</em> supported by all compilers. So here is an idea for a workaround:</p> <p>Implement a template function outside of your class which takes the same action as the method. Then you can specialize this function, and it call it fro...
9,005
<p>Should it be possible to directly send G-code to the printer serial connection using pipes under Linux?</p> <p>Example:</p> <pre><code>echo M106 &gt; /dev/ttyUSB0 </code></pre> <p>My controller runs at 250000 baud, I have tried setting the TTY baud rate to 250 kBd with: </p> <pre><code>stty -F /dev/ttyUSB0 25000...
<p>For direct low-level printer control from a terminal, without specific software, I found the following solution with full credit thanks to user: <a href="http://stackexchange.com/users/6463673/meuh">http://stackexchange.com/users/6463673/meuh</a></p> <p>Sharing here as may be of use to other users in the 3d Printin...
<p>That's work solution: <div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/1kcvIRhXkCo?start=0"></iframe> </div></div> you need 2 terminal, one for in and another for out flows </p>
437
<p>So you have a String that is retrieved from an admin web UI (so it is definitely a String). How can you find out whether this string is an IP address or a hostname in Java?</p> <p>Update: I think I didn't make myself clear, I was more asking if there is anything in the Java SDK that I can use to distinguish between...
<p>You can use a regular expression with this pattern:</p> <pre><code>\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b </code></pre> <p>That will tell you if it's an IPv4 address.</p>
<p>Couldn't you just to a regexp match on it?</p>
9,251
<p>I've been running Tomcat 5.5 with Java 1.4 for a while now with a huge webapp. Most of the time it runs fine, but sometimes it will just hang, with no exception generated, and no apparant way of getting it to run again other than re-starting Tomcat. The tomcat instance is allowed a gigabyte of memory on the heap, ...
<p>For any jvm process, force a thread dump. In windows, this can be done with CTRL-BREAK, I believe, in the console window.</p> <p>In *nix, it is almost always "kill -3 jvm-pid".</p> <p>This may show if you have threads waiting on db connection pool/thread pool, etc.</p> <p>Another thing to check out is how many co...
<p>It sounds like you're hitting a deadlock.</p> <p>If you can reproduce it in a dev environment then try attaching a debugger once it's happened. Take a look at your threads and see if you have any deadlocks.</p> <p>If you can't get a debugger to attach you should be able to generate a thread dump, as Dustin pointe...
9,176
<p>I am trying to find out if it's possible to build a complete IVR application by cobbling together parts from open source projects. Is anyone using a non-commercial VoiceXML implementation to build speech-enabled systems?</p>
<p>I've tried JVoiceXML in the past and had some luck with it.</p> <p><a href="http://jvoicexml.sourceforge.net/" rel="noreferrer">http://jvoicexml.sourceforge.net/</a></p> <p>It's java of course, but that wasn't a problem for my situation.</p>
<p>If you want to build an IVR and you're not married to VoiceXML, you might try <a href="http://www.twilio.com/" rel="nofollow noreferrer">Twilio</a>. They have a simple XML syntax, an awesome REST API, and small-project-friendly pay per minute pricing which lets you concentrate on building your app and not building/h...
5,668
<p>Hey all, my Computational Science course this semester is entirely in Java. I was wondering if there was a good/preferred set of tools to use in ubuntu. Currently I use gedit with a terminal running in the bottom, but I'd like an API browser. </p> <p>I've considered Eclipse, but it seems to bloated and unfriendly f...
<p>Java editing tends to go one of two ways; people either stick with a simple editor and use a terminal to compile/run their programs, or they use a big IDE with a zillion features.</p> <p>I usually go the simple route and just use a plain text editor and terminal, but there's still a lot to be said for IDEs. This i...
<p>I'm using NetBeans with success right now.</p>
9,380
<p>I am looking to others who have successfully printed in ABS using a Wanhao Duplicator i3. </p> <p>I have tried and get a lot of warping and delamination. I tried putting a large box over the printer which did help with the warping some but I am still getting some layer separation. I used 235&nbsp;°C for the extrude...
<p>I am an official Wanhao Distributor</p> <p>By experience I can recommend you to print with this settings:</p> <ul> <li>Extruder 230 °C </li> <li>Heated Bed 65 °C</li> <li>Have a glass surface</li> <li>Use hairspray over the glass</li> <li>Continue to enclose the printer or at least put it where there is almost no ...
<p>I've had hit and miss success, but nothing I would consider great. I was using Hatchbox ABS with the extruder at 230&nbsp;°C and the bed at 65&nbsp;°C and a homemade enclosure. </p> <p>One thing that did help was making sure the HVAC vents near the printer were closed. </p>
277
<p>Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)</p>
<p>Like others have mentioned, NetBeans' visual editor is pretty good, but it's based pretty heavily on the <a href="https://java.net/projects/appframework/" rel="nofollow noreferrer">Swing Application Framework</a>, so you'd need to get an understanding of how it works to properly use it (although you don't need to di...
<p><a href="https://developers.google.com/java-dev-tools/download" rel="nofollow">window builder pro</a> is good option and it is free also.</p>
4,602
<p>When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): </p> <pre> /NinjaProg/branches /tags /trunk /StealthApp/bra...
<p>I am surprised no has mentioned that this is discussed in Version Control with Subversion, which is available free online, <a href="http://svnbook.red-bean.com/en/1.5/svn.reposadmin.planning.html" rel="nofollow noreferrer">here</a>.</p> <p>I read up on the issue awhile back and it really seems like a matter of perso...
<p>One repository per project.</p> <p>Steven Murawski's comment about CC.NET is an interesting one. I would be interested to hear how it works if you need to specify several source control repositories.</p>
3,643
<p>What I have so far is </p> <pre><code>#!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) retval=$? if [ $retval -gt 0 ]; then echo "========...
<p>If the commit is a partial commit (not all the changes in the working tree are committed), then this make give incorrect results since it tests the working copy and not the staged copy.</p> <p>One way to do this could be:</p> <pre><code>git diff --cached --name-only --diff-filter=ACMR | xargs git checkout-index --...
<p>If you've got the php5-cli installed you can write your pre-commit in PHP and use the syntax your more familiar with.</p> <p>Just do something more like.</p> <pre><code>#!/usr/bin/php &lt;?php /* Your pre-commit check. */ ?&gt; </code></pre>
6,499
<p>What is the best way to upload a file to a Document Library on a SharePoint server through the built-in web services that version WSS 3.0 exposes?</p> <p><strong>Following the two initial answers...</strong></p> <ul> <li><p>We definitely need to use the Web Service layer as we will be making these calls from remot...
<p>Example of using the WSS "Copy" Web service to upload a document to a library...</p> <pre><code>public static void UploadFile2007(string destinationUrl, byte[] fileData) { // List of desination Urls, Just one in this example. string[] destinationUrls = { Uri.EscapeUriString(destinationUrl) }; // Empty ...
<p>From a colleage at work:</p> <blockquote> <p>Lazy way: your Windows WebDAV filesystem interface. It is bad as a programmatic solution because it relies on the WindowsClient service running on your OS, and also only works on websites running on port 80. Map a drive to the document library and get with the file copyin...
5,179
<p>Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.</p> <p>The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point...
<p>First you will need some GUI library with Python bindings and then (if you want) some program that will convert your python scripts into standalone executables.</p> <p><strong>Cross-platform GUI libraries with Python bindings (Windows, Linux, Mac)</strong></p> <p>Of course, there are many, but the most popular tha...
<p>You don't need to <em>compile</em> python for Mac/Windows/Linux. It is an interpreted language, so you simply need to have the Python interpreter installed on the system of your choice (it is available for all three platforms).</p> <p>As for a GUI library that works cross platform, Python's <a href="http://www.tcl...
2,508
<p>Has anyone managed to use <code>ItemizedOverlays</code> in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. </p> <p>I've been trying to use the <code>ItemizedOverlay</code> and <code>OverlayItem</code> classes. Their intended purpo...
<p>For the sake of completeness I'll repeat the discussion on Reto's post over at the <a href="http://groups.google.com/group/android-developers/browse_thread/thread/36fe0648dabfe745#" rel="noreferrer">Android Groups here</a>.</p> <p>It seems that if you set the bounds on your drawable it does the trick:</p> <pre><co...
<p>try :</p> <pre><code>Drawable defaultMarker = r.getDrawable(R.drawable.icon); defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(), defaultMarker.getIntrinsicHeight()); MyItemizedOverlay markers = new MyItemizedOverlay(defaultMarker); overlays.add(markers); </code></pre>
4,592