instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I am designing a contact management system and have come across an interesting issue regarding modeling geographic locations in a consistent way. I would like to be able to record locations associated with a particular person (mailing address(es) for work, school, home, etc.) My thought is to create a table of local... | <p>You might want to have a look at Freebase.com as a site that's had some open discussion about what a "location" means and what it means when a location is included in another. These sorts of questions can generate a lot of discussion.</p>
<p>For example, there is the obvious "geographic nesting", but there are les... | <p>I'm modeling an apps for global users and I have the same problems, but I think that this approach could already be in use in many enterprise. But why this problem don't have an universal solution? Or, has this problem one best solution that can be the start point or anybody in the world need think in a solution for... | 7,298 |
<p>i have scenario where i have to provide my own control template for a few WPF controls - i.e. GridViewHeader. when you take a look at control template for GridViewHEader in blend, it is agregated from several other controls, which in some cases are styled for that control only - i.e. this splitter between columns.
... | <p>Referencing internal resources that are 100% subject to change isn't serviceable - better to just copy it. </p>
| <p>It is possible to reference them, but as paulbetts said, its not recommended as they could change. Also consider if what you are doing is truely 'correct'. Can you edit your question to explain why you need to do this exactly?</p>
| 9,478 |
<p>Let's take the code</p>
<pre><code>int a, b, c;
...
if ((a + b) > C)
</code></pre>
<p>If we add the values of a and b and the sum exceeds the maximum value of an int, will the integrity of the comparison be compromised? I was thinking that there might be an implicit up cast or overflow bit check and that will ... | <p>C will do no such thing. It will silently overflow and lead to a possibly incorrect comparison. You can up-cast yourself, but it will not be done automatically.</p>
| <p>I believe this might be platform specific. Check the C documentation on how overflows are handled...</p>
<p>Ah, yes, and the upcast will not happen automatically...</p>
| 7,330 |
<p>I'm getting a <code>NoSuchMethodError</code> error when running my Java program. What's wrong and how do I fix it?</p>
| <p>Without any more information it is difficult to pinpoint the problem, but the root cause is that you most likely have compiled a class against a different version of the class that is missing a method, than the one you are using when running it.</p>
<p>Look at the stack trace ... If the exception appears when calli... | <p>If your file name is different than the class name which contain main method then it may be the possibility that this error may cause.</p>
| 5,562 |
<p>Is there any performance difference between tuples and lists when it comes to instantiation and retrieval of elements? </p>
| <p>The <a href="https://docs.python.org/3/library/dis.html" rel="noreferrer"><code>dis</code></a> module disassembles the byte code for a function and is useful to see the difference between tuples and lists.</p>
<p>In this case, you can see that accessing an element generates identical code, but that assigning a tupl... | <p>The main reason for Tuple to be very efficient in reading is because it's immutable. </p>
<h2>Why immutable objects are easy to read?</h2>
<p>The reason is tuples can be stored in the memory cache, unlike lists. The program always read from the lists memory location as it is mutable (can change any time).</p>
| 9,417 |
<p>I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring.</p>
<p>Example:</p>
<pre><code>// Updated to be correct, thanks @Apocalisp
^foo.*(?<!bar)$
</code></pre>
<p>Should match anything that starts with "foo" and doesn't end with "bar". I kno... | <p>I think in this case you want <strong>negative lookbehind</strong>, like so:</p>
<pre><code>foo.*(?<!bar)
</code></pre>
| <p>As other commenters said, you need a negative lookahead. In Java you can use this pattern:</p>
<pre><code>"^first_string(?!.?second_string)\\z"
</code></pre>
<ul>
<li>^ - ensures that string starts with
first_string</li>
<li>\z - ensures that string ends with second_string</li>
<li>(?!.?second_string) - means that... | 6,462 |
<p>The following XHTML code is not working:</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
... | <p>The problem seams to be the ending of the file...</p>
<ul>
<li>If I name the file <a href="http://www.tasix.ch/Greter/test2.html" rel="nofollow noreferrer">test2.html</a> everything works.</li>
<li>If I name the file <a href="http://www.tasix.ch/Greter/test2.xhtml" rel="nofollow noreferrer">test2.xhtml</a> I get th... | <p>Well, what is dojo.js doing at line 319?</p>
| 7,097 |
<p>Code:</p>
<pre><code><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unusual Array Lengths!</title>
<script type="text/javascript">
var arrayList = new Array();
arrayList = [1, 2, 3, 4, 5, ];
alert(arrayList.length);
</script>
</... | <p>It seems to me that the Firefox behavior is correct. What is the value of the 6th value in IE (sorry I don't have it handy to test). Since there is no actual value provided, I imagine it's filling it with something like 'null' which certainly doesn't seem to be what you intended to have happen when you created the... | <p><a href="https://stackoverflow.com/questions/29053/javascript-browser-quirks-arraylength#29073">@John</a>: The value of arrayList[5] comes out to be 'undefined'.</p>
<p>Yes, there should never be a dangling comma in declarations. Actually, I was just going through someone else's long long javascript code which some... | 4,872 |
<p>I had a problem with my nozzle on my homemade printer. The problem was that the nozzle with a 0.4 mm diameter wasn't putting out any plastic. I replaced the nozzle with a 0.2 mm one and now the bottom of my model is looking like this: <a href="https://i.stack.imgur.com/UFSHV.jpg" rel="nofollow noreferrer"><img src="... | <p>Without more detail is difficult to say with certainty what the <em>root</em> cause of the problem is, but it looks like <strong>too much material is being deposited on the bed</strong>.</p>
<p>A few things to try/check:</p>
<ul>
<li><strong>Make sure the nozzle is not leaking</strong>. If it is, you should see f... | <p>Without more detail is difficult to say with certainty what the <em>root</em> cause of the problem is, but it looks like <strong>too much material is being deposited on the bed</strong>.</p>
<p>A few things to try/check:</p>
<ul>
<li><strong>Make sure the nozzle is not leaking</strong>. If it is, you should see f... | 820 |
<p>I bought an ASP.NET script about a year ago to retrieve FedEx shipping values. It builds an XML string that passes to the FedEx server using an HttpWebRequest, then parses the raw XML. The average response time for the script is about 900 milliseconds. </p>
<p>So the other day I was poking around in the FedEx ... | <p>You can find a good article and a library to start with here: <a href="http://www.codeproject.com/KB/COM/opcdotnet.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/COM/opcdotnet.aspx</a></p>
| <p>If buying a comercial toolkit is an option I've used the Northern Dynamics <a href="http://www.nordyn.com/Main/Products/Main.htm" rel="nofollow noreferrer">server toolkit</a> and it worked fine. A toolkit will take away a lot of the issues mentioned in the other questions (or at least you should get support if there... | 9,234 |
<p>I am a physics graduate student and I want to create some 3D models for my crystal samples. We have an X-ray diffractometer in our lab. It comes with a goniometer inside it, so basically I can take as many photos as needed from any angles. (I have included a gif animation made of 10 photos taken by the machine as an... | <p>YES, it is possible to make a model from several shots, if you know the angle of rotation between the pictures.</p>
<p>most CAD programs allow to insert a picture, for example as backdrop or to trace it. We are interested in the later use:</p>
<p>We insert the picture, trace it in the picture's layer, then insert th... | <p>You may want to do a search for "photogrammetry". This is software that uses many photos to build a 3D model. Dr. Falkingham did a good review of free software on his blog:</p>
<p><a href="https://peterfalkingham.com/2016/09/14/trying-all-the-free-photogrammetry/" rel="nofollow noreferrer">https://peterfalkingham... | 1,152 |
<p>How do I forcefully unload a <code>ByteArray</code> from memory using ActionScript 3?</p>
<p>I have tried the following:</p>
<pre><code>// First non-working solution
byteArray.length = 0;
byteArray = new ByteArray();
// Second non-working solution
for ( var i:int=0; i < byteArray.length; i++ ) {
byteArray[... | <p>(I'm not positive about this, but...)</p>
<p>AS3 uses a non-deterministic garbage collection which means that dereferenced memory will be freed up whenever the runtime feels like it (typically not unless there's a reason to run, since it's an expensive operation to execute). This is the same approach used by most mo... | <p>Use <code>bytearray.clear()</code></p>
<p>As per the <a href="https://airsdk.dev/reference/actionscript/3.0/" rel="nofollow noreferrer">Language Reference</a></p>
<p>this</p>
<blockquote>
<p>Clears the contents of the byte array and resets the length and position properties to 0. Calling this method explicitly frees... | 2,241 |
<p>My motto for Java is "just because Java has static blocks, it doesn't mean that you should be using them." Jokes aside, there are a lot of tricks in Java that make testing a nightmare. Two of the most I hate are Anonymous Classes and Static Blocks. We have a lot of legacy code that make use of Static Blocks and thes... | <p><a href="http://powermock.org" rel="noreferrer">PowerMock</a> is another mock framework that extends EasyMock and Mockito. With PowerMock you can easily <a href="http://code.google.com/p/powermock/wiki/SuppressUnwantedBehavior" rel="noreferrer">remove unwanted behavior</a> from a class, for example a static initiali... | <p>Not really an answer, but just wondering - isn't there any way to "reverse" the call to <code>Mockit.redefineMethods</code>?<br>
If no such explicit method exists, shouldn't executing it again in the following fashion do the trick?</p>
<pre><code>Mockit.redefineMethods(ClassWithStaticInit.class, ClassWithStaticInit... | 8,626 |
<p>I have just set up my new 3D printer. However, the build plate keeps slipping while printing. I tried to use binder clips to keep the plate in place, but this makes the build plate unlevel, messing up my prints. What are some other ways to prevent the build plate from slipping. I was considering using duct tape, but... | <p>I use kapton tape to fixate the glass plates to the heated beds on two of my printers, one a Prusa i3 clone, the other a CoreXY. The tape is able to withstand higher temperatures, and is very thin, so it doesn't have the drawbacks of limiting the print area or high chance the nozzle hitting the clips.</p>
<p><a href... | <p>I'm not sure what "the build plate keeps slipping while printing. I tried to use binder clips to keep the plate in place" means, but if you have a build surface and a bottom heated bed, you can look for "silicone thermal pad 0.5mm".</p>
<p>You can put it between build surface and lower bed, so th... | 1,899 |
<p>The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says:</p>
<p><strong>The node to be removed is not a child of this node.</strong></p>
<p>Does anyone know the proper way to do this?</p>
<pre><code>public void DeleteProject (string projectNam... | <p>Instead of </p>
<pre><code>configDoc.RemoveChild(projectNodes[i]);
</code></pre>
<p>try </p>
<pre><code>projectNodes[i].parentNode.RemoveChild(projectNodes[i]);
</code></pre>
| <p>It would be handy to see a sample of the XML file you're processing but my guess would be that you have something like this</p>
<pre><code><Root>
<Blah>
<project>...</project>
</Blah>
</Root>
</code></pre>
<p>The error message seems to be because you're trying to remove <co... | 4,095 |
<p>If you create an ASP.NET web file project you have direct access to the Profile information in the web.config file. If you convert that to a Web App and have been using ProfileCommon etc. then you have to jump through a whole bunch of hoops to get your web app to work.</p>
<p>Why wasn't the Profile provider built i... | <p>The profile provider uses the ASP.NET Build Provider system, which doesn't work with Web Application Projects.</p>
<blockquote>
<p>Adding a customized BuildProvider
class to the Web.config file works in
an ASP.NET Web site but does not work
in an ASP.NET Web application project.
In a Web application proje... | <p>Actually, Microsoft does have a solution for this known issue.
It's the "Web Profiler Builder". I used it for my Web App and it works great.
<a href="http://code.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980" rel="nofollow noreferrer">http://code.msdn.microsoft.com/WebProfileBuilder... | 3,366 |
<p>When running a Java app from eclipse my ImageIcon shows up just fine.</p>
<p>But after creating a jar the path to the image obviously gets screwed up.</p>
<p>Is there a way to extract an image from the jar at runtime so I can then open it up? Or, is there a better way to do this?</p>
<p>I'd like to distribute a ... | <p>To create an <code>ImageIcon</code> from an image file within the same jars your code is loaded:</p>
<pre><code>new javax.swing.ImageIcon(getClass().getResource("myimage.jpeg"))
</code></pre>
<p><code>Class.getResource</code> returns a URL of a resource (or <code>null</code>!). <code>ImageIcon</code> has a constru... | <p>Load image in from Jar file during run time is the same as loading image when executed from IDE e.g netbeans the difference is that when loading image from JAR file the path must be correct and its <b>case sensitive</b> (very important).
This works for me</p>
<pre>
image1 = new javax.swing.ImageIcon(getClass().get... | 5,101 |
<p>How do you unit test a <code>HttpModule</code> in asp.net given that <code>HttpApplication</code> and <code>HttpContext</code> do no implement an interface ?</p>
| <p>In the past before moving to ASP.NET MVC, I used <a href="http://haacked.com/archive/2007/09/09/ihttpcontext-and-other-interfaces-for-your-duck-typing-benefit.aspx" rel="nofollow noreferrer">this library</a> Phil Haack created for Unit Testing anything that used the HttpApplication and HttpContext. It in turned use... | <p>You can use an Isolation (mocking) framework. I know of two tools that enable you to fake/mock any .NET objects - <a href="http://www.typemock.com/typemock-isolator-product3" rel="nofollow">Typemock Isolator</a> and <a href="http://www.telerik.com/products/mocking.aspx" rel="nofollow">Telerik JustMock</a> i think th... | 4,488 |
<p>I'm looking to convert a SQL like statement on the fly to the equivalent regex i.e. </p>
<pre><code>LIKE '%this%'
LIKE 'Sm_th'
LIKE '[C-P]arsen'
</code></pre>
<p>What's the best approach to doing this?</p>
<p>P.S. I'm looking to do this on the .Net Framework (C#).</p>
| <p>The following Regex converts an SQL like pattern into a Regex pattern with the help of a <a href="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.matchevaluator.aspx" rel="nofollow noreferrer"><code>MatchEvaluator</code></a> delegate. It correctly handles square bracket blocks and escapes spec... | <p>I found a Perl module called <a href="http://search.cpan.org/dist/Regexp-Wildcards/lib/Regexp/Wildcards.pm" rel="nofollow noreferrer">Regexp::Wildcards</a>. You can try to port it or try Perl.NET. I have a feeling you can write something up yourself too.</p>
| 6,924 |
<p>I'm using Cura as my slicing/printing software and I just started using the BuildTak printing surface.</p>
<p>The BuildTak is damaged by pushing a hot nozzle into it and my printer's (Robo3D R1+) autoleveling feature works by pushing the nozzle into the build surface.</p>
<p>Is there a way to configure Cura so tha... | <p>In Cura (and Slic3r), you can 100% customize what the printer does before printing your actual model through custom <strong>start/end g-code</strong>.</p>
<p>If you navigate to the <code>Start/End-GCode tab in Cura</code>, then select <code>start.gcode</code>, you can see what operations are run before each print b... | <p>As pointed out in <a href="https://3dprinting.stackexchange.com/questions/454/how-to-configure-cura-to-run-the-z-probe-before-heating/469#comment6403_469">Markus's comment</a> to <a href="https://3dprinting.stackexchange.com/a/469/4762">Tormod's answer</a>, <code>{print_temperature}</code> needs to be replaced by <c... | 179 |
<p>I am currently using Windows Server 2008 Standard and have several Hyper V machines. These are development VM's and I want to now switch back Vista x64 because I am missing Aero.</p>
<p>I know Windows Server 2008 can have aero but the host performance is very very bad when I run VM in Hyper V.</p>
<p>I want to exp... | <p>VPC to Hyper-V is one way.</p>
| <p>You should review Windows 2008 R2 SP1 upgrade with RemoteFX, it comes with a new video driver for VM's that allow 3D, extended desktops and more. It will help resolve some of the issues you are seeing today.</p>
<p>Both the Host server and VM need to be running SP1 of Windows 2008 R2.</p>
<p><a href="http://blogs.... | 6,477 |
<p>Internet Explorer has a file download limit of 4GB (2 GB on IE6). Firefox does not have this problem (haven't tested safari yet)
(More info here: <a href="http://support.microsoft.com/kb/298618" rel="nofollow noreferrer">http://support.microsoft.com/kb/298618</a>)</p>
<p>I am working on a site that will allow the ... | <p><a href="http://www.bittorrent.com/" rel="nofollow noreferrer">bittorrent</a>?</p>
<p>There have been a few web-based versions already (<a href="http://www.bitlet.org/" rel="nofollow noreferrer">bitlet</a>, <a href="http://torrentfreak.com/w3btorrent-a-bittorrent-client-for-your-web-server/" rel="nofollow noreferre... | <p>@travis</p>
<p>Unfortunately It has to be over HTTP inside the users browser.
I'll update the question to be more clear about that.</p>
| 5,570 |
<p>I have written an AIR Application that downloads videos and documents from a server. The videos play inside of the application, but I would like the user to be able to open the documents in their native applications.</p>
<p>I am looking for a way to prompt the user to Open / Save As on a local file stored in the Ap... | <p>You can use the new <code>openWithDefaultApplication();</code> function that's available on the File class (I believe it's only available in AIR 2)</p>
<p>eg:</p>
<pre><code>var file:File = File.desktopDirectory.resolvePath(fileLocation);
file.openWithDefaultApplication();
</code></pre>
| <p>Currently adobe is not supporting opening files in there default applications. Passing it off to the browser seems to be the only way to make it work.</p>
<p>You could however use a FileStream and write a small html file with some javascript that sets the location of an iframe to the file, then after 100ms or so ca... | 2,699 |
<p>I forgot my password for Sql Server 2005. Windows Authentication is not enabled so I cannot login. How can I remove the current instance and create a new db instance? Or is there a better solution exists?</p>
| <p>Assuming you are a member of the Windows Admininstrator group, you can put the server in Single User mode, you could try this -</p>
<p><a href="http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx" rel="nofollow noreferrer">http://... | <p>Have you tried connecting when logged on as domain/server-local Administrator?</p>
| 3,932 |
<p>I have a job interview tomorrow for a .NET shop. For the past few years I have been developing in languages other than .NET and figure it is probably a good idea to brush up on what is cool and new in the world of .NET. I've been reading about LINQ and WPF but these are more technologies than trends. What else sh... | <p>This is completely language agnostic so you may want to skip over it, but I've based a lot of my practice and preparation for job interviews around <a href="http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html" rel="nofollow noreferrer">Steve Yegge's getting a job at google post</a>.</p>
<p>I use a l... | <p>If you're doing web development, ASP.NET MVC and Silverlight (née WPF/e) come to mind as relatively recent trends.</p>
| 3,590 |
<p>I have an Ender 3 Pro which I use together with Cura 4.2.1 (and Octoprint). I print in PLA at 180°C. The print bed is set to 70°C. The Bed temperature is lower though, since I use a glas bed on top of the heated bed. I use a print cooling fan at 100%. The layer height is set to 0.2 mm, the line width 0.4mm from the ... | <p>So the problem was that the TMC2208 were wired for UART mode, yet Marlin was configured for standalone, which apparently makes them work, but with completely wrong step sizes. Changing it in the configuration completely eliminated the problem</p>
| <p>I would check the "steps per distance" setting. If the motors were moving more than the firmware thinks, the height would measure as shorter than actual (since the number of steps would be less than the firmware expected). Similarly, the radius would scale up.</p>
<p>You replaced the controller and motor drivers,... | 1,477 |
<p>i have a list of products that are being displayed in particular order. store admin can reassign the display order, by moving the "hot" items to the top of the list. what's the best way of implementing the admin functionality <b>UI</b> [asp.net C#]? Products table has a [displayOrder(int)] filed which determines the... | <p>using AJAX you could implement a Reoder list control you can find more information here <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx" rel="nofollow noreferrer">http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ReorderList/ReorderList.aspx</a></p>
<p>Mauro</p>
<p><a href... | <p>i'm implementing that using the 'Order' column/property where people input numbers like 10, 20, 30 (i have ascending ordering). i have a list of items with text boxes to input order, and an 'apply order' button that saves new values to the database and reorders/reloads items on the page with the new ordering applied... | 7,439 |
<p>I know this isn't strictly speaking a programming question but something I always hear from pseudo-techies is that having a lot of entries in your registry slows down your Windows-based PC. I think this notion comes from people who are trying to troubleshoot their PC and why it's running so slow and they open up the... | <p>In short, not really. </p>
<p>In the old days when machines were slower the answer was yes; but having a modern processor rip through even a 60MB registry is not a problem.</p>
<p>Typically, the real reason a modern machine starts running slow is due to everything from malware to virus scanners: Mcafee, Norton's,... | <p>any problems occur on the registry could also make your computer much slower.the fix registry problems you need to install a <a href="http://www.windows7-slow.com/computer-running-extremely-slow/" rel="nofollow">registry cleaner</a> as this will fix the errors and make your pc back to its normal state.</p>
| 7,317 |
<p>I have a table with a 'filename' column.
I recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images.</p>
<p>How can I easily update the 'filename' column of these inserted fields (assuming I can select the... | <p>The solution is:</p>
<pre><code>UPDATE tablename SET [filename] = RTRIM([filename]) + '.jpg' WHERE id > 50
</code></pre>
<p>RTRIM is required because otherwise the [filename] column in its entirety will be selected for the string concatenation i.e. if it is a varchar(20) column and filename is only 10 letters l... | <p>If the original data came from a char column or variable (before being inserted into this table), then the original data had the spaces appended before becoming a varchar.</p>
<pre><code>DECLARE @Name char(10), @Name2 varchar(10)
SELECT
@Name = 'Bob',
@Name2 = 'Bob'
SELECT
CASE WHEN @Name2 = @Name THEN 1 ELS... | 3,822 |
<p>I have a form in C# that has a button that, when clicked, I want the background image to cycle through a set of images (which I have as resources to the project). The images are named '_1', '_2', etc. and each time I click the button I want its background image to increment to the next one and go back to "_1" when ... | <p>Why don't you just put the images in an array?</p>
| <p>You could subclass Button and override the BackgroundImage property so you can better keep track of the current resource that represents the image. You might also override the onclick method to internally handle cycling to the next image, though that might be a little weird if the resources are handled outside of y... | 3,587 |
<p>I want to know what a "<em>virtual base class</em>" is and what it means.</p>
<p>Let me show an example:</p>
<pre><code>class Foo
{
public:
void DoSomething() { /* ... */ }
};
class Bar : public virtual Foo
{
public:
void DoSpecific() { /* ... */ }
};
</code></pre>
| <p>Virtual base classes, used in virtual inheritance, is a way of preventing multiple "instances" of a given class appearing in an inheritance hierarchy when using multiple inheritance.</p>
<p>Consider the following scenario:</p>
<pre><code>class A { public: void Foo() {} };
class B : public A {};
class C : public A ... | <p>Virtual classes are <strong>not</strong> the same as virtual inheritance. Virtual classes you cannot instantiate, virtual inheritance is something else entirely.</p>
<p>Wikipedia describes it better than I can. <a href="http://en.wikipedia.org/wiki/Virtual_inheritance" rel="nofollow noreferrer">http://en.wikipedia.... | 4,169 |
<p>I have a Tevo Flash. Normally, I don't care about perpendicularity with respect to the table. But now I have a 5" disc on a ball bearing, held by a 3D printed tube with a flat bottom. If the tube's axis is not 100 % perpendicular to the bottom, the disc, when spun, wobbles at the edge: ~1/8".</p>
<p><a hre... | <p>In answer to <em>(doesn't have to the issue of the OP, but as a reaction for other readers)</em>:</p>
<blockquote>
<p>Note: this has nothing to do with bed leveling. The bed is level, the printer has a BLTouch.</p>
</blockquote>
<p><a href="/a/16605">Having a BLTouch doesn't imply the bed is level!</a> The bed is le... | <p>If you've measured the frame and it's not square, that's almost surely your problem and you need to fix it. But having a BLtouch does not mean your bed is level. The effect you're seeing is exactly what you get from using a BLtouch and mesh leveling to compensate for a non-level bed, and it's a very bad thing and wh... | 1,965 |
<p>There are three assembly version attributes. What are differences? Is it ok if I use <code>AssemblyVersion</code> and ignore the rest?</p>
<hr>
<p>MSDN says:</p>
<ul>
<li><p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblyversionattribute" rel="noreferrer">AssemblyVersion</a>:</p>
... | <p><strong>AssemblyVersion</strong></p>
<p>Where other assemblies that reference your assembly will look. If this number changes, other assemblies must update their references to your assembly! Only update this version if it breaks backward compatibility. The <code>AssemblyVersion</code> is required.</p>
<p>I use the f... | <p>When a assembly' s AssemblyVersion is changed,
If it has strong name, the referencing assemblies need to be recompiled, otherwise the assembly does not load!
If it does not have strong name, if not explicitly added to project file, it will not be copied to output directory when build so you may miss depending assemb... | 9,018 |
<p>I have a three-tier application which is installed in corporate environments. With every server version update, all clients have to be updated, too. Currently, I provide an MSI package which is automatically deployed via Active Directory, however my customers (mostly with 20-300 users each) seem to hate the MSI solu... | <p>You can somewhat replicate what ClickOnce does, just adjust it for your needs.</p>
<ol>
<li>Create a lightweight executable that checks a network/web location for updates. </li>
<li>If there are updates, it copies them locally and replaces the "real" application files.</li>
<li>It runs the "real" application.</li>
... | <p>If you don't want to give your users too many rights, it is possible to write a Windows Service, which will run on each computer under an account with the appropriate privileges, and which can update your application, when a new version gets available.</p>
| 9,167 |
<p>I have an exe with an <code>App.Config</code> file. Now I want to create a wrapper dll around the exe in order to consume some of the functionalities.</p>
<p>The question is how can I access the app.config property in the exe from the wrapper dll?</p>
<p>Maybe I should be a little bit more in my questions, I have ... | <p>The <a href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.openmappedexeconfiguration(VS.80).aspx" rel="noreferrer">ConfigurationManager.OpenMappedExeConfiguration Method</a> will allow you to do this.</p>
<p>Sample from the MSDN page:</p>
<pre><code>static void GetMappedExeConf... | <p>It's an xml file, you can use Linq-XML or DOM based approaches to parse out the relevant information.<br>
(that said I'd question if there isn't a better design for whatever it is.. you're trying to achieve.)</p>
| 7,706 |
<p>I'm looking for a testing framework for the Windows kernel environment. So far, I've found <a href="http://cfix.sourceforge.net/" rel="noreferrer">cfix</a>. Has any one tried it? Are there alternatives?</p>
| <p>Being the author of cfix, I might be a little biased here -- but as a matter of fact, I am currently not aware of any other unit-testing framework for NT kernel mode.</p>
<p>If you should experience any problems with cfix, feel free to contact me.</p>
| <p><a href="http://www.microsoft.com/whdc/devtools/tools/SDV.mspx" rel="nofollow noreferrer">Microsoft Static Driver Verifier</a> is described as "a compile-time tool that explores code paths in a device driver by symbolically executing the source code. SDV is a unit-testing tool for Microsoft Windows device drivers ba... | 3,885 |
<p>I have three stepper motors.
One Nema 17 - 2.4 ohm, the second smaller noname from color printer - 9.5 ohm and third the smallest noname from cdrom - 10.5 ohm.</p>
<p>I have connected them to arduino mega 2560 with ramps 1.4(set to 1/32 micro stepping) and drivers drv8825. <a href="https://3dprinting.stackexchange.... | <blockquote>
<p>The second motor is hot. And the third is very hot. I can not even touch it.</p>
</blockquote>
<p>This is to some degree, completely normal and expected. From the <a href="https://www.oyostepper.com/images/upload/File/17HS19-1684S1.pdf" rel="nofollow noreferrer">datasheet for a typical NEMA 17 steppe... | <h2>Problem statement</h2>
<p>Your RAMPs board is supplying your drivers all with similar voltages, with the basic settings calculated for a NEMA 17. </p>
<p>So, we got different Resistances R, so why do they heat differently?</p>
<h2>Physics background: energy transformation and dissipation</h2>
<p>Resistance can ... | 1,250 |
<p>A few months back my team switched our source control over to <a href="http://subversion.apache.org/" rel="noreferrer">Apache Subversion</a> from <a href="http://msdn.microsoft.com/en-us/vs2005/aa718670.aspx" rel="noreferrer">Visual SourceSafe</a>, and we haven't been happier. </p>
<p>Recently I've been looking at... | <p>I joined an Open Source project over at CodePlex, recently. They use TFS for their source control and I have to say that it's absolutely magnificent. I'm incredibly impressed with it, so far. I'm a huge fan of the IDE integration and how easy it is to branch and tag your code. Adding a solution to source control is ... | <p>TFS by a mile.</p>
<p>I inadvertently cause too many problems for myself with SVNs file-based approach.
Source control problems ive experienced:
TFS – 0 problems over 2 years
SVN – lost count...</p>
<p>Yes I know the price of TFS factors it out for most companies which is such a shame. MS might have a lot more mar... | 2,620 |
<p>I'm working on a website built with pure HTML and CSS, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.NET Forms Authorization. I created the default Visual Studio log in form and set up the users, roles, and access r... | <p>I'd guess (since I don't have IIS7 handy ATM) that you'd need to turn off Anonomyous Auth, and enable Forms Auth in the IIS7 sections.</p>
| <p>At what point did you insert your login/password? Did you have a look at the tables that where created? Althought your password must be encrypted, maybe it's worth just checking if your user was actually created.</p>
| 4,505 |
<p>What are the steps in the production process that factories that produce filament have to take to get from pellets to a full spool of filament.</p>
<p>Which of these steps are critical for quality (thickness, roundness, long shelf life,..) ?</p>
| <p>Some general comments about the process used (plastic extrusion):</p>
<p>The plastic extrusion process is not simple- many textbooks dense with equations have been written about it. The lowest cost industrial extrusion processes do not use pellets at all- because pellets have already gone through an extrusion proce... | <p>Each step is critical for quality. It's refined plastic mass. And in oil-based-products, every step is crucial for quality.</p>
<p>In <strong><a href="https://www.youtube.com/watch?time_continue=1&v=OEkksADFjP8" rel="nofollow">this</a></strong> vieo, everything is explained.</p>
| 241 |
<p>I have an extrusion problem with my creality CR 10 3D printer while printing.
I am using a standard 0.4 mm nozzle with a 1.75 mm diameter PLA and I use Cura as my slicer.</p>
<p>This printer worked perfectly fine and I stopped using it a few months ago right after the problem started.</p>
<p>When I try p... | <p>Without images of the problem it is difficult to diagnose, but, the described symptoms sounds as if the nozzle is too close to the bed. If the nozzle is too close to the bed, and the extruder not strong enough, the filament flow is very limited due to pressure caused by a very small opening between the nozzle and th... | <p>Clearly you're having an extrusion problem. Extrusion problems usually come either from a clogged nozzle (as @Adam S. said) or from the extruder it self. To determine where the problem is located I would first do a flow rate test using <a href="https://www.youtube.com/watch?v=lWBkPIXTOlo&feature=emb_logo" rel="n... | 1,659 |
<p>A former coworker insisted that a database with more tables with fewer columns each is better than one with fewer tables with more columns each. For example rather than a customer table with name, address, city, state, zip, etc. columns, you would have a name table, an address table, a city table, etc.</p>
<p>He a... | <p>I have a few fairly simple rules of thumb I follow when designing databases, which I think can be used to help make decisions like this....</p>
<ol>
<li>Favor normalization. Denormalization is a form of optimization, with all the requisite tradeoffs, and as such it should be approached with a <a href="http://en.wik... | <p>Good to see so many inspiring and well based answers.</p>
<p>My answer would be (unfortunately): it depends.</p>
<p>Two cases:
* If you create a datamodel that is to be used for many years and thus possibly has to adept many future changes: go for more tables and less rows and pretty strict normalization.
* In oth... | 8,411 |
<p>I have read that if I disconnect OctoPrint when printing, the print will stop. Since I thought the advantage of OctoPrint over, say, printing from Cura, was that it didn't tie up the computer while the print was taking place, what are the advantages of OctoPrint?</p>
| <p>The benefit of using OctoPrint as a printserver lies in the fact that it can be used on a stable computer platform. E.g. when you install OctoPrint on a Raspberry Pi, you are ensured that the "computer" stays online. Other platforms, such as Windows are much prone to interrupt the printing process (user ac... | <p>Printer Supervisory control and data acquisition (SCADA)</p>
<p><a href="https://en.wikipedia.org/wiki/SCADA" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/SCADA</a></p>
<p>In the context of 3d printing, SCADA is useful because it is important to have a redundant method of monitoring (and control) of a sys... | 1,900 |
<p>If I have a collection of database tables (in an Access file, for example) and need to validate each table in this collection against a rule set that has both common rules across all tables as well as individual rules specific to one or a subset of tables, can someone recommend a good design pattern to look into?</p... | <p>Just an update on this: I decided to go with the <a href="http://en.wikipedia.org/wiki/Decorator_pattern" rel="noreferrer">Decorator pattern</a>. That is, I have one 'generic' table class that implements an <code>IValidateableTable</code> interface (which contains <code>validate()</code> method). Then, I created se... | <p>I think you are really talking about a concept called <a href="http://en.wikipedia.org/wiki/Database_constraints" rel="nofollow noreferrer">constraints</a> in the world of databases. Constraints are how a database guarantees the integrity of the data it contains. It makes much more sense to put this sort of logic in... | 6,806 |
<p>I want to skeletize the surface mesh. For that I need to export .STL from Solidworks and then convert that into .OFF file to be able to use it in CGAL library for skeletonzation. How can I do this?</p>
| <p>One aspect of having this level of control with 3d printing of a model is the removal of the need for supports and the attendant post-processing. In the case of the model shown in the video, some effects are created by printing the continents in a conformal manner that would otherwise be impossible with conventional... | <p>Slicing prints for printing in 5 Axis is not going to be simple with the current software. If you look at the web site for the 5AxisMaker you can see they are using Algorithmic modeling software (Grasshopper). You would probably need to buy this as well and then spend a decent amount of time learning how to use this... | 429 |
<p><strong>Most recent edits in bold</strong>
I am using the .net <code>HttpListener</code> class, but I won't be running this application on IIS and am not using ASP.net. This <a href="http://www.leastprivilege.com/CommentView.aspx?guid=0c34094a-bdd4-4041-be6e-919f10fe1d31" rel="noreferrer">web site</a> describes wha... | <p>I don't have it entirely implemented yet, but this web site seems to give a <a href="http://developers.de/blogs/damir_dobric/archive/2006/08/01/897.aspx" rel="noreferrer">good walkthrough</a> of setting up the certificates and the code.</p>
| <p>The <a href="http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx" rel="nofollow noreferrer">class documentation</a></p>
<p>has this note:</p>
<blockquote>
<p>If you create an HttpListener using
https, you must select a Server
Certificate for that listener.
Otherwise, an HttpWebRequest quer... | 2,603 |
<p>I am looking for good methods of manipulating HTML in PHP. For example, the problem I currently have is dealing with malformed HTML.</p>
<p>I am getting input that looks something like this:</p>
<pre><code><div>This is some <b>text
</code></pre>
<p>As you noticed, the HTML is missing closing tags. I c... | <p>PHP has <a href="http://php.net/tidy" rel="noreferrer">a PECL extension that gives you access to the features of HTML Tidy</a>. Tidy is a pretty powerful library that should be able to take code like that and close tags in an intelligent manner.</p>
<p>I use it to clean up malformed XML and HTML sent to me by a cl... | <p>For manipulating the DOM i think that what you're looking for is <a href="http://www.php.net/manual/en/intro.dom.php" rel="nofollow noreferrer">this</a>. I've used to parse HTML documents from the web and it worked fine for me.</p>
| 4,685 |
<p>I ended up writing a quick little script for this in Python, but I was wondering if there was a utility you could feed text into which would prepend each line with some text -- in my specific case, a timestamp. Ideally, the use would be something like:</p>
<pre><code>cat somefile.txt | prepend-timestamp
</code></p... | <p>Could try using <code>awk</code>:</p>
<pre><code><command> | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'
</code></pre>
<p>You may need to make sure that <code><command></code> produces line buffered output, i.e. it flushes its output stream after each line; the timestamp <code>awk</cod... | <p>If the value you are prepending is the same on every line, fire up emacs with the file, then:</p>
<p><kbd>Ctrl</kbd> + <kbd><space></kbd></p>
<p>at the beginning of the of the file (to mark that spot), then scroll down to the beginning of the last line (Alt + > will go to the end of file... which probably... | 4,170 |
<p>I see in the Stack Overflow footer that the SVN Revision number is displayed. Is this automated and if so, how does one implement it in ASP.NET?</p>
<p><em>(Solutions in other languages are acceptable)</em></p>
| <p>Make sure that the file has s<code>vn:keywords "Rev Id"</code> and then put <code>$Rev$</code> somewhere in there.</p>
<p>See <a href="https://stackoverflow.com/q/163/10221765">this question and the answers to it</a>.</p>
| <p>in our continuous integration setup we use <code>SVNRevisionLabeller</code> and pass the variables from this to MSBuild to use when creating the compiled website dll. It's then available to .NET using <code>GetCurrentAssembly()</code> in the final build.</p>
| 2,447 |
<p>I'm currently in the process of setting up a continuous integration environment at work. We are using VisualSVN Server and CrusieControl.NET. Occasionally a build will fail and a symptom is that there are conflicts in the CruiseControl.NET working copy. I believe this is due to the way I've setup the Visual Studio s... | <p>Doing a full delete before or after your build is good practice. This means that there is no chance of your build environment picking up an out of date file. Your building exactly against what is in the repository.</p>
<p>Deleting the working copy is possible as I have done it with Nant. </p>
<p>In Nant I would h... | <p>It is very common and generally a good practice for any build process to do a 'clean' before doing any significant build. This prevents any 'artifacts' from previous builds to taint the output.</p>
<p>A clean is essentially what you are doing by deleting the working copy.</p>
| 2,959 |
<p>I am starting to build a new web application that will require user accounts. Now that I have an OpenID that I am using for this site I thought it would be cool if I could use OpenID for authentication in my application. Are there any good tutorials on how to integrate OpenID with an ASP.NET site?</p>
| <p>See <a href="http://www.hanselman.com/blog/TheWeeklySourceCode25OpenIDEdition.aspx" rel="noreferrer">Scott Hanselman's post on using DotNetOpenID</a> in ASP.NET. <a href="http://blog.nerdbank.net/" rel="noreferrer">Andrew Arnott's blog</a> is full of samples on using DotNetOpenID with ASP.NET, including ASP.NET MVC.... | <p>You should check out the <a href="http://www.dotnetnuke.com" rel="nofollow noreferrer">DotNetNuke</a> codebase as well, they have been using OpenID for the last several revisions, and you'll find working code for implementing it there.</p>
| 3,741 |
<p>I know you could make a helper pretty easily given the data. So, if possible, please only submit answers that also include getting the data.</p>
| <p>We are using an action filter for this. </p>
<p>...</p>
<pre><code> public override void OnActionExecuting(ActionExecutingContext filterContext)
{
var controller = (Controller) filterContext.Controller;
Breadcrumb[] breadcrumbs = _breadcrumbManager.PushBreadcrumb(_breadcrumbLinkText);
... | <p>@Chris: something like this:</p>
<pre><code> <%
foreach (var item in ViewData.Get<Breadcrumb[]>())
{
%>
<a href="<%= Server.HtmlEncode(item.Url) %>"><%= item.LinkText %></a> &raquo;
<%
}
%>... | 9,168 |
<p>Currently, pure CAD questions are out of scope of our Stack, but we have quite some cases that edge, where the question about the CAD is about how to make a model printable or design principles or such.</p>
<p>Where do we draw the line in the sand? <a href="https://3dprinting.meta.stackexchange.com/questions/204/the... | <p>I struggled with the same question since I saw the edit, good that you brought this to Meta! Thanks!</p>
<p>As the community of regular and active members is limited, I think it is okay to welcome people in a comment or an answer. It would be a shame to scare people away after their first question, resulting in aban... | <p>I struggled with the same question since I saw the edit, good that you brought this to Meta! Thanks!</p>
<p>As the community of regular and active members is limited, I think it is okay to welcome people in a comment or an answer. It would be a shame to scare people away after their first question, resulting in aban... | 78 |
<p>How do I make <code>diff</code> ignore temporary files like <code>foo.c~</code>? Is there a configuration file that will make ignoring temporaries the default?</p>
<p>More generally: what's the best way to generate a "clean" patch off a tarball? I do this rarely enough (submitting a bug fix to an OSS project by ema... | <p>This doesn't strictly answer your question, but you can avoid the problem by configuring Emacs to use a specific directory to keep the backup files in. There are different implementations for Emacs or XEmacs.</p>
<p>In GNU Emacs</p>
<pre>
(defvar user-temporary-file-directory
(concat temporary-file-direc... | <p>You can create a small sunction/script to it, like:</p>
<pre><code>#!/bin/bash
olddir="/tmp/old"
newdir="/tmp/new"
pushd $newdir
for files in $(find . -name \*.c)
do
diff $olddir/$file $newdir/$file
done
popd
</code></pre>
<p>This is only one way to script this. The simple way. But I think you got the idea.</p>... | 5,304 |
<p>If the hot-end is at ~0 on the Z axis and I go to level it, as it approaches X = 0 it begins scraping along the bed, then when moving back to probe the center of the bed (after homing X to 0) it will scrape the bed again.</p>
<p>I want to add a glass plate but am worried this aggressive homing will smash the glass.... | <p>I realised the simplest fix for this shortly after posting the question. In either your slicer or your printer controller (I use octoprint, so I added this there) add to the starting G-code something to lift the head so that it is above the point it is scraping across.</p>
<p>For example, change your starting G-cod... | <p>Sounds like you need a different sensor? You have a lot of issues from the sounds of it. Also no code so cannot comment on your settings.</p>
<p>If it always scrapes the bed (sorry but its really unclear what is going on) then lower your sensor a bit.. Best I can give you with the provided info.</p>
| 403 |
<p>How do I set the column which has the header sort glyph, and its direction, in a .NET 2.0 WinForms ListView?</p>
<h2>Bump</h2>
<p>The listview is .net is not a managed control, it is a very thin wrapper around the Win32 ListView common control. It's not even a very good wrapper - it doesn't expose all the features... | <p>In case someone needs a quick solution (it draws up/down arrow at the beginning of column header text):</p>
<p><strong>ListViewExtensions.cs:</strong></p>
<pre><code>public static class ListViewExtensions
{
public static void DrawSortArrow(this ListView listView, SortOrder sortOrder, int colIndex)
{
... | <p>I use unicode arrow characters in the title of the column and make the header a linkbutton.</p>
| 9,901 |
<p>I have a <a href="https://flex3drive.com/" rel="nofollow noreferrer">Flex3Drive</a> remote-direct-drive extruder I bought for my Ender 3 (with the original extruder motor), and I'm pretty happy with it except for abysmal retraction performance due to the 40:1 reduction, which requires the motor to turn about 480° to... | <p>In general I would use <a href="https://github.com/rcarlyle/StepperSim" rel="nofollow noreferrer">https://github.com/rcarlyle/StepperSim</a> which takes into account more parameters.</p>
<p>You can play with voltage and current to see which combination gives you the best results for your motor.</p>
<p>Or you can cha... | <p>I was considering buying a Fl3xdrive but had this exact fear, that the speed (rotation) required for retractions was too much.</p>
<p>I stumbled upon this post while looking for a project for a step-up gearbox. I found a <a href="https://www.thingiverse.com/thing:3714978" rel="nofollow noreferrer">Nema 17 Gearbox &q... | 1,894 |
<p>What are the most common things to test in a new site?</p>
<p>For instance to prevent exploits by bots, malicious users, massive load, etc.?</p>
<p>And just as importantly, what tools and approaches should you use?</p>
<p>(some stress test tools are really expensive/had to use, do you write your own? etc)</p>
<p... | <p>Try and break your own site before someone else does. Your web site is basically a publicly accessible API that allows access to a database and other backend systems. Test the URLs as if they were any other API. I like to start by cataloging all URLs that have some sort of permenant affect on the state of the syste... | <p>There's seperate stages for this one.</p>
<p>Firstly there's the technical testing, where you check all technical functionality:</p>
<ul>
<li>SQL injections</li>
<li>Cross-site Scripting (XSS)</li>
<li>load times</li>
<li>stress levels</li>
</ul>
<p>Then there's the phase where you have someone completely compute... | 4,301 |
<p>I have a Person object with two constructors - one takes an int (personId), the other a string (logonName). I would like another constructor that takes a string (badgeNumber). I know this can't be done, but seems it might be a common situation. Is there a graceful way of handling this? I suppose this would apply... | <p>You might consider using custom types.</p>
<p>For example, create LogonName and BadgeNumber classes.</p>
<p>Then your function declarations look like...</p>
<pre><code>public Person(LogonName ln)
{
this.Load(ln.ToString());
}
public Person(BadgeNumber bn)
{
//load logic here...
}
</code></pre>
<p>Such a... | <p>How about ...</p>
<pre><code>public Person(int personId)
{
this.Load(personId);
}
public Person(string logonName)
{
this.Load(logonName);
}
public Person(Object badgeNumber)
{
//load logic here...
}
</code></pre>
| 5,111 |
<p>The <code>Close</code> method on an <code>ICommunicationObject</code> can throw two types of exceptions as MSDN outlines <a href="http://msdn.microsoft.com/en-us/library/ms195520.aspx" rel="nofollow noreferrer">here</a>. I understand why the <code>Close</code> method can throw those exceptions, but what I don't unde... | <p>You can mark variables as "<a href="https://velocity.apache.org/engine/1.5/user-guide.html#quietreferencenotation" rel="noreferrer">silent</a>" like this:</p>
<pre><code>$!variable
</code></pre>
<p>If $variable is null, nothing will be rendered. If it is not null, its value will render as it normally would.</p>
| <p>You will also need to be sure and use the proper syntax. Your example is missing the dollar before the variable. It should be $!{person.age}, not just {person.age}.</p>
| 4,368 |
<p>Does anyone use have a good regex library that they like to use? Most of the regexes that you find online either contain bugs or are so focused on the edge cases that it turns into a competition to validate whatever spec 100%. Of course you can write your own, but when you are billing by the hour its handy to have a... | <p>You can search for regular expression in <a href="http://regexlib.com/" rel="nofollow noreferrer">regexlib</a>.</p>
| <p>e-texteditor hilights what you're searching for as you type it. This is incredibly useful, as you can paste your 'sample text' into a file, and just type your regex into the search field, and see what it's matching right in front of you.</p>
<p>None of these 'visual regex builder' things are substitutes for actuall... | 3,181 |
<p>Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable.</p>
<p>We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can't find a simple & easy to use method for t... | <p>Spring Dynamic Modules has excellent support for <a href="http://static.springframework.org/osgi/docs/current/reference/html/testing.html" rel="noreferrer"> testing OSGi bundles</a>.</p>
| <p>How about bnd-testing-maven-plugin?</p>
<p>It allow running JUnit inside a running container like Felix or Equinox.
If you used the BNDTools for eclipse this is very similar but just maven withpout eclipse and without a UI.</p>
<p><a href="https://github.com/bndtools/bnd/tree/master/maven/bnd-testing-maven-plugin"... | 9,954 |
<p>I am interested to know whether anyone has written an application that takes advantage of a <a href="http://en.wikipedia.org/wiki/GPGPU" rel="nofollow noreferrer">GPGPU</a> by using, for example, <a href="http://www.nvidia.com/object/cuda_get.html" rel="nofollow noreferrer">nVidia CUDA</a>. If so, what issues did y... | <p>I have been doing gpgpu development with <a href="http://ati.amd.com/technology/streamcomputing/sdkdwnld.html" rel="nofollow noreferrer">ATI's stream SDK</a> instead of Cuda.
What kind of performance gain you will get depends on a <strong><em>lot</em></strong> of factors, but the most important is the numeric intens... | <p>Yes. I have implemented the <a href="http://www.cs.huji.ac.il/~cheny/reading/diffusion/classic.pdf" rel="nofollow noreferrer">Nonlinear Anisotropic Diffusion Filter</a> using the CUDA api.</p>
<p>It is fairly easy, since it's a filter that must be run in parallel given an input image. I haven't encountered many dif... | 7,915 |
<p>I need to import a csv file into <strong>Firebird</strong> and I've spent a couple of hours trying out some tools and none fit my needs.</p>
<p>The main problem is that all the tools I've been trying like <a href="http://www.sqlmanager.net/products/ibfb/dataimport" rel="noreferrer">EMS Data Import</a> and <a href="... | <p>It's a bit crude - but for one off jobs, I sometimes use Excel.</p>
<p>If you import the CSV file into Excel, you can create a formula which creates an INSERT statement by using string concatenation in the formula. So - if your CSV file has 3 columns that appear in columns A, B, and C in Excel, you could write a fo... | <p>A tool I recently tried that worked outstandingly well is <a href="http://www.volny.cz/iprenosil/interbase/fsql.htm" rel="nofollow noreferrer">FSQL</a>.</p>
<p>You write an IMPORT command, paste it into <code>FSQL</code> and it imports the CSV file into the Firebird table.</p>
| 2,966 |
<p>So my company uses a delightfully buggy program called Rational Purify (as a plugin to Microsoft Visual Developer Studio) to manage memory leaks. The program is deigned to let you click on a memory leak after you have encountered it, and then jump to the line that the leak occurs on.</p>
<p>Unfortunately Purify is... | <p>Generally you have two options, one exclude modules DLL's from instrumentation in Purify, it helps some times. Second is get BoundsChecker, this does compile time instrumentation much slower but the level of detail is an order of magnitude better.</p>
<p>We generally use Purify on check-in, sanity checking, and Bou... | <p>Are you sure you have debug build? Or rather you have all PDB's enabled? Try WindDbg on your executable and check with !lmi command what is visible.</p>
<p>Is whole code properly instrumented?</p>
<p>Also consider using something else like <a href="http://www.codeproject.com/KB/applications/visualleakdetector.aspx... | 2,741 |
<p>I'm attempting to print some flexible TPE filament. But I failed to imagine TPE was this difficult to print.</p>
<p>Specs of the shop-brand filament:<br>
Red 1.75 mm TPE (+-0.05 mm).<br>
Hardness: 45D.<br>
Print temperature: 220-260 °C with 0-95 °C bed.</p>
<p>I'm trying to print <a hre... | <p>I have experienced this problem. This picture is one that I could have taken. </p>
<p>It has always been because I was putting too much plastic into the available space.</p>
<p>This has been caused two things: overextrusion -- squirting out too much plastic for the intended layer height, and the bed being too "hi... | <p>This could be a number of things, I personally think it could be either over extrusion or an issue with one of the belts. Depending on the printer, you may need to manually go in and adjust your steps per millimeter, which you should be able to find a guide on. If that doesn't work, then look into belt tension adjus... | 1,395 |
<p>In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that you know is prefixed by greater-than in the code. It's particularly a... | <p>This is a really cool feature. I've poked through the <a href="http://msdn.microsoft.com/en-us/library/1665hyw1(VS.80).aspx" rel="nofollow noreferrer">feature documentation</a>, and the accompanying <a href="http://msdn.microsoft.com/en-us/library/c338aexd(VS.80).aspx" rel="nofollow noreferrer">command list</a>, and... | <blockquote>
<p>Wow, I didn't know that. Where do I
find the list of possible commands?</p>
</blockquote>
<p>The commands are the same as those you can enter in the command window, so you can pretty much drive the entire IDE and debugger using it. There are a load of predefined aliases for common commands. Open up... | 3,555 |
<p>By default IntelliJ IDEA 7.0.4 seems to use 4 spaces for indentation in XML files. The project I'm working on uses 2 spaces as indentation in all it's XML. Is there a way to configure the indentation in IntelliJ's editor?</p>
| <p>Sure there is. This is all you need to do:</p>
<ul>
<li>Go to</li>
</ul>
<pre>File -> Settings -> Global Code Style -> General</pre>
<ul>
<li>Disable the checkbox next to 'Use same settings for all file types' </li>
<li>The 'XML' tab should become enabled. Click it and set the 'tab' (and probably 'indent') size ... | <p>Note: make sure to not use the <em>same</em> file in two project, or your settings might revert to the default (4 spaces), instead of the custom XML tab indent size.</p>
<p>See <a href="https://youtrack.jetbrains.com/issue/IDEA-130878" rel="nofollow">bug IDEA-130878</a>, for the latest IntelliJ IDEA 14 (Oct 2014)</... | 5,882 |
<p>First of all I'm working with a Folger Tech Prusa i3 kit, if that makes a difference. Also I believe the Arduino is a Mega 2560.</p>
<p>I know somewhere in the back of my head that electrically programmable ROM like what must be on the Arduino board storing the firmware degrades a little, each time you write to it.... | <p>The EEPROM is <em>not</em> where the program itself is stored, what's relevant for your question is the flash. The flash in the ATmega2560 <a href="http://www.atmel.com/images/atmel-2549-8-bit-avr-microcontroller-atmega640-1280-1281-2560-2561_datasheet.pdf" rel="nofollow noreferrer">is rated for 10,000 cycles</a> (i... | <p>The AVR has SRAM for variables (what is usually called RAM), it has EEPROM for non volatile variables and it has flash for the executable code. (Harvard Architecture!)</p>
<p>For re-flashing the firmware neither SRAM nor EEPROM write rates are important, but the Flash rates are. The flash write rates are in the reg... | 237 |
<p>I am developing an application to install a large number of data files from multiple DVDs. The application will prompt the user to insert the next disk, however Windows will automatically try to open that disk either in an explorer window or ask the user what to do with the new disk.<br>
How can I intercept and can... | <p>There are two approaches that I know of. The first and simplest is to register the special Windows message "QueryCancelAutoPlay" and simply return 1 when the message is handled. This only works for the current window, and not a background application.</p>
<p>The second approach requires inserting an object that i... | <p>Alternatively, you could just programmatically save the current state of autoplay and turn it off when your program starts, then restore the original state when your program closes. This would be a lot simpler. Check out <a href="http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/93502.mspx... | 3,282 |
<p>Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number?</p>
<pre><code>select datepart(dw, getdate());
</code></pre>
<p>This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1.</p>
| <pre><code>select datename(weekday, getdate());
</code></pre>
| <p>This is not possible without using the result to select the day yourself. For one thing the textual representation of the day is locale-dependent. For another the returned value depends upon the 'datefirst' setting.</p>
| 3,356 |
<p>From the Java 6 <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html" rel="noreferrer">Pattern</a> documentation:</p>
<blockquote>
<p>Special constructs (non-capturing)</p>
<p><code>(?:</code><i>X</i><code>)</code> <i>X</i>, as a non-capturing group</p>
<p>…</p>
... | <p>It means that the grouping is <a href="http://www.regular-expressions.info/atomic.html" rel="noreferrer">atomic</a>, and it throws away backtracking information for a matched group. So, this expression is possessive; it won't back off even if doing so is the only way for the regex as a whole to succeed. It's "indepe... | <p><code>(?>X?)</code> equals <code>(?:X)?+</code>, <code>(?>X*)</code> equals <code>(?:X)*+</code>, <code>(?>X+)</code> equals <code>(?:X)++</code>.</p>
<p>Taking away the fact that X must be a non-capturing group, the preceding equivalence is:</p>
<p><code>(?>X?)</code> equals <code>X?+</code>, <code>(?&g... | 7,329 |
<p>Alright.</p>
<p>So I figure it's about time I get into unit testing, since everyone's been banging on about it for long enough. I've installed NUnit and gone through a few "intro to unit testing" type tutorials.</p>
<p>I'm currently putting together a small framework to help with the rebuild of one of our web app... | <p>You can do model-view-controller or model-view-presenter type architectures without using a full blown framework. You already found out that unit-testing ui-components is difficult. There are ways around that but you probably don't want to go that route. Usually this will make your tests very hard to maintain, more ... | <p>The MVC framework mentioned above is the best way to test what the control does. However testing how it works is a bit different.</p>
<p>This is totally off the cuff but you could make the user control expose some protected methods and properties to return validation information and then have a testing user contro... | 5,105 |
<p>What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?</p>
| <p>I recommend the Apache License (specifically, version 2). It is not a “copy left” license and it addresses several matters that are important to established companies and their lawyers.</p>
<p>“Copy left” is the philosophy of the free software foundation requiring anything incorporating the licensed opens source c... | <p>MIT, Apache and BSD tend to be the most corporate friendly. The least corporate friendly that I have ran across are usually Q Public, GPL and Mozilla...</p>
| 4,814 |
<p>I know there's a bug with conditional visibility and page breaks with SQL 2005, but I wonder if anyone has come up with a work around.</p>
<p>I have a table that has a conditional visibility expression, and I need a page break at the end of the table.</p>
<ul>
<li>If I set the PageBreakAtEnd property to true. It i... | <p>Place two rectangles, one inside the other.<br>
Place your table inside the inner rectangle and set it to always be visible.<br>
Set the inner rectangle's Page Break to Insert After Rectangle.<br>
Set the outer rectangle's visibility to use your conditional expression.</p>
<p>The page break and the conditional visi... | <p>Add a second (empty) table immediately after the first. Page break after that.</p>
| 2,984 |
<p>I am printing some minion chess pieces for my teacher at school and on every model I have found something called "ghosting", or at least I heard that is what it is called. For example there is a strap on the model for the pants. And going left and right there is very shallow "straps" or something happening. </p>
<p... | <p><strong>Ghosting is an artefact in the print due to the vibrations in the printer that are induced by rapid changes of direction</strong>. It is important not to confuse them with inherent vibrations in the printer due for example to the belts being loose or the bearings not being in perfect order.</p>
<p>The good... | <p>To expand on the #3 solution: reducing the elasticity of the system, if you have your filament mounted on the top of your printer, placing the filament elsewhere on a separate spool holder can also reduce ghosting. Tightening the belts and moving my filament got rid of ghosting for me on my MP Maker Select.</p>
| 806 |
<p>Under what circumstances might you want to use multiple indirection (that is, a chain of pointers as in <code>Foo **</code>) in C++?</p>
| <p>Most common usage as @aku pointed out is to allow a change to a pointer parameter to be visible after the function returns.</p>
<pre><code>#include <iostream>
using namespace std;
struct Foo {
int a;
};
void CreateFoo(Foo** p) {
*p = new Foo();
(*p)->a = 12;
}
int main(int argc, char* argv[... | <p>A simple example would be using <code>int** foo_mat</code> as a 2d array of integers.
Or you may also use pointers to pointers - lets say that you have a pointer <code>void* foo</code> and you have 2 different objects that have a reference to it with the following members: <code>void** foo_pointer1</code> and <code>... | 9,655 |
<p>I've been working through <a href="http://gigamonkeys.com/book" rel="nofollow noreferrer">Practical Common Lisp</a> and as an exercise decided to write a macro to determine if a number is a multiple of another number:</p>
<p><code>(defmacro multp (value factor)<br>
`(= (rem ,value ,factor) 0))</code></p>
<p>so... | <p>Siebel gives an extensive rundown (for simple cases anyway) of possible sources of leaks, and there aren't any of those here. Both <code>value</code> and <code>factor</code> are evaluated only once and in order, and <code>rem</code> doesn't have any side effects.</p>
<p>This is not good Lisp though, because there's... | <p>No, no symbol introduced in the macro's "lexical closure" is released to the outside.</p>
<p>Note that leaking isn't NECESSARILY a bad thing, even if accidental leaking almost always is. For one project I worked on, I found that a macro similar to this was useful:</p>
<pre><code>(defmacro ana-and (&rest forms)... | 8,510 |
<p>I have a service contract that defines a method with a parameter of type System.Object (xs:anyType in the WSDL). I want to be able to pass simple types as well as complex types in this parameter. Simple types work fine, but when I try to pass a complex type that is defined in my WSDL, I get this error:</p>
<p>Ele... | <p>The NetDataContract works because the NetDataContractSerializer includes type information.</p>
<p>The KnownType attribute instructs the DataContractSerializer how to deserialize the message. Being implementation specific, this is information over-and-above that defined by the public contract and doesn't belong in t... | <p>Try use data contract Surrogates to map unsupported object that is dot net specific or not interoperable types. See <a href="http://msdn.microsoft.com/en-us/library/ms733064.aspx" rel="nofollow noreferrer">MSDN</a></p>
| 9,330 |
<p>I've got some curious marks on my heatbed.</p>
<p>It appears to be from my black Sunlu PLA+ (I can just feel it if I scrape my finger nail over it) but I can't scrape it off with the metal spatula.</p>
<p>When I try and print over it the filament won't stick.</p>
<p>Any suggestions as to what it is and how you ge... | <p>Prusa ships (or has shipped) with two types of PEI build plates. The original (and what I was shipped in February 2019) is a PEI sheet held in place with an adhesive. The marks I've gotten seem to be places where the adhesive has been displaced slightly from long term pressure by the object being printed.</p>
<p>... | <p>Edit: As Trish noted, apparently Prusa printers don't ship with Buildtak stickers like the other printers I've used, so this is probably a bad idea in your specific case. For others reading this, only do the sanding shenanigans with buildtak or other stickers that you can easily replace and don't mind wearing down o... | 1,331 |
<p>I've had some discussions recently at work about switching from Subversion to a DVCS like bazaar, and I would like to get other people's opinion.</p>
<p>I've managed to crystallize my reluctance to do so into a simple parallel.</p>
<blockquote>
<p>Version Control can be used well or badly. </p>
</blockquote>
<p... | <p>If there are developers on your team that don't want to share their "one week local hack" then thats the problem, not the source control tool you are using. A better term for the "dark side" you are describing is "the wrong way" of coding for a team. Source control is a tool used to facilitate collaborative work. If... | <p>I believe svn's merging has been somewhat overhauled in the latest release.</p>
| 4,670 |
<p>I'm wondering if there is some trick to power my OctoPi with the power supply of my 3D printer. I'm using an Geeetech I3 Pro W.</p>
<p>The power supply itself should be able, but the output is as far as I'm aware of 3.3 volts. Not my desired 5 V for USB, it would be a shame if I really would need to buy a new ... | <p>What you are looking for is called a "buck converter" or a "step down module". These literally cost about half a buck/Euro a piece. These converters convert a high voltage into a low voltage, the better ones are able to draw 2 to 3 Amps, which is required for stable operation of the Raspberry Pi.</p>
<p>If you have... | <p>Thank you guys for your help. I ended up with a suggested <a href="https://www.amazon.de/dp/B0768D2NYH?tag=t--21" rel="nofollow noreferrer">"Step Down Power Module"</a> which works fine for me. I connected that module directly with the power supply of the printer with a blade connector. The first startup showed me a... | 1,299 |
<p>Does anyone know of a disassembler for <em>ARMV4i</em> executables and DLLs?</p>
<p>I've got a plug-in DLL I'm writing with a very rare <code>data abort</code> (<5% of the time) that I have narrowed down to a specific function (via dumpbin and the address output by the <code>data abort</code>). However, it is a... | <p>IDA Pro will definitely do ARM disassembly. And they (Datarescue) once arranged me a licence at about 11PM local time, so I like to recommend them...</p>
<p>I see from <a href="http://www.datarescue.com/idabase/" rel="nofollow noreferrer">http://www.datarescue.com/idabase/</a> that there's been some rearrangement ... | <p>A couple of years ago I found an ARM disassembler I used while doing some embedded work. However, I don't remember its name - though I think it was part of a larger package like an emulator or something.</p>
<p>In your case, could you ask your compiler to generate an assembly listing of the compiled code? That migh... | 4,228 |
<p>I could swear I've seen people typing function headers and then hitting some key combination to auto-create function braces and insert the cursor between them like so:</p>
<pre><code>void foo()_
</code></pre>
<p>to</p>
<pre><code>void foo()
{
_
}
</code></pre>
<p>Is this a built-in feature?</p>
| <p>Check out <a href="http://www.jetbrains.com/resharper/documentation/feature_map.html" rel="nofollow noreferrer">Resharper</a> - it is a Visual Studio add-on with this feature, among many other development helps.</p>
<p>Also see <a href="http://www.knowdotnet.com/articles/csharpcompleter.html" rel="nofollow noreferr... | <p>I just created one based on @Luke's above. This one, you want to hit Enter then hit your key combination and it will insert:</p>
<pre><code>if ()
{
}
else
{
}
</code></pre>
<p>And it will put your cursor in the parenthesis by the if statement.</p>
<pre><code>Sub IfStatement()
DTE.ActiveDocument.Selection.Te... | 3,090 |
<p>Imagine this directory structure:</p>
<pre><code>app/
__init__.py
sub1/
__init__.py
mod1.py
sub2/
__init__.py
mod2.py
</code></pre>
<p>I'm coding <code>mod1</code>, and I need to import something from <code>mod2</code>. How should I do it? </p>
<p>I tried <code>from ..sub2 import... | <p>Everyone seems to want to tell you what you should be doing rather than just answering the question.</p>
<p>The problem is that you're running the module as '__main__' by passing the mod1.py as an argument to the interpreter.</p>
<p>From <a href="http://www.python.org/dev/peps/pep-0328/" rel="noreferrer">PEP 328</... | <p>This method queries and auto populates the path:</p>
<pre class="lang-py prettyprint-override"><code>import os
import inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.path.insert(1, parentdir)
# print("currentdir = &quo... | 9,845 |
<p>Waiting for a heatbed to get up to 85˚C for a relatively small part got me wondering why beds aren't hardware/G-code configurable for what area is heated? I'm sure it would be an increase in parts costs and electronics, but it seems that being able to just heat an area a little larger than the part(s) being built wo... | <p>I've wondered that myself a while ago and fact is that such beds or silicone heating pads do <a href="http://www.formbot3d.com/dual-zone-heated-build-plate-and-digital-controller-for-t-rex-2_p0015.html" rel="nofollow noreferrer">exist</a>. Usually these are quite large (and expensive) and usually referred to as "dua... | <p>it is probably too late for the party but i thought about grid heated bed recently. about controlling which zone to turn on and off, i think we can treat the grid as Led matrix, the matrix led signal can be used to drive mosfets to power the heat pads.</p>
| 953 |
<p>How does one go about authoring a <em><strong>Regular Expression</strong></em> that matches against all strings that are valid URIs, while failing to match against all strings that are invalid URIs?</p>
<p>To be specific about what I am referencing when I say URI, I have added a link below for the most current URI R... | <p>Does <a href="http://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring.aspx" rel="noreferrer">Uri.IsWellFormedUriString</a> work for you?</p>
| <p>Are there some specific URIs you care about or are you trying to find a single regex that validates <a href="http://rfc.net/std0066.html" rel="nofollow noreferrer">STD66</a>?</p>
<p>I was going to point you to <a href="http://www.unix.com.ua/rfc/std0066.html#p50" rel="nofollow noreferrer">this regex</a> for parsing... | 5,070 |
<p>Our (beloved) designer keeps creating PNG files with transparent backgrounds for use in our applications. I'd like to make sure that this feature of the PNG works in "older" browsers as well. What's the best solution?</p>
<p><em>edits below</em></p>
<p>@mabwi & @syd - Whether or not I agree about the use of a ... | <p>I've found what looks to be a very good solution here: <a href="http://web.archive.org/web/20170521133429/http://labs.unitinteractive.com:80/unitpngfix.php" rel="nofollow noreferrer">Unit Interactive -> Labs -> Unit PNG Fix</a></p>
<p><em>update</em> Unit PNG is also featured on a <a href="http://nettuts.com/v... | <p>I might be mistaken, but I'm pretty sure IE6 and less just don't do transparency with PNG files.</p>
<p>I have two "solutions" that I use. Either create GIF files with transparency and use those everywhere, or just use them for IE 6 and older with conditional style sheets. The second really only works if you are ... | 3,146 |
<p>What object do you query against to select all the table names in a schema in Oracle?</p>
| <p>To see all the tables you have access to</p>
<pre><code>select table_name from all_tables where owner='<SCHEMA>';
</code></pre>
<p>To select all tables for the current logged in schema (eg, your tables)</p>
<pre><code>select table_name from user_tables;
</code></pre>
| <p>You may use:</p>
<pre><code>select tabname from tabs
</code></pre>
<p>to get the name of tables present in schema.</p>
| 7,427 |
<p>There is a field in my company's "Contacts" table. In that table, there is an XML type column. The column holds misc data about a particular contact. EG. </p>
<pre><code><contact>
<refno>123456</refno>
<special>a piece of custom data</special>
</contact>
</code></pre>
<p>The tag... | <p>I've found the msdn xml best practices helpful for working with xml blob columns, might provide some inspiration...
<a href="http://msdn.microsoft.com/en-us/library/ms345115.aspx#sql25xmlbp_topic4" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms345115.aspx#sql25xmlbp_topic4</a></p>
| <p>In addition to the page mentioned by @pauljette, this page has good performance optimization advice:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms345118.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms345118.aspx</a></p>
<p>There's a lot you can do to speed up the performance... | 7,532 |
<p>I'm wondering if people can suggest the best tutorial that will walk me through the best way to do Drag and Drop with control collision detection etc, using MS Silverlight V2.</p>
<p>I've done the <a href="http://silverlight.net/learn/tutorials.aspx" rel="nofollow noreferrer">Jesse Liberty tutorials</a> at Silverli... | <p>Here is a page that explained the solution for my use.</p>
<p><a href="http://www.adefwebserver.com/DotNetNukeHELP/Misc/Silverlight/DragAndDropTest/" rel="nofollow noreferrer">Silverlight 2 Drag, Drop, and Import Content Example</a></p>
| <p>A codeplex project for drag and drop <a href="http://www.codeplex.com/silverlightdragdrop" rel="nofollow noreferrer">http://www.codeplex.com/silverlightdragdrop</a></p>
| 9,563 |
<p>How can you allow a PHP script to write to a file with high-security restrictions, such as only allowing a single user to write to it?</p>
<p>The difficulty seems to be that a PHP script is running as a low-permissions user (maybe apache, or www, or nobody?), and even if I <code>chown</code> apache the_writable_fil... | <p>Unfortunately, in shared hosts that use <strong>mod_php, there is no way to restrict access</strong> to secure files to your web app and login user.</p>
<p>The solution is to <strong>run your web app as your login user</strong>. When you do that, UNIX file permissions can correctly lock everyone else out. There are... | <p>Sure, <code>chgrp apache the_writable_file</code> and <code>chmod g+w the_writable_file</code>. After that, only your secure user and the apache user will be able to write to the file. Since the apache user is typically forbidden from logging in, you only have to worry about web users writing to your secure file u... | 5,417 |
<p>What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have:</p>
<pre><code>$sql = "SELECT * FROM users WHERE username='" . mysql_escape_string($_P... | <p>I came up with this and it appears to work.</p>
<pre><code>while($row = mysql_fetch_assoc($result))
{
$_SESSION = array_merge_recursive($_SESSION, $row);
}
</code></pre>
| <p>OK, this doesn't answer your question, but doesn't your current code leave you open to SQL Injection?</p>
<p>I could be wrong, never worked in PHP, just saw the use of strings in the SQL and alarm bells started ringing!</p>
<h3>Edit:</h3>
<p>I am not trying to tamper with your post, I was correcting a spelling error... | 4,536 |
<p>We have a Makerbot Replicator 2X at our school. I have a class in the computer lab and one of our focuses is using the printer. Currently, it is not printing properly. We are using PLA at 210 degrees Celcius. The built plate is not heated (using Build Tak). This has worked very well in the past. The problem is ... | <p>Overall, it is unlikely that the problem is temp sensing accuracy. There are only a few things that will throw off the thermocouple's reading:</p>
<ul>
<li>Poor thermal coupling between the tip and the hot block, such as if the tip has partially pulled free of the brass thermowell crimp (this will make the hot bloc... | <p>The temperature is fine.</p>
<p>In my experience the filament curls up only when the extruder is extruding way up, far from the plate: are you experiencing this while actually printing?</p>
<p>If yes: recalibrate the printer so that the extruder is closer to the build plate and this shouldn't happen. For the filam... | 206 |
<p>I'm pretty keen to develop my first Ruby app, as my company has finally blessed its use internally.</p>
<p>In everything I've read about Ruby up to v1.8, there is never anything positive said about performance, but I've found nothing about version 1.9. The last figures I saw about 1.8 had it drastically slower than... | <p>There are some benchmarks of 1.8 vs 1.9 at <a href="http://www.rubychan.de/share/yarv_speedups.html" rel="nofollow noreferrer">http://www.rubychan.de/share/yarv_speedups.html</a>. Overall, it looks like 1.9 is a lot faster in most cases.</p>
| <p>I'd second the recommendation of the use of Passenger - it makes deployment and management of Rails applications trivial</p>
| 4,551 |
<p>In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables?</p>
<p>Will I get a significant performance gain if I used a bitset for 50 flags rather than using 50 separate bool variables?</p>... | <p>Well, 50 bools as a bitset will take 7 bytes, while 50 bools as bools will take 50 bytes. These days that's not really a big deal, so using bools is probably fine.</p>
<p>However, one place a bitset might be useful is if you need to pass those bools around a lot, especially if you need to return the set from a fun... | <p>It depends what you mean by 'performance gain'. If you only need 50 of them, and you're not low on memory then separate bools is pretty much always a better choice than a bitset. They will take more memory, but the bools will be much faster. A bitset is usually implemented as an array of ints (the bools are packed i... | 4,112 |
<p>It seems like IDataReader.Read() is always true at least one time (If I'm wrong about this let me know.) So how do you tell if it has no records without just wrapping it in a try/catch?</p>
| <pre><code>if(dr.Read())
{
//do stuff
}
else
{
//it's empty
}
</code></pre>
<p>usually you'll do this though:</p>
<pre><code>while(dr.Read())
{
}
</code></pre>
| <p>You can just cast <code>System.Data.IDataReader</code> to <code>System.Data.Common.DbDataReader</code> </p>
<pre><code>using (System.Data.IDataReader IReader = ICommand.ExecuteReader())
{
if (((System.Data.Common.DbDataReader)IReader).HasRows)
{
//do stuff
}
} // End Using IReader
</code></pre>... | 7,402 |
<p>I bought a self-made Reprap Prusa Mendel 3 printer, modified to be built from cheaper materials, and immediately after the deal I got various problems. I fixed the majority of them, but don't know what the reason of the strange extruder behavior is: The stepper motor is not rotating while extruding filament, it's mo... | <p>Your controller board probably requires calibration.</p>
<p>It sounds like, maybe, the extruder's stepper motor is <em>not receiving sufficient</em> current, to make it turn. <strong>Or</strong>, somewhat confusingly, maybe the stepper is <em>receiving too much current</em>, and overheating.</p>
<p>You don't say whi... | <p>I also faced similar problem. Mine was a self-made marlin/repetier. The problem was that the motor current was much less than the motor requirement and the axis were not calibrated properly. Giving recommended current according to your motor ratings and limiting your feedrate according to your calibration should wor... | 442 |
<p>I upgraded from Cura 2.7 to 3.1.0 and I'm getting horrible under extrusion, I'm sure this is the software because I rolled back to 2.7 and everything is working fine again.</p>
<p>My printing is a Robo3D R1+ using the "custom FDM printer" profile.</p>
<p>Is there any new setting or a setting that isn't migrated pr... | <p>Some users have reported upgrades to Cura changing the filament size to the default 2.85 mm. If you are using 1.75 mm filament (which most printers do), you will get extreme under-extrusion.</p>
| <p>I hit this issue again in January 2019 with CuraEngine 3.6+git. Since support for multiple extruders was added, it now auto-loads a per-extruder settings file that overrides the main settings file <strong>and the command line</strong>, so <code>-s material_diameter=1.75</code> on the command line did not help. Given... | 770 |
<p>I would like to get a green tombow PITS adhesive stick. On Rakuten, it costs \$1 (USD). On my 3d printer's (XYZ) retailer's site, it costs \$20 (USD). Due to the costs and the fact that Rakuten does not ship to my country, I need an alternative. I am currently using Davinci 1.0 for my bed, which I believe is a glass... | <p>As mentioned by Matt - PVA glues work perfect for both filaments.
It works well because it's softening temperature is between 45..85C so it's more or less temperature of HB.</p>
<p>Advantages:</p>
<ul>
<li>cheap</li>
<li>easy to apply on HB</li>
<li>can be applied on cold as same as on hot HB</li>
<li>sticks model... | <p>Most PVA glue works well for both (Poly Vinyl Acetate).<br>
There are different brands in every country.</p>
| 280 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.