instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>What is the command to list all triggers in a MySQL database?</p>
<p>The command for listing all triggers is:</p> <pre><code>show triggers; </code></pre> <p>or you can access the <code>INFORMATION_SCHEMA</code> table directly by:</p> <pre><code>select trigger_schema, trigger_name, action_statement from information_schema.triggers </code></pre> <ul> <li>You can do this from versio...
<p>This sentence could contribute to solving the problem:</p> <pre><code>select LOWER(concat('delimiter |', '\n', 'create trigger %data_base_name%.', TRIGGER_NAME, '\n', ' ', ACTION_TIMING, ' ', EVENT_MANIPULATION, ' on %data_base_name%.', EVENT_OBJECT_TABLE, ' for each row', '\n', ACTION_STATEMENT, '\n', '|')) AS ...
6,957
<p>One of my biggest typographical frustrations about HTML is the way that it mangles conjoined whitespace. For example if I have:</p> <pre><code>&lt;span&gt;Following punctuation rules. With two spaces after the period. &lt;/span&gt; </code></pre> <p>One of the two spaces following the period will be considered t...
<p>For your specific example, there is no need to worry about it. Web browsers perform typographical rendering and place the correct amount of space between periods and whatever character follows (and it's different depending on the next character, according to kerning rules.)</p> <p>If you want line breaks, &lt;br/&g...
<p>You'd better use white-space: pre-wrap than white-space: pre or &amp;nbsp; With your example, the latter solutions can start a new line on "rules.&amp;nbsp;" just because your <strong>n</strong>on-<strong>b</strong>reakable <strong>sp</strong>ace hit the end of the line.</p>
3,710
<p>Do you expect your WPF developers to know expression blend?</p> <p>Any good resources for learning more about Blend?</p> <p>[UPDATE] Does knowing blend make you more productive?</p>
<p>I found Blend a great way to ease into XAML. Many of the common things you want to do are easy in Blend, especially databinding. Databinding has no intellisense and I found doing things in Blend a great way of discovering how do write the databinding syntax.</p> <p>I now find myself mostly editing raw XAML buy han...
<p>Developers don't <strong>need</strong> to know Expression at all.</p> <p>What you <strong>do</strong> need to know is XAML and not hide behind some tool, which would be the worst thing you could do as a WPF developer. Your tool of choice is yours to decide on. I used to use the XML editor in Visual Studio.</p> <p>...
8,658
<p>I'm trying to increase adhesion of the first layer (as well as to fill gaps for a more even surface) by squeezing more material against the bed. The obvious way of doing that in Cura is by increasing the "Initial Layer Flow", i.e. to make the printer push out slightly more material than it normally would.</p> <p>Bu...
<p>Cura option <code>Initial Layer Width</code> will cause lines to be further apart or closer together, based on the value you set with respect to the default. The required filament flow to produce these lines is calculated based on the width of the line and the overlap between lines (and layer height).</p> <p>The Cu...
<p>The typical consensus is that you increase the layer flow initially for better adhesion, though from my experience I <strong>decrease</strong> it!<br /> My first layer is printed at between 70-75 % layer flow, this gives the best adhesion and best visuals when printing with ASA or ABS.<br /> From layer 2 on I've 105...
1,538
<p>I would like to make a 24&nbsp;V (3D printer board and shield) setup, as opposed to the usual 12&nbsp;V, and to do so I had been considering using the Taurino Power board, or the clone Eruduino. However, I just found this board:</p> <p><a href="https://i.stack.imgur.com/FoUYh.jpg" rel="nofollow noreferrer" title="R...
<p>Given that the capacitor near the input is quite clearly marked 35&nbsp;V, a 36&nbsp;V rating seems questionable.</p> <p>The (buck) regulator used on the (genuine version of the) board is the <a href="http://www.aosmd.com/res/data_sheets/AOZ1282CI.pdf" rel="nofollow noreferrer">AOZ1282CI</a> which supports up to 36...
<p>For completion, I've just seen this, <a href="https://www.reddit.com/r/3Dprinting/comments/9wfrmk/can_a_ramps_16_support_24v/" rel="nofollow noreferrer">Can a ramps 1.6 support 24v?</a> (which basically confirms the 24&nbsp;V support of the Re-ARM board) although it isn't particularly useful w.r.t. the RAMPS 1.6 sid...
1,412
<p>I have a page where there is a column and a content div, somewhat like this:</p> <pre><code>&lt;div id="container"&gt; &lt;div id="content"&gt;blahblahblah&lt;/div&gt; &lt;div id="column"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>With some styling I have an image that is split between the column and t...
<p>Its a bug in the rendering engine. I run into it all the time. One potential way to solve it is to hide and show the div whenever you change the content (that in turn changes the height):</p> <pre><code>var divCol = document.getElementById('column'); divCol.style.display = 'none'; divCol.style.display = 'block'; </...
<p>If you are worried about getting a flicker from showing and hiding divCol you can ajust another css property and it will have the same effect e.g.</p> <pre><code>var divCol = document.getElementById('column'); divCol.style.zoom = '1'; divCol.style.zoom = ''; </code></pre>
5,395
<p>I'm taking the leap: my PHP scripts will ALL fail gracefully!</p> <p>At least, that's what I'm hoping for...`</p> <p>I don't want to wrap (practically) every single line in <code>try...catch</code> statements, so I think my best bet is to make a custom error handler for the beginning of my files.</p> <p>I'm testi...
<p><code>set_error_handler</code> is designed to handle errors with codes of: <code>E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE</code>. This is because <code>set_error_handler</code> is meant to be a method of reporting errors thrown by the <em>user</em> error function <code>trigger_error</code>.</p> <p>However, I d...
<p>Very interesting thing that I've discovered today as I was facing the similar problem. If you use the following - it will catch the error with your custom error handler function / method:</p> <pre><code>ini_set('display_errors', 'Off'); error_reporting(-1); set_error_handler(array("Cmd\Exception\Handler", "getErro...
5,723
<p>I'm trying to extend some "base" classes in Python:</p> <pre><code>class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self x = xlist([1,2,3]) pri...
<p>Your two <code>xint</code> examples don't work for two different reasons.</p> <p>The first doesn't work because <code>self += value</code> is equivalent to <code>self = self + value</code> which just reassigns the local variable <code>self</code> to a different object (an integer) but doesn't change the original ob...
<p>Ints are immutable and you can't modify them in place, so you should go with option #2 (because option #1 is impossible without some trickery).</p>
5,363
<p>What are the best resources for Wordpress theme-development? I am currently in the phase of starting my own blog, and don't want to use one of the many free themes. I already have a theme for my website, so I want to read about best-practices. </p> <p>Any advice on how to get started would be very welcome :)</p> <...
<p>I think that the best way to learn is to look at how other people construct their themes. The first one to start one is the Default Kubrick theme that is included in the standard WordPress install. It has all of the basics and will show you some advanced techniques like including sidebar widgets. Next, in conjunctio...
<p>Found a new one over here. it's a good resource if you want to make a simple theme. :)</p> <p><a href="http://www.webhostingsearch.com/articles/create-your-own-wordpress-theme-tutorial.php" rel="nofollow noreferrer">http://www.webhostingsearch.com/articles/create-your-own-wordpress-theme-tutorial.php</a></p>
3,464
<p>I get a URL from a user. I need to know:<br/> a) is the URL a valid RSS feed?<br/> b) if not is there a valid feed associated with that URL</p> <p>using PHP/Javascript or something similar</p> <p>(Ex. <a href="http://techcrunch.com" rel="nofollow noreferrer">http://techcrunch.com</a> fails a), but b) would return th...
<p>Found something that I wanted:</p> <p>Google's <a href="http://code.google.com/apis/ajaxfeeds/" rel="noreferrer">AJAX Feed API</a> has a load feed and lookup feed function (Docs <a href="http://code.google.com/apis/ajaxfeeds/documentation/reference.html#_intro_fonje" rel="noreferrer">here</a>).</p> <p>a) <a href="...
<p>Are you doing this in a specific language, or do you just want details about the RSS specification?</p> <p>In general, look for the XML prolog:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; </code></pre> <p>followed by an &lt;rss&gt; element, but you might want to validate it as XML, fully validate ...
8,678
<p>I have a list of <code>Foo</code>. Foo has properties <code>Bar</code> and <code>Lum</code>. Some <code>Foo</code>s have identical values for <code>Bar</code>. How can I use lambda/linq to group my <code>Foo</code>s by <code>Bar</code> so I can iterate over each grouping's <code>Lum</code>s?</p>
<p><a href="https://stackoverflow.com/questions/46130/how-do-i-group-in-memory-lists#46317">Deeno</a>,</p> <p>Enjoy:</p> <pre><code>var foos = new List&lt;Foo&gt; { new Foo{Bar = 1,Lum = 1}, new Foo{Bar = 1,Lum = 2}, new Foo{Bar = 2,Lum = 3}, }; // Using language integrated queries: var q = from foo in foo...
<pre><code>var q = from x in list group x by x.Bar into g select g; foreach (var group in q) { Console.WriteLine("Group " + group.Key); foreach (var item in group) { Console.WriteLine(item.Bar); } } </code></pre>
6,816
<p>I have an Ender 5 pro and upgraded from the magnetic bed to the glass version. I print with Prusament PLA on 65 °C bed temp and 220 °C extruder temp. I measured that the glass surface has ~58 °C in the center and ~56 °C on the corners. That should be in the specs of the spool which has a printed recommendation of 50...
<p>The only time I've seen lifting, away from the edges of the part like this, is when the bed is contaminated with something which will stop the print sticking, like fingerprints and such.</p> <p>A thorough wipe-down with IPA on the heated bed is usually enough to stop it.</p>
<p>I haven't seen lifts that aren't on the edge of the print, such as warping, or the entire printed surface lifts. When I get something like in your photograph, it's because the print surface isn't flat and the first layer matches the surface topology. If the second image shows the print surface, it looks like blobs...
1,874
<p>I used the LINQ to SQL designer in Visual Studio to create an object model of a database. Now, I want to add XML comments to each generated property but I can't figure out how to do it without erasing the properties the next time the dbml file is refreshed.</p> <p>How can this be done?</p>
<blockquote> <p>Is there a way to determine at what point I would encounter a stack overflow?</p> </blockquote> <p>Not really. A stack overflow happens when you exhaust the stack space - however...</p> <ul> <li>The initial stack size can be changed programatically and may default to different amounts depending on y...
<p>Sure - e.g. if you want to traverse a tree structure what else would you use ? </p> <p>Maybe you would like to have something like a maximum depth to be sure you're not writing an infinite loop. (if this makes sense in your example)</p>
5,823
<p>I want to print HTML from a C# web service. The web browser control is overkill, and does not function well in a service environment, nor does it function well on a system with very tight security constraints. Is there any sort of free <code>.NET</code> library that will support the printing of a basic HTML page? ...
<p>You can print from the command line using the following:</p> <blockquote> <p>rundll32.exe %WINDIR%\System32\mshtml.dll,PrintHTML "%1"</p> </blockquote> <p>Where %1 is the file path of the HTML file to be printed.</p> <p>If you don't need to print from memory (or can afford to write to the disk in a temp fil...
<p>I don't know the specific tools, but there are some utilities that record / replay clicks. In other words, you could automate the "click" on the print dialog. (I know this is a hack, but when all else fails...)</p>
2,265
<p>Using .Net (C#), how can you work with USB devices? </p> <p>How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).</p> <p>Is there a native .Net solution to do this?</p>
<p>There is no <em>native</em> (e.g., System libraries) solution for this. That's the reason why <a href="http://www.icsharpcode.net/OpenSource/SharpUSBLib/" rel="nofollow noreferrer">SharpUSBLib</a> exists as mentioned by <a href="https://stackoverflow.com/questions/68749/working-with-usb-devices-in-net#68777">moobaa<...
<p>Most USB chipsets come with drivers. <a href="https://www.silabs.com/products/mcu/usb/Pages/default.aspx" rel="nofollow noreferrer">Silicon Labs</a> has one.</p>
9,429
<p>I would like to implement something similar to a c# delegate method in PHP. A quick word to explain what I'm trying to do overall: I am trying to implement some asynchronous functionality. Basically, some resource-intensive calls that get queued, cached and dispatched when the underlying system gets around to it. ...
<p>(Apart from the observer pattern) you can also use <a href="http://php.net/manual/function.call-user-func.php" rel="nofollow noreferrer"><code>call_user_func()</code></a> or <a href="http://php.net/manual/function.call-user-func-array.php" rel="nofollow noreferrer"><code>call_user_func_array()</code></a>.</p> <p>If...
<p>How do you feel about using the <a href="http://en.wikipedia.org/wiki/Observer_Pattern" rel="nofollow noreferrer">Observer</a> pattern? If not, you can implement a true callback this way:</p> <pre><code>// This function uses a callback function. function doIt($callback) { $data = "this is my data"; $call...
7,105
<p>I was (and still am) looking for an embedded database to be used in a .net (c#) application. The caveat: The Application (or at least the database) is stored on a Network drive, but only used by 1 user at a time.</p> <p>Now, my first idea was <a href="http://www.microsoft.com/sql/editions/compact/default.mspx" rel=...
<p><a href="http://www.sqlite.org/" rel="noreferrer">SQLite</a> came to my mind while reading your question, and I'm quite sure that it's possible to access it from a network drive <em>if</em> you keep yourself to the constraint of 1 user at a time.</p> <p><a href="http://web.archive.org/web/20100208133236/www.mikedun...
<p>This question is now ancient, and a lot has changed. For my specific purposes, <a href="https://www.litedb.org/" rel="nofollow noreferrer">LiteDB</a> is the option of choice. It's open source and has a <a href="https://github.com/mbdavid/LiteDB" rel="nofollow noreferrer">GitHub Repository</a>.</p> <p>Apart from tha...
2,312
<p>I wrote a simple batch file as a PowerShell script, and I am getting errors when they run.</p> <p>It's in a scripts directory in my path. This is the error I get:</p> <blockquote> <p>Cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about-signing".</p> </block...
<p>It could be PowerShell's default security level, which (IIRC) will only run signed scripts.</p> <p>Try typing this:</p> <pre class="lang-none prettyprint-override"><code>set-executionpolicy remotesigned </code></pre> <p>That will tell PowerShell to allow local (that is, on a local drive) unsigned scripts to run.<...
<p>On Windows 10: Click change security property of myfile.ps1 and change "allow access" by right click / properties on myfile.ps1</p>
3,184
<p>It's common to have a table where for example the the fields are account, value, and time. What's the best design pattern for retrieving the last value for each account? Unfortunately the last keyword in a grouping gives you the last physical record in the database, not the last record by any sorting. Which means...
<p>The subquery option sounds best to me, something like the following psuedo-sql. It may be possible/necessary to optimize it via a join, that will depend on the capabilities of the SQL engine.</p> <pre><code>select * from table where account+time in (select account+max(time) from table ...
<p>@shs<br> yes, that select last(value) SHOULD work, but it doesn't... My understanding although I can't produce an authorative source is that the last(value) gives the last physical record in the access file, which means it could be the first one timewise but the last one physically. So I don't think you should use...
6,964
<p>Has anyone considered using something along the lines of the Amazon SimpleDB data store as their backend database?</p> <p>SQL Server hosting (at least in the UK) is expensive so could something like this along with cloud file storage (S3) be used for building apps that could grow with your application.</p> <p>Grea...
<p>This is a good analysis of Amazon services from <a href="http://www.25hoursaday.com/weblog/2008/08/21/SomeThoughtsOnAmazonsElasticBlockStore.aspx" rel="nofollow noreferrer">Dare</a>.</p> <p><em>S3 handled what I've typically heard described as "blob storage". A typical Web application typically has media files and ...
<p>But do you really need SQL Server? Can't you live with PostgreSQL or MySQL? Both have proven to be ok for most tasks. </p> <p>Now if you need SQL Server features then you're out of luck. </p> <p>Another option is to rent a server. How expensive is expensive?</p> <p>(I've used Amazon S3 to store images for an appl...
7,723
<p>I have done the calibration for the x, y, and z axis and everything works fine there. However when I went to do the calibration for extruder things got a little weird. The original number programmed on the board for the step per mm was 98 When I did my first measurements I used 120mm as the mark on the filament then...
<p>It is really strange that although you <em>increased</em> the steps per mm, the amount extruded was <em>less</em>. I can think of two possible explanations:</p> <ul> <li><p>You are extruding too quickly, at a rate at which the extruder can't keep up melting the filament fast enough, causing the filament to slip or ...
<p>I understand you marked at 120mm then tried to extrude 100mm and measured 37.66mm remaining. Take the 120mm - 37.66mm (remaining)= 82.34mm (that was extruded (so you were 17.66mm short of your 100mm).</p> <p>The formula I use is [New Setting=(Wanted Distance X old setting)/ Actual Distance].</p> <p>So [New Settin...
236
<p>My Sunhokey Prusa i3 arrived with a corrupted disc. I'm awaiting a new one and finished the mechanical build via YouTube videos. </p> <p>I've no clue which motor controls the X, Y, and Z, axes. I"m not even positive which axis is which. YouTube vids don't show the origin of all the wires/cables/cords they connect. ...
<p>X-axis is right-to-left (Carriage motor)</p> <p>Y-axis is front-to-back (Base/Bed motor)</p> <p>Z-axis is up-and-down (lead screws)</p> <p>There are several videos on YouTube. This <a href="https://www.youtube.com/watch?v=meKht2ObOWw&amp;list=PLEHodQXu836zPQmIkCwLAE2ze_qOxoOvY" rel="nofollow noreferrer">playlist<...
<p>This diagram would appear to show the connections to the controller board. Taken from <a href="https://hackaday.io/page/1569-3d-printer-sunhokey-prusa-i3-2015-review" rel="nofollow noreferrer">3D Printer: Sunhokey prusa i3 2015 review</a></p> <blockquote> <p><a href="https://i.stack.imgur.com/6iKdC.png" rel="nofo...
780
<p>In the past we had printers with poor mechanics and with primitive software algorithms, therefore we used to print inner perimeters faster than the outermost one. See for example (generic, found online):</p> <p><a href="https://i.stack.imgur.com/DJeIV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.co...
<p>Lowering speed on outer perimeter has always been mostly wrong, but possibly useful. Usually, it's a poor approximation for what you really want to do, which is lowering <em>acceleration</em> on the outer perimeter, to avoid surface quality and dimensional accuracy errors due to ringing and backlash. However, on bow...
<p>Thanks to Input Shaper, you can print faster, sometimes to the point of reaching your speed limit on the max nozzle flow speed. At that point, if all speeds are hitting that threshold without any changes in quality, you could print every part at the same maximum speed.</p>
1,843
<p>I want to implement in Java a class for handling graph data structures. I have a Node class and an Edge class. The Graph class maintains two list: a list of nodes and a list of edges. Each node must have an unique name. How do I guard against a situation like this: </p> <pre><code>Graph g = new Graph(); Node n1 = ...
<p>I work with graph structures in Java a lot, and my advice would be to make any data member of the Node and Edge class that the Graph depends on for maintaining its structure final, with no setters. In fact, if you can, I would make Node and Edge completely immutable, which has <a href="http://www.javapractices.com/t...
<p>In addition to the comments by @jhkiley.blogspot.com, you can create a factory for Edges and Nodes that refuses to create objects with a name that was already used.</p>
8,914
<p>I have a table with many millions of rows. I need to find all the rows with a specific column value. That column is not in an index, so a table scan results.</p> <p>But would it be quicker to add an index with the column at the head (prime key following), do the query, then drop the index?</p> <p>I can't add an in...
<p>I'm no DBA, but I would guess that building the index would require scanning the table anyway. </p> <p>Unless there are going to be multiple queries on that column, I would recommend not creating the index.</p> <p>Best to check the explain plans/execution times for both ways, though!</p>
<p>Adding an index requires a table scan, so if you can't add a permanent index it sounds like a single scan will be (slightly) faster.</p>
4,996
<p>Has anyone implements Subversion with Siteminder as authentication provider ? If yes, would it be possible to provide an overview of how the whole setup is done ?</p> <p>Since I am using only HTTP authentication, I think it would be easier to integrate with SM, but I am not able to find much help on this on the net...
<p>SVN with Siteminder has been implemented and is working now. Since there is not much of information out there on this, I would like to post the overview of steps followed:</p> <ol> <li>Cookie based authentcation was disabled on Siteminder end</li> <li>HTTP AUTH was enabled (in Siteminder) and all webdav methods wer...
<p>Look for information about <strong>Apache</strong> and Siteminder as Apache is responsible for the HTTP transport stuff in Subversion</p>
9,936
<p>I'm needing to check the differences between two XMLs but not "blindly", Given that both use the same DTD, I'm actually interested in verifying wether they have the same amount of elements or if there's differences.</p>
<ul> <li><a href="http://www.logilab.org/859" rel="nofollow noreferrer">xmldiff</a> from Logilab</li> <li><a href="http://diffxml.sourceforge.net/" rel="nofollow noreferrer">diffxml</a> </li> <li>A commercial one include in <a href="http://www.altova.com/products/xmlspy/xml_differencing.html" rel="nofollow noreferrer">...
<p><a href="http://www.oxygenxml.com/xml_diff_and_merge.html" rel="nofollow noreferrer">oXygen</a> has good XML diff (and merge) support.</p>
8,918
<p>I have a Struts + Velocity structure like for example, a Person class, whose one property is a Car object (with its own getter/setter methods) and it is mapped to a Velocity form that submits to an Action, using ModelDriven and getModel structure.</p> <p>I what to put a button on the form that shows "View Car" if c...
<p>You should change the #if line to:</p> <pre><code>#if($car) </code></pre>
<p>In the upcoming Velocity 1.6 release, you will be able to do <code>#if( $car == $null )</code> without error messages. This will allow you to distinguish easily between when <code>$car</code> is null and when it is false. To do that now requires <code>#if( $car &amp;&amp; $car != false )</code>, which just isn't a...
4,410
<p>I have a web server and I am currently paying for SVN hosting at a company that specializes in hosting svn.</p> <p>I am thinking of just installing SVN on my dedicated server, are there any security implications of this? </p>
<p>Small correction to Jedi: it's VisualSVN Server from <a href="http://www.visualsvn.com/server/" rel="noreferrer">http://www.visualsvn.com/server/</a></p>
<p>SVN is very difficult to get setup in the Windows environment, at least if you want hosted SVN, a local repository is different. My suggestion is stick with the company or search out a cheaper SVN that will not cost as much money. They are not difficult to setup, but you would hate to lose all your source code bec...
3,415
<p>I have printed two objects with my new 3D printer (Anycubic Mega S) and everytime, my prints are stuck to my bed (sort of glued to it). I cannot remove them by hand. I have tried waiting until it cools off, but the only thing that works is scraping really hard the bed with the spatula.</p> <p>I'm scared that if I h...
<p>One method that works at our makerspace and also has worked for a user on another 3d printing forum is to use a 50:50 mix of water and denatured alcohol. While the print bed is warm, apply some to the perimeter of the print at the bed surface. Allow it to cool, try to remove the print. If it does not work, reheat th...
<p>I have had good luck using dental floss. If you can get it under the edge of the print, then you can pull it all the way through and prints come off easily. </p>
1,548
<p>I spent the last days trying to make the best gears I could but they are not "smooth" nor good. I searched at thingverse with "gear" but I see no set of gears. I would like someone to point me a good set of gears (with 5, 10, 15... teeth for example) so I can use this STL file with Google Sketchup.</p> <p>Do you gu...
<p>This type of gear is known as a "herringbone" gear. A traditional straight-cut gear is strong, but can cause more vibration as each tooth engages and disengages. A helical gear (slanted tooth) reduces that vibration as the tooth engagement is more uniform. However the angle of the teeth causes a sideways force that ...
<p>As for high speed gear ideas why don't you design your own if there aren't any good ones. I will admit sometimes there will be surprising lack of content in some areas and I dont know what you expect, sometimes you do have to do some things your self to bridge the gaps. Maybe try looking into automobile transmission...
558
<p>The easiest way to think of my question is to think of a single, simple unix command (albeit, this is for windows) and I need progmatic access to run it. </p> <p>I have a single command-line based executable that performs some unit of work. I want to call that executable with the .net process library, as I can do w...
<p>No, you can't execute it directly. You could probably unpack it to a temporary directory and execute it from there.</p>
<p>Is this where <a href="http://msdn.microsoft.com/en-us/magazine/cc164123.aspx" rel="nofollow noreferrer">PInvoke</a> can help?</p>
8,497
<p>What's the best, crossplatform way to perform blackbox tests on AJAX web applications?</p> <p>Ideally, the solution should have the following attributes:</p> <ul> <li>Able to integrate into a continuous integration build loop</li> <li>Cross platform so I you can run it on Windows laptops and Linux continuous integ...
<p>Selenium might be what you're looking for: <a href="http://selenium.openqa.org/" rel="noreferrer">http://selenium.openqa.org/</a></p> <p>It allows you to script actions and evaluate the results. It's open-source (Apache 2.0), cross platform, and has nice tools.</p>
<p>I have used Selenium for exactly this task, but found it to be brittle.</p> <p>Check out this talk by two Googlers: <a href="http://video.google.com/videoplay?docid=4378663232897374824" rel="nofollow noreferrer">Does my button look big in this? Building testable AJAX applications</a></p> <p>They isolate the testab...
9,597
<p>Is it possible to do 3.1 or 5.1 audio using Flash? We're starting a project here for an interactive kiosk, and we've been told to use Flash. However, we also have a requirement to support either 3.1 or 5.1 audio (where 5.1 is the most wanted feature). </p> <p>I haven't done any high-tech audio stuff using Flash,...
<p>A quick google search gave me this forum <a href="http://board.flashkit.com/board/showthread.php?t=715062" rel="nofollow noreferrer">http://board.flashkit.com/board/showthread.php?t=715062</a> where they state that Flash is unable to handle 5.1 audio and the alternative is to use another application that can communi...
<p>As far as I know this is not possible. </p> <p>You <strong>might</strong> be able to do it if you use uncompressed wave files already encoded in DTS or something and put a surround receiver in between. This will however stop you from doing anything with the sound before outputting it, not even changing the volume. ...
5,531
<p>Has anyone got <a href="http://perldoc.perl.org/Sys/Syslog.html" rel="nofollow noreferrer">Sys::Syslog</a> to work on Solaris? (I'm running Sys::Syslog 0.05 on Perl v5.8.4 on SunOS 5.10 on SPARC). Here's what doesn't work for me:</p> <pre><code>openlog "myprog", "pid", "user" or die; syslog "crit", "%s", "Test fr...
<p>By default, Sys::Syslog is going to try to connect with one of the following socket types:</p> <pre><code>[ 'tcp', 'udp', 'unix', 'stream' ] </code></pre> <p>On Solaris, though, you'll need to use an inet socket. Call:</p> <pre><code>setlogsock('inet', $hostname); </code></pre> <p>and things should start workin...
<p>setlogsock('inet') didn't do it for me (it looks for host "syslog") but building and installing Sys::Syslog from CPAN did. The Sys::Syslog that comes with Solaris 10 is ancient.</p>
9,331
<p>I know you can look at the row.count or tables.count, but are there other ways to tell if a dataset is empty?</p>
<p>I would suggest something like:-</p> <pre><code> bool nonEmptyDataSet = dataSet != null &amp;&amp; (from DataTable t in dataSet.Tables where t.Rows.Count &gt; 0 select t).Any(); </code></pre> <p><strong>Edits:</strong> I have significantly cleaned up the code after due consideration, I think this is much cle...
<p>To be clear, you would first need to look at all the DataTables, and then look at the count of Rows for each DataTable.</p>
7,010
<p>On IIS 6, what does an IIS reset do? </p> <p>Please compare to recycling an app pool and stopping and starting an ASP.NET web site.</p> <p>If you replace a DLL or edit/replace the web.config on an ASP.NET web site is that the same as stopping and starting that web site?</p>
<p>IISReset stops and restarts the entire web server (including non-ASP.NET apps)<br> Recycling an app pool will only affect applications running in that app pool.<br> Editing the web.config in a web application only affects that web application (recycles just that app).<br> Editing the machine.config on the machine wi...
<p>Here what's technet has to say about <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/003ed2fe-6339-4919-b577-6aa965994a9b.mspx?mfr=true" rel="nofollow noreferrer">iisreset</a></p> <blockquote> <p>You might need to restart Internet Information Services (IIS) before certain confi...
4,347
<p>I would really like to be able to print moving parts that fit well enough to move without excessive friction, but also aren't excessively loose. Using an Ultimaker 2, what should be my expectations be, and how would I go about produce well fitting parts?</p> <p>Using a tool like Openscad to generate parametric par...
<p>There are a lot of factors to 3D printing parts that work and fit together. </p> <p>A lot of it will be discovered by trial and error, but let's try to put you on the right path. </p> <p>First your material is what matters the most. Specifically their coefficient of thermal expansion, i.e. how much can the plastic...
<p>I can't attest to the empirical data laid out in the first answer, but I've had to deal with a lot of components printed in two parts to be connected via design-incorporated channels. I always found that, as a reference, a box of width and length 0.98" will slide securely, but freely, into a square channel of width ...
462
<p>When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event.</p> <p>However, when clicking the button, after the page reloads, my event handler does not fire.</p> <p>Can anyone explain why?</p>
<p>@Brad: Your answer isn't complete; he's most likely doing it too late in the page lifecycle, during the Page_Load event.</p> <p>Okay, here's what you're missing.</p> <p>ASP.NET is stateless. That means, after your page is rendered and sent to the browser, the page object and everything on it is destroyed. There...
<p>That is because the event binding that happens needs to be translated in to HTML. This postback that happens if bound to the page between OnInit and OnLoad. So if you want the button to bind events correclty make sure you do the work in OnInit.</p> <p>See the Page Life Cycle explaination.</p> <p><a href="http://...
6,409
<p>I'm new to 3d printing, so I might be missing something obvious. If so, please let me know. </p> <p>I printed my model successfully yesterday, but today I'm trying to print the same model and the first layer refuses to adhere, which means at best several layers after that are messed up if it manages to recover, but...
<p>Your nozzle is clearly too far from the bed. The plastic should be squashed down slightly. Some firmwares have an option where you can adjust the height of the nozzle "live" during the first layer, in Marlin this is called "babystepping". This can be very useful because you can get the height correct without having ...
<p>You can use the masking tape as base, however the height of nozzle is higher than required. Check that your fist layer height is 70% lower than your nozzle size. In my opinion this can be the step layer minus 0.05, for example layer height is 0.2, then my first layer is 0.15, this makes that the material squizes a l...
476
<p>I work on quite a few DotNetNuke sites, and occasionally (I haven't figured out the common factor yet), when I use the Database Publishing Wizard from Microsoft to create scripts for the site I've created on my Dev server, after running the scripts at the host (usually GoDaddy.com), and uploading the site files, I g...
<p>The Database Publishing Wizard's generated scripts usually need to be tweaked since it sometimes gets the order wrong of table/procedure creation when dealing with constraints. What I do is first backup the database, then run the script, and if I get an error, I move that query to the end of the script. Continue res...
<p>You should be able to expose the underlying error message by setting the following in the web.config:</p> <pre><code>customErrors mode="Off" </code></pre> <p>Could you elaborate on "and uploading the site files"? New instance of DNN? updating an existing site? upgrading DNN version? If upgrade or update -- what fi...
3,560
<p>Pretty much what the title says really.</p> <p>We have some code that is .NET 1.1 based and no real desire to up-convert it. However, we are looking to add developers to the team and they will need copies of Visual Studio.</p> <p>My understanding is that they will need VS 2003 - as this is the only IDE that suppo...
<p>Visual Studio 2003 is still available to download for MSDN subscribers.</p> <p>The EULA for Visual Studio includes a 'downgrade' clause, which appears, IMNAL, to allow you to buy Visual Studio 2008 and then install 2003 under the same license.</p> <blockquote> <p>DOWNGRADE. You may install and use this version...
<p>Supported: Yes<br> Available: Not through normal channels. You might still find a boxed copy on Amazon or somewhere.</p>
7,266
<p>I've been using my Ender 3 for about four months now and it's been working wonderfully. The print quality is amazing and all the prints are very strong. Then about three weeks ago, my entire system crashed while Ultimaker Cura was open and it lost the profile for my 3D printer. I recreated the profile to the best of...
<p>It is not too rare to create a new machine in Ultimaker Cura to be set to 2.85 mm as this is the default. Also some bugs in the past did reset or assume this diameter unless you manually set it, and unless we know your exact version we can't confirm it is really this.</p> <h2>Underextrusion why?</h2> <p>The 0.55 mm ...
<p>The following saved me from under extrusion on Ender 3 Pro.</p> <ol> <li><p>Check the diameter of the material referenced and the nozzle parameter in your slicer (Cura, ...). Then re-slice.</p></li> <li><p>If not sufficient, it may be a printer parameter issue. The extruder parameter is missconfigured: the stepper ...
1,242
<p>Consider the following 2 queries:</p> <pre><code>select tblA.a,tblA.b,tblA.c,tblA.d from tblA where tblA.a not in (select tblB.a from tblB) select tblA.a,tblA.b,tblA.c,tblA.d from tblA left outer join tblB on tblA.a = tblB.a where tblB.a is null </code></pre> <p>Which will perform better? My assumption is that i...
<p>RDBMSs "rewrite" queries to optimize them, so it depends on system you're using, and I would guess they end up giving the same performance on most "good" databases.</p> <p>I suggest picking the one that is clearer and easier to maintain, for my money, that's the first one. It's much easier to debug the subquery as...
<p>From my observations, MSSQL server produces same query plan for these queries.</p>
6,968
<p>I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath the application are several 2.0 apps. To completely logout a user can I just logout of the 1.1 app with FormsAuthentication.SignOut or is it more complicated than that?</p>
<p>What you are looking to do is called Single Sign On and Single Sign Off. There are differences based on how you have the applications set up. I will try to clarify where those differences come into play.</p> <p>To implement single sign on and single sign off you need to make the cookie name, protection, and path ...
<p>It could be easier if you are having a central session store for all your applications. You can then set the session to null in one place.</p>
7,929
<p>We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We'd like to generate our test data ourselves from these files. Is there an easy/free way to do that?</p> <p><strong>Edit</strong></p> <p>There are ap...
<p>In Visual Studio 2008 SP1 and later the <a href="http://msdn.microsoft.com/en-us/library/cc716766.aspx" rel="noreferrer">XML Schema Explorer</a> can create an XML document with some basic sample data:</p> <ol> <li>Open your XSD document</li> <li>Switch to XML Schema Explorer</li> <li>Right click the root node and c...
<p>The <a href="http://www.k-int.com/products/OpenXSD" rel="nofollow">OpenXSD</a> library mentions that they have support for generating XML instances based on the XSD. Check that out.</p>
3,780
<p>With a distributed application, where you have lots of clients and one main server, should you:</p> <ul> <li>Make the clients dumb and the server smart: clients are fast and non-invasive. Business rules are needed in only 1 place</li> <li>Make the clients smart and the server dumb: take as much load as possible off...
<p>You should do as much client-side processing as possible. This will enable your application to scale better than doing processing server-side. To solve your temperamental user problem, you could look into making your client processes run at a very low priority so there's no noticeable decrease in performance on the ...
<blockquote> <p>The server must analyze all of this info to determine the health of these computers</p> </blockquote> <p>That is probably the biggest clue so far explaning what your application is kinda about. Are you able to provide a more elaborate briefing on what this application is seeking to achieve in thi...
5,626
<p>When interviewing college coops/interns or recent graduates it helps to have a Java programming question that they can do on a white board in 15 minutes. Does anyone have examples of good questions like this? A C++ question I was once asked in an interview was to write a string to integer function which is along t...
<p>Some stuff that has showed up on SO:</p> <ul> <li>IsPalindrome(string s)</li> <li>ReverseWordsInString(string s): "I know java" --> "java know I"</li> </ul> <p>Other stuff that springs to mind:</p> <ul> <li>multiply a Vector with a Matrix (can this be done OO-Style?)</li> <li><code>echo</code> (yes, a simple clon...
<p>I agree with <a href="https://stackoverflow.com/questions/53808/good-15-minute-java-question-to-ask-recent-college-graduate#53847">Nicolas</a> in regards to separating the algorithmic questions from the actual language questions. </p> <p>One thing that you might want to consider is giving them a couple simple algor...
7,738
<p>In SQL Server 2005, the query analyzer has told me many times to create a non-clustered index on a primary ID column of a table which already has a clustered index. After following this recommendation, the query execution plan reports that the query should be faster.</p> <p>Why would a Non-Clustered index on the s...
<p>A clustered index has all the data for the table while a non clustered index only has the column + the location of the clustered index or the row if it is on a heap (a table without a clustered index). So if you do a count(column) and that column is indexed with a non clustered index SQL server only has to scan the ...
<p>A clustered index will generally be faster, but you can only have 1 clustered index. So if the table <em>already has</em> a clustered index on a different column, then a non-clustered index is the best you can do.</p>
6,342
<p>We're in the process of redesigning the customer-facing section of our site in .NET 3.5. It's been going well so far, we're using the same workflow and stored procedures, for the most part, the biggest changes are the UI, the ORM (from dictionaries to LINQ), and obviously the language. Most of the pages to this poin...
<p>Believe me, I know <em>exactly</em> where you are coming from.. I am currently migrating a large app from ASP classic to .NET.. And I am still learning ASP.NET! :S (yes, I am terrified!).</p> <p>The main things I have kept in my mind is this:</p> <ul> <li>I dont stray <em>too</em> far from the current design (i.e....
<p>Sounds like you have a pretty good handle on things. I've seen a lot of people try to do a straight-line transliteration, includes and all, and it just doesn't work. You need to have a good understanding of how ASP.Net wants to work, because it's <em>much</em> different from Classic ASP, and it sounds like maybe y...
5,109
<p>I need to come up with an analysis of simultaneus events, when having only starttime and duration of each event.</p> <p><strong>Details</strong></p> <p>I've a standard CDR call detail record, that contains among others:</p> <ul> <li>calldate (timedate of each call start</li> <li>duration (int, seconds of call dur...
<p>I would implement this on the database. Using a GROUP BY clause with DATEPART, you could get a list of simultaneous calls for whatever time period you wanted, by second, minute, hour, whatever.</p> <p>On the web side, you would only have to display the histogram that is returned by the query.</p>
<p>@eric-z-beard: I would really like to be able to implement this on the database. I like your proposal, and while it seems to lead to something, I dont quite fully understand it. Could you elaborate? Please recall that each call will span over several seconds, and each second need to count. If using DATEPART (or some...
7,339
<p>I've had a hard time trying to find good examples of how to manage database schemas and data between development, test, and production servers.</p> <p>Here's our setup. Each developer has a virtual machine running our app and the MySQL database. It is their personal sandbox to do whatever they want. Currently, deve...
<p>There are a couple of good options. I wouldn't use the "restore a backup" strategy.</p> <ol> <li><p>Script all your schema changes, and have your CI server run those scripts on the database. Have a version table to keep track of the current database version, and only execute the scripts if they are for a newer ve...
<p>I've written a tool which (by hooking into <a href="http://www.codeplex.com/OpenDBiff" rel="nofollow noreferrer">Open DBDiff</a>) compares database schemas, and will suggest migration scripts to you. If you make a change that deletes or modifies data, it will throw an error, but provide a suggestion for the script (...
2,811
<p>We have literally 100's of Access databases floating around the network. Some with light usage and some with quite heavy usage, and some no usage whatsoever. What we would like to do is centralise these databases onto a managed database and retain as much as possible of the reports and forms within them.</p> <p>The...
<p>We upsize (either using the upsize wizard or by hand) users to SQL server. It's usually pretty straight forward. Replace all the access tables with linked tables to the sql server and keep all the forms/reports/macros in access. The investment in access isn't lost and the users can keep going business as usual. You ...
<p>So? Dedicate a server to your Access databases. </p> <p>Now you have the benefit of some sort of usage tracking, and also the ability to pay more attention to some of the important decentralised data that is stored in these apps.</p> <p>This is what you were going to do anyway, only you wanted to use a different d...
6,944
<p>What techniques can be applied effectively to improve the performance of SQL queries? Are there any general rules that apply?</p>
<ul> <li>Use primary keys</li> <li>Avoid select *</li> <li>Be as specific as you can when building your conditional statements </li> <li>De-normalisation can often be more efficient </li> <li>Table variables and temporary tables (where available) will often be better than using a large source table </li> <li>Partitione...
<p>I think using SQL query analyzer would be a good start.</p>
6,036
<p>Given a string <code>"filename.conf"</code>, how to I verify the extension part?</p> <p>I need a cross platform solution.</p>
<p>Is this too simple of a solution?</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; int main() { std::string fn = "filename.conf"; if(fn.substr(fn.find_last_of(".") + 1) == "conf") { std::cout &lt;&lt; "Yes..." &lt;&lt; std::endl; } else { std::cout &lt;&lt; "No..." &lt;&lt; std::endl;...
<p>If you happen to use <a href="http://pocoproject.org/" rel="nofollow">Poco</a> libraries you can do:</p> <pre><code>#include &lt;Poco/Path.h&gt; ... std::string fileExt = Poco::Path("/home/user/myFile.abc").getExtension(); // == "abc" </code></pre>
7,518
<p>Are there any good online resources for how to create, maintain and think about writing test routines for numerical analysis code?</p> <p>One of the limitations I can see for something like testing matrix multiplication is that the obvious tests (like having one matrix being the identity) may not fully test the fun...
<p>It sounds as if you need to think about testing in at least two different ways:</p> <ol> <li><p>Some numerical methods allow for some meta-thinking. For example, invertible operations allow you to set up test cases to see if the result is within acceptable error bounds of the original. For example, matrix <em>M-i...
<p>Check out a book by <a href="http://en.wikipedia.org/wiki/David_Gries" rel="nofollow noreferrer">David Gries</a> called <a href="https://rads.stackoverflow.com/amzn/click/com/0387964800" rel="nofollow noreferrer" rel="nofollow noreferrer">The Science of Programming</a>. It's about proving the correctness of programs...
3,714
<p>I have a Prusa i3 MK3 or maybe it was upgraded to a i3 MK3S.</p> <p>How can I figure out?</p> <p>The <a href="https://shop.prusa3d.com/en/original-prusa-i3-mk3s/1390-original-prusa-i3-mk3-to-mk3s-upgrade-kit.html" rel="nofollow noreferrer">description of the upgrade kit</a> talks about</p> <ul> <li>the SuperPINDA (h...
<p><a href="https://i.stack.imgur.com/1ldX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ldX4.png" alt="Left right" /></a></p> <p><a href="https://i.stack.imgur.com/TtrmF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TtrmF.png" alt="Filament sensors" /></a></p> <p>The MK3 has...
<p>On the LCD, the MK3 will show <strong>Original Prusa MK3 OK</strong>, while the MK3S/+ will show <strong>Original Prusa MK3S OK</strong></p>
1,985
<p>I've just purchased an Alladinbox SkyCube 3D that I want to use to print board game miniatures and other fun stuff.</p> <p>However, the instructions do not give the settings I need to put into software like Ultimaker Cura, and this is where I need some help so that I can generate the G-code files from models I down...
<p>Okay, after some research and experimentation, I've come up with some settings that seem to work.</p> <p>Firstly, some specs about the Alladinbox SkyCube 3D:</p> <ul> <li>Firmware: Marlin</li> <li>Nozzle diameter: 0.4 mm</li> <li>Nozzle speed: 20 to 70 mm/s</li> <li>Layer thickness: 0.1 to 0.4 mm</li> <li>Printing...
<p>Ultimaker Cura comes with pre-defined profiles for various materials. PLA filament is present in between them. This could be a good starting point to derive your specific profile for your own material. To do we usually print test objects and look at the quality of the product. Test prints can consist of simple X-Y-Z...
909
<p>I printed this <a href="https://www.thingiverse.com/thing:4775702" rel="nofollow noreferrer">Curvy vase</a> from Thingiverse and it came out pretty well on my Chiron.</p> <p><a href="https://i.stack.imgur.com/AP0wQ.jpg" rel="nofollow noreferrer" title="Curvy vase print"><img src="https://i.stack.imgur.com/AP0wQ.jpg"...
<p>There is a <a href="https://support.ultimaker.com/hc/en-us/articles/360012512340-Shell-settings" rel="nofollow noreferrer">Cura option</a> to choose a random seam alignment in the shell menu:</p> <p><a href="https://i.stack.imgur.com/I6UXi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I6UXi.png"...
<p>Use Cura's &quot;Vase Mode&quot; (known as <code>Spiralize Outer Contour</code>) for seamless printing.</p>
1,878
<p>I want to be able to display a normal YouTube video with overlaid annotations, consisting of coloured rectangles for each frame. The only requirement is that this should be done programmatically. </p> <p>YouTube has annotations now, but require you to use their front end to create them by hand. I want to be able to...
<p>YouTube provides an <a href="http://code.google.com/apis/youtube/flash_api_reference.html" rel="noreferrer">ActionScript API</a>.</p> <p>Using this, you could load the videos into Flash using their API and then have your Flash app create the annotations on a layer above the video. </p> <p>Or, alternatively, if you...
<p>The player itself has a <a href="http://code.google.com/apis/youtube/js_api_reference.html" rel="noreferrer">Javascript API</a> that might be useful for syncing the video if you choose to make your own <code>annotation-thingamajig</code>.</p>
2,266
<p>What are the specifications of the three wires inside a PC cable that is used to connect the switching power supply to a US AC outlet.</p> <p>The positive, negative and ground appear to be the same gauge stranded cable, and I've heard that it can handle 10A, but beyond that I don't really know what the rest of the ...
<p><em>Very</em> basically speaking, electricity works like this:</p> <ol> <li>There's some source that delivers a certain <strong>voltage</strong>.</li> <li>You have a device that operates at a certain voltage. <strong>The device voltage and supply voltage should always match.</strong> No, don't put that 120V US devi...
<p>It's somewhat unclear what you mean by "standard PC cable", but virtually all desktop computers use <a href="https://en.wikipedia.org/wiki/IEC_60320#C13.2FC14_coupler" rel="nofollow">IEC C14 sockets/IEC C13 plugs</a>. Such connectors/sockets are rated for 10A 250V and thus you can safely assume that the cord itself ...
168
<p>I am currently designing an application that has one module which will load large amounts of data from a database and reduce it to a much smaller set by various calculations depending on the circumstances.</p> <p>Many of the more intensive operations behave deterministically and would lend themselves to parallel pr...
<p>I might be missing something here, but this this seems fairly straight forward using pthreads.</p> <p>Set up a small threadpool with N threads in it and have one thread to control them all.</p> <p>The master thread simply sits in a loop doing something like:</p> <ol> <li>Get data chunk from DB </li> <li>Find next...
<p>The same thread pool is used in java. But the threads in threadpools are serialisable and sent to other computers and deserialised to run.</p>
8,086
<p>I am attempting to parse a string like the following using a .NET regular expression:</p> <pre><code>H3Y5NC8E-TGA5B6SB-2NVAQ4E0 </code></pre> <p>and return the following using Split: H3Y5NC8E TGA5B6SB 2NVAQ4E0</p> <p>I validate each character against a specific character set (note that the letters 'I'...
<p>I have discovered the answer I was after. Here is my working code:</p> <pre><code> static void Main(string[] args) { string pattern = @"^\s*((?&lt;group&gt;[ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8})-?){3}\s*$"; string input = "H3Y5NC8E-TGA5B6SB-2NVAQ4E0"; Regex re = new Regex(pattern); ...
<p>Why use Regex? If the groups are always split by a -, can't you use Split()?</p>
4,519
<p>Anybody ever tried to retrofit a heatbed to the da Vinci mini w with the proper dimensions (165 mm x 165 mm or 6.5&quot; x 6.5&quot;).</p> <p>Where can I find a heatbed that fits and a corresponding power supply / PID controller?</p>
<p>The firmware of the printer reads the g-code, in this instance, for z-axis movement. The g-code provides only (primarily) millimeters of movement and direction, along with speed.</p> <p>The firmware reads those figures, figuratively speaking, and knows from the values stored in the firmware, how many steps to rotat...
<p>You can set the 'steps per mm' for the extruder (and the other axes) by sending GCODE to the printer, and store this in the internal memory. Re-flashing the firmware only affects the 'factory reset' configuration of the printer parameters.</p> <p>To see how to calibrate your extruder, you're probably best looking f...
836
<p>So I'm using an IDataReader to hydrate some business objects, but I don't know at runtime exactly what fields will be in the reader. Any fields that aren't in the reader would be left null on the resulting object. How do you test if a reader contains a specific field without just wrapping it in a try/catch?</p>
<p>This should do the trick:</p> <pre><code> Public Shared Function ReaderContainsColumn(ByVal reader As IDataReader, ByVal name As String) As Boolean For i As Integer = 0 To reader.FieldCount - 1 If reader.GetName(i).Equals(name, StringComparison.CurrentCultureIgnoreCase) Then Return True ...
<p>You can't just test reader["field"] for null or DBNull because a IndexOutOfRangeException is thrown if the column isn't in the reader.</p> <p>The code I use in my mapping layer for creating domain objects and the stored procedures that use the mapping layer might have different column names is below; you could modi...
7,630
<p>I am uploading multiple files using the BeginGetRequestStream of HttpWebRequest but I want to update the progress control I have written whilst I post up the data stream. </p> <p>How should this be done, I have tried calling Dispatch.BeginInvoke (as below) from within the loop that pushes the data into the stream ...
<p>I was going to say that, I didn't think that Silverlight 2's HttpWebRequest supported streaming, because the request data gets buffered into memory entirely. It had been a while since the last time I looked at it though, therefore I went back to see if Beta 2 supported it. Well turns out it does. I am glad I went...
<p>Thanks for that, I will take a look at those links, I was considering chunking my data anyway, seems to be the only way I can get any reasonable progress reports out of it.</p>
3,421
<p>Is there a way to guarantee that a file on Windows (using the NTFS file system) will use contiguous sectors on the hard disk? In other words, the first chunk of the file will be stored in a certain sector, the second chunk of the file will be stored in the next sector, and so on.</p> <p>I should add that I want to ...
<p>I would start here:</p> <p><a href="http://technet.microsoft.com/en-us/sysinternals/bb897428.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/sysinternals/bb897428.aspx</a></p> <p>and follow Mark's documentation of the defrag stuff:</p> <p><a href="http://technet.microsoft.com/en-us/sysinternals...
<p>I believe there's no way to achieve that. You can only defragment the file after it's been written.</p>
7,897
<p>I'm in the unfortunate position of having to implement a drop-down cascading menu on a site I'm building. I'm looking for a Suckerfish-style solution that is primarily CSS-based and works on a simple set of nested ULs and LIs.</p> <p><a href="http://htmldog.com/articles/suckerfish/dropdowns/" rel="noreferrer">Son ...
<p>I would <em>strongly</em> suggest that you use <a href="http://users.tpg.com.au/j_birch/plugins/superfish/" rel="noreferrer">superfish</a>, the jQuery adaptation of the suckerfish menu. It has loads of features (and delay is one of them), adds some fancy animation capabilities, and degrades to the normal suckerfish ...
<p>I can't see a way to add delay outside of JavaScript - but if you're going to use JavaScript you may as well use a JavaScript controlled menu. </p> <p>If you follow a semantically-correct nav pattern and set it up so it display's normally (e.g. static) when JavaScript is not present you should be fine with whateve...
3,667
<p>I want to implement a paperless filing system and was looking to use WIA with C# for the image acquisition. There are quite a few sample projects on CodeProject, etc. However, after downloading every one of them that I can find, I have run into a problem.</p> <p>In each and every one of them, the reference to WIALi...
<p>To access WIA, you'll need to add a reference to the COM library, "Microsoft Windows Image Acquisition Library v2.0" (wiaaut.dll). add a "using WIA;"</p> <pre><code>const string wiaFormatJPEG = "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}"; CommonDialogClass wiaDiag = new CommonDialogClass(); WIA.ImageFile wiaImage = nu...
<p>It doesn't <strong>need</strong> to be WIA. I was mostly looking at the WIA setup because it offers the same basic interface for different scanners. I've got 3 scanners on this machine and the TWAIN drivers/software for all of them suck (like blocking the screen during scanning).</p> <p>For document management, I'm...
3,043
<p>This free collection library comes from IT University of Copenhagen.</p> <p><a href="http://www.itu.dk/research/c5/" rel="noreferrer">http://www.itu.dk/research/c5/</a></p> <p>There is a video with one of the authors on Channel 9. I am trying to learn how to use these collections and I was wondering whether anyone...
<p>I've used it in the past and there are a couple of notes I must make:</p> <ol> <li>The library is very good, very fast and very useful. It has lots of very nice data structures, some of which I did not know before starting to use this library.</li> <li>It's Open-Source! This is a huge benefit.</li> <li>Sometimes yo...
<p>In addition to that omer van kloeten's points.</p> <p>The open source licence is MIT (comparable to BSD licence) this means that if you need make changes to the library you don't have to open-source the changes. (this might be a problem with some companies). For GPL-type licences this can be a problem.</p>
6,967
<p>In C#, if I have an inherited class with a default constructor, do I have to explicitly call the base class' constructor or will it be implicitly called?</p> <pre><code>class BaseClass { public BaseClass() { // ... some code } } class MyClass : BaseClass { public MyClass() // Do I need to pu...
<p>You do not need to explicitly call the base constructor, it will be implicitly called.</p> <p>Extend your example a little and create a Console Application and you can verify this behaviour for yourself:</p> <pre><code>using System; namespace ConsoleApplication1 { class Program { static void Main(...
<p>You don’t need call the base constructor explicitly it will be implicitly called, but sometimes you need pass parameters to the constructor in that case you can do something like:</p> <pre><code>using System; namespace StackOverflow.Examples { class Program { static void Main(string[] args) ...
3,872
<p>I am writing a client-side <strong>Swing</strong> application (graphical font designer) on <strong>Java 5</strong>. Recently, I am running into <code>java.lang.OutOfMemoryError: Java heap space</code> error because I am not being conservative on memory usage. The user can open unlimited number of files, and the prog...
<p>Ultimately you always have a finite max of heap to use no matter what platform you are running on. In Windows 32 bit this is around <code>2GB</code> (not specifically heap but total amount of memory per process). It just happens that Java chooses to make the default smaller (presumably so that the programmer can't c...
<p>If everything else fails, in addition to increasing the max heap size try also increasing the swap size. For Linux, as of now, relevant instructions can be found in <a href="https://linuxize.com/post/create-a-linux-swap-file/" rel="nofollow noreferrer">https://linuxize.com/post/create-a-linux-swap-file/</a>.</p> <p...
5,799
<p>Following on from my recent question on <a href="https://stackoverflow.com/questions/17725/large-complex-objects-as-a-web-service-result">Large, Complex Objects as a Web Service Result</a>. I have been thinking about how I can ensure all future child classes are serializable to XML.</p> <p>Now, obviously I could imp...
<p>I'd write a unit/integration test that verifies that any class matching some given criteria (ie subclassing X) is decorated appropriately. If you set up your build to run with tests, you can have the build fail when this test fails.</p> <p>UPDATE: You said, "Looks like I will just have to roll my sleeves up and mak...
<p>A good FXCop rule (and one which I am finding I need right now) would be to check that all objects that are being added to the ASP.NET Session have the Serializable attribute. I'm trying to move from InProc session state to SQL Server. First time I requested a page, my site blew up on me because non-serializable o...
3,992
<p>I have a report in Reporting services, and when I preview it, the headers for a table wrap, but when I export it to Excel, the don't. They just get cut off. Any ideas on how to force it to wrap when I export to Excel?</p>
<p>Although this link doesn't address your question directly, its fairly comprehensive in terms of design considerations for Report Rendering in in Excel</p> <p>Link: <a href="http://msdn.microsoft.com/en-us/library/ms159836(SQL.90).aspx" rel="nofollow noreferrer">Designing for Microsoft Excel Output</a>(Reporting Ser...
<p>If you are importing report from SSRS to EXCEL and if you find some TOP column joined up then the best way to resolve this issue would be:</p> <ul> <li>Go back to report designer and adjust all your text boxes. </li> <li>Adjust to left side of the designer window. You will see a blue line when it's adjusted to left...
8,931
<p>I have an SQL query that takes the following form:</p> <pre><code>UPDATE foo SET flag=true WHERE id=? </code></pre> <p>I also have a PHP array which has a list of IDs. What is the best way to accomplish this other than with parsing, as follows, ...</p> <pre><code>foreach($list as $item){ $querycondition = $...
<p>This would achieve the same thing, but probably won't yield much of a speed increase, but looks nicer.</p> <pre><code>mysql_query("UPDATE foo SET flag=true WHERE id IN (".implode(', ',$list).")"); </code></pre>
<p>I haven't ever seen a way to do that other than your foreach loop.</p> <p>But, if $list is in any way gotten from the user, you should stick to using the prepared statement and just updating a row at a time (assuming someone doesn't have a way to update several rows with a prepared statement). Otherwise, you are w...
6,096
<p>I've tried printing in vase mode (or &quot;spiralise outer contour&quot; in Cura) and while the floor looks fine, the vertical sides look &quot;saggy&quot;</p> <p>I'm using a 0.4 mm nozzle, with eSUN PLA+ at 218 °C and a bed temp of 60 °C. This combination works fine for normal printing. Layer height is 0.28 mm (...
<p>Presuming that you're talking about an 8 hour period, your printer should be designed to run for 8 hours continuous anyway, so nothing will happen regarding the bed or screen that wouldn't happen with a normal print.</p> <p>If the first few layers stick to the bed, it's likely that you're print will at least be part...
<p>There are software solutions like &quot;Spaghetti Detective&quot; (recently renamed to &quot;Obico&quot;) which can watch your print via a camera, and potentially stop the job if it looks bad.</p> <p>Most of the time my print failures come early, in the form of poor bed adhesion - watch the job start for a while be...
2,158
<p>I have mounted two radial fan on my printer as a part cooling solution.</p> <p><a href="https://i.stack.imgur.com/MTeZ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MTeZ5.png" alt="radial blower fan"></a></p> <p>As you can see, the fan has input on the left side and blows air down. Does a mir...
<p>Yes these do exist, but I've never seen them in the size you are interested in, see e.g. these projector fans:</p> <p><a href="https://i.stack.imgur.com/Jw36Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jw36Y.png" alt="enter image description here"></a></p> <p>An alternative are fans that at...
<p>I did also some research on this and decided to go with this solution. This fan only measures 50x50x10mm and is easy flippable: <a href="https://de.aliexpress.com/item/1005001894771961.html" rel="nofollow noreferrer">https://de.aliexpress.com/item/1005001894771961.html</a></p> <p><a href="https://i.stack.imgur.com/W...
1,478
<p>I am new to 3D printing. I own jewelry stores and want to 3D print my jewelry packaging for rings, necklaces, and bangles as in the picture below:</p> <p><a href="https://i.stack.imgur.com/NVwgE.png" rel="nofollow noreferrer" title="Product photo of a jewelry ring box"><img src="https://i.stack.imgur.com/NVwgE.png" ...
<h1>With the right materials</h1> <p>With the right material, you can get flexible surfaces and prints. Just two random examples:</p> <ul> <li>TPU is a flexible material, which can be used to print something like &quot;Lips&quot; that flex and take the jewelry or even strings that suspend the piece in the center.</li> ...
<p>I would advise against this, as you will get layer lines which isn't visible in normal form, and the fit wont be as smooth etc, resulting in a cheaper look &amp; feel. You will spend a lot of effort modifiying the parameters to get a foamy look, but still end up with a worse product. Instead the best option is proba...
2,181
<p>I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why h...
<p>You should regard .h files as <strong>interface files</strong> of your .c file. Every .c file represents a module with a certain amount of functionality. If functions in a .c file are used by other modules (i.e. other .c files) put the function prototype in the .h interface file. By including the interface file in y...
<p>The .h files should be used to define the prototypes for your functions. This is necessary so you can include the prototypes that you need in your C-file without declaring every function that you need all in one file. </p> <p>For instance, when you <code>#include &lt;stdio.h&gt;</code>, this provides the prototype...
7,026
<p>I'm having an issue with my very first printer, a Monoprice Select Mini V2. After doing about 20 successful prints on it, the Z axis is suddenly acting very odd.</p> <p>When I 'home' the Z axis and move the nozzle on the X and Y, I can do the paper test on all four corners of the bed without issue - the leveling is...
<p>Check the Z-drive for any component looseness. Look at belts, gears, anything with screws. Wiggle things mercilessly checking for play. </p> <p>At the start of a normal print run, the the print head typically rises up very high as the head warms up (depends on software) and then lowers to print. If your homing pape...
<p>I just had this issue with my Monoprice Select Mini V2. It seems there's some bug in the software if you already have the 3D printer at its lowest Z-elevation before starting the home calibration. To make sure it prints correctly, move the head up using the manual controls, then hit home. It should then go to the co...
921
<p>We have a 4 server cluster running ASP.NET web application using ASP.NET State Server Service for session. On one of the 4 servers ASP.NET State Server Service is running and other servers are configured to look at this. Very often we have to patch the servers, and applying patch on the State Server requires few min...
<p>I'd look into Session State Partitioning. Good info here: <a href="http://blog.maartenballiauw.be/post/2008/01/ASPNET-Session-State-Partitioning-using-State-Server-Load-Balancing.aspx" rel="nofollow noreferrer">http://blog.maartenballiauw.be/post/2008/01/ASPNET-Session-State-Partitioning-using-State-Server-Load-Bala...
<p>A second ASP.NET State Server Service cannot take over if the first one fails <em>without</em> losing the part of session info stored on the first server. New sessions will be handled fine by the second server. To get this behaviour you need to set up session state partitioning (see <a href="https://stackoverflow.co...
9,988
<p>When you are starting a personal programming project, what is your first step? I'm trying to start a project thats just an idea at the moment. I get lots of these and I dive right into the code and after a while just completely lose interest and or just forget about the project.</p> <p>When you are starting, what i...
<p>The only thing that works for me: Create the smallest possible implementation of it that's somehow usable and then use it.</p>
<p>First plan out the basic outline of the final application. Most important features, basic GUI, program flow, etc. Then refine that so that you don't take on too much at first, remove unnecessary features, and add what else you want in the first version. Then use that outline to start a task list to create the smalle...
8,603
<p>What is an efficient way to implement a singleton design pattern in Java?</p>
<p>Use an enum:</p> <pre><code>public enum Foo { INSTANCE; } </code></pre> <p>Joshua Bloch explained this approach in his <a href="http://sites.google.com/site/io/effective-java-reloaded" rel="noreferrer">Effective Java Reloaded</a> talk at Google I/O 2008: <a href="http://www.youtube.com/watch?v=pi_I7oD_uGI#t=28...
<p>Sometimes a simple "<strong><code>static Foo foo = new Foo();</code></strong>" is not enough. Just think of some basic data insertion you want to do.</p> <p>On the other hand you would have to synchronize any method that instantiates the singleton variable as such. Synchronisation is not bad as such, but it can lea...
9,612
<p>OK. This problem is doing my head in. And I don't know if there even IS a definitive answer.</p> <p>We have a website, lets call it <em>mycompany.com</em>. It's a UK-based site, with UK based content. Google knows about it, and we have done a load of SEO on it. All is well.</p> <p><strong>Except</strong>, we are a...
<p>As long as Google can find mycompany.com/uk and mycompany.com/au, it'll index all three versions of the site. Your domain's Google juice should apply to all three URLs just fine if they're on the same domain.</p>
<p>@ross: yes, we have links between the sites. It' just the home page, and which one comes up when someone searches for "my company" in google.</p> <p>Thanks!</p>
5,218
<p>How can I create this file in a directory in windows 2003 SP2:</p> <pre><code>.hgignore </code></pre> <p>I get error: You must type a file name.</p>
<p>That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt:</p> <pre><code>echo Hello there! &gt; .hgignore </code></pre>
<p>By the way Raymond Chen had a blog post about this topic a while back:</p> <p><a href="https://devblogs.microsoft.com/oldnewthing/20080414-00/?p=22763" rel="nofollow noreferrer">Why doesn't Explorer let you create a file whose name begins with a dot?</a> (archive.org link with comments: <a href="https://web.archive....
3,989
<p>I have a function that gets x(a value) and xs(a list) and removes all values that are bigger than x from the list. Well it doesn't work, can you tell me why?</p> <pre><code>(defun biggerElems(x xs) (let ((xst)) (dolist (elem xs) (if (&gt; x elem) (setf xst (remove elem xs)))) xst)) </code...
<p>I think it's this line that's not right:</p> <pre><code>(setf xst (remove elem xs)))) </code></pre> <p>The first argument to <code>setf</code> is the place, followed by the value. It looks like you have it backwards (and <code>xst</code> is either <code>nil</code> or uninitialized).</p> <p>You might find it easi...
<blockquote> <p>What was the '#' for? It didn't compile with it.</p> </blockquote> <p>Typo. Normally you refer to functions with <code>#'</code> (like <code>(remove-if #'oddp list)</code>), but when I was editing, I forgot to remove the '#'.</p>
6,856
<p>Can the GT2 belts lengthen themselves if they are tentioned too much?</p> <p>I had them tensioned quite a bit until I saw the <a href="https://youtu.be/zoKmmT0a7jk" rel="nofollow noreferrer">video</a> from &quot;Lost in Tech&quot;. I then decided to reduce the tension, but the dimensional precision was all over the ...
<p>First of all there are two methods to achieve the belt be tensioned.</p> <p>First method is when both ends of the belt hard attached. In this case if there is a fluctuation in the mechanical system then it will be absorbed by the belt itself. And in this case with big tension it will result in stretching over time w...
<p>As I've seen in todays video from Makers Muse, he also says that these belts can lengthen over time: <div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/-cm1vIER_bk?start=338"></iframe> </div></div> (Link with time code)</p>
2,141
<p>In a few weeks, we'll be teaching a crash course on C++ for Java programmers straight out of college. They have little or no experience yet with C or C++.</p> <p>Previous editions of this course were just 1 or 2 half-day sessions and covered topics including:</p> <ul> <li>new language features, e.g. <ul> <li>header ...
<p>I can only once again point to <a href="http://www.research.att.com/~bs/new_learning.pdf" rel="nofollow noreferrer">Stroustrup</a> and preach: Don't teach the C subset! It's important, but not for beginners! C++ is complex enough as it is and the standard library classes, especially the STL, is much more important a...
<p>You should take some time on memory management, and especially RAII.</p>
7,096
<h2>Overview</h2> <p>One of the things I've asked a lot about on this site is <a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx" rel="noreferrer">LINQ</a>. The questions I've asked have been wide and varied and often don't have much context behind them. So in an attempt to consolidate the knowledge I'...
<p>LINQ to entities:</p> <ul> <li><a href="http://blogs.msdn.com/adonet/archive/2008/05/20/how-do-i-new-entity-framework-videos.aspx" rel="noreferrer">Video walkthroughs</a></li> <li><a href="http://channel9.msdn.com/shows/Going+Deep/ADONET-Entity-Framework-What-How-Why/" rel="noreferrer">Channel 9 video</a></li> <li>...
<p><strong>For Linq Practice</strong></p> <p>If you want some practice on LINQ with exercises and answers, really easy to set up and, in my opinion, awesome:</p> <p><a href="https://github.com/walkhard/linq-exercises" rel="nofollow noreferrer">https://github.com/walkhard/linq-exercises</a></p> <p>Download from git, ...
3,703
<p>If any of you have worked with a cool tool for viewing/querying the SQL Transaction logs, please let me know. This should show all the transactional sql statements which are committed or rolled back.</p> <p>For Database files, if it has some additional graphical capabilities like showing the internal Binary Tree st...
<p>This is only relevant if you're talking SQL Server 2000 but RedGate produced a free tool called <a href="http://www.red-gate.com/products/SQL_Log_Rescue/index.htm" rel="noreferrer">SQL Log Rescue</a>. Otherwise, for SQL Server 2005 <a href="http://www.apexsql.com/sql_tools_log.asp" rel="noreferrer">ApexSQLLog</a> fr...
<p>There are some companies that produce log readers like Lumigent and Red Gate. However they do not work with SQL server versions greater than 2000 because of meta data changes in the underlying system tables and data types, they might work if you do not use any new functionality but if you use varchar(max) XML datat...
7,274
<p>High temperature PTFE tape is rated up to 550°F, which is 288°C. I'm wondering if it would be useful for components on the hot end to prevent oozing. Has anyone tried it?</p>
<p>That is perfectly viable these days in Marlin firmware, there are options for setting this up using the configuration file, e.g.:</p> <pre><code>// :[0, 1, 2, 3, 4, 5, 6, 7, 8] #define EXTRUDERS 1 ... ... ... // A dual extruder that uses a single stepper motor //#define SWITCHING_EXTRUDER #if ENABLED(SWITCHING_EXTRU...
<p>You'll need a custom firmware.</p> <p>Yur custom firmware will have to react to the &quot;Change extruder&quot; command differently than a normal firmware: instead of just swapping to a different extruder, you'll need to perform some operations to alter the gearing (possibly a solenoid?), and possibly include some k...
1,807
<p>I want to extend <strong>all</strong> my CR-10S wires. I have two long wire types: 22 and 18 AWG wires. I've done some research and found the following:</p> <ul> <li>Extruder heating element: 22 AWG or lower.</li> <li>Extruder thermistor sensor: 22 AWG or lower (Doesn't really need much amp).</li> <li>Fans: 24 A...
<p>To answer your question directly, the PTFE tube (or a separate thin walled PTFE tube for the bottom part of the heatbreak) <em>generally</em> always is outside the nozzle, so yes (unless you have an all-metal hotend, then there is no PTFE tube up to the nozzle). But as read from your question, your setup has the tub...
<p>Yes, you can use a direct drive hotend with a bowden tube, but it won't just plug together. You just need a way to secure the end of the bowden tube to be centered above and as close the the hotend mouth as possible. In a pinch, you can spin a 4mm nut onto the tube and secure it down against the hotend mount with zi...
1,105
<p>How do I determine how much an individual print costs?</p> <p>I'd like an answer including support material, failed prints, and (ideally) wear and tear / printer maintenance costs.</p> <p>To clarify, I'm not asking how to <em>predict</em> the cost before printing, but rather how to calculate the actual cost after ...
<p>For <a href="http://3dprintingfromscratch.com/common/types-of-3d-printers-or-3d-printing-technologies-overview/#fdm" rel="nofollow noreferrer">FDM</a> printing: </p> <p>Both Cura and Makerbot Desktop (and perhaps others I'm not as familiar with) will give you a preview of both the length and weight of your print, i...
<p>I recently faced the problem of calculating the cost of my printed 3D models. I wanted to know what their real value had to be counted in Excel. It was really inconvenient. Then I found a program for counting, it turned out really great, even takes into account the electricity. This is not an advertisement just thr...
129
<p>The heated bed output on my printer recently stopped working. I have an output for a second hotend. How can I reprogram this output as a heated bed output? The board is a <a href="http://www.geeetech.com/wiki/index.php/GT2560" rel="nofollow noreferrer">Geeetech GT2560 rev A+</a>.</p>
<p><em>Although it appears to be a RAMPS compatible board as described in <a href="/a/11477">this <strong>now deleted</strong> answer</a>, <strong>it is not using a RAMPS pin configuration</strong>.</em> </p> <hr> <p>To fix this in the firmware, this requires an upload of newly configured firmware to the board. See e...
<p>If you want to use Extruder heater and thermistor 2 as a hotbed driver, then you will need to get an external mosfet, since I doubt that the extruder heater mosfet will be able to handle the required current. Then in your slicer, just remap the bed from BED to E2</p>
1,524
<p>I'm using Repetier and Slic3r and it is printing a gap between the perimeter and infill on the first layer. Also, the infill is lifting (as in photo). Any advise?</p> <p><a href="https://i.stack.imgur.com/mXJCl.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/mXJCl.jpg" alt="infill issue"></a> </p>
<p>You're not sticking to your bed. Adjust your bed height. You are too far. Otherwise you are going too fast and or too hot.</p> <p>Calibrate the bed. Reduce speed. Then adjust temps. </p> <p>Also could be material contamination</p> <p>See this link for a visual troubleshooting.</p> <p><a href="http://reprap.org/w...
<p>I found a solution that works for me.</p> <p>I have increased my first layer extrusion width to 250 %, reduced the print speed of perimeters to 30 mm/s, reduced the brim width to 1 and increased the infill/perimeter overlap to 30 %.</p> <p>This was PLA with heat bed off (no heating), printing on glass and using hair...
363
<p>I'm trying to produce sheets of photographs with captions arranged in a grid using XSLT and XSL-FO. The photo URLs and captions are produced using a FOR XML query against an SQL Server database, and the number of photos returned varies from sheet to sheet. I want to lay the photos out in four columns, filling the gr...
<p>To keep life simple I would normally setup a table for this, it's quite simple and will ensure that things get laid out right. If you wanted to do it similarly to how you would do it in HTML then you should layout block-container elements.</p> <p>However you decide to do it I would always recommend using the <a hre...
<p>In the end I used a table with one row and four cells for this. In each one I selected the source elements with position() mod 4 equal to 0, 1, 2 or 3 as appropriate, and then made sure that the photo and caption was always the same height so the rows lined up correctly.</p>
7,748
<p>I'm trying to install a .NET service I wrote. As recommended by MSDN, I'm using InstallUtil. But I have missed how I can set the default service user on the command-line or even in the service itself. Now, when InstallUtil is run, it will display a dialog asking the user for the credentials for a user. I'm tryin...
<p>I think I may have found it. In the service itself, the automatically created ServiceProcessInstaller component has a property "Account" which can be set to "LocalService", "LocalSystem", "NetworkService" or "User". It was defaulting to "User" which must have displayed the prompt. </p>
<p>Are you being asked for the account to run the service under, or for rights to install the service? For the second, installing as admin should prevent that from happening. For the first, you have to add a ServiceProcessInstaller to your Installer.</p> <p>I believe the design surface for a service has a link to cr...
5,212
<p>Besides the LD_PRELOAD trick , and Linux Kernel Modules that replace a certain syscall with one provided by you , is there any possibility to intercept a syscall ( open for example ) , so that it first goes through your function , before it reaches the actual open ?</p>
<p>Why can't you / don't want to use the <a href="https://stackoverflow.com/questions/426230/what-is-the-ld-preload-trick">LD_PRELOAD trick</a>?</p> <p>Example code here:</p> <pre><code>/* * File: soft_atimes.c * Author: D.J. Capelis * * Compile: * gcc -fPIC -c -o soft_atimes.o soft_atimes.c * gcc -shared -o so...
<p>Sounds like you need auditd.</p> <p>Auditd allows global tracking of all syscalls or accesses to files, with logging. You can set keys for specific events that you are interested in.</p>
9,526
<p>Have you used VS.NET Architect Edition's Application and System diagrams to start designing a solution?</p> <p>If so, did you find it useful? Did the "automatic implementation" feature work ok?</p>
<p>I used to use it a lot. This designer worked good for stubbing out prototype projects, but ultimately I found myself wasting a lot of time moving the mouse around when I could be typing. It seemed like an awesome idea to be able to print out the class diagrams to show APIs to other developers while I was prototypi...
<p>Yes, and no, it's not very useful in my opinion. It's not very stable, it's easy to get out of sync, and the "look how fast I generate this" advantage is virtually nil when compared to more mundane things such as code snippets.</p> <p>Then again, I am a total "Architect" luddite, so take this with a grain of salt.<...
3,727
<p>I need to match and remove all tags using a regular expression in Perl. I have the following:</p> <pre><code>&lt;\\??(?!p).+?&gt; </code></pre> <p>But this still matches with the closing <code>&lt;/p&gt;</code> tag. Any hint on how to match with the closing tag as well?</p> <p>Note, this is being performed on x...
<p>I came up with this:</p> <pre><code>&lt;(?!\/?p(?=&gt;|\s.*&gt;))\/?.*?&gt; x/ &lt; # Match open angle bracket (?! # Negative lookahead (Not matching and not consuming) \/? # 0 or 1 / p # p (?= # Positive lookahead (Matching and not consuming) &gt; # &gt; -...
<p>You should probably also remove any attributes on the &lt;p> tag, since someone bad could do something like:</p> <pre><code>&lt;p onclick="document.location.href='http://www.evil.com'"&gt;Clickable text&lt;/p&gt; </code></pre> <p>The easiest way to do this, is to use the regex people suggest here to search for &am...
4,970