instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>In <a href="http://en.wikipedia.org/wiki/PostgreSQL" rel="noreferrer">PostgreSQL</a>, I can do something like this:</p> <pre><code>ALTER SEQUENCE serial RESTART WITH 0; </code></pre> <p>Is there an Oracle equivalent?</p>
<p>Here is a good procedure for resetting any sequence to 0 from Oracle guru <a href="http://asktom.oracle.com" rel="noreferrer">Tom Kyte</a>. Great discussion on the pros and cons in the links below too.</p> <pre><code>tkyte@TKYTE901.US.ORACLE.COM&gt; create or replace procedure reset_seq( p_seq_name in varchar2 ) ...
<p>Stored procedure that worked for me</p> <pre><code>create or replace procedure reset_sequence( p_seq_name in varchar2, tablename in varchar2 ) is l_val number; maxvalueid number; begin execute immediate 'select ' || p_seq_name || '.nextval from dual' INTO l_val; execute immediate 'select max(id) fro...
7,453
<p>I'm likely to need to print some parts from TPU (Shore 95A or harder) in the near future. I have everything I need to do a direct drive conversion using the original extruder on a bracket above the hot end -- but for most of my printing (PLA and PETG), this setup isn't required or even optimal, because of the extra...
<p>With some engineering, you could consider creating a tool dock version where you can easily screw off the Bowden driven hotend and screw on the direct driven hotend. You'll only need to have an extension stepper cable to connect the direct drive stepper and pluggable hotend heater and thermistor connections.</p> <p>...
<p>It depends on the level of automation you are willing to implement.</p> <p>The Bowden extruder, including the motor, from the Ender 3 which I think you have (but in general, any Bowden extruder) does not need to be moved at all, since it's not on the printing head. You just need to disconnect the Bowden from the hot...
1,996
<p>What languages and tools do you consider a youngster starting out in programming should use in the modern era?</p> <p>Lots of us started with proprietary Basics and they didn't do all of us long term harm :) but given the experiences you have had since then and your knowledge of the domain now are there better opti...
<p>I would suggest <a href="http://mindstorms.lego.com/Products/Default.aspx" rel="nofollow noreferrer">LEGO Mindstorm</a>, it provides an intuitive drag and drop interface for programming and because it comes with hardware it provides something tangible for a child to grasp. Also, because it is "LEGO" they might think...
<p>Wasn't Smalltalk designed for such a purpose? I think Ruby would be a good choice, as a descendant of Smalltalk.</p>
4,040
<p>I have some classes layed out like this</p> <pre><code>class A { public virtual void Render() { } } class B : A { public override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup } protected virtual void SpecialRender() ...
<p>You can seal individual methods to prevent them from being overridable:</p> <pre><code>public sealed override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup } </code></pre>
<p>yes. If you mark a method as Sealed then it can not be overriden in a derived class.</p>
6,512
<p>I use <strong>Delphi</strong> for many years, and although I have now moved on to Visual Studio I still fondly remember numbered bookmarks (<kbd>CTRL</kbd>+<kbd>K</kbd>+<kbd>1</kbd> to set bookmark 1, <kbd>CTRL</kbd>+<kbd>Q</kbd>+<kbd>1</kbd> to goto bookmark 1).</p> <p>Is there a <strong>Visual Studio</strong> equ...
<p><a href="https://marketplace.visualstudio.com/items?itemName=SergeyM.DPack-16348" rel="nofollow noreferrer">DPack</a> can give you numbered bookmarks in VisualStudio.</p>
<p>I use:</p> <ul> <li><kbd>CTRL</kbd>-<kbd>F2</kbd> toggle bookmark</li> <li><kbd>F2</kbd> next bookmark</li> <li><kbd>SHIFT</kbd>-<kbd>F2</kbd> previous bookmark</li> <li><kbd>CTRL</kbd>-<kbd>SHIFT</kbd>-<kbd>F2</kbd> clear all bookmarks</li> </ul> <p>BTW, after using Visual Studio for years I just found about a cou...
5,975
<p>I'd like to know which libraries are used by executables on my system. More specifically, I'd like to rank which libraries are used the most, along with the binaries that use them. How can I do this?</p>
<ol> <li>Use <code>ldd</code> to list shared libraries for each executable.</li> <li>Cleanup the output</li> <li>Sort, compute counts, sort by count</li> </ol> <p>To find the answer for all executables in the "/bin" directory:</p> <pre><code>find /bin -type f -perm /a+x -exec ldd {} \; \ | grep so \ | sed -e '/^[^\t]...
<p>I found this post very helpful as I needed to investigate dependencies from a 3rd party supplied library (32 vs 64 bit execution path(s)).</p> <p>I put together a Q&amp;D recursing bash script based on the 'readelf -d' suggestion on a RHEL 6 distro.</p> <p>It is very basic and will test every dependency every time...
7,286
<p>I've got many, many mp3 files that I would like to merge into a single file. I've used the command line method</p> <pre><code>copy /b 1.mp3+2.mp3 3.mp3 </code></pre> <p>but it's a pain when there's a lot of them and their namings are inconsistent. The time never seems to come out right either.</p>
<p>As Thomas Owens pointed out, simply concatenating the files will leave multiple ID3 headers scattered throughout the resulting concatenated file - so the time/bitrate info will be wildly wrong.</p> <p>You're going to need to use a tool which can combine the audio data for you.</p> <p><a href="http://mp3wrap.source...
<p>Personally I would use something like mplayer with the audio pass though option eg -oac copy</p>
8,810
<p>Trying to print a 3D model for my mobile phone, but I see that when printing the sides, being thin, increases the retraction and the recoil seems a little abrupt and makes a coarse sound.</p> <p>I would like to know if it is possible to know what speed and temperature is recommended to print a model.</p> <p>In my ...
<p>The first indication for print speed and temperature should be taken from the box the filament comes in. Generally it specifies temperature ranges for the hotend and the heated bed. Sometime, mostly online, more parameters can be found amongst which is the printing speed. </p> <p>Do note that temperature and printi...
<p>So as someone else on here mention, those settings shouldn't be for the model but for the filament. Sadly, you will need to test 99% of filaments to really figure this out. I have a modify tester, and on the description it tells you how to set your temp. <a href="https://www.thingiverse.com/thing:3347967" rel="nofol...
1,298
<p>I've just been learning about master pages in ASP.NET 2.0. </p> <p>They sound great, but how well do they work in practice? </p> <p>Does anybody have experience of using them for a large web site?</p>
<p>I'm pretty sure I've only used master pages in the context of ASP.NET MVC so I'm not sure if it differs from web forms but in my experience they are not only excellent but I couldn't imagine not using them. Master pages are code inheritance to web pages.</p>
<p>Master Pages have made building template-able websites easy.</p> <p>I think the trickiest part in building a website using master pages is knowing when to put things into the master page and when to put things into the ContentPlaceHolder on the child page. Generally, dynamic stuff goes into the placeholder while st...
2,844
<p>Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. That would be a serious problem?</p> <p>To address the first concern: Does a device on the same wireless network have any special privileges or access that an other device on the internet has?<b...
<p>Bruce Schneier is famous for running an open wireless network at home (<a href="http://www.schneier.com/blog/archives/2008/01/my_open_wireles.html" rel="noreferrer">see here</a>). He does it for two reasons:</p> <ol> <li>To be neighborly (you'd let your neighbor borrow a cup of sugar, wouldn't you? Why not a few me...
<p>@kronoz: I guess it depends on where you live. Only two houses are within reach of my wireless network, excluding my own. So I doubt that small number of people can affect my bandwidth. But if you live in a major metro area, and many people are able to see and get on the network, yeah, it might become a problem.</p>...
5,295
<p>I've read a bunch of articles about getting better springs for my bed levelling screws so that I don't have to adjust it as often because standard springs vibrate loose as it prints.</p> <p>However, would it be simpler and more effective to just use Nyloc nuts tightened against the adjustment wheels so that the whee...
<p>It's because the bed heats up. Since the bed can heat up to the point that locktite or nylon can soften, using those products to keep the screws from turning will have exactly the opposite effect.</p>
<p>Does your bed already have washers on the screws? The neopreme (red) washer under the screw head (in picture). This is the German Reprap X400 design and is worth trying.</p> <p><a href="https://i.stack.imgur.com/jucy3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jucy3.jpg" alt="enter image de...
1,852
<p>In my host, I currently have installed 2 wordpress applications, 1 phpBB forum and one MediaWiki.</p> <p>Is there a way to merge the login so that all applications share the same credentials?</p> <p>For instance, I want to register only in my phpBB and then I want to access all other applications with the given us...
<p>when you integrate the system. Just remember 2 things:</p> <ol> <li><p>Login to system<br/> Check username/password with both systems.</p></li> <li><p>Change of Password<br/> Update the password on both systems.</p></li> </ol>
<p>Having tried to do this some years ago I remember it not being very easy. </p> <p>The way I did it was to create totally new table to user/pass and then replace these columns in the respective software with foreign keys to your new table - this required <strong>a lot</strong> of custom tweaking of core files in eac...
6,066
<p>What's the best way to store a linked list in a MySQL database so that inserts are simple (i.e. you don't have to re-index a bunch of stuff every time) and such that the list can easily be pulled out in order?</p>
<p>Store an integer column in your table called 'position'. Record a 0 for the first item in your list, a 1 for the second item, etc. Index that column in your database, and when you want to pull your values out, sort by that column.</p> <pre><code> alter table linked_list add column position integer not null defaul...
<p>A list can be stored by having a column contain the offset (list index position) -- an insert in the middle is then incrementing all above the new parent and then doing an insert.</p>
9,098
<p>I have heard/read the term but don't quite understand what it means.</p> <p>When should I use this technique and how would I use it? Can anyone provide a good code sample?</p>
<p>The visitor pattern is a way of doing double-dispatch in an object-oriented way.</p> <p>It's useful for when you want to choose which method to use for a given argument based on its type at runtime rather than compile time.</p> <p>Double dispatch is a special case of <strong>multiple dispatch</strong>. </p> <p>Wh...
<p>Full listing of working code</p> <pre class="lang-cs prettyprint-override"><code>using System; using System.Linq; namespace TestConsoleApp { internal class Program { public static void Main(string[] args) { const int x = 5; var dispatch = new DoubleDispatch(); ...
6,415
<p>I was reading the example chapter from <a href="http://www.manning.com/rahien/" rel="nofollow noreferrer">the book by Ayende</a> and on the website of <a href="http://boo.codehaus.org/" rel="nofollow noreferrer">the Boo language</a> I saw a reference to the <a href="http://specter.sourceforge.net/" rel="nofollow nor...
<p>Create one Message table, containing a unique MessageId and the various properties you need to store for a message.</p> <pre><code>Table: Message Fields: Id, TimeReceived, MessageDetails, WhateverElse... </code></pre> <p>Create two link tables - QuoteMessage and JobMessage. These will just contain two fields each,...
<p>Why not just have both QuoteId and JobId fields in the message table? Or does a message have to be regarding either a quote or a job and not both?</p>
3,999
<p>Can anyone point me to a good resource (or throw me a clue) to show me how to do DataBinding to controls (ComboBox, ListBox, etc.) in WPF? I'm at a bit of a loss when all my WinForms niceities are taken away from me, and I'm not all that bright to start with...</p>
<p>The best resource I've found for WPF data binding is <a href="http://www.beacosta.com" rel="nofollow noreferrer">Bea Costa's blog</a>. Start from the first post and read forward. It's awesome.</p>
<p>in code behind -- set the DataContext of your list box equal to the collection you're binding to.</p> <pre><code>private void OnInit(object sender, EventArgs e) { //myDataSet is some IEnumerable // myListBox is a ListBox control. // Set the DataContext of the ListBox to myDataSet myListBox.DataContext = m...
2,900
<p>What is the thread pitch of the Ender 3's bed leveling screws? The diameter measures about 4mm. Are they M4 0.7 (coarse) pitch or 0.5 (fine) pitch? I'd like to develop rigorous formulas for the amount to turn the knobs by after measuring (or visually inspecting, since I can see an accurate 0.2 mm first layer decentl...
<p>I measured mine with a thread gauge and it says the pitch is <strong>0.7 mm</strong>.</p> <p>So, as the stock adjustment wheels have 14 bumps around their circumference, turning by one of those is an adjustment of exactly 0.05 mm (assuming no backlash).</p> <p>I can't speak for anyone else's, but due to the availabi...
<p>I don't know what the value is, but there are a few ways to find out. It is very hard to measure this with a caliper, but it can be done, mark the upper and bottom of e.g. 10 windings and measure this with a caliper. Alternatively measure how much the screw drops after 10 full turns. </p> <p>There are special tools...
1,570
<p>What is the RegEx pattern for DateTime (2008-09-01 12:35:45 ) ?</p> <p>I get this error:</p> <blockquote> <p>No ending delimiter '^' found</p> </blockquote> <p>Using:</p> <pre><code>preg_match('(?n:^(?=\d)((?&lt;day&gt;31(?!(.0?[2469]|11))|30(?!.0?2)|29(?(.0?2)(?=.{3,4}(1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579...
<p>@Espo: I just have to say that regex is incredible. I'd hate to have to write the code that did something useful with the matches, such as if you wanted to actually find out what date and time the user typed.</p> <p>It seems like Tom's solution would be more tenable, as it is about a zillion times simpler and with ...
<p>PHP preg functions needs your regex to be wrapped with a delimiter character, which can be any character. You can't use this delimiter character without escaping inside the regex. This should work (here the delimiter character is /):</p> <pre><code>preg_match('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', '2008-09-01 12:...
5,852
<p>I have designed a bread mark and printed it on the Prusa i3 MK3.</p> <p><a href="https://i.stack.imgur.com/qs5PP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qs5PP.png" alt="Bread mark"></a></p> <p>I wanted it to have as sharp edges as possible, so I used a triangle:</p> <p><a href="https://...
<p>This is dependent on the slicer and the nozzle diameter. Typically, you cannot print a wall smaller than twice the nozzle diameter because walls need an inner and outer line. Therefore, your slicer will make some cutoff and won't print walls below a certain threshold, in order to try to faithfully replicate your mod...
<p>The absolute minimum a slicer will allow existing in a g-code is one extrusion diameter, which is typically roundabout a nozzle diameter. So for a standard 0.4 mm nozzle, the model will be cut in a way that keeps at <em>least</em> 0.4 mm thick walls, or, if the slicer is extra careful, double that, as the model dema...
1,101
<p>I'm trying to find out the 'correct' windows API for finding out the localized name of 'special' folders, specifically the Recycle Bin. I want to be able to prompt the user with a suitably localized dialog box asking them if they want to send files to the recycle bin or delete them directly.</p> <p>I've found lots ...
<p>Read this article for code samples and usage:</p> <p><a href="http://www.codeproject.com/KB/winsdk/SpecialFolders.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/winsdk/SpecialFolders.aspx</a></p> <p>Also there is an article on MSDN that helps you <a href="http://msdn.microsoft.com/en-us/library/aa14...
<p>I actually didn't find the CodeProject article terribly helpful, so I thought I'd answer this question with the actual code that I used to retrieve the localized name of the recycle bin.</p> <p>This sample also tries to behave correctly with regard to freeing resources. Any comments are welcome, especially if you ...
5,770
<p>How can I visually customize autocomplete fields in Wicket (change colors, fonts, etc.)?</p>
<p>You can use CSS to modify the look of this component. For the Ajax auto-complete component in 1.3 the element you want to override is div.wicket-aa, so for example you might do:</p> <pre><code>div.wicket-aa { background-color:white; border:1px solid #CCCCCC; color:black; } div.wicket-aa ul { list-st...
<p>Perilandmishap has probably the most usefull answer for your needs. Personally, I always found the default Ajax auto complete control in Wicket to be woefully insufficient for my needs. If you really want a professional "feel" to your auto complete, roll your an using Wicket's Ajax libraries.</p>
9,548
<p>In the business I work for we are discussion methods to reduce the read load on our primary database.</p> <p>One option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and write directly to the primary da...
<p>A few cons:</p> <ul> <li>2 points of failure</li> <li>Application logic will have to take into account the delay between writing something and then reading it, since it won't be available immediately from the secondary database</li> </ul> <p>A strategy I have used is to send key reporting data to a secondary datab...
<p>We are using one-way replications, but not from the same application. Our applications are reading-writing to the master database, the data gets synchronized to the replca database, and the reporting tools are using this replica.</p> <p>We don't want our application to read from a different database, so in this sce...
6,509
<p>We're using SQL Server 2005 in a project. The users of the system have the ability to search some objects by using 'keywords'. The way we implement this is by creating a full-text catalog for the significant columns in each table that may contain these 'keywords' and then using CONTAINS to search for the keywords th...
<p>These "small words" are considered "noise words" by the full text index. You can customize the list of noise words. This <a href="http://arcanecode.wordpress.com/2008/05/29/creating-and-customizing-noise-words-in-sql-server-2005-full-text-search/" rel="nofollow noreferrer">blog post</a> provides more details. You ne...
<p>I knew about the noise words file, but I'm not why your "Terminator 2" example is still giving you issues. You might want to try asking this on the <a href="http://forums.microsoft.com/Forums/ShowForum.aspx?ForumID=93&amp;SiteID=1" rel="nofollow noreferrer">MSDN Database Engine forum</a> where people that specialize...
9,707
<p>Does it make sense, having all of the C#-managed-bliss, to go back to Petzold's Programming Windows and try to produce code w/ pure WinAPI?</p> <p>What can be learn from it? Isn't it just too outdated to be useful?</p>
<p>This question is bordering on religious :) But I'll give my thoughts anyway.</p> <p>I do see value in learing the Win32 API. Most, if not all, GUI libraries (managed or unmanaged) result in calls to the Win32 API. Even the most thorough libraries don't cover 100% of the API, and hence there are always gaps which ne...
<p>If you planning to develop a cross platform application, If you use win32, then your application could easily run on linux through WINE. This results in a highly maintainable application. This is one of the advantages of learning win32.</p>
2,740
<p>What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?</p> <p>For example:</p> <p>Let's say that I have a main page called <strong>blog.php</strong> (I know, creativity abounds). Let's also say that there is a page called <strong>delete.php</s...
<p>You were correct in trying to use session variables. Once your user authenticates, you should store that information in their session so that each subsequent page view will see that. Make sure you are calling <code>session_start()</code> on both pages (blog.php and delete.php) before accessing $_SESSION. Also mak...
<p>It is not recommended that you rely on sessions for authentication without taking additional actions. <a href="http://shiflett.org/articles/the-truth-about-sessions" rel="nofollow noreferrer">Read more on</a>.</p>
3,618
<p>I created my model in onshape then exported it to stl file then imported it to simplify 3d to convert to gcode.</p> <p>However my model didn't go any in fill, it just continue to print layer after layer in the same fasion as the 1st layer. </p> <p>Correct me if am wrong infill is used so that the middle of your mo...
<p>I don't use either of the two piece of software, but the first things to pop to mind:</p> <ul> <li><strong>Inspect the slicing preview</strong>: it should be self-evident if your GCODE is being generated correctly. In my slicer the infill is red and you can discern the typical pattern within:</li> </ul> <p><a hre...
<p>The infill portion of your model is configured during the Simplify3D process. After loading your STL file into S3D, edit the process and examine the Infill tab and Infill slider. You'll see a percentage indicator, as well as an extruder selection (left or right, if you have two) to be used for the infill. There are ...
782
<p>I am developing an application that controls an Machine.<br/> When I receive an error from the Machine the users should be able to directly notice it, one way that is done is Flashing the tray on the taskbar. When the machine clears the error the tray should stop flashing.</p> <p>There's one little annoyance using t...
<p>Behaviour is the same when a window finishes flashing for as long as it's supposed to: the taskbar button stays coloured. I don't think this is a bug. If you think about it, when you use <code>FLASHW_STOP</code>, the flashing does in fact stop, but the point of the flashing is to get the user's attention. The button...
<p>Just set uCount to 0 to stop the flashing.</p>
4,199
<p>I've been working on a project that accesses the WMI to get information about the software installed on a user's machine. We've been querying Win32_Product only to find that it doesn't exist in 64-bit versions of Windows because it's an <a href="http://msdn.microsoft.com/en-us/library/aa392726(VS.85).aspx" rel="nofo...
<p>You didn't mention for what OS, but the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=013BB284-3946-44A9-AC3C-BF2A569EAA72&amp;displaylang=en" rel="nofollow noreferrer" title="Microsoft Download Center">WMI Redistributable Components version 1.0</a> definitely exists.</p> <p>For Windows Server 2...
<p>Wouldn't the normal approach for a Windows component be that the administrators of a set of servers use whatever their local software push technology (i.e. SMS) to ensure that component is installed? This is not that uncommon of a requirement for the remote management of servers via WMI.</p> <p>By the way, the WMI ...
2,581
<p>I've just started developing an ExtJS application that I plan to support with a very lightweight JSON PHP service. Other than that, it will be standalone. My question is, what is the best way to organize the files and classes that will inevitably come into existence? Anyone have any experience with large ExtJS pro...
<p>I would start here <a href="http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/" rel="noreferrer">http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/</a></p> <p>This site gives a good introductory overview of how to structure your application.</p> <p>We are currently using these ideas in tw...
<p>When starting new big project, I decided to make it modular. Usually, in big projects not all modules are used by a particular user, so I load them on demand. F.e., if a project would have 50+ modules, the big probability is that user is working only with 10-. </p> <p>Such architecture lets you to have the initial ...
8,856
<p>I would like to enable/disable some code based on a custom solution configuration I added in Visual Studio. How do I check this value at runtime?</p>
<p>You can use <a href="http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx" rel="noreferrer">precompiler directives</a> within Visual Studio. The #if directive will allow you to determine if you are going to include code or not based on your custom solution configuration.</p>
<p>I'm not sure if you can figure out the exact name of the build configuration. Howerver, if you use Debug.Assert(...), that code will only be run when you compile in debug mode. Not sure it that helps you at all.</p>
5,144
<p>What should every WPF developer know?</p> <p><strong>Entry Level</strong></p> <ul> <li>Strong .NET 2.0 Background &amp; willing to learn!</li> <li>Explain dependency properties?</li> <li>What's a style?</li> <li>What's a template?</li> <li>Binding</li> <li>Differences between base classes: Visual, UIElement, Frame...
<p>I'd put binding and converters at entry level, since that is how you spend a lot of time in WPF.</p>
<p>I think lifecycle of WPF application - from creation to runtime should be included in the Beginner level of questions. Without knowing it, its hard to believe one is a real WPF dev.</p>
8,316
<p>I recently encountered a problem where a value was null if accessed with Request.Form but fine if retrieved with Request.Params. What are the differences between these methods that could cause this?</p>
<p>Request.Form only includes variables posted through a form, while Request.Params includes both posted form variables and get variables specified as URL parameters.</p>
<p>The reason was that the value I was retrieving was from a form element, but the submit was done through a link + JQuery, not through a form button submit.</p>
2,756
<p>I have a model of an eye that I custom made in <strong>Blender 2.83</strong> that when printed only creates <strong>roughness</strong> on the printed object near where I had the supports. <strong>The supports are not the cause of the roughness</strong> (at least not completely) since the supports don't even touch t...
<p>While Trish is completely right that the roughness can't be completely eliminated (you can't print a perfect spherical surface with discrete layers), the situation can be improved dramatically. The most telling photo in your question is the one of the removed support structure.</p> <p>The part of your sphere that's ...
<p>I’ve noticed the best way to get it smooth without support is to make the printer print the inner parts of the model first. That way it gives the hanging layer something to hold on to. I turn my window ac unit up to high aim it at the printer so it cools the filament quickly. Next you’re going to want to mess around...
1,691
<p>What does the pink color in Slic3r preview mean? Yellow is my model, green is support, and pink is..?</p> <p>If the pink color is some kind of warning, how do I fix it?</p> <p><a href="https://i.stack.imgur.com/2PIRU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2PIRU.jpg" alt="Illustration fr...
<p>In slic3r preview, salmon (pink) represents infill, yellow represents perimeters, and green represents support material, including skirt and brim.</p>
<p>Having had direct experience with Slic3r, I can offer up this information. Your model is composed of bottom layers, top layers, outside layers, infill, rafts, brims and perhaps something I've missed.</p> <p>The program provides for color coding of these features. In the case of your image, the pink represents a top...
569
<p>Let's say that you want to output or concat strings. Which of the following styles do you prefer?</p> <ul> <li><p><code>var p = new { FirstName = "Bill", LastName = "Gates" };</code></p></li> <li><p><code>Console.WriteLine("{0} {1}", p.FirstName, p.LastName);</code></p></li> <li><p><code>Console.WriteLine(p.FirstNa...
<p>Try this code.</p> <p>It's a slightly modified version of your code.<BR></p> <ol> <li>I removed Console.WriteLine as it's probably a few orders of magnitude slower than what I'm trying to measure.<BR></li> <li>I'm starting the Stopwatch before the loop and stopping it right after, this way I'm not losing precision i...
<p>Actually, I ran these tests yesterday, but it was getting late so I didnt put my responses.</p> <p>The bottom line seems that they take both the same time on average. I did the test over 100000 iterations.</p> <p>I'll try with StringBuilder as well, and I'll post the code and results when I get home.</p>
3,713
<p>I have a query that looks like this:</p> <pre><code>public IList&lt;Post&gt; FetchLatestOrders(int pageIndex, int recordCount) { DatabaseDataContext db = new DatabaseDataContext(); return (from o in db.Orders orderby o.CreatedDate descending select o) .Skip(pageIndex * re...
<p>Something else you can do is EagerLoading. In Linq2SQL you can use LoadOptions : <a href="http://oakleafblog.blogspot.com/2007/08/linq-to-sql-query-execution-with.html" rel="nofollow noreferrer">More on LoadOptions</a> One VERY weird thing about L2S is that you can set LoadOptions only before the first query is sent...
<p>you might want to look into using compiled queries</p> <p>have a look at <a href="http://www.3devs.com/?p=3" rel="nofollow noreferrer">http://www.3devs.com/?p=3</a></p>
7,288
<p>From a web developer point of view, what changes are expected in the development arena when Google Chrome is released?</p> <p>Are the developments powerful enough to make another revolution in the web? Will the way we see web programming change?</p> <p>Or is it just another web browser?</p>
<p>I think this is just another web browser. The most impact I expect to be improved Javascript performance, and the usability perspective. The first will benefit developers, especially when using Google Gears. I think the users will benefit the most from an enhanced user experience, the safety features, and ease of us...
<p>@bpapa</p> <blockquote> <p>It's just another web browser that very few people are going to use because there are already 4 major browsers out there that work just fine for most people. It doesn't have the extensions like Firefox,</p> </blockquote> <p>Actually, it is pretty clear that it has a plugin ar...
6,091
<p>Does anyone know of anywhere I can find actual code examples of Software Phase Locked Loops (SPLLs) ? </p> <p>I need an SPLL that can track a PSK modulated signal that is somewhere between 1.1 KHz and 1.3 KHz. A Google search brings up plenty of academic papers and patents but nothing usable. Even a trip to the Uni...
<p>I suppose this is probably too late to help you (what did you end up doing?) but it may help the next guy.</p> <p>Here's a golfed example of a software phase-locked loop I just wrote in one line of C, which will sing along with you:</p> <pre><code>main(a,b){for(;;)a+=((b+=16+a/1024)&amp;256?1:-1)*getchar()-a/512,p...
<p>Have Matlab with Simulink? There are PLL demo files available at Matlab Central <a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14868&amp;objectType=FILE#" rel="nofollow noreferrer">here</a>. Matlab's code generation capabilities might get you from there to a PLL written in C.</p>
6,057
<p>This is something I've ignored for awhile, but it keeps cropping up, and occasionally, if the filament snags real good, it can mess up a great print half way through, etc.</p> <p>Basically I have my filament spools hanging on a PVC pipe mounted directly above the printer, and the printer just sucks it in from the s...
<p>I had the same problem with my FFC dual.</p> <p>Consider using some kind of retaing clip to hold the spool in place, so it doesn't move back and forth on the post. This <a href="https://web.archive.org/web/20170127154947if_/http://www.thingiverse.com/thing:923340" rel="nofollow noreferrer">spool holder</a> worked fo...
<p>I used this solution, it makes a lot of sense, because I store the filament back in a box and the tip endup getting knotted.</p> <p><div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/lE9LchCtKL4?start=0"></iframe> </div></div></p>
397
<p>Is there a good <code>.Net</code> implementation of the <code>NNTP</code> protocol?</p>
<p>Try libraries like <a href="http://sourceforge.net/projects/dougnewsnntp/" rel="nofollow noreferrer">http://sourceforge.net/projects/dougnewsnntp/</a> and <a href="http://www.codeplex.com/nntpclientlib" rel="nofollow noreferrer">http://www.codeplex.com/nntpclientlib</a></p>
<p>There is a C# tutorial for reading posts using NNTP <a href="http://www.geekpedia.com/tutorial212_Developing-an-NNTP-Newsgroup-Reader.html" rel="nofollow noreferrer">here</a>. It should be enough to get you started but if you wish to start getting into processing binary posts, you're probably going to have to deal ...
9,000
<p>I originally asked <a href="https://stackoverflow.com/questions/46933/why-doesnt-inheritance-work-the-way-i-think-it-should-work">this question</a>, but in finding an answer, discovered that my original problem was a lack of support in C# for covariance on inherited methods' return types. After discovering that, I b...
<ul> <li>C++</li> <li>Java</li> <li>REALbasic</li> <li>Eiffel</li> <li>Sather</li> <li>Modula-3</li> </ul>
<blockquote> <p>but I think thats what I'm asking for..or is it?</p> </blockquote> <p>I frankly don't know what you're asking. Java apparently has the same support for return-type covariance as C#, so if whatever you're looking for is lacking in C#, it's lacking in Java also.</p>
6,921
<p>I know this rather goes against the idea of enums, but is it possible to extend enums in C#/Java? I mean "extend" in both the sense of adding new values to an enum, but also in the OO sense of inheriting from an existing enum. </p> <p>I assume it's not possible in Java, as it only got them fairly recently (Java 5...
<p>The reason you can't extend Enums is because it would lead to problems with polymorphism.</p> <p>Say you have an enum MyEnum with values A, B, and C , and extend it with value D as MyExtEnum.</p> <p>Suppose a method expects a myEnum value somewhere, for instance as a parameter. It should be legal to supply a MyExt...
<p>You can't inherit from/extend an enum, you can use <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.descriptionattribute.aspx" rel="nofollow noreferrer">attributes</a> to <a href="http://blog.waynehartman.com/articles/84.aspx" rel="nofollow noreferrer">declare a description</a>. If you're look...
7,912
<p>Currently I am setting up an application that can deploy other web apps to Tomcat 6 clusters. It is set up right now to have a one to one relationship between deployed web application and a cluster. My current reasoning for this is so that I can change the JVM args of the Tomcat server without disrupting other app...
<p>Divide your services by resource requirements at the very least. For example, if you are running a photo album site, separate your image download server from your image upload server. The download server will have many more requests, and because most people have a lower upload speed the upload server will have longe...
<p>Divide your services by resource requirements at the very least. For example, if you are running a photo album site, separate your image download server from your image upload server. The download server will have many more requests, and because most people have a lower upload speed the upload server will have longe...
5,017
<p>I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different tools they might suggest?</p>
<p>I have used:</p> <blockquote> <ul> <li><a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WatiN</a></li> <li><a href="http://www.automatedqa.com/products/testcomplete/index.asp" rel="nofollow noreferrer">AutomatedQA TestComplete</a></li> </ul> </blockquote> <p>All of them have had their purp...
<p>WatiN is excellent.</p> <p>I inherited <a href="http://en.wikipedia.org/wiki/HP_QuickTest_Professional" rel="nofollow noreferrer">Mercury Quicktest</a> for functional testing a while back. £30k for the licences and it was truly awful. We never got the same results twice (running on the exact same application). Th...
3,577
<p>On a web page I want to dynamically render very basic flow diagrams, i.e. a few boxes joined by lines. Ideally the user could then click on one of these boxes (<code>DIVs</code>?) and be taken to a different page. Resorting to Flash seems like an overkill. Is anyone aware of any client-side (i.e. <code>server agnost...
<p>Does the rendering have to be client side?</p> <p>If yes, you could try Processing:</p> <p><a href="http://ejohn.org/blog/processingjs/" rel="nofollow noreferrer">http://ejohn.org/blog/processingjs/</a></p> <p>If you can do it server side, then Graphviz is a good choice.</p> <p><a href="http://www.graphviz.org/"...
<p>This kind of flowchart can be accomplished using CSS, resorting to JavaScript graphing libraries (canvas) might be overkill. You may wish to checkout how some Genealogy sites do this to get a family tree.</p>
4,729
<p>I'm coming from a Rails background and doing some work on a ASP.NET project (not ASP MVC). Newbie question: what's the easiest way to make a custom editor for a table of records?</p> <p>For example: I have a bunch of data rows and want to change the "category" field on each -- maybe a dropdown, maybe a link, maybe ...
<p>You can REALLY cheat nowadays and take a peek at the new Dynamic Data that comes with .NET 3.5 SP1. Scott Guthrie has a blog entry demoing on how quick and easy it'll flow for you here:</p> <p><a href="http://weblogs.asp.net/scottgu/archive/2007/12/14/new-asp-net-dynamic-data-support.aspx" rel="nofollow noreferrer"...
<p>There are a few controls that will do this for you, with varying levels of complexity depending on their relative flexibility. </p> <p>The traditional way to do this would be the DataGrid control, which gives you a table layout. If you want something with more flexibility in appearance, the DataList and ListView co...
3,381
<p>I am trying to build gdb for armv6 architecture. I will be compiling this package on a Fedora Linux-Intel x86 box. I read the process of installing the gdb, like</p> <ol> <li><p>Download the source pachage</p></li> <li><p>run <code>configure -host</code></p></li> <li><p><code>make</code></p></li> </ol> <p>But I go...
<p>We (www.rockbox.org) use the arm target for a whole batch of our currently working DAPS. The target we specify is usually arm-elf, rather than arm-linux.</p>
<p>target/host is usually the target tool chain you would be using (mostly arm-linux)</p>
9,562
<p>Looking to get your take on an automated testing tool (voting should bring good ones to the top)</p> <p>Ideal tool would:</p> <ul> <li>Eliminate the need to present a set of values to a method. </li> <li>employ techniques such as Interactive Exploratory Testing where the code is examined to determine what values a...
<p>I've tried some of these tools in other languages and IMHO they are almost a complete waste of time. Reason? They can't guess at the semantics of a method call in any meaningful way. There's a very good article about this <a href="http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd" rel="nofo...
<p>Another good tool that automatically generates unit tests is Randoop.</p> <p>Randoop is available for Java (<a href="http://mernst.github.io/randoop/" rel="nofollow">http://mernst.github.io/randoop/</a>) and for .NET (<a href="https://github.com/abb-iss/Randoop.NET" rel="nofollow">https://github.com/abb-iss/Randoop...
6,865
<p>Given a username and a password for a domain user, what would be the best way to authenticate that user programatically?</p>
<p>It appears that .NET 3.5 added a new namespace to deal with this issue - System.DirectoryServices.AccountManagement. Code sample is below:</p> <pre><code>Private Function ValidateExternalUser(ByVal username As String, ByVal password As String) As Boolean Using context As PrincipalContext = New PrincipalContext(...
<p>You can use some hacks to <strong>authenticate</strong> only.</p> <pre><code>Try Dim directoryEntry as New DirectoryEntry("LDAP://DomainController:389/dc=domain,dc=suffix", "username", "password") Dim temp as Object = directoryEntry.NativeObject return true Catch return false End Try </code></pre> ...
5,072
<p>I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or other method) should I use to prevent it from showing up?</p> <pre><code>class MyCon...
<p>Use the following attribute ...</p> <pre><code>using System.ComponentModel; [Browsable(false)] public bool SampleProperty { get; set; } </code></pre> <p>In VB.net, this <a href="https://stackoverflow.com/questions/71440/set-a-usercontrol-property-to-not-show-up-in-vs-properties-window#71481">will be</a>:</p> <pr...
<p><a href="http://www.c-sharpcorner.com/UploadFile/mgold/PropertyGridInCSharp11302005004139AM/PropertyGridInCSharp.aspx" rel="nofollow noreferrer">Tons of attributes</a> out there to control how the PropertyGrid works.</p> <pre><code>[Browsable(false)] public bool HiddenProperty {get;set;} </code></pre>
9,694
<p>What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?</p> <p>Please indicate whether the methods are Unicode-friendly and how portable they are.</p>
<p>Boost includes a handy algorithm for this:</p> <pre><code>#include &lt;boost/algorithm/string.hpp&gt; // Or, for fewer header dependencies: //#include &lt;boost/algorithm/string/predicate.hpp&gt; std::string str1 = "hello, world!"; std::string str2 = "HELLO, WORLD!"; if (boost::iequals(str1, str2)) { // Strin...
<pre class="lang-c++ prettyprint-override"><code>bool insensitive_c_compare(char A, char B){ static char mid_c = ('Z' + 'a') / 2 + 'Z'; static char up2lo = 'A' - 'a'; /// the offset between upper and lowers if ('a' &gt;= A and A &gt;= 'z' or 'A' &gt;= A and 'Z' &gt;= A) if ('a' &gt;= B and B &gt;= 'z' or '...
3,273
<p>Does C# have the notion of private / protected inheritance, and if not, why?</p> <p><strong>C++</strong></p> <pre> <code> class Foo : private Bar { public: ... }; </code> </pre> <p><strong>C#</strong></p> <pre> <code> public abstract NServlet class : private System.Web.UI.Page { // error "type expected...
<p>C# allows public inheritance only. C++ allowed all three kinds. Public inheritance implied an "IS-A" type of relationship, and private inheritance implied a "Is-Implemented-In-Terms-Of" kind of relationship. Since layering (or composition) accomplished this in an arguably simpler fashion, private inheritance was onl...
<p>No it doesn't. What would the benefit be of allowing this type of restriction?</p>
5,312
<p>My website is entirely flash based, it moves around a 3D model which was given to me as chunks of video that I've converted to FLV files. I'm using the FLVPlayback component to control the video inside of my program. While running memory checks using System.totalMemory I've noticed that whenever a video is loaded, i...
<p>You can't help the memory problems much until Flash adds destructors and explicit object deletion, unfortunately. See this thread:</p> <p><a href="https://stackoverflow.com/questions/34/unloading-a-bytearray-in-actionscript-3">Unloading a ByteArray in Actionscript 3</a></p> <p>There's a limit to how much memory Fl...
<p>Unfortuantely, thats just the way flash handles it. Not particularly smart, but it works for most people.</p>
4,340
<p>I'd like to start 3d printing in wax.</p> <p>Is there a reasonably priced 3d printer that is capable of it?</p> <p>Am I right in assuming that all I need is to make my own filament and set extruder temperature correctly, or do I miss something?</p>
<p>Yes, with the proper equipment.</p> <p>Printing wax filament (at 51 seconds): <a href="https://youtu.be/tibkVZB_n9c?t=51s" rel="noreferrer">https://youtu.be/tibkVZB_n9c?t=51s</a></p> <p>There are also options for melting wax, filling a heated reservoir head, and printing with that. I recommend doing this with a co...
<p>Just make a silicone mold of any of your prints and pour you wax in the silicone,you silicone putty is pretty cheap so is wax ,no need to break the bank as printers have become less expensive and can do a pretty good job </p>
629
<p>How can I convince Firefox (3.0.1, if it matters) to send an If-Modified-Since header in an HTTPS request? It sends the header if the request uses plain HTTP and my server dutifully honors it. But when I request the same resource from the same server using HTTPS instead (i.e., simply changing the http:// in the UR...
<blockquote> <p>HTTPS requests are not cached so sending an If-Modified-Since doesn't make any sense. The not caching is a security precaution.</p> </blockquote> <p>The not caching <strong>on disk</strong> is a security pre-caution, but it seems it indeed affects the <strong>If-Modified-Since</strong> behavior (glan...
<p>HTTPS requests are not cached so sending an <strong>If-Modified-Since</strong> doesn't make any sense. The not caching is a security precaution.</p>
3,721
<p>I’m getting nothing but jams with a new BCN3D Sigma R19 printer, printing PLA at 195 °C, two brands (BCN’s own brand and Monoprice orange). 6.5 mm retraction, as used in BCN’s PLA profile. Using their fork of Cura. Full enclosure, but it gets maybe to 32 °C inside, just warm. It prints fine for a few layers, then it...
<p>My first thought is heat creep. I've never seen a heatsink on the hot-end that couldn't use more air and a lower temperature. IF not heat creep, then perahps under-temperature.</p> <p>But, since you've worked on this issue without success, and the extruder skipping happens even wit a steady flow and no backpressur...
<p>Is this what your hotends look like? <a href="https://i.stack.imgur.com/R6FKi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R6FKi.jpg" alt="enter image description here" /></a></p> <p>They look like Bowden tube extruders. Your images are consistent with heat creek for Bowden tub extruders. Can...
1,972
<p>When should I <strong>not</strong> use the ThreadPool in .Net?</p> <p>It looks like the best option is to use a ThreadPool, in which case, why is it not the only option?</p> <p>What are your experiences around this?</p>
<p>The only reason why I wouldn't use the <code>ThreadPool</code> for cheap multithreading is if I need to&hellip;</p> <ol> <li>interract with the method running (e.g., to kill it)</li> <li>run code on a <a href="http://msdn.microsoft.com/en-us/library/system.stathreadattribute.aspx" rel="nofollow noreferrer" title="S...
<p>@Eric</p> <blockquote> <p>@Derek, I don't exactly agree with the scenario you use as an example. If you don't know exactly what's running on your machine and exactly how many total threads, handles, CPU time, RAM, etc, that your app will use under a certain amount of load, you are in trouble.</p> </blockquote> <...
3,148
<p>I have a CC.NET project configured to call a common NAnt build file, which does some stuff, and then calls a child NAnt build file. The child build file name is specified by CC.NET to the command build file using a property.</p> <p>The hurdle that I am trying to get over is that the common build file log gets overw...
<p>Use the <a href="http://nant.sourceforge.net/release/0.85-rc1/help/tasks/nant.html" rel="nofollow noreferrer">nant task</a>, so you get one single build file.</p>
<p>Is there any way that you could <em>include</em> the child nant file as opposed to executing it as a full-fledged child nant project? This would prevent the overwrite, but not sure if it's possible in your situation.</p>
4,345
<p>Does anyone see server-side JavaScript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude). </p> <p>I'm curious to know if anyone actually writes JavaScript for the server-side and what their experiences with it h...
<p>I like to read Googler Steve Yegge's blog, and recently I came across <a href="http://steve-yegge.blogspot.com/2008/06/rhinos-and-tigers.html" rel="nofollow noreferrer" title="Rhinos and Tigers">this article of his</a> where he argues that <a href="http://www.mozilla.org/rhino" rel="nofollow noreferrer" title="Mozil...
<p>I can't see most developers getting over their distaste for client-side JavaScript programming. I'd rather go to Java for server-side stuff before choosing JavaScript.</p>
3,810
<p>I need some software to explore and modify some SQLite databases. Does anything similar to SQL Server Management Studio or MySQLAdmin exist for it?</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/5817" rel="nofollow noreferrer">As a Firefox plugin</a> (aimed mainly at gears, but should work)</p> <p><a href="http://www.sqlitemanager.org" rel="nofollow noreferrer">As a (sucky) web based app</a></p> <p>And <a href="http://www.sqlite.org/cvstrac/wiki?p=Ma...
<p>I also discovered some SQLite software for Visual Studio at <a href="http://sqlite.phxsoftware.com/" rel="nofollow noreferrer">http://sqlite.phxsoftware.com/</a> which allows you to use the Visual Studio Server Explorer to create connections to SQLite databases.</p>
7,984
<p>I recently finished building my first printer. The only problem that I'm having is that the hotend is not getting hot enough to start printing with PLA (180 to 230 degrees celsius), the hotend getting hotter stops at 170 degrees. Please help I've been stuck on this problem for days. Thanks in advance.</p>
<p>Usually, this kind of problem is due to an issue with the control loop of the temperature. You can try to do <a href="http://reprap.org/wiki/PID_Tuning" rel="noreferrer">PID Tuning</a> by running the command <code>M303 E0 S200 C8</code>. This will heat up the hot end and cycle it around 200C a few times, and afterwa...
<p>There are software limits that might be set low by default depending on the software you are using. I know there is with Marlin.</p>
385
<p>This question is a follow up to my <a href="https://stackoverflow.com/questions/56279/export-aspx-to-html">previous question</a> about getting the HTML from an ASPX page. I decided to try using the webclient object, but the problem is that I get the login page's HTML because login is required. I tried "logging in" u...
<p>Try setting the credentials property of the WebClient object</p> <pre><code>WebClient ww = new WebClient(); ww.Credentials = CredentialCache.DefaultCredentials; ww.DownloadString("Login.aspx?UserName=&amp;Password="); string html = ww.DownloadString("Internal.aspx"); </code></pre>
<p>@Fire Lancer: I asked myself that same question during my tests, so I checked, and it does work from a browser.</p>
8,635
<p>I have been working on a printer project that basically is a 2D printer (dot matrix type). We are using solenoids as actuators to make impressions on the paper. We are now in the process of designing custom software. But a problem that we have encountered is that we have no idea how to design software as we are a bu...
<p>3D printer firmware use gcode that is derived from CNC and no acknowledgment. They send movement commands to the stepper motors like <code>G1 X10 Y10</code> to move the printhead 10 mm along the X and Y.</p> <p>You could use a ready 3D printer firmware like Marlin on a 3d printer board and use the X-axis or extrude...
<p>The CNC system, and simplifying intentionally, is divided into several steps:</p> <ol> <li><strong>Acquisition of the g-code</strong>: This depends on the platform, whether is a file from an USB flash-memory, network or direct input from the operator. G-code operations needs to be buffered in a quantity enough to a...
1,176
<p>Is there a built in function in .NET 2.0 that will take two arrays and merge them into one array?</p> <p>The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format.</p> <p>I'm looking to avoid...
<p>In C# 3.0 you can use LINQ's <a href="https://msdn.microsoft.com/en-us/library/vstudio/bb302894%28v=vs.100%29.aspx" rel="noreferrer">Concat</a> method to accomplish this easily:</p> <pre><code>int[] front = { 1, 2, 3, 4 }; int[] back = { 5, 6, 7, 8 }; int[] combined = front.Concat(back).ToArray(); </code></pre> <p...
<p>Try this:</p> <pre><code>ArrayLIst al = new ArrayList(); al.AddRange(array_1); al.AddRange(array_2); al.AddRange(array_3); array_4 = al.ToArray(); </code></pre>
8,376
<p>Given a string like this:</p> <blockquote> <p>a,"string, with",various,"values, and some",quoted</p> </blockquote> <p>What is a good algorithm to split this based on commas while ignoring the commas inside the quoted sections?</p> <p>The output should be an array:</p> <blockquote> <p>[ "a", "string, with", "...
<p>Looks like you've got some good answers here.</p> <p>For those of you looking to handle your own CSV file parsing, heed the advice from the experts and <a href="http://secretgeek.net/csv_trouble.asp" rel="noreferrer">Don't roll your own CSV parser</a>.</p> <p>Your first thought is, <em>"I need to handle commas ins...
<p>I use this to parse strings, not sure if it helps here; but with some minor modifications perhaps?</p> <pre><code>function getstringbetween($string, $start, $end){ $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$en...
2,802
<p>I've recently had to switch from Visual Studio to Eclipse CDT.<br> It would seem that Eclipse "workspaces" are not quite like VS solution files.<br> Eclipse workspaces use the <code>.metadata</code> folder for managing multiple projects, but there doesn't seem to be a simple distinction between user settings or IDE ...
<p>Yes you are right eclipse does not manage projects in the same way VS does with solution files. However for putting a group of related projects into a VCS eclipse has the concept of a <em>Team Project Set</em> available in File->Export then under the Team folder there is Team Project Set.</p>
<p>I often find IDE's have a preferred way to work. Sure, you might be able to get the IDE to do it your way, but you'll probably end up fighting it all the way.</p> <p>Try to use your IDE like their makers intended you to. They have made presumptions on how you are supposed to do your work. They have optimized the us...
7,976
<p>I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object. What is the best way to test that the factory...
<p>Since I don't know how your factory method looks like, all I can advise right now is to </p> <ol> <li><p>Check to see the object is the correct concrete implementation you were looking for:</p> <pre><code>IMyInterface fromFactory = factory.create(...); Assert.assertTrue(fromFactory instanceof MyInterfaceImpl1); ...
<pre><code>if (myNewObject instanceof CorrectClass) { /* pass test */ } </code></pre> <p><strong>update:</strong></p> <p>Don't know why this got marked down, so I'll expand it a bit...</p> <pre><code>public void doTest() { MyInterface inst = MyFactory.createAppropriateObject(); if (! inst instanceof Expe...
5,796
<p>I have a simple type that explicitly implemets an Interface.</p> <pre><code>public interface IMessageHeader { string FromAddress { get; set; } string ToAddress { get; set; } } [Serializable] public class MessageHeader:IMessageHeader { private string from; private string to; [XmlAttribute("From")] ...
<p>You cannot serialize IMessageHeader because you can't do Activator.CreateInstance(typeof(IMessageHeader)) which is what serialization is going to do under the covers. You need a concrete type.</p> <p>You can do typeof(MessageHeader) or you could say, have an instance of MessageHeader and do </p> <pre><code>XmlSeri...
<p>You can create an abstract base class the implements IMessageHeader and also inherits MarshalByRefObject</p>
8,476
<p>I was just shopping for filament, and saw some glowing claims about PETG being as easy to work with as PLA, but as strong as ABS, and less brittle. Anyone know if that's actually true, or what the tradeoffs are?</p>
<p>PETG is great stuff to work with. It is stronger than ABS also. It prints slower than ABS and PLA. The formulas vary quite a bit from vendor to vendor. I have used 3 brands, and each of their properties vary. </p> <p>From my experience you do have to be careful with moisture. You'll be able to tell you have moistur...
<p>I love PETG. When I first started I always used ABS because I thought it was the best and didn't see the point in using PLA. However, after a few years of playing around I no longer use ABS. I use PLA for when I am testing and PETG when I want to print something that will be used, ike parts or models. </p> <p>PETG ...
160
<p>I'm trying to print with Laybrick and for the most part it is going. The problem lies with the top layer and gaps appearing. I've tried increasing the number of top layers but the gaps still appear. Any ideas what else I can try? </p> <p>I'm using Simplify3d. <a href="https://i.stack.imgur.com/Y05dR.jpg" rel="no...
<p>When using Simplify3D, you may try referring to their awesome troubleshooting guide: <a href="https://www.simplify3d.com/support/print-quality-troubleshooting/#holes-and-gaps-in-the-top-layers" rel="nofollow">https://www.simplify3d.com/support/print-quality-troubleshooting/#holes-and-gaps-in-the-top-layers</a> 3 rea...
<p>When using Simplify3D, you may try referring to their awesome troubleshooting guide: <a href="https://www.simplify3d.com/support/print-quality-troubleshooting/#holes-and-gaps-in-the-top-layers" rel="nofollow">https://www.simplify3d.com/support/print-quality-troubleshooting/#holes-and-gaps-in-the-top-layers</a> 3 rea...
393
<p>I'm trying to implement Drag &amp; Drop functionality with source being a TreeView control. When I initiate a drag on a node, I'm getting:</p> <p><em>Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))</em></p> <p>The ItemDrag handler (where the exception takes place), looks like:</p>...
<p>In case it helps anyone else - I encountered this problem with the WPF TreeView (not Windows Forms as listed in the question) and the solution was simply to make sure to mark the event as handled in the drop event handler.</p> <pre><code> private void OnDrop(object sender, DragEventArgs e) { // Other...
<p><strong><code>FORMATETC</code></strong> is a type of application clipboard, for lack of a better term. In order to pull off some of the visual tricks of draging around the tree node, it has to be copied into this clipboard with its source description. The source control loads its info into the <code>FORMATETC</cod...
7,310
<p>I upgraded to an Mk9 dual extruder, and it came with thermocouples installed instead of the thermistors I had before. </p> <p>No matter what I did with the thermocouples, the indicated temperature jumped around by as much as 30C or more. In short, after several weeks of fiddling I never got the thermocouples to wor...
<p>Thermocouples work by passively generating VERY small voltages via the Seebeck effect -- usually a few tens of millivolts. They're literally just a pair of wires made from two different special alloys, electrically connected together at the "hot" end. That wire junction can be mounted inside whatever kind of attachm...
<p>It sound like you just have a defective thermocouple. But, I just did a google search for "Why are thermocouples inaccurate" and found <a href="http://www.temprel.com/support/troubleshoot-thermocouple.aspx" rel="nofollow">this article</a> on identifying bad thermocouples and preventative maintenance. I never thought...
126
<p>I have an ANET A2 Prusa - which I've setup and performed a few prints on and they have various problems with the quality. I'm after some specific experience on what the flow of filament should look like or if my decription triggers someone </p> <p>I've been adjusting settings - In particular the temperature - as ...
<p>From my experience with mk8 extruders lower than optimal nozzle temperature or clogged nozzle can lead to an extruder's stepper motor overheating and partial burning out of a stepper</p> <p>It looks like “Achilles' heel” of mk8 extruders. I had to change 4 stepper motors for 2 3d printers with mk8 due to that</p> ...
<p>From my experience with few printer, Sometime it's happen because of the filament. Solution- If your printer have unload function or if you don't have that funstion select a printerable file and change temperature to 205-210 C and try to use long and thin hex key like this to push the filament out. -Make sure you...
659
<p>I've had an app doing prefix searches for a while. Recently the index size was increased and it turned out that some prefixes were too darned numerous for lucene to handle. It kept throwing me a <a href="http://web.archive.org/web/20080901205009/http://lucene.apache.org:80/java/2_3_2/api/core/org/apache/lucene/sear...
<p>I've hit this before. It has to do with the fact that lucene, under the covers, turns many (all?) things into boolean queries when you call Query.rewrite()</p> <p>From: <a href="http://web.archive.org/web/20110915061619/http://lucene.apache.org:80/java/2_2_0/api/org/apache/lucene/search/Query.html" rel="nofollow no...
<p>When running a prefix query, Lucene searches for all terms in its "dictionary" that match the query. If more than 1024 (by default) match, the TooManyClauses-Exception is thrown.</p> <p>You can call BooleanQuery.setMaxClauseCount to increase the maximum number of clauses permitted per BooleanQuery.</p>
2,997
<p>It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on.</p> <p>Is there a specific HTTP Header that IE6 does listen...
<p><code>Cache-Control: private, max-age=0</code> should fix it. From classic ASP this is done with <code>Response.Expires=-1</code>.</p> <p>Keep in mind when testing that just because your server is serving pages with caching turned off doesn't mean that the browser will obey that when it has an old cached page that ...
<p>Have you tried setting an ETag in the header? They're a pretty reliable way to indicate that content has changed <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19" rel="nofollow noreferrer">w3c Spec</a> &amp; <a href="http://en.wikipedia.org/wiki/HTTP_ETag" rel="nofollow noreferrer">Wikipedia...
6,371
<p>When writing database queries in something like TSQL or PLSQL, we often have a choice of iterating over rows with a cursor to accomplish the task, or crafting a single SQL statement that does the same job all at once.</p> <p>Also, we have the choice of simply pulling a large set of data back into our application an...
<p>The main reason that I'm aware of is that set-based operations can be optimised by the engine by running them across multiple threads. For example, think of a quicksort - you can separate the list you're sorting into multiple "chunks" and sort each separately in their own thread. SQL engines can do similar things wi...
<p>The idea behind preferring to do the work in queries is that the database engine can optimize by reformulating it. That's also why you'd want to run EXPLAIN on your query, to see what the db is <em>actually</em> doing. (e.g. taking advantage of indices, table sizes and sometimes even knowledge about the distribution...
4,390
<p>When go to export a model using Fusion 360 or Meshmixer, I see that there are two options. Could the final model be affected by the format chosen at the time of saving?</p> <p><a href="https://i.stack.imgur.com/xIEXt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xIEXt.png" alt="enter image description h...
<p>The two formats contain the same information about the model, but the binary format is <strong>much more compact</strong>, so it will produce smaller files from the same part but they should work the same. That's to say, if you take the exact same model, save it as a binary STL and as an ASCII STL, the binary STL fi...
<p>The other answers on this thread seem kind of hand-wavy, so I'll give my input.</p> <p>At its simplest, all we're dealing with here is two different formats of encoding the same data. The 3D file is identical, just described by the file data in different terms.</p> <p>That being said, there is a multitude of differe...
1,453
<p>I would like to create events for certain resources that are used across various processes and access these events by name. The problem seems to be that the names of the events must be known to all applications referring to them.</p> <p>Is there maybe a way to get a list of names events in the system?</p> <p>I am ...
<p>No, there is not any facility to enumerate named events. You could enumerate all objects in the respective object manager directory using ZwOpenDirectoryObject and then filter for events. But this routine is undocumented and therefore should not be used without good reason.</p> <p>Why not use a separate mechanism t...
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="nofollow noreferrer">ProcessExplorer</a> is able to enumerate all the named events held by some specific process. You could go over the entire process list and do something similar although I have now clue as to what API is used to get the ...
5,631
<p>I'm new to this game, and recently upgraded the hotend on my Ender 3 Pro to a <em>clone</em> of an E3D V6, as I'm keen to do nylon prints at some point. I noticed however that this one I got has a teflon liner which seems to negate the advantage of a metal hotend entirely.</p> <p>I'm wondering what temperature it's ...
<p>There are many types of <a href="https://3dprinting.stackexchange.com/questions/10998/e3d-v6-original-vs-clone/11012#11012">heatbreak clones</a>. In cour case, your clone effectively turns your hotend into an e3d Lite6, not an all-metal e3d v6. To function properly, the PTFE liner needs to butt against the nozzle or...
<p>Long story short, you can print Nylon with a Teflon tube. I've done it. P.S. The nylon absorbs water like nothing you've ever seen. Even after the part is printed, it absorbs water, and expands!</p>
1,712
<p>If I have an IEnumerator variable is it possible to have a lambda function that takes it, advances it with MoveNext() and returns the Current value every single time its called?</p>
<pre><code>e =&gt; e.MoveNext() ? e.Current : null </code></pre> <p>This will advance the enumerator and return the current value, and return null when the enumeration is complete.</p>
<p>Is this what you are looking for?</p> <pre><code>List&lt;string&gt; strings = new List&lt;string&gt;() { "Hello", "I", "am", "a", "list", "of", "strings." }; IEnumerator&lt;string&gt; e = strings.GetEnumerator(); Func&lt;string&gt; f = () =&gt; e.MoveNext() ? e.Current : null; for (; ; ) { string str = f();...
9,851
<p>I'm trying to bind a list of custom objects to a WPF Image like this:</p> <pre><code>&lt;Image&gt; &lt;Image.Source&gt; &lt;BitmapImage UriSource="{Binding Path=ImagePath}" /&gt; &lt;/Image.Source&gt; &lt;/Image&gt; </code></pre> <p>But it doesn't work. This is the error I'm getting:</p> <p><em>"P...
<p>WPF has built-in converters for certain types. If you bind the Image's <code>Source</code> property to a <code>string</code> or <code>Uri</code> value, under the hood WPF will use an <a href="https://msdn.microsoft.com/en-us/library/system.windows.media.imagesourceconverter(v=vs.110).aspx" rel="noreferrer">ImageSour...
<p>You need to have an implementation of <a href="http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter.aspx" rel="nofollow noreferrer">IValueConverter</a> interface that converts the uri into an image. Your Convert implementation of IValueConverter will look something like this:</p> <pre><code>...
4,091
<p>I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error:</p> <blockquote> <p><strong>Request Error</strong><br>The server encountered an error processing the request. See server log...
<p>In order to verbosely display the errors resulting from your data service you can place the following tag above your dataservice definition:</p> <pre><code>[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] </code></pre> <p>This will then display the error in your browser window as well...
<p>For me the error was caused by two methods having the same name (unintended overloading).</p> <blockquote> <p>Overloading is not supported but type 'abc' has an overloaded method 'Void SubmitCart(System.String, Int32)'.</p> </blockquote> <p>I found out by running the service in debug mode.</p>
7,799
<p>If you're building an <code>AJA~Xy</code> app, are there any downsides to using <code>JSONP</code> requests/responses even if you're not planning on any <code>cross-domain</code> requests? </p> <p>The only thing I can think of is that there are a couple extra bytes for the callback wrapper... </p> <p><strong>Edit:...
<p>Downside? It's fairly limited - you trigger a "GET" request and get back some script that's executed. You don't get error handling if your server throws an error, so you need to wrap all errors in JSON as well. You can't really cancel or retry the request. You're at the mercy of the various browser author opinions o...
<p>Here is another bit you may want to consider with JSONP.. possible memory leaks.. </p> <p><a href="http://neil.fraser.name/news/2009/07/27/" rel="nofollow noreferrer">http://neil.fraser.name/news/2009/07/27/</a></p>
3,965
<p>Would it be possible to print <code>Hello</code> twice using single <code>condition</code>?</p> <pre><code>if "condition" printf ("Hello"); else printf("World"); </code></pre>
<pre><code>if ( printf("Hello") == 0 ) printf ("Hello"); else printf ("World"); </code></pre> <p>:-)</p>
<p>The condition to this question is:</p> <pre><code> if(printf("hello")? 0 : 1) { } </code></pre>
5,318
<p>I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calendar and the login time. I do not know if the right term for this is <i>Course Scheduler</i> but I shall describe this in more detail here.</p> <p><b>Course Scheduler</b><br> The widget would ...
<p>this could be what you're looking for:</p> <p><a href="http://www.dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml" rel="noreferrer">DHTMLxScheduler link</a></p> <ul> <li>It has day/week/month views</li> <li>It is free</li> <li>Data can be loaded in xml or iCal formats</li> </ul> <p>You can populate the calen...
<p>try the following open source one. <a href="http://www.web-delicious.com/jquery-events-calendar-wdcalendar/">wdCalendar</a> is a jquery based google calendar clone. It cover most google calendar features.</p> <pre><code>* Day/week/month view provided. * create/update/remove events by drag &amp; drop. * Easy way to...
4,578
<p>I just installed my BLTouch clone (Marlin 1.8) on my Anycubic i3 Mega Ultrabase and finding confusing information about the <code>Z_PROBE_OFFSET_FROM_EXTRUDER</code> or the <code>M851</code> command.</p> <p>I understand <code>M851</code> command does the same as <code>Z_PROBE_OFFSET_FROM_EXTRUDER</code> in the Confi...
<p>What may be confusing is the use of the naming of the mechanism &quot;Auto Bed Levelling&quot;, or short ABL, does not make your build plate to level itself with respect to the frame of the printer<sup>1)</sup>. Hence you are instructed to always tram (level is rather misleading as it doesn't involve bubble levellin...
<p>Just thought that BLTouch could automatically measure the nozzle height. If it goes down slowly till nozzle touch the bed and then push down a little more then it will see sensor isn't moving anymore then it means nozzle already pushes the bed down. Beds are usually have springs and shouldn't hurt to push it a littl...
1,845
<p>I have a page with a Google Maps mashup that has pushpins that are color-coded by day (Monday, Tuesday, etc.) The IFrame containing the map is dynamically sized, so it gets resized when the browser window is resized. </p> <p>I'd like to put a legend in the corner of the map window that tells the user what each colo...
<p>You can add your own Custom Control and use it as a legend.</p> <p>This code will add a box 150w x 100h (Gray Border/ with White Background) and the words "Hello World" inside of it. You swap out the text for any HTML you would like in the legend. This will stay Anchored to the Top Right (G_ANCHOR_TOP_RIGHT) 10px d...
<p>I would use HTML like the following:</p> <pre><code>&lt;div id="wrapper"&gt; &lt;div id="map" style="width:400px;height:400px;"&gt;&lt;/div&gt; &lt;div id="legend"&gt; ... marker descriptions in here ... &lt;/div&gt; &lt;/div&gt; </code></pre> <p>You can then style this to keep the legend in the bottom right...
5,712
<p>I just tried FxCop. It does detect unused private methods, but not unused public. Is there a custom rule that I can download, plug-in that will detect public methods that aren't called from within the same assembly?</p>
<p>Corey, my answer of using FxCop had assumed you were interested in removing unused private members, however to solve the problem with other cases you can try using <a href="http://www.ndepend.com/" rel="nofollow noreferrer">NDepend</a>. Here is some CQL to detect unused public members (adapted from an article listed...
<p>How would it know that the public methods are unused?</p> <p>By marking a method as public it can be accessed by any application which references your library.</p>
9,703
<p><em>Preferred languages</em>: C/C++, Java, and Ruby.</p> <p>I am looking for some helpful books/tutorials on how to write your own compiler simply for educational purposes. I am most familiar with C/C++, Java, and Ruby, so I prefer resources that involve one of those three, but any good resource is acceptable.</p>
<h2>Big List of Resources:</h2> <ul> <li><a href="http://www.cs.indiana.edu/%7Edyb/pubs/nano-jfp.pdf" rel="noreferrer">A Nanopass Framework for Compiler Education</a> ¶</li> <li><a href="http://www.amazon.com/gp/offer-listing/1558603204?tag=thecompilerconne&amp;camp=14573&amp;creative=327641&amp;linkCode=am1&amp;creati...
<p>Whenever I want to try out a new language idea, I just write a simple parser, and have it generate some language that's easy to get good compilers for, like C.</p> <p>How do you think C++ was done?</p>
2,399
<p>I am importing data from MS Excel spreadsheets into a php/mySQL application. Several different parties are supplying the spreadsheets and they are in formats ranging from Excel 4.0 to Excel 2007. The trouble is finding a technique to read ALL versions.</p> <p>More info: </p> <pre><code> - I am currently using php...
<p>Depending on the nature of your data and the parties that upload the excel files, you might want to consider having them save the data in .csv format. It will be much easier to parse on your end.</p> <p>Assuming that isn't an option a quick google search turned up <a href="http://sourceforge.net/projects/phpexcelr...
<p>The open-source ETL tool Talend (<a href="http://wwww.talend.com" rel="nofollow noreferrer">http://wwww.talend.com</a>) will generate Java or Perl code and package such code with the necessary 3rd party libraries. </p> <p>Talend should be able to handle all versions of Excel and output the result set in any format ...
9,826
<p>Recently I noticed a small issue with my Creality Ender 3, where I would come home and find one of the bed leveling wheels had fallen off. This one wheel keeps vibrating loose. It's not really affecting my prints for some reason, so I just kind of let it happen.</p> <p>Yesterday I started an 8 hour print and left. W...
<p>From the excellent Thingiverse link, <a href="https://www.thingiverse.com/thing:4967931" rel="nofollow noreferrer">Customizable QR Keyring or Tag</a> by <a href="https://www.thingiverse.com/outwardb/designs" rel="nofollow noreferrer"><em>OutwardB</em></a> - which was provided in the (now deleted) <a href="https://3d...
<p>From the excellent Thingiverse link, <a href="https://www.thingiverse.com/thing:4967931" rel="nofollow noreferrer">Customizable QR Keyring or Tag</a> by <a href="https://www.thingiverse.com/outwardb/designs" rel="nofollow noreferrer"><em>OutwardB</em></a> - which was provided in the (now deleted) <a href="https://3d...
2,045
<p>Using C# 2.0 what is the best way to implement dynamic form controls?</p> <p>I need to provide a set of controls per data object, so should i just do it manually and lay them out while increment the top value or is there a better way?</p>
<p>You can use panels with automatic layout such as <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.flowlayoutpanel.asp" rel="nofollow noreferrer">FlowLayoutPanel</a> and <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.tablelayoutpanel.aspx" rel="nofollow noreferrer">TableLay...
<p>What do you mean by “dynamic”? A new, fixed set of controls for each data row in the data set? Then use a <code>UserControl</code> that contains your controls.</p> <p>Or do you mean that, depending on your data layout, you want to provide the user with a customized set of controls, say, one <code>TextBox</code> for...
6,516
<p>I seem right now to be embroiled in a debate with another programmer on this project who thinks that views have no merits. He proposes a system that PHP looks something like this:</p> <pre><code>$draw = new Draw; $nav = $draw-&gt;wideHeaderBox(). $draw-&gt;left(). $draw-&gt;image(). Image::get($image,6...
<p>HTML time-savers are useful, but they're only useful when they're intuitive and easy-to-understand. Having to instantiate a <code>new Draw</code> just doesn't sound very natural. Furthermore, <code>wideHeaderBox</code> and <code>left</code> will only have significance to someone who intimately knows the system. And ...
<p>The argument he uses is the argument you need to <em>have</em> views. Both result in only changing it in one place. However, in his version, you are mixing view markup with business code.</p> <p>I would suggest using more of a templated design. Do all your business logic in the PHP, setup all variables that are nee...
5,851
<p>I have OctoPrint set up on a Raspberry Pi (OctoPi). I have loaded a number of G-code files to the SD card on the printer.</p> <p>My question is: If I initiate a print from the SD card via OctoPrint, can I then turn off the RPi so I can use it for other things while the print continues?</p>
<p>Your printer will stop printing. So no.</p>
<p>Disconnecting the USB or connecting it triggers a reboot in the printer. As a result, you can not disconnect or turn off the print server running OctoPrint.</p>
1,816
<p>In emacs, I've read the following code snippet in <code>simple.el</code>:</p> <pre><code>(frame-parameter frame 'buried-buffer-list) </code></pre> <p>What is the exact meaning of the <code>'buried-buffer-list</code> parameter? What it is used for?</p>
<p>MSSQL2000 won't give you that kind of information. But a way you can identify what tables ARE used (and then deduce which ones are not) is to use the SQL Profiler, to save all the queries that go to a certain database. Configure the profiler to record the results to a new table, and then check the queries saved ther...
<p>If you have lastupdate columns you can check for the writes, there is really no easy way to check for reads. You could run profiler, save the trace to a table and check in there</p> <p>What I usually do is rename the table by prefixing it with an underscrore, when people start to scream I just rename it back</p>
5,553
<p>Are <strong>CDATA</strong> tags ever necessary in script tags and if so when?</p> <p>In other words, when and where is this:</p> <pre><code>&lt;script type="text/javascript"&gt; //&lt;![CDATA[ ...code... //]]&gt; &lt;/script&gt; </code></pre> <p>preferable to this:</p> <pre><code>&lt;script type="text/javascript...
<p>A CDATA section is required if you need your document to parse as XML (e.g. when an XHTML page is interpreted as XML) <em>and you want to be able to write literal <code>i&lt;10</code> and <code>a &amp;&amp; b</code> instead of <code>i&amp;lt;10</code> and <code>a &amp;amp;&amp;amp; b</code></em>, as XHTML will parse...
<p><a href="http://javascript.about.com/library/blxhtml.htm" rel="nofollow noreferrer">When you want it to validate</a> (in XML/XHTML - thanks, <a href="https://stackoverflow.com/users/6436/loren-segal">Loren Segal</a>).</p>
9,238
<p>I'm having problems when printing small parts over big areas.</p> <p>I'm currently printing quite big casing (~180&nbsp;mm x 100&nbsp;mm), which has hexagonal holes on the corners. On the first layer the printer prints, in order:</p> <ul> <li>Supports inside the holes, </li> <li>Borders around the holes</li> <li>B...
<p>it seems like retraction issue</p> <p>i would say you should experiment with </p> <ul> <li>retraction length - so it would retract more</li> <li>extra extrusion after retraction - so the printer could put some material before it will start your next hole :)</li> </ul> <p>unfortunately there is no good guide how m...
<p>Set <code>retraction_min_travel</code> to 0. The default value is 1.5 and skips retraction when moving less than 1.5 mm. This leads to serious oozing whenever your print has small travel, which seems likely between the hole walls and the supports inside the holes.</p> <p>Also, the "custom start gcode" in Cura's End...
1,291
<p>I am using &quot;Pretty PETG&quot; along with PrusaSlicer's consecutive print mode.</p> <p>What I am noticing is that upon finishing the first print, the printer hits <code>MINTEMP BED Fixed</code>. I'm not sure if it's immediate because I let the prints run overnight but I assume the bed cools down and then the err...
<p>0.2 mm and 0.4 mm are half the diameter, but the maximum flow is not just half: Flow scales with the area. The 0.4 mm nozzle has an area 4 times as the 0.2 mm one:</p> <p><span class="math-container">$\frac{A_1} {A_2}=\frac {0.2^2}{0.1^2}=4$</span></p> <p>You need to reduce <code>print speed</code> or the <code>volu...
<p>The discussion about slowing the print speed is important, but in my experience it is not at the root of the problem, and slowing down printing may make it worse.</p> <p>If ny &quot;heater&quot; you mean the complete hot-end, then I suspect you are jamming in the cooler part of the hot-end. This cooler part is sepa...
1,744
<p>I am starting a new <strong>client/server</strong> project at work and I want to start using some of the newer technologies I've been reading about, LINQ and Generics being the main ones. Up until now I have been developing these types of applications with MySQL as clients were unwilling to pay the large licence co...
<p>The answer to the question on any project in regards to what platform/technologies to use is: <strong>What does everyone know best?</strong></p> <ol> <li><p>Yes express <a href="http://www.microsoft.com/express/2005/sql/download/" rel="nofollow noreferrer">can still be downloaded</a>.</p></li> <li><p>Will it fit yo...
<p>Note sure about #2 but you can download <a href="http://www.microsoft.com/sql/editions/express/default.mspx" rel="nofollow noreferrer">SQL Server Express 2005 here</a>.</p>
4,646
<p>Harking back to the days of "singing disk drives," I am wondering if anyone's written music to be performed on a 3D printer. Most of us have noticed in passing that the servo motors for X and Y drive generate a different pitch depending on motion speed. With some care and experimentation, one could write g-code to p...
<p>Yes, it has been done before, see <a href="https://github.com/forflo/gCodeMusic" rel="noreferrer">here</a> and <a href="https://github.com/yeokm1/midi-to-simple-metal-gcode" rel="noreferrer">here.</a></p> <p>The README file of the first repository linked above contains a detailed explanation of the basic idea/calcu...
<p>I actually did this, on my Malyan M150. </p> <p>After not that much experimentation at all it turned out that the frequency of the produced tone scales linearly with the speed of the motors. Due to the nature of the way humans perceive music, the actual frequencies do not matter at all, just the relative difference...
853