instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project.</p> <p>How does this relate to Visual Studio and Projects/Solutions there?</p>
<p>A VS project is it's own entity. It will build and compile by itself. A Solution is just a way to contain multiple projects. The projects don't necessarily need the other projects to compile (though, they can depend on the other projects). </p> <p>This just lets you conceptually group projects together into one Big...
<p>A Solution has 0 or many Projects...</p>
8,163
<ul> <li>I am curious, what is the purpose of printing a single-height outline around the objects to be printed?</li> <li>Also, how would it affect the outline if the object to be printed extends to (very near) the very edge of the print area?</li> </ul> <p><a href="https://i.stack.imgur.com/vEr8Z.png" rel="noreferrer...
<blockquote> <p>I am curious, what is the purpose of printing a single-height outline around the objects to be printed?</p> </blockquote> <p>The (equidistant) lines at distance from the print object is called the "skirt", the skirt is an option found under the "Build Plate Adhesion" options in your slicer. The prima...
<p>My understand is that's is basically a purging extrusion, so that you get flow through the extruder before you start printing the object, as filament that's been inside the hotend during warm-up might have been "overcooked" by spending too much time in the hotend at temperature. It also helps stabilise the PID loop ...
1,640
<p>If you had to provide a wizard like form entry experience in mvc how would you abstract the page flow?</p>
<p>Investigate the post-redirect-get pattern.</p> <p><a href="http://weblogs.asp.net/mhawley/archive/tags/MVC/default.aspx" rel="nofollow noreferrer">http://weblogs.asp.net/mhawley/archive/tags/MVC/default.aspx</a><br> <a href="http://devlicio.us/blogs/tim_barcz/archive/2008/08/22/prg-pattern-in-the-asp-net-mvc-framew...
<p>There are a couple ways, create an action for each step of the wizard process, or create a parameter that is passed in to the action method. Like <em>step</em> that will allow you to know what the state of the wizard is in.</p>
3,705
<p>For me <strong>usable</strong> means that:</p> <ul> <li>it's being used in real-wold</li> <li>it has tools support. (at least some simple editor)</li> <li>it has human readable syntax (no angle brackets please) </li> </ul> <p>Also I want it to be as close to XML as possible, i.e. there must be support for attribut...
<p>YAML is a 100% superset of JSON, so it doesn't make sense to reject YAML and then consider JSON instead. YAML does everything JSON does, but YAML gives so much more too (like references).</p> <p>I can't think of anything XML can do that YAML can't, except to validate a document with a DTD, which in my experience h...
<p>AFAIK, JSON and YAML are exactly equivalent in data structure terms. YAML just has less brackets and quotes and stuff. So I don't see how you are rejecting one and keeping the other.</p> <p>Also, I don't see how XML's angle brackets are less "human readable" than JSON's square brackets, curly brackets and quotes.</...
7,455
<p>I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the brow...
<p>This depends entirely on how smart you want the algorithm to be.</p> <p>For instance, here are some issues:</p> <ul> <li>cropped images vs. an uncropped image</li> <li>images with a text added vs. another without</li> <li>mirrored images</li> </ul> <p>The easiest and simplest <em>algorithm</em> I've seen for this...
<p>Well a really base-level method to use could go through every pixel colour and compare it with the corresponding pixel colour on the second image - but that's a probably a very <strong>very</strong> slow solution.</p>
4,555
<p>There is this great hotend called a <a href="http://reprap.org/wiki/Diamond_Hotend#Benefits_of_this_design" rel="noreferrer">diamond hotend</a>, which can be used to print in 3 colors and mix them into hundreds? of colors. This can for example be used with Red, Green and Blue filament to mix a RGB palette. They don'...
<p>You may be a bit misled here. First of all, you do <strong>not</strong> want "RGB" , as those are additive colors such as used when combining light sources. You <strong>do</strong> want "RYB" (red-yellow-blue) or the more accurate CMY(plus K just to get a 'truer' black) for subtractive colors.</p> <p>Next, there'...
<p>So whilst this is not quite what you were talking about I think this is the closest to the effect you’re looking for that I’ve seen.</p> <p><a href="https://www.xyzprinting.com/en-US/product/da-vinci-color" rel="nofollow noreferrer">https://www.xyzprinting.com/en-US/product/da-vinci-color</a></p> <p>This da Vinci ...
402
<p>I want to shift the contents of an array of bytes by 12-bit to the left.</p> <p>For example, starting with this array of type <code>uint8_t shift[10]</code>:</p> <pre><code>{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xBC} </code></pre> <p>I'd like to shift it to the left by 12-bits resulting in:</p> ...
<p>Hurray for pointers! </p> <p>This code works by looking ahead 12 bits for each byte and copying the proper bits forward. 12 bits is the bottom half (nybble) of the next byte and the top half of 2 bytes away.</p> <pre><code>unsigned char length = 10; unsigned char data[10] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0A,0x...
<p>@Joseph, notice that the variables are 8 bits wide, while the shift is 12 bits wide. Your solution works only for N &lt;= variable size.</p> <p>If you can assume your array is a multiple of 4 you can cast the array into an array of uint64_t and then work on that. If it isn't a multiple of 4, you can work in 64-bi...
4,909
<p>I'm new to SQL Server Reporting Services, and was wondering the best way to do the following:</p> <blockquote> <ul> <li>Query to get a list of popular IDs</li> <li>Subquery on each item to get properties from another table</li> </ul> </blockquote> <p>Ideally, the final report columns would look like this:<...
<p>I would recommend using a <a href="http://msdn.microsoft.com/en-us/library/ms160348.aspx" rel="nofollow noreferrer">SubReport</a>. You would place the SubReport in a table cell.</p>
<p>Simplest method is this:</p> <pre><code>select *, (select count(*) from tbl2 t2 where t2.tbl1ID = t1.tbl1ID) as cnt from tbl1 t1 </code></pre> <p>here is a workable version (using table variables):</p> <pre><code>declare @tbl1 table ( tbl1ID int, prop1 varchar(1), prop2 varchar(2) ) declare @tbl2 table ( tb...
4,125
<p>How to obtain Vista Edition programmatically, that is Home Basic, Home Premium, Business or Ultimate ?</p>
<p>MSDN gives extensive answer:</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms724429%28VS.85%29.aspx" rel="nofollow noreferrer">Getting the System Version</a></p>
<p>Brilliant! This is just what I need as well. Thanks aku.</p> <p>edg: Environment.OSVersion contains a version string but this doesn't generally give enough information to differentiate editions (also applies to XP Home/XP Pro). Also, there's the risk that this string will be localised so matching on it woudn't nece...
8,007
<p>I'm trying to do a simple rotation in OpenGL but must be missing the point. I'm not looking for a specific fix so much as a quick explanation or link that explains OpenGL rotation more generally.</p> <p>At the moment I have code like this:</p> <pre><code>glPushMatrix(); glRotatef(90.0, 0.0, 1.0, 0.0); glBegin(...
<p>Do you get a 1 unit straight line? It seems that 90deg rot. around Y is going to have you looking at the side of a triangle with no depth.</p> <p>You should try rotating around the Z axis instead and see if you get something that makes more sense. </p> <p>OpenGL has two matrices related to the display of geometry,...
<p>When I had a first look at OpenGL, the <a href="http://nehe.gamedev.net/" rel="nofollow noreferrer">NeHe tutorials</a> (see the left menu) were invaluable.</p>
4,371
<p>When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. </p> <p>Does anyone care to offer an efficient algorithm on how best to do this?</p>
<p>There are 2 solutions to your problem:</p> <ul> <li><p><strong>Easy way:</strong> Use an external library such as '<a href="http://gmplib.org/" rel="noreferrer">The GNU MP Bignum Library</a> and forget about implementation details.</p></li> <li><p><strong>Hard way:</strong> Design your own class/structure containin...
<p>Using the built-in features of a language work for me.</p> <p>Java has <code>BigInteger</code> and <code>BigDecimal</code>, and Python automagicaly switches to an object similar to Java's if a number gets out of the range of an <code>integer</code> or whatnot.</p> <p>As for other languages though, I have no idea.<...
4,567
<p>How can a <code>sdbm</code> hash function (such as <a href="http://www.cse.yorku.ca/~oz/hash.html" rel="nofollow noreferrer">this</a>) be implemented in C# ?</p>
<p>You can take the C code almost without changes:</p> <pre><code>uint sdbm( string str ) { uint hash = 0; foreach( char ch in str ) { hash = ch + (hash &lt;&lt; 6) + (hash &lt;&lt; 16) - hash; } return hash; } </code></pre> <p>Or did you think of something more sophisticated?</p>
<p>The result from the hash differs between the C++ and C# implementation. I figured out that str parameter needs to be passed as a byte array.</p> <pre><code>private uint sdbm(byte[] str) { uint hash = 0; foreach (char ch in str) hash = ch + (hash &lt;&lt; 6) + (hash &lt;&lt; 16) - hash; return ...
3,673
<p>I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of time (Eclipse, TextMate). Some editors cope with this a lo...
<p>Use a source control system — Subversion, Perforce, Git, Mercurial, Bazaar, etc. — so you're never editing code on a shared server. Instead you should be editing a local work area and committing changes to a repository located on the network.</p> <p>Also, convince your company to adapt their policy such that compa...
<p>Short answer: you can do no trick. CIFS is really geared towards LAN with a reasonably calm trafic, so you have zero chance to not suffer intermittent lag accessing a share through a VPN. The editor at some point needs to access the file in blocking IO, because it makes no real sense to do otherwise.</p> <p>You cou...
5,396
<p>I can never remember the differences in regular expression syntax used by tools like <a href="http://en.wikipedia.org/wiki/Grep" rel="noreferrer">grep</a> and <a href="http://en.wikipedia.org/wiki/AWK" rel="noreferrer">AWK</a>, or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm ...
<p><a href="https://rads.stackoverflow.com/amzn/click/com/0596528124" rel="nofollow noreferrer" rel="nofollow noreferrer">Mastering Regular Expressions</a>, devotes the last four chapters to Java, PHP, Perl, and <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="nofollow noreferrer">.NET</a>. One chapter for e...
<p>I find this site helpful: <a href="http://www.regular-expressions.info/" rel="noreferrer">http://www.regular-expressions.info/</a></p> <p>Other than that, I use the corresponding documentation extensively and I believe, all said and done, there's no way around that.</p>
4,322
<p>I am planning a mechanical 40% keyboard build and are coincidentally on the home stretch of a homemade CNC project.</p> <p>The only thing the CNC needs to do for the keyboard project is to drill 7*48 holes. So what I need to do now is layout those holes in SVG. Therein lies the question. What resolution should I us...
<p><strike>I found one of those printer things that puts ink on dead trees and tested to print a simple SVG file.</p> <pre><code>&lt;svg xmlns="http://www.w3.org/2000/svg" width="400px" height="800px"&gt; &lt;rect x="10" y="10" width="72" height="72" fill="#999999" /&gt; &lt;rect x="10" y="100" width="378" he...
<p>SVG is a vector-graphics format, there's no particular reason it can't scale arbitrarily. Presumably the CNC software will allow you to select the scale of a pixel? If so, pick a scale that makes the math work out easily (so some integer number of pixels per millimeter). If not, it's probably documented somewhere fo...
446
<p>Can we achieve 100% decoupling between components of a system or different systems that communicate with each other? I don't think its possible. If two systems communicate with each other then there should be some degree of coupling between them. Am I right?</p>
<p>If components are 100% decoupled, it means that they don't communicate with each other.</p> <p>Actually there are <a href="http://en.wikipedia.org/wiki/Coupling_%28computer_science%29" rel="nofollow noreferrer">different types of coupling</a>. But the general idea is that objects are not coupled if they don't depen...
<p>You can achieve that. Think of two components that communicate with each other through network. One component can run on Windows while other on Unix. Isn't that 100% decoupling?</p>
9,586
<p>Some code that rounds up the division to demonstrate (C-syntax):</p> <pre><code>#define SINT64 long long int #define SINT32 long int SINT64 divRound(SINT64 dividend, SINT64 divisor) { SINT32 quotient1 = dividend / divisor; SINT32 modResult = dividend % divisor; SINT32 multResult = modResult * 2; SINT32 qu...
<p>This functionality is introduced in <a href="http://lxr.linux.no/linux+v2.6.22/lib/div64.c" rel="noreferrer">/linux/lib/div64.c</a> as early as kernel v2.6.22.</p>
<p><code>ldiv</code> ?</p> <p>Edit: reread title, so you might want to ignore this. Or not, depending on if it has an appropriate non-library version.</p>
5,593
<p>In my web application I have a file which hold the current revision number via $Rev$. This work fine except, if I don't make any changes to that file, it doesn't get committed.</p> <p><strong>Is there anyway I can force a single file to always get committed to the SVN server?</strong></p> <p><em>I'm using Tortoise...
<p>Basically, you want the output of the <code>svnversion</code> command in a file.</p> <p>Such files are usually kept out of the repository, and automatically created by a build script. I suggest you do the same. If you don't build, but just to a <code>svn up</code> on the server side, just call <code>svnversion</cod...
<p>Depending on your client, some of them offer a pre-commit hook that you can implement something that simply "touches" the file and flags it as changed. If your using something like Visual Studio you could create a post build task that would "touch" the file but you would have to make sure that you do a build before ...
2,781
<p>I'm working on an installer (using Wise Installer, older version from like 1999).</p> <p>I'm creating a shortcut in the Programs group to an EXE. I'm also creating a shortcut on the Desktop.</p> <p>If the install is run from an Admin account, then I create the shortcut on the Common Desktop and Common Program Grou...
<p>Vista does some nifty transparent redirection to provide backwards compatibility with non-vista applications. Try installing to the All Users location as a non-admin, and Vista should transparently put your shortcuts somewhere unique to that user.</p>
<p>I had a permissions issue with an installer I created when users started installing on Vista. What solved my problem was renaming the installer to install.exe (or setup.exe). </p> <p>-Dave</p>
8,214
<p>I have an application that's a mix of Java and C++ on Solaris. The Java aspects of the code run the web UI and establish state on the devices that we're talking to, and the C++ code does the real-time crunching of data coming back from the devices. Shared memory is used to pass device state and context information f...
<p>The first thing I would do is construct a model of the system to map the data flow and try to understand precisely where the bottleneck lies. If you can model your system as a <a href="http://en.wikipedia.org/wiki/Pipeline_(software)" rel="nofollow noreferrer">pipeline</a>, then you should be able to use the theory...
<p>You need to scale sideways and out. Maybe something like a <a href="http://en.wikipedia.org/wiki/Java_Message_Service" rel="nofollow noreferrer">message queue</a> could be the backend between the frontend and the crunching.</p>
7,428
<p>I want to write a word addin that does some computations and updates some ui whenever the user types something or moves the current insertion point. From looking at the MSDN docs, I don't see any obvious way such as an TextTyped event on the document or application objects.</p> <p>Does anyone know if this is possib...
<p>As you've probably discovered, <a href="http://msdn.microsoft.com/en-us/library/aa269681(office.10).aspx" rel="nofollow noreferrer">Word has events</a>, but they're for really coarse actions like a document open or a switch to another document. I'm guessing MS did this intentionally to prevent a crappy macro from s...
<p>As you've probably discovered, <a href="http://msdn.microsoft.com/en-us/library/aa269681(office.10).aspx" rel="nofollow noreferrer">Word has events</a>, but they're for really coarse actions like a document open or a switch to another document. I'm guessing MS did this intentionally to prevent a crappy macro from s...
7,957
<p>I have a Visual Studio 2005 Solution workspace which in turn has 8 projects included in it. I want to profile the complete code(all the projects) and get some measure about the absolute cycles taken by each function to execute, or at least percentage cycle consumptions.</p> <p>I checked out help for VS 2005, and al...
<p>I guess the inbuilt profiler of Visual Studio 2005 comes onyl with the Developer Edition and Team Edition. I have a Professional edition which, it seems doesnot have the inbuilt profiler tool.</p> <p>-AD</p>
<p>Red-gate's <a href="http://www.red-gate.com/products/ants_profiler/index.htm" rel="nofollow noreferrer">Profiler</a> is great for this.</p>
6,775
<p>I am trying to set a <code>javascript</code> <code>date</code> so that it can be submitted via <code>JSON</code> to a <code>.NET</code> type, but when attempting to do this, <code>jQuery</code> sets the <code>date</code> to a full <code>string</code>, what format does it have to be in to be converted to a <code>.NET...
<p><a href="http://support.microsoft.com/kb/320687" rel="nofollow noreferrer" title="KB Article 320687">Microsoft KB Article 320687</a> has a detailed answer to this question.</p> <p>Basically, you override the WndProc method to return HTCAPTION to the WM_NCHITTEST message when the point being tested is in the client ...
<p>VC++ 2010 Version (of FlySwat's):</p> <pre><code>#include &lt;Windows.h&gt; namespace DragWithoutTitleBar { using namespace System; using namespace System::Windows::Forms; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Data; using names...
5,008
<p>I have values stored as strings in a <code>DataTable</code> where each value could really represent an <code>int</code>, <code>double</code>, or <code>string</code> (they were all converted to strings during an import process from an external data source). I need to test and see what type each value really is.</p> ...
<p>Would use double.TryParse, it has performance benefits.</p>
<p>I'd personally use int.tryparse, then double.tryparse. Performance on those methods is quite fast. They both return a Boolean. If both fail then you have a string, per how you defined your data.</p>
2,422
<p>I know the following libraries for drawing charts in an SWT/Eclipse RCP application:</p> <ul> <li><a href="http://www.eclipse.org/articles/article.php?file=Article-BIRTChartEngine/index.html" rel="noreferrer">Eclipse BIRT Chart Engine</a> (Links to an article on how to use it)</li> <li><a href="http://www.jfree.org...
<p>I have not used BIRT or JGraph, however I use JFreeChart in my SWT application. I have found the best way to use JFreeChart in SWT is by making a composite an AWT frame and using the AWT functionality for JFreeChart. The way to do this is by creating a composite </p> <pre><code>Composite comp = new Composite(parent...
<p>There's also JGraph, but I'm not sure if that's only for graphs (i.e. nodes and edges), or if it does charts also.</p>
4,285
<p>My Anet A8 was working and printing great until my hotbed connector snapped and shorted out my motherboard. After replacing the connections to my hotbed and my motherboard I can't print anything because the filament flow is very inconsistent. It often laying down nothing. See my included picture. </p> <p>I've tried...
<p>Thanks everyone for the tips. I posted this question on another board and it was suggested my extruder was clogged. After unclogging everything works great again. </p>
<p><em>Please note that the problems you faced are typical for the Anet A8, the connectors are underrated for the application. Also, do note that the stock firmware does not have thermal runaway protection, which is considered to be very unsafe and could potentially lead to burning down your house! Please flash a firmw...
1,067
<p>When I am writing code in Python, I often need to remove items from a list or other sequence type based on some criteria. I haven't found a solution that is elegant and efficient, as removing items from a list you are currently iterating through is bad. For example, you can't do this:</p> <pre><code>for name in na...
<p>Two easy ways to accomplish just the filtering are:</p> <ol> <li><p>Using <code>filter</code>:</p> <p><code>names = filter(lambda name: name[-5:] != "Smith", names)</code></p></li> <li><p>Using list comprehensions:</p> <p><code>names = [name for name in names if name[-5:] != "Smith"]</code></p></li> </ol> <p>Not...
<p>Well, this is clearly an issue with the data structure you are using. Use a hashtable for example. Some implementations support multiple entries per key, so one can either pop the newest element off, or remove all of them.</p> <p>But this is, and what you're going to find the solution is, elegance through a differe...
3,899
<p>Can the glTF format be used for 3D printing?</p> <p>If not, is there any tool can convert it to another format such as STL, OBJ, STEP, and IGES? </p>
<p>As far as can be found it should be possible to convert glTF into STL (or OBJ).</p> <p>You could try to use an online converter to do this, e.g. <a href="http://www.greentoken.de/onlineconv/" rel="nofollow noreferrer">this one (greentoken)</a>; and <a href="http://assimp.sourceforge.net/main_features_formats.html" ...
<p>No, <code>gltf</code> is not a format that slicers accept commonly, and indeed, it is not even intended to be reverseable in the 1.0 format version. This has changed a little for the 2.0 standard. Some programs that allow exporting into the sliceable <code>stl</code> and <code>obj</code> formats can also import <co...
1,037
<p>We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively?</p> <blockquote> <p><a href="http://code.google.com/support/bin/answer.py?answer=65301&amp;topic=10945" rel="noreferrer">Will the Maps API w...
<p>I'd agree with the previous two answers that in this instance it may be better from a usability perspective to split the two functions into separate screens. You really want your users to be focussed on entering complete and accurate credit card information, and having a map on the same screen may be distracting.</p...
<p>I 've just removed the http protocol and it worked!</p> <p>From this:</p> <pre><code>&lt;script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>To this:</p> <pre><code>&lt;script src="//maps.google.com/maps/api/js?sensor=true" type="text/javascript"...
2,556
<p>What are attributes in .NET, what are they good for, and how do I create my own attributes?</p>
<p>Metadata. Data about your objects/methods/properties. </p> <p>For example I might declare an Attribute called: DisplayOrder so I can easily control in what order properties should appear in the UI. I could then append it to a class and write some GUI components that extract the attributes and order the UI elements ...
<p>Attributes are also commonly used for Aspect Oriented Programming. For an example of this check out the <a href="http://www.postsharp.org" rel="nofollow noreferrer">PostSharp</a> project.</p>
4,072
<p>In your applications, what's a "long time" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours?</p> <p>and on which database?</p>
<p>transactions: minutes.</p> <p>Cursors: 0seconds maximum, if you use a cursor we fire you. </p> <p><strong>This is not ridiculous when you consider we are in a high availability web environment, that has to run sql server, and we don't even allow stored procs because of inability to accurately version and maintain ...
<p>Generally I agree with the other answers: Avoid cursors when possible (in most cases) and close them as fast as possible.</p> <p>However: It all depends on the environment you're working in. </p> <ul> <li>If it is a production website environment with lots of users, make sure that the cursor goes away before someo...
3,190
<p>I would like to parse a string such as <code>p1=6&amp;p2=7&amp;p3=8</code> into a <code>NameValueCollection</code>.</p> <p>What is the most elegant way of doing this when you don't have access to the <code>Page.Request</code> object?</p>
<p>There's a built-in .NET utility for this: <a href="http://msdn.microsoft.com/en-us/library/ms150046.aspx" rel="noreferrer">HttpUtility.ParseQueryString</a></p> <pre class="lang-cs prettyprint-override"><code>// C# NameValueCollection qscoll = HttpUtility.ParseQueryString(querystring); </code></pre> <pre class="la...
<p>This is my code, I think it's very useful: </p> <pre><code>public String GetQueryString(string ItemToRemoveOrInsert = null, string InsertValue = null ) { System.Collections.Specialized.NameValueCollection filtered = new System.Collections.Specialized.NameValueCollection(Request.QueryString); if (ItemToRemov...
9,416
<p>Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed.</p> <p>But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time.</p> <p>Why does Java choose this strategy and what is the benefit from thi...
<p>There are drawbacks of using reference counting. One of the most mentioned is circular references: Suppose A references B, B references C and C references B. If A were to drop its reference to B, both B and C will still have a reference count of 1 and won't be deleted with traditional reference counting. CPython (re...
<p>Late in the game, but I think one significant rationale for RC in python is its simplicity. See this <a href="http://mail.python.org/pipermail/python-list/2005-October/921938.html" rel="nofollow noreferrer">email by Alex Martelli</a>, for example.</p> <p>(I could not find a link outside google cache, the email date...
4,194
<p>I am using MSBuild to build my stuff. I want to use CruiseControl.net as by Build Server.</p> <p>Now, CCNET refers nAnt a lot, but it looks as if ccnet can do most of the stuff nant could do through the project configuration and msbuild. Also, nAnt seems a bit unsupported, with a Beta release that is almost a year ...
<p>If you are quite happy with MSBuild, then I would stick with MSBuild. This may be one of those cases where the tool you learn first is the one you will prefer. I started with NAnt and can't quite get used to MSBuild. I'm sure they will both be around for quite some time.</p> <p>There are some fundamental differe...
<p>Like what so many people have already indicated, the answer here is "it depends". There are some things like <em>repeating operations</em> that are much simpler and cleaner in NAnt. See <a href="http://forums.msdn.microsoft.com/en-US/msbuild/thread/417329cb-a6f6-45dd-9a56-98bb4aee74f9" rel="nofollow noreferrer">the ...
2,369
<p>I have created a design with fusion 360. I tried to print it with my M3D Pro printer but it seems the designs have a flaw. </p> <p>If I try to print the bottom part, the second layer is wrong. It seems to have moved to the left by a few centimeters.</p> <p>Here is the link to the <code>.stl</code> files and pictur...
<blockquote> <p>and found out it has a resistance of 1.5kΩ, while it should have a resistance of 4.7kΩ, so I suspect this is the main reason behind this high reading. Now the only thing left to figure out is how the resistance of this resistor changed.</p> </blockquote> <p>You can't measure the resistance of a resis...
<blockquote> <p>and found out it has a resistance of 1.5kΩ, while it should have a resistance of 4.7kΩ, so I suspect this is the main reason behind this high reading. Now the only thing left to figure out is how the resistance of this resistor changed.</p> </blockquote> <p>You can't measure the resistance of a resis...
762
<p>Does anybody know of any sample databases I could download, preferably in CSV or some similar easy to import format so that I could get more practice in working with different types of data sets? </p> <p>I know that the Canadian Department of Environment has <a href="http://www.climate.weatheroffice.ec.gc.ca/Welco...
<p>The datawrangling blog posted a nice list a while back:</p> <p><a href="http://www.datawrangling.com/some-datasets-available-on-the-web" rel="noreferrer">http://www.datawrangling.com/some-datasets-available-on-the-web</a></p> <p>Includes financial, government data (labor, housing, etc.), and too many more to list ...
<p>What database engine are you importing into? That will help determine what formats you can include in your search.</p> <p>The <a href="http://www.ferc.gov/docs-filing/eqr/soft-tools/sample-csv.asp" rel="nofollow noreferrer">Federal Energy Regulatory</a> Commission has some sample data for download in CSV format.</p...
8,126
<p>When using custom-draw (NM_CUSTOMDRAW) to draw the entire contents of a ListView SubItem (in Report/Details view), it would be nice to be able to apply the same left and right padding in my custom paint method that is applied by the control itself for non-custom-drawn items.</p> <p>Is there a way to programmatically...
<p>use ListView Header message HDM_GETBITMAPMARGIN see <a href="http://msdn.microsoft.com/en-us/library/bb775314(VS.85).aspx" rel="nofollow noreferrer">link text</a></p>
<p>I would assume that <em>GetSystemMetrics()</em> is that you need to look at. I think that <strong>SM_CXEDGE</strong> and <strong>SM_CYEDGE</strong> are probably the values you want, but don't quote me on that. ;-)</p>
7,400
<p>What is the most proper way to sending email of minimal 1000 or more in PHP? Any reliable email queuing technique that is capable to handle that? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>
<p>You could just insert your emails into a Mail Queue database table, and have a separate process check the queue and batch send a certain number at once.</p>
<p>I've generally relied on a hack. I have a database list of email addresses and then use a meta-redirect to self with an increasing 'offset' parameter that specifies which row in the database I am up to. Server redirects cause problems because browsers assume that the time taken indicates an infinite loop.</p>
3,820
<p>I want to wrap a piece of code that uses the Windows Impersonation API into a neat little helper class, and as usual, I'm looking for a way to go test-first. However, while WindowsIdentity is a managed class, the LogonUser call that is required to actually perform the logging in as another user is an unmanaged funct...
<p><em>Guideline: Don't test code that you haven't written.</em><br> You shouldn't be concerned with WinAPI implementation not working (most probably it works as expected). Your concern should be testing the 'Wiring' i.e. if your code makes the right WinAPI call. In which case, all you need is to mock out the interfac...
<p>I am not sure if I follow you.. You don't want to test the PInvoke yourself (you didn't write it) so you want to test that the wrapper class is performing as expected right?</p> <p>So, just create your interface in the wrapper class and test against that?</p> <p>In terms of needing to set up users etc, I think tha...
7,689
<p>Some RepRap models use only a single motor for the Z axis, others use two.</p> <p>For example, there is the <a href="http://reprap.org/wiki/3drag" rel="noreferrer">3drag</a> that has only one motor and a smooth rod on the other side. There are modifications that add a threaded rod on the other side that is connecte...
<p>There are three main options here for Mendel style ZX gantries:</p> <ul> <li>One Z screw and motor, which is similar to a cantilevered design but somewhat more stable because of the opposite smooth rod</li> <li>Two Z screws and two motors</li> <li>Two Z screws and one motor, with belt synchronization of the two sid...
<p>The general concept is to provide additional stability during the print. In the case of the 3drag machine you mentioned, you could run the risk of the -X- axis sagging due to the weight of the print head and/or additional wear on the rod or bearings on the one side (smooth side) as a result of the off balance weight...
218
<p>I've had the Ender 5 Pro, as is, for 3 months.</p> <p>After I tried a cheap PLA filament (maybe too cheap), it clogged the nozzle. I cleaned it, but any other filament I have would have similar problems from then on. After some days doing test prints, it clogged again. This time, I heated it up to 240&nbsp;ºC, I un...
<p>Without images of the problem it is difficult to diagnose, but, the described symptoms sounds as if the nozzle is too close to the bed. If the nozzle is too close to the bed, and the extruder not strong enough, the filament flow is very limited due to pressure caused by a very small opening between the nozzle and th...
<p>Clearly you're having an extrusion problem. Extrusion problems usually come either from a clogged nozzle (as @Adam S. said) or from the extruder it self. To determine where the problem is located I would first do a flow rate test using <a href="https://www.youtube.com/watch?v=lWBkPIXTOlo&amp;feature=emb_logo" rel="n...
1,660
<p>I'm writing a Perl script and would like to use a n-ary tree data structure.</p> <p>Is there a good implementation that is available as source code (rather than part of a Perl library) ?</p>
<p>Adding to what Matthew already said, it looks like the following modules would be suitable:</p> <p><a href="http://search.cpan.org/perldoc?Tree::Nary" rel="nofollow noreferrer">Tree::Nary</a><br> <a href="http://search.cpan.org/perldoc?Tree::Simple" rel="nofollow noreferrer">Tree::Simple</a><br> <a href="http://sea...
<p>I don't really understand why you want it was "source" rather than as a perl library, but you can download the source for any CPAN module. </p> <p>I haven't used it, but <a href="http://search.cpan.org/~rkinyon/Tree-1.01/lib/Tree.pm" rel="nofollow noreferrer">Tree</a> looks to fill your requirements.</p>
5,844
<p>I want to grab the value of a hidden input field in HTML.</p> <pre><code>&lt;input type="hidden" name="fooId" value="12-3456789-1111111111" /&gt; </code></pre> <p>I want to write a regular expression in Python that will return the value of <code>fooId</code>, given that I know the line in the HTML follows the form...
<p>For this particular case, BeautifulSoup is harder to write than a regex, but it is much more robust... I'm just contributing with the BeautifulSoup example, given that you already know which regexp to use :-)</p> <pre><code>from BeautifulSoup import BeautifulSoup #Or retrieve it from the web, etc. html_data = ope...
<pre><code>/&lt;input type="hidden" name="fooId" value="([\d-]+)" \/&gt;/ </code></pre>
7,914
<p>Handling multiple merges onto branches in Subversion or CVS is just one of those things that has to be experienced. It is inordinately easier to keep track of branches and merges in Mercurial (and probably any other distributed system) but I don't know why. Does anyone else know?</p> <p>My question stems from the f...
<blockquote> <p>In Subversion (and CVS), the repository is first and foremost. In git and mercurial there is not really the concept of a repository in the same way; here changes are the central theme.</p> </blockquote> <p>+1</p> <p>The hassle in CVS/SVN comes from the fact that these systems do <strong>not</str...
<p>I only have experience with Subversion but I can tell you that the merge screen in TortoiseSVN is horribly complicated. Luckily they include a dry run button so that you can see if you are doing it right. The complication is in the configuration of what you want to merge to where. Once you get that set up for the...
6,562
<p>I have two options - to buy either the Ender 3 or the Mega Zero. I'm heading towards Ender 3 because the Mega Zero doesn't have a heated bed. </p> <p>My question is, how is a printer without a heated bed (the Mega Zero) a better option than one with a heated bed (the Ender 3)?</p> <p>Why would I even consider buyi...
<p>Lack of a heated bed does not necessarily limit you to using PLA. I would say (among those I've used) the material that's least sensitive to whether you have a heated bed is probably TPU. Depending on your model, it can even be hard to print PLA without a heated bed, unless perhaps you're willing to use a brim or ra...
<p>Lack of a heated bed does not necessarily limit you to using PLA. I would say (among those I've used) the material that's least sensitive to whether you have a heated bed is probably TPU. Depending on your model, it can even be hard to print PLA without a heated bed, unless perhaps you're willing to use a brim or ra...
1,635
<p>I have a sample held in a buffer from DirectX. It's a sample of a note played and captured from an instrument. How do I analyse the frequency of the sample (like a guitar tuner does)? I believe FFTs are involved, but I have no pointers to HOWTOs.</p>
<p>The FFT can help you figure out where the frequency is, but it can't tell you <em>exactly</em> what the frequency is. Each point in the FFT is a &quot;bin&quot; of frequencies, so if there's a peak in your FFT, all you know is that the frequency you want is somewhere within that bin, or range of frequencies.</p> <p...
<p>Apply a <a href="http://en.wikipedia.org/wiki/Discrete_Fourier_transform" rel="nofollow noreferrer">DFT</a> and then derive the fundamental frequency from the results. Googling around for DFT information will give you the information you need -- I'd link you to some, but they differ greatly in expectations of math ...
9,104
<p>I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for testing ASP.Net or Perl web sites....
<p>VMware did recently release a free version of ESXi recently.</p> <p>VMware has a few advantages:<br> 1. VMware virtual machines are portable across different types of hardware. IIRC, Hyper-V uses the drivers from the Host OS.<br> 2. VMware virtual machines are portable across different VMware products (although yo...
<p><em>Necros the thread</em> Just wanted to add my 2c since the last post has been a while.</p> <p>I have been using VMWare Server since version 1.6 all the way up to 2.0.</p> <p>Just out of curiosity, I tried out Hyper-V, and there's a real definitive performance gain. Hyper-V is plain faster.</p> <p>Switched over...
5,923
<p>Recently I have started using a fairly large LCD resin printer. (Yidimu Falcon Pro) It has a fairly large 260x160mm perforated and coated steel build plate and a decent dual rail Z axis with a ballscrew. It has a 10" LCD. It prints ChiTuBox files from a USB stick.</p> <p>I have been having a mostly successful print...
<p>looks like you have done a lot of work to try to get it working.</p> <p>considering you are having issues on one side of the build plate my thought is that it is a levelling issue or an issue with the plate itself. Try levelling it using the video <a href="https://www.youtube.com/watch?v=K4G6ExEtk70" rel="nofollow n...
<p>I had an issue with my Vat Bolts, one being cracked and leveling at a greater tension than the other. With the compressible feet of my Vat this caused a problem in the FEP. This was enough to cause failure on one side more than the other. Cause was verified by switching the left and right knobs, thus shifting the...
1,677
<p>I am having some trouble with model adherence to my print bed. As shown in the attached photo, my model is pulled away at the sides leaving it bowed even though it is designed to be flat. Other than this &quot;bowing&quot;, the model is of good quality.</p> <p>The model is printed solid on an Anycubic Photon M3 Plus...
<h2>Print orientation</h2> <p>Your model is pulled up from the FEP film with a huge force. It releases from the film first at the corners, then progresses to the center. The force bends the model down as it is still flexible, so it creates a bent item.</p> <p>This can be mitigated by reducing the area that you pull at....
<h2>Print orientation</h2> <p>Your model is pulled up from the FEP film with a huge force. It releases from the film first at the corners, then progresses to the center. The force bends the model down as it is still flexible, so it creates a bent item.</p> <p>This can be mitigated by reducing the area that you pull at....
2,204
<p>I have built a 3D printer from parts. It is using a standard 12V power supply, an Arduino Mega 2560 replica and a RAMPS 1.4 board. The hotend cooling fan is connected to the 12V-AUX pin (the one right next to the x axis stepper driver) on the RAMPS board so that it continuously receives power as long as the machine ...
<p>Now that you have done some measurements, you could make some conclusions.</p> <blockquote> <p>The voltage over the fan is reported to be constant, but the current starts at 110-115 mA and reduces to 90 mA over time.</p> </blockquote> <p>With limited knowledge of electronics you can conclude that the resistanc...
<p>I propose examining the current voltage of the motor and the arm. The fluctuation of voltage causes the noise.</p>
962
<p>How do I ask PowerShell where something is? </p> <p>For instance, "which notepad" and it returns the directory where the notepad.exe is run from according to the current paths.</p>
<p>The very first alias I made once I started customizing my profile in PowerShell was 'which'.</p> <pre class="lang-sh prettyprint-override"><code>New-Alias which get-command </code></pre> <p>To add this to your profile, type this:</p> <pre class="lang-sh prettyprint-override"><code>"`nNew-Alias which get-command" ...
<p>There also always the option of using which. there are actually three ways to access which from Windows powershell</p> <ul> <li>The first, (though not the best) is wsl(windows subsystem for linux)</li> </ul> <pre class="lang-sh prettyprint-override"><code>wsl -e which command </code></pre> <p>This requires installa...
8,927
<p>I recently saw <a href="https://www.youtube.com/watch?v=TpvNEZCvk84" rel="noreferrer">this</a> video of super-swellable polymer and felt inspired. Printing a swellable structure would be sort of interesting. However, sodium polyacrylate isn't a printable material. Does anyone know of a material that is? Preferably, ...
<p>To print with 2 extruders simultaneously you need a firmware that supports that. Luckily, there is a firmware called Sailfish that is able to do that. The feature you are looking for is called <code>Ditto</code> printing.</p> <p>Sailfish firmware is found <a href="http://www.sailfishfirmware.com" rel="nofollow nore...
<p>If you want a ditto printing is not mandatory to have a specific firmware (or g-code), you only need to add extruder to your end effector and - because of electrical power requirements - add further stepper driver for further stepper motor. Please note that the maximum footprint of your printed object is less than ...
913
<p>Technical Debt <a href="http://www.martinfowler.com/bliki/TechnicalDebt.html" rel="noreferrer">via Martin Fowler</a>, <a href="http://forums.construx.com/blogs/stevemcc/archive/2007/11/01/technical-debt-2.aspx" rel="noreferrer">via Steve McConnell</a></p> <p>YAGNI (You Ain't Gonna Need It) <a href="http://en.wikipe...
<p>There was an interesting discussion of Technical Debt based on your definition of done on HanselMinutes a couple of weeks ago -- <a href="http://www.hanselminutes.com/default.aspx?showID=137" rel="nofollow noreferrer">What is Done</a>. The basics of the show were that if you re-define 'Done' to increase perceived v...
<p>That's why it's always easier to write nice "acadamic papers" talking about how Agile development is good, what are the "best practices" and so on.</p> <p>That's why you find a lot of "suited engineers" making up new software engineering techniques.</p> <p>Process is important, keeping best practices is cool but o...
8,595
<p>I need to cool some liquid (250&nbsp;°C) while it’s flowing through a tube which has to be able to bend and flex. My idea is to make a flexible tube with a second tube spiraling around it through which coolant will flow.</p> <p>I’d like to 3D print this tube if possible so I wonder if there is some printable filame...
<p>Ok, so to answer the primary question: What flexible filament will operate consistently at 250 °C?</p> <p>Man, this is a tough one. Some filaments, like PEEK and ULTEM 1010 can operate up in the 200 °C range, but they're not flexible at all.</p> <p>Silicon might be able to work, but you're still pushing boundaries.<...
<p>3D printing nerd showed a couple of filaments that fits this in his latest video "Printers at RAPID + TCT 2019":</p> <p><div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/obCgJQp5Yj8?start=0"></iframe> </div></div></p> <p>Firstly a...
1,338
<p>We have a PHP project that we would like to version control. Right now there are three of us working on a development version of the project which resides in an external folder to which all of our Eclipse IDEs are linked, and thus no version control.</p> <p>What is the right way and the best way to version control ...
<p>We were in a similar situation, and here's what we ended up doing:</p> <ul> <li>Set up two branches -- the release and development branch.</li> <li>For the development branch, include a post-commit hook that deploys the repository to the dev server, so you can test.</li> <li>Once you're ready, you merge your change...
<p>Each of you could run it locally, or on your own dev server (or even the same one with a different port...).</p>
2,694
<p>Here's a quick question I've been banging my head against today.</p> <p>I'm trying to convert a .Net dataset into an XML stream, transform it with an xsl file in memory, then output the result to a new XML file. </p> <p>Here's the current solution:</p> <pre><code> string transformXML = @"pathToXslDocument"...
<p>I'm not sure but it seems that you didn't reset position in stream before passing it to XmlReader. Try to seek at the beginning of your stream before trying to read from it. Also it may be necessary to close\flush stream after you wrote some data to it.</p> <p><strong>EDIT</strong>:</p> <p>Just tried following cod...
<p>please look it and use..</p> <pre><code>using (MemoryStream memStream = new MemoryStream()) { memStream.Write(Encoding.UTF8.GetBytes(xmlBody), 0, xmlBody.Length); memStream.Seek(0, SeekOrigin.Begin); using (StreamReader reader = new StreamReader(memStream...
6,228
<p>Should the folders in a solution match the namespace?</p> <p>In one of my teams projects, we have a class library that has many sub-folders in the project.</p> <p>Project Name and Namespace: <code>MyCompany.Project.Section</code>.</p> <p>Within this project, there are several folders that match the namespace sect...
<p>Also, note that if you use the built-in templates to add classes to a folder, it will by default be put in a namespace that reflects the folder hierarchy.</p> <p>The classes will be easier to find and that alone should be reasons good enough.</p> <p>The rules we follow are:</p> <ul> <li>Project/assembly name is t...
<blockquote> <p>What's the standard?</p> </blockquote> <p>There is no official standard but conventionally the folder-to-namespace mapping pattern is most widely used.</p> <blockquote> <p>In class libraries do the folders usually match the namespace structure or is it a mixed bag?</p> </blockquote> <p>Yes, in ...
2,667
<p>Since I started studying object-oriented programming, I frequently read articles/blogs saying functions are better, or not all problems should be modeled as objects. From your personal programming adventures, when do you think a problem is better solved by OOP?</p>
<p>There is no hard and fast rule. A problem is better solved with OOP when you are better at solving problems and thinking in an OO mentality. Object Orientation is just another tool which has come along through trying to make computing a better tool for solving problems. </p> <p>However, it can allow for better c...
<p>I tell you when OOP is bad. </p> <p>When the architect writes really complicated, non-documented OOP code. Leaves half way through the project. And many of his common code pieces he used across various project has missing code. Thank god for .NET Reflector.</p> <p>And the organization was not running Visual So...
2,843
<p>Every time I write "Cura" in a question or answer, it gets edited to "Ultimaker Cura", <a href="https://3dprinting.stackexchange.com/a/10940/11157">most recently</a> resulting in awkward verbose repetition that required additional edits to fix. I don't see any justification for requiring use of official verbose name...
<h1>Laundry list:</h1> <h2>Open</h2> <ul> <li><a href="https://3dprinting.meta.stackexchange.com/a/438">e3d</a></li> <li><a href="https://3dprinting.meta.stackexchange.com/a/436">Creality</a></li> <li><a href="https://3dprinting.meta.stackexchange.com/a/434">Filled PLA</a></li> </ul> <h2>Done</h2> <ul> <li><a href=...
<h1>Manufacturer: Monoprice</h1> <p>Status: <strong>Done</strong></p> <p>This tag (<a href="https://3dprinting.stackexchange.com/questions/tagged/monprice" class="post-tag" title="show questions tagged &#39;monprice&#39;" rel="tag">monprice</a>) is used for tagging questions regarding various printer types while the ta...
71
<p>I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, lim...
<p>For anything past a few kilobytes you need to use either JSR 75 or a remote server. RMS records are extremely limited in size and speed, even in some higher end handsets. If you need to juggle 1MB of data in J2ME the only reliable, portable way is to store it on the network. The HttpConnection class and the GET and ...
<p>I'm just starting to code for JavaME, but have experience with old versions of PalmOS, where all data chunks are limited in size, requiring the design of data structures using record indexes and offsets.</p>
3,951
<p>I'm new to 3D Printing and recently purchased an Ender 3D PRO I'm having an issue with the filament guide tube getting pushed out of the nozzle on the feeding mechanism. The assembly instructions don't include a whole lot of detail about installing this guide tube but there are blue clips that were included along w...
<p>The blue clips stick in the connector on the extruder end of the feed tube. They are to keep it from opening as the printer extrudes and retracts filament.</p> <p>To install them, push them in between the white part of the fitting on the feed tube (not the hot end). You should only need one or two, and they are all...
<p>The clips or collet clips as they are called are to secure the Bowden tube more solidly to improve printer extrusion; more specifically: extruder retraction performance.</p> <p>E3D has explained this very nicely on their site under <a href="https://e3d-online.com/blog/2017/10/27/bowden-tube-physics/" rel="nofollow ...
1,624
<p>I've kept up to date with new features in the C# language as it's moved from version 1 through version 3. I haven't done such a good job keeping up to date with ASP.NET. I feel like some of the post version 1 features are not so good (e.g. the AJAX framework) or are just not that useful to me (e.g. the membership ...
<p>For ASP.NET, you have a lot of improvements:</p> <ul> <li>split view (code and design)</li> <li>faster switching between code and design view</li> <li>embedded master pages (one master page in another)</li> <li>javascript debugging</li> </ul> <p>Anyway most of the useful stuff are really in the meat of the languag...
<p>I don't think the MVC Framework is quite ready for prime time yet, though I definitely plan to use it sometime next year. I love the clean URLs, clean XHTML (web forms can really spew out some nasty HTML) and the ability to create controller actions with no associated view.</p> <p>I've been using Master Pages sinc...
3,147
<p>I have a "watcher" module that is currently using global hierarchies inside it. I need to instantiate a second instance of this with a second global hierarchy.</p> <p>Currently:</p> <pre><code>module watcher; wire sig = `HIER.sig; wire bar = `HIER.foo.bar; ... endmodule watcher w; // instantiation </code></pre> ...
<p>My preference is to have a single module (or a small number of modules) in your testbench that contains all your probes but no other functionality. All other modules in your testbench that require probes then connect to that "probe module". Use SystemVerilog interfaces in preference to raw wires if that's an option ...
<p>Can you use the SystemVerilog <code>bind</code> keyword to bind the module into every hierarchy that requires it? (This requires that you use SystemVerilog, and have a license for a simulator.)</p> <p>Using bind is like instantiating a module in the normal way, except that you provide a path to hierarchy into which...
9,296
<p>I'm new to 3D printing. I modeled an empty bird in Blender (the stl file of model is presented). I tested the model in Blender (using 3D printing tool) and also the Netfabb software. They don't show any error. However, when I load this model in Ultimaker Cura for printing, as shown in the last image, the result is o...
<p>You have modeled your bird. So far so good, but you likely only modeled a single surface and not a closed surface body. The crucial step was forgotten, as your pictures 1 and 2 show: you have designed a single surface for most of the object, not a body. To turn the bird into a printable object needs it not to be a s...
<p>Slicers don't do well with &quot;empty&quot; (hollow) bodies, or bodies with secret holes in it. You need to supply a filled body<sup>1</sup>, the slicer will make it mostly empty anyways (depending on the infill percentage). Also, you need to have infill, else the top cannot be printed as it does not have any suppo...
1,386
<p>I have been told that there is a performance difference between the following code blocks.</p> <pre><code>foreach (Entity e in entityList) { .... } </code></pre> <p>and </p> <pre><code>for (int i=0; i&lt;entityList.Count; i++) { Entity e = (Entity)entityList[i]; ... } </code></pre> <p>where</p> <pre><cod...
<p>foreach creates an instance of an enumerator (returned from GetEnumerator) and that enumerator also keeps state throughout the course of the foreach loop. It then repeatedly calls for the Next() object on the enumerator and runs your code for each object it returns.</p> <p>They don't boil down to the same code in a...
<p>I think one possible situation where you <em>might</em> get a performance gain is if the enumerable type's size and the loop condition is a constant; for example:</p> <pre><code>const int ArraySize = 10; int[] values = new int[ArraySize]; //... for (int i = 0; i </pre> <p>In this case, depending on the complexit...
6,593
<p>If I have 2 query sources how do I find ones that are in one that are not in the other?</p> <p>example of join to find items in both:</p> <pre><code>var results = from item1 in qs1.Items join item2 in qs2 on item1.field1 equals item2.field2 select item1; </code></pre> <p>So what would the linq code be to re...
<p>Darren Kopp's <a href="https://stackoverflow.com/questions/50702/linq-how-do-you-do-a-query-for-items-in-one-query-source-that-are-not-in-anothe/50724#50724">answer</a>:</p> <pre><code>var excluded = items1.Except(items2); </code></pre> <p>is the best solution from a performance perspective.</p> <p><em>(NB: This ...
<p>Here's a more simple version of the same thing, you don't need to nest the query:</p> <pre><code>List&lt;string&gt; items1 = new List&lt;string&gt;(); items1.Add("cake"); items1.Add("cookie"); items1.Add("pizza"); List&lt;string&gt; items2 = new List&lt;string&gt;(); items2.Add("pasta"); items2.Add("pizza"); var ...
7,346
<p>This is my problem:</p> <p>I'm assembling a 3D printer with the RAMPS 1.4 board and Arduino Mega. I have assembled the structure and the electronics (set drivers, placed the jumpers, connected stepper motors...) and have uploaded Marlin firmware (configuring: thermistor, endstops...) on the Arduino Mega.</p> <p>I've...
<p>The demo files are gcode files generated for use with the sample PLA that comes with the printer. If you want to print it with ABS select the file and set the temperature manually afterwards. </p>
<p>If you want to use the demo files, you can probably pause the print as soon as it starts, and manually set the extruder temperatures before resuming the print. Easier to generate new g-code though.</p>
466
<p>When using a heated bed with your printer, I have seen claims of running temperatures of 90c throughout the print.</p> <p>That seems like a fairly high power use to keep a large slab of, say, aluminium at 90c for long print times (ie multiple hours).</p> <p>Is there a common 'sweet spot' for operating temperature?...
<p>Heatbeds have two purposes:</p> <ol> <li>Increase surface energy of the print bed to improve bonding strength of the first layer (particularly important when using surfaces like PEI or Kapton)</li> <li>Keep the bottom few millimeters of the print hot enough to provide a warp-free foundation for the rest of the prin...
<p>First you say 90c, which means you are talking about ABS likely. I state this as some PLA printers do not even use heated beds, and instead use elaborate rafts only. (Makerbot)</p> <p>Now that I have gotten that out of the way I wanted to point out to you that it really isn't using that much power. 110 watts (based...
361
<p>I want to convert a primitive to a string, and I tried:</p> <pre><code>myInt.toString(); </code></pre> <p>This fails with the error:</p> <pre><code>int cannot be dereferenced </code></pre> <p>Now, I get that primitives are not reference types (ie, not an Object) and so cannot have methods. However, Java 5 intro...
<p>Java autoboxing/unboxing doesn't go to the extent to allow you to dereference a primitive, so your compiler prevents it. Your compiler still knows <code>myInt</code> as a primitive. There's a paper about this issue at <a href="http://jcp.org/aboutJava/communityprocess/jsr/tiger/autoboxing.html" rel="noreferrer">jcp...
<p>In C#, integers are neither reference types nor do they have to be boxed in order for <em>ToString()</em> to be called. They <strong>are</strong> considered objects in the Framework (as a ValueType, so they have value semantics), however. In the CLR, methods on primitives are called by "indirectly" loading them onto...
2,626
<p>I'm still new to 3D printing and I want to print something. I expect that I'll mess it up since I find nothing to adjust it but it is now laying around for 4 months and I'm sick of it.</p> <p>So my question is where do I find Windows software to print something and of course where do I get a 3D model?</p> <p>I own...
<h2>First; find a model!</h2> <p>To print something you require a <strong>model</strong> (usually this is in STL format, look into websites called <a href="http://www.thingiverse.com" rel="nofollow noreferrer">Thingiverse</a> and <a href="https://www.myminifactory.com/" rel="nofollow noreferrer">MyMiniFactory</a> for e...
<p>If you're just starting out then Tinkercad (website) is a good place to start designing your own objects. Later you can get to grips with OpenScad for more complex shapes. Both are free.</p>
1,294
<p>I did a lot of PHP programming in the last years and one thing that keeps annoying me is the weak support for Unicode and multibyte strings (to be sure, natively there is none). For example, &quot;htmlentities&quot; seems to be a much used function in the PHP world and I found it to be absolutely annoying when you'v...
<p>Named entities in "real" XHTML (i.e. with <code>application/xhtml+xml</code>, rather than the more frequently-used <code>text/html</code> compatibility mode) are discouraged. Aside from the five defined in XML itself (<code>&amp;lt;</code>, <code>&amp;gt;</code>, <code>&amp;amp;</code>, <code>&amp;quot;</code>, <cod...
<p>Safari seems to have issues with some glyphs but not others, it may not be <strong>needed</strong> but it's probably best to do so, of course, this is my opinion and not backed up by anything but my own observations.</p>
4,474
<p>A discussion about Singletons in <strong>PHP</strong> has me thinking about this issue more and more. Most people instruct that you shouldn't make a bunch of DB connections in one request, and I'm just curious as to what your reasoning is. My first thought is the expense to your script of making that many requests t...
<p>Database connections are a limited resource. Some DBs have a very low connection limit, and wasting connections is a major problem. By consuming many connections, you may be blocking others for using the database.</p> <p>Additionally, throwing a ton of extra connections at the DB doesn't help anything unless ther...
<p>I would assume that it is because your requests are not being sent asynchronously, since your requests are done iteratively on the server, blocking each time, you have to pay for the overhead of creating a connection each time, when you only have to do it once...</p> <p>In Flex, all web service calls are automatica...
4,821
<p>What would be the best method for getting a custom element (that is using J2ME native Graphics) painted on LWUIT elements?</p> <p>The custom element is an implementation from mapping library, that paints it's content (for example Google map) to Graphics object. How would it be possible to paint the result directly ...
<p>I do not think any hacking is necessary. You can subclass the LWTUI Component class and then you can pain whatever you want on to the graphic context of the component. You do not get the native lcdui.Graphics object but an object with a same interface that is easy to use.</p> <p>If you really need to pass a lcdui.G...
<p>Based on the javadoc for LWUIT and J2ME and guessing that the custom J2ME class is a <a href="http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Canvas.html" rel="nofollow noreferrer">Canvas</a> it looks like you would have to:</p> <ul> <li>Subclass <a href="https://lwuit.dev.java.net/javadoc...
4,332
<p>What is the approved way to convert from char* to System::string and back in C++/CLI? I found a few references to marshal_to&lt;> templated functions on Google, but it appears that this feature never made the cut for Visual Studio 2005 (and isn't in Visual Studio 2008 either, AFAIK). I have also seen some code on <a...
<p>System::String has a constructor that takes a char*:</p> <pre><code> using namespace system; const char* charstr = "Hello, world!"; String^ clistr = gcnew String(charstr); Console::WriteLine(clistr); </code></pre> <p>Getting a char* back is a bit harder, but not too bad:</p> <pre><code> IntPtr p = Marshal::Str...
<p>One additional link to a summary of possible ways:</p> <p><a href="http://support.microsoft.com/?kbid=311259" rel="nofollow">http://support.microsoft.com/?kbid=311259</a></p>
8,052
<p>I've been trying to convert SVG images to PNG using C#, without having to write too much code. Can anyone recommend a library or example code for doing this?</p>
<p>You can call the command-line version of inkscape to do this:</p> <p><a href="http://harriyott.com/2008/05/converting-svg-images-to-png-in-c.aspx" rel="noreferrer">http://harriyott.com/2008/05/converting-svg-images-to-png-in-c.aspx</a></p> <p>Also there is a C# SVG rendering engine, primarily designed to allow SVG...
<p>you can use altsoft xml2pdf lib for this</p>
8,335
<p>I am looking for a way to easily separate the wires between the power supply and the Einsy board of my Prusa Mk 3S+ with a connector. The power supply delivers 10 A at 24 V.</p> <p>I thought about a <a href="https://www.jst.com/products/wire-to-wire/yl-connector/" rel="nofollow noreferrer">YL wire-to-wire electrical...
<p>I have used a standard soldering iron to modify and fix 3D prints in the past. You have to keep some things in mind when doing so:</p> <ul> <li>Don't overheat your material. PLA can take a soldering iron of about 230 °C before charring.</li> <li>Don't use a tip with solder, or you will get grey deposits in the plast...
<p>Cutting materials with a 'hot knife' isn't anything new. There should be a fairly established toolset for working foam. For 3D prints, I prefer to add coatings rather than modify surfaces with a hand held tool after. I do run a drill bit through printed holes though.</p>
1,915
<p>I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and security trimmings. There are only 21 menu options, but the results HTML of the menu is a whopping 14k. The site is hosted on our company's intranet and must be serverd to people worldwide on limited bandwidth, so I'd like to reduce the size ...
<p>Take a look at: <a href="http://www.asp.net/CSSAdapters/Menu.aspx" rel="nofollow noreferrer">http://www.asp.net/CSSAdapters/Menu.aspx</a></p> <p>The default Menu control is rendering far too much HTML.</p>
<p>You might have a look at my <a href="http://jagbarcelo.blogspot.com/2009/03/aspnet-menu-control-optimization.html" rel="nofollow noreferrer">ASP.NET menu optimization post</a>. What I do is extracting the common part of the menu rendered in every page to an external file that is loaded and cached only once at the us...
2,702
<p>I have a script that renders graphs in gnuplot. The graphs all end up with an ugly white background. How do I change this? (Ideally, with a command that goes into a gnuplot script, as opposed to a command-line option or something in a settings file)</p>
<p>You can change the background color by command <code>set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"green" behind</code> to set the background color to the the color you specified (here is green).</p> <p>To get more knowledge about setting the background in gnuplot, you can visit this <a href="...
<p>According to the <a href="http://www.gnuplot.info/documentation.html" rel="nofollow noreferrer">official documentation</a>, as of version 5.4 the right way to set the background color in a gnuplot script is something like the following:</p> <pre><code>set term wxt background rgb &quot;gray75&quot; </code></pre> <p>N...
9,487
<p>I'm working on a web-based contest which is supposed to allow anonymous users to vote, but we want to prevent them from voting more than once. IP based limits can be bypassed with anonymous proxies, users can clear cookies, etc. It's possible to use a Silverlight application, which would have access to isolated stor...
<p>The short answer is: no. The longer answer is: but you can make it arbitrarily difficult. What I would do:</p> <ul> <li>Voting requires solving a captcha (to avoid as much as possible automated voting). To be even more effective I would recommend to have prepared multiple types of simple captchas (like "pick the ph...
<p>Nope, it's the user's computer and they're in control. Unfortunately the only solution is to bring it back on your court so to speak and require authentication.</p> <p>However, a CAPTCHA helps limit the votes to human users at least.</p> <p>Of course even with authentication you can't enforce single voting because...
7,965
<p>Say I have the following methods:</p> <pre><code>def methodA(arg, **kwargs): pass def methodB(arg, *args, **kwargs): pass </code></pre> <p>In methodA I wish to call methodB, passing on the kwargs. However, it seems that if I define <code>methodA</code> as follows, the second argument will be passed on as ...
<p>Put the asterisks before the kwargs variable. This makes Python pass the variable (which is assumed to be a dictionary) as keyword arguments.</p> <pre><code>methodB("argvalue", **kwargs) </code></pre>
<p>Some experimentation and I figured this one out:</p> <p>def methodA(arg, **kwargs): methodB("argvalue", **kwargs)</p> <p>Seems obvious now...</p>
7,446
<p>I remember back in the day with the old borland DOS compiler you could do something like this:</p> <pre><code>asm { mov ax,ex etc etc... } </code></pre> <p>Is there a semi-platform independent way to do this now? I have a need to make a BIOS call, so if there was a way to do this without asm code, that would be ...
<p>Using <a href="http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html" rel="noreferrer">GCC</a></p> <pre><code>__asm__("movl %edx, %eax\n\t" "addl $2, %eax\n\t"); </code></pre> <p>Using <a href="http://msdn.microsoft.com/en-us/library/4ks26t93(VS.71).aspx" rel="noreferrer">VC++</a></p> <pre><code...
<p>use of <code>asm</code> or <code>__asm__</code> function ( in compilers have difference )</p> <p>also you can write fortran codes with <code>fortran</code> function</p> <pre><code>asm(&quot;syscall&quot;); fortran(&quot;Print *,&quot;J&quot;); </code></pre>
8,650
<p>I had been printing with ABS and took the advice to alter the fan so I can see the filament when I am loading it into the cold end. It was tricky but doable. I am now trying with PLA and getting it to line up with the whole is a nightmare. Can the driving cog and guide wheel be moved? A couple of mm would stop the d...
<p>I was having the same issue as you and know what you are talking about and there is a file that you should print that will help you (I have printed this).</p> <p>While the file says for the Anet A6, I think the extrude are the same on the Anet A8. It goes under the gear and bearing and guides the filament to the ho...
<p>A lot of people complain on the filament insertion of the Anet A8. Personally, I have no problems at all. I cut the filament under a sharp angle and pre-bend the filament (not completely straight) and push it in the hole, it works every time without having to disassemble the extruder fan. Note that if you have the t...
810
<p>First off, there's a bit of background to this issue available on my blog:</p> <ul> <li><a href="http://www.codebork.com/coding/2008/06/25/message-passing-a-plug-framework.html" rel="nofollow noreferrer">http://www.codebork.com/coding/2008/06/25/message-passing-a-plug-framework.html</a></li> <li><a href="http://www...
<p>This is my understanding of your question: You have a plugin object that may have to listen for events on x data objects - you don't want to subscribe to the event on each data object though. I'm assuming that several plugins may want to listen to events on the same data object.</p> <p>You could create a session ty...
<p>It's early yet, but have you considered trying to use <a href="http://www.codeplex.com/MEF" rel="nofollow noreferrer">MEF</a> instead of rolling your own?</p>
7,363
<p>I'm doing some research on what types of LCD displays can be used to filter and pass UV light for resin curing - specifically in the context of building a DIY 3D SLA printer.</p> <p>The community commonly uses the Sharp LS055R1SX03 module. Looking through the datasheet, there doesn't seem to be any information pert...
<p>Hmm I seen videos off people pealing filters off of lcd screens to let uv pass through.</p> <p>I believe the sharp unit maybe popular because not all lcds have square pixels and have poor pixel alignment towards the edges, (the focus of the eye can only take in so much information why waste materials producing inpe...
<p>I am not an expert by any stretch but I hope this helps, but these are regular old TFT LCD screens. You can even get 4K ones and use them for the same process. You can for example pick up 4K displays such as the H546UAN01.0 and do the same with them. </p>
1,432
<p>I'm trying to write a Wordpress plug-in that automatically posts a blog post at a certain time of day. For example, read a bunch of RSS feeds and post a daily digest of all new entries.</p> <p>There are plug-ins that do something similar to what I want, but many of them rely on a cron job for the automated schedul...
<p><a href="http://codex.wordpress.org/Function_Reference/wp_schedule_event" rel="nofollow noreferrer">http://codex.wordpress.org/Function_Reference/wp_schedule_event</a></p>
<p>vBulletin uses a sort of Pseudo-Cron system, that basically checks a schedule on every page access, and fires any processes that are due then.</p> <p>It's been a while since I worked with Wordpress, but I think something like this should work if it runs on each page view. </p>
7,762
<p>There are lot of advices on the web how to paint the 3D printed objects, but generally they are advices for manual painting and this required special skills, especially if the object is small. My guess is that maybe 3D printer can lay the color layers as well? I am especially interested in the layering of enamel pai...
<p>So, there's not really anything like a 3D painting machine/robot like I think you're looking for, but there are printers that do fine detail with actual paint, usually oils, but not on 3D materials.</p> <p>I found a <a href="https://studioartist.ning.com/forum/topics/paint-printers-do-they-exist" rel="nofollow noref...
<h2>Painting Prints</h2> <p>Yes, you can paint your models with <a href="https://en.wikipedia.org/wiki/Enamel_paint" rel="nofollow noreferrer">enamel paints</a>. Actually, most paints will work. You might need to roughen the surface with sandpaper a tiny bit. Note that some spray paints might contain solvents that migh...
1,779
<p>Anyone have a decent example, preferably practical/useful, they could post demonstrating the concept?</p>
<blockquote> <p>(Edit: a small <a href="http://web.archive.org/web/20041012103936/http%3A//www.bagley.org/~doug/ocaml/Notes/okoans.shtml" rel="nofollow noreferrer">Ocaml FP Koan</a> to start things off)</p> <blockquote> <p><strong>The Koan of Currying (A koan about food, that is not about food)</strong></p> ...
<p>I gave a good example of simulating currying in C# <a href="http://azurecoding.net/blogs/brownie/archive/2010/01/18/accounting-for-cost-of-sales-with-currying.aspx" rel="nofollow">on my blog</a>. The gist is that you can create a function that is closed over a parameter (in my example create a function for calculati...
2,988
<p>On my Mac I've got two versions of Cura installed, in <code>/Applications/Cura250</code> and <code>/Applications/Cura262</code>.</p> <p>How can I copy my printer and profile settings from Cura 2.5 to Cura 2.6?</p>
<p>Much of the software used in 3D printing is open-source, and so are some slicers. Cura, for instance, does (or did, this source code is from an older branch) its print time estimation in <a href="https://github.com/smorloc/Curation/blob/master/Cura/util/gcodeInterpreter.py" rel="noreferrer">gcodeInterpreter.py</a>.<...
<p>Generally speaking, the typical algorithm takes into account the slicer's speed settings for specific features of the build, such as infill, perimeters, top/bottom layers, etc. The distance traveled by the nozzle at a specific speed for each feature is also part of the equations involved. There are some rather vague...
665
<p>I printed a lot of models in last month. I spent 2 kg filament in total. I want to know how many hours have been passed while printing. As far as I read, 1 kg PLA (1.75 mm) is about 110 meters long. My default print speed is 70 mm/s. The nozzle diameter is 0.4 mm. The nozzle multiplier in the simplify3d is 0.9 .</p>...
<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,950
<p>We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons.</p> <p>Has anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so I'm keen to hear about experie...
<p>Steve, I had to migrate my old application the way around, that is PgSQL->MySQL. I must say, you should consider yourself lucky ;-) Common gotchas are:</p> <ul> <li>SQL is actually pretty close to language standard, so you may suffer from MySQL's dialect you already know</li> <li>MySQL quietly truncates varchars th...
<p>We did a move from a MySQL3 to PostgreSQL 8.2 then 8.3. PostgreSQL has the basic of SQL and a lot more so if your MYSQL do not use fancy MySQL stuff you will be OK.</p> <p>From my experience, our MySQL database (version 3) doesn't have Foreign Key... PostgreSQL lets you have them, so we had to change that... and it...
3,829
<p>I'm looking for suggestions on possible IPC mechanisms that are:</p> <ul> <li><strong>Cross platform</strong> (Win32 and Linux at least)</li> <li>Simple to implement in <strong>C++</strong> as well as the <strong>most common scripting languages</strong> (perl, ruby, python, etc).</li> <li>Finally, <strong>simple to...
<p>In terms of speed, the best cross-platform IPC mechanism will be pipes. That assumes, however, that you want cross-platform IPC on the same machine. If you want to be able to talk to processes on remote machines, you'll want to look at using sockets instead. Luckily, if you're talking about TCP at least, sockets ...
<p>Python has a pretty good IPC library: see <a href="https://docs.python.org/2/library/ipc.html" rel="nofollow noreferrer"><a href="https://docs.python.org/2/library/ipc.html" rel="nofollow noreferrer">https://docs.python.org/2/library/ipc.html</a></a></p>
8,558
<p>So, I need some help. I am working on a project in C++. However, I think I have somehow managed to corrupt my heap. This is based on the fact that I added an <code>std::string</code> to a class and assigning it a value from another <code>std::string</code>:</p> <pre><code>std::string hello = "Hello, world.\n"; /* e...
<p>These are relatively cheap mechanisms for possibly solving the problem:</p> <ol> <li>Keep an eye on my <a href="https://stackoverflow.com/questions/1069/heap-corruption-under-win32-how-to-locate">heap corruption question</a> - I'm updating with the answers as they shake out. The first was balancing <code>new[]</co...
<p>As far as I can tell your code is correct. Assuming exampleString is an std::string that has class scope like you describe, you ought to be able to initialize/assign it that way. Perhaps there is some other issue? Maybe a snippet of actual code would help put it in context.</p> <p>Question: Is exampleString a point...
2,906
<p>With Hibernate, can you create a composite ID where one of the columns you are mapping to the ID can have null values?</p> <p>This is to deal with a legacy table that has a unique key which can have null values but no primary key.</p> <p>I realise that I could just add a new primary key column to the table, but I'...
<p>No. Primary keys can not be null.</p>
<p>Why would you want to do that? Your composite ID should map the primary key of your table, and it doesn't sound wise to put null values in a key, does it?</p> <p><strong>EDIT:</strong> Hibernate does not allow to do so; you might put the property outside the key and tweak the DAO a little to take the field into acc...
9,637
<p>Every now and then I'll have a problem with layer shift. Solving this is a separate issue, but it occurred to me: most of the time when this happens I notice right away because of the noise. What if there were an easy to to pause the print, re-home the X/Y axis (not Z), and then resume. I'd only have one layer that ...
<p>Have you tried this? It should just work, at least if you're using software like Octoprint to control the printer over serial interface rather than print-from-SD-card on the printer itself. In such a setup you're free to submit whatever commands (in particular, <code>G28 X Y</code>) you like while the print is pause...
<p>Repetier software has a Pause button and works very well. I use it to change filament color in mid-print. When pause is invoked manual moves and homing of all three axes are available. In my case, after pausing I quickly home X and Y so the nozzle is not over the in-progress print in case of oozing during the filame...
1,929
<p>The art in question is <a href="https://www.instagram.com/p/CIfsO2ZD7Rj/" rel="nofollow noreferrer">https://www.instagram.com/p/CIfsO2ZD7Rj/</a> . I Think the concept artist, Jean Giraud, is dead.</p>
<p>While better fitted to our friends at <a href="https://law.stackexchange.com/questions/tagged/copyright">law.SE</a>, the general gist is: <strong>No.</strong></p> <p>Art is protected by copyright, and any adaption (<em>derivative work</em>) requires the OK from the right holders <em>per se</em>. Only 70-75 years aft...
<p>This is something that might have a precedent, where the line is blurry, someone might have already tried, and in that case the judge's decision in that court case is the official interpretation of the law towards that specific scenario.</p> <p>There might also be definitive laws regarding &quot;derived works&quot;....
1,794
<p>I am using Adobe Flex/Air here, but as far as I know this applies to all of JavaScript. I have come across this problem a few times, and there must be an easy solution out there!</p> <p>Suppose I have the following XML (using e4x):</p> <pre><code>var xml:XML = &lt;root&gt;&lt;example&gt;foo&lt;/example&gt;&lt;/roo...
<p>It seems you confuse variables for the values they contain. The assignment</p> <pre><code>node = textInput.text; </code></pre> <p>changes the value the <em>variable</em> <code>node</code> points to, it doesn't change anything with the object that <code>node</code> currently points to. To do what you want to do you...
<p>If you're trying to change the root element of a document, you don't really need to-- just throw out the existing document and replace it. Alternatively, just wrap your element in a more proper root element (you shouldn't be editing the root node anyway) and you'd be set.</p> <p>Of course, that doesn't answer your...
8,744
<p>My OctPrint and Monoprice Maker Select IIIP (A Wanhao i3 Duplicator Plus clone) were working fine, but suddenly today the hot end won't heat up anymore. I tried disconnecting the OctoPrint USB and resetting the printer power, and it still couldn't heat up the extruder, such as through the filament menu.</p> <p>But t...
<p>This has nothing to do with OctoPrint itself, the cause is related to the printer itself, not the print server running the printer.</p> <p>This is a pretty commonly seen issue (usually seen at heated beds), this is caused by faulty wires/cables or connectors. This usually happens after a vast period of usage. You sh...
<p>Measure your heater resistance of the heater in the heater block. Approximate heater resistances are 4.8 Ω for 12 V 30 W and 3.6 Ω for 12 V 40 W. See <a href="https://3dprinting.stackexchange.com/questions/10695/proper-hotend-heater-for-reprap-x400-pro-v3">Proper hotend heater for Reprap x400 Pro V3</a></p> <p>No...
2,023
<p>Typical way of creating a <a href="http://en.wikipedia.org/wiki/Comma-separated_values" rel="noreferrer">CSV</a> string (pseudocode):</p> <ol> <li>Create a CSV container object (like a StringBuilder in C#).</li> <li>Loop through the strings you want to add appending a comma after each one.</li> <li>After the loop, ...
<p>You could use <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query#LINQ_to_Objects" rel="noreferrer">LINQ to Objects</a>:</p> <pre><code>string [] strings = contactList.Select(c =&gt; c.Name).ToArray(); string csv = string.Join(",", strings); </code></pre> <p>Obviously that could all be done in one line...
<p>How about tracking whether you are on the first item, and only add a comma <em>before</em> the item if it is not the first one.</p> <pre><code>public string ReturnAsCSV(ContactList contactList) { StringBuilder sb = new StringBuilder(); bool isFirst = true; foreach (Contact c in contactList) { i...
2,644
<p>Ok, so, my visual studio is broken. I say this NOT prematurely, as it was my first response to see where I had messed up in my code. When I add controls to the page I can't reference all of them in the code behind. Some of them I can, it seems that the first few I put on a page work, then it just stops. </p> <p>I f...
<p>try clearing your local VS cache. find your project and delete the folder. the folder is created by VS for what reason I honestly don't understand. but I've had several occasions where clearing it and doing a re-build fixes things... hope this is all that you need as well.</p> <p>here</p> <pre><code>%Temp%\VWDWebC...
<p>For me, deleting/renaming the files in the following location worked:</p> <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\myvirtualwebsite\e331e0a9 </code></pre>
5,961
<p>Whenever I show a ModalPopupExtender on my Sharepoint site, the popup shown creates both horizontal and vertical scrollbars. If you scroll all the way to the end of the page, the scrollbar refreshes, and there is more page to scroll through. Basically, I think the popup is setting its bounds beyond the end of the ...
<p>Hacky answer would be to grab the IE Developer Toolbar, find the tag that has the scrollbar, and alter your CSS file to add the overflow:hidden property to it.</p>
<p>Hacky answer would be to grab the IE Developer Toolbar, find the tag that has the scrollbar, and alter your CSS file to add the overflow:hidden property to it.</p>
4,753