instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>We have been using CruiseControl for quite a while with NUnit and NAnt. For a recent project we decided to use the testing framework that comes with Visual Studio, which so far has been adequate.</p>
<p>I'm attempting to get the solution running in CruiseControl. I've finally got the build itself to work; however,... | <p>Not sure if that helps (i found the ccnet Documentation somewhat unhelpful at times):</p>
<p><a href="http://confluence.public.thoughtworks.org/display/CCNET/Using+CruiseControl.NET+with+MSTest" rel="noreferrer">Using CruiseControl.NET with MSTest</a></p>
| <p>The CC.Net interface is generated via an XSL transform on your XML files put together as specified in the ccnet.config file for your projects. The XSL is already written for things like FxCop - check your server's CC xsl directory for examples - shouldn't be too hard to write your own to add in the info - just reme... | 2,373 |
<p>What I would like to do is create a clean virtual machine image as the output of a build of an application.</p>
<p>So a new virtual machine would be created (from a template is fine, with the OS installed, and some base software installed) --- a new web site would be created in IIS, and the web app build output cop... | <p>To find out which files on your system have been encrypted with EFS, you can simply run this command:</p>
<pre><code>CIPHER.EXE /U /N
</code></pre>
| <p>Clippy noticed that you have sensitive information in your files and automatically encrypted them.</p>
<p>Are you sure it's for EFS? I've had things prompt me to backup my keys before, but I didn't know exactly what they were to. I was assuming it was like a DRM protected file or something. It was a while ago so i ... | 3,280 |
<p>I've looked at several URL rewriters for ASP.Net and IIS and was wondering what everyone else uses, and why. </p>
<p>Here are the ones that I have used or looked at:</p>
<ul>
<li><a href="http://www.codeproject.com/KB/aspnet/urlrewriter.aspx" rel="nofollow noreferrer">ThunderMain URLRewriter</a>: used in a previou... | <p>There's System.Web.Routing that was just released with .NET 3.5.</p>
<p>You can just use Request.RewritePath() in a custom HttpModule</p>
<p>I prefer using an IHttpHandlerFactory implementation and have full control over all incoming URLs and where they're mapped to.</p>
| <p>+1 for UrlRewritingNet.UrlRewrite too but why do I always need to end my URL with .aspx? I think it should be improved better regular expression partern.</p>
<p>Why do I always have to end with aspx in virtualURL localhost/Products/Beverages.aspx", "localhost/Products/Condiments.aspx". I just want to type localhost... | 3,548 |
<p>I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what...</p>
<pre><code>>>> import re
>>> mystring = r"This is \n a test \r"
>>> p = re.compile( "\... | <p>Isn't that what Anders' second example does?</p>
<p>In 2.5 there's also a <code>string-escape</code> encoding you can apply:</p>
<pre><code>>>> mystring = r"This is \n a test \r"
>>> mystring.decode('string-escape')
'This is \n a test \r'
>>> print mystring.decode('string-escape')
This i... | <p>You are being tricked by Python's representation of the result string. The Python expression:</p>
<pre><code>'This is \\n a test \\r'
</code></pre>
<p>represents the string</p>
<pre><code>This is \n a test \r
</code></pre>
<p>which is I think what you wanted. Try adding 'print' in front of each of your p.sub() c... | 3,474 |
<p>There are multiple Ruby implementations in the works right now. Which are you looking forward to and why? Do you actively use a non-MRI implementation in production?</p>
<p>Some of the options include:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Ruby_MRI" rel="nofollow noreferrer">Ruby MRI (original 1.8 branc... | <p><a href="http://ruby.gemstone.com/" rel="noreferrer">Maglev</a>. It will have the speed benefit of all the optimization that has gone into a major Smalltalk VM over many, many year. Plus it will automatically persist all your data pretty much automatically so there is no more need to monkey around with Object-Relati... | <p>What about Enterprise Ruby? This has been out there for a while.</p>
<p><a href="https://www.phusionpassenger.com/enterprise" rel="nofollow">https://www.phusionpassenger.com/enterprise</a></p>
| 9,582 |
<p>This is about when a .NET remoting exception is thrown. If you take a look at MSDN, it will mention that a remoting exception is thrown when something goes wrong with remoting. If my server is not running, I get a socket exception which is fine.</p>
<p>What I am trying to figure out is: does getting a remoting excep... | <p>Getting a remoting exception does not guarantee that your server is up and running. If something else happens to be running and listening on that port, the connection will succeed, and you will not get a socket exception. What happens in this case depends on how the application which actually got your connection b... | <p>Try assuring that you send the correct message and the messages received by the server are also correct, e.g. using assertions (it is called Design by Contract).
If you have such possibility, try debugging the server side and client side at the same time. (running two VS instances at the same time)</p>
| 9,951 |
<p>I am wondering - of course if the 3D printer's bed big enough - printing multiple copies of the same print could save me significant amount of time in a small production line, excluding minor wastage such as setup time, post-processing time, etc.</p>
<p><a href="https://i.stack.imgur.com/aQ1Zt.png" rel="noreferrer"... | <p>Actually no. It will take slightly more for each addition. You also then have the point of failure, where one gets knocked off and ruins all the prints.</p>
<p>The fastest way to print multiple objects is one at a time. In fact slic3r lets you do just that with their <a href="http://manual.slic3r.org/advanced/sequen... | <p>Actually the answer is yes and no. So I had to print 12 of the same small objects for a science experiment. Just some rocks I made from domes with some displaced faces, anyway my printers minimum wall width is 0.5 mm. The objects were 2 cm³. The first print failed because of them being disconnected but then I connec... | 534 |
<p>Yesterday, I was reading 3dprinting.meta and read a suggestion that (which I rephrase as) we should ask questions for the purpose of bringing answers inside our tent.</p>
<p>I spent some time thinking about questions I have been asked by friends who purchased FDM machines and were starting to undertake their own de... | <p><strong>TL;DR</strong> The <em>answer</em> that this question was looking for can be covered in 4 or 5 basic points, without much ambiguity. The question is therefore not fundamentally <em>too broad</em>, but could maybe be made a bit more specific.</p>
<p>Too broad seems a bit of a mis-assessment, but I think it's... | <p>The "Have you googled this" comment was a little like the comments that we used to see, and which, of late, we fortunately haven't seen much of (please see <a href="https://3dprinting.meta.stackexchange.com/questions/134/post-closing-issues/263#263">my answer</a> to <a href="https://3dprinting.meta.stackexchange.com... | 56 |
<p>ABS is a very strong material, but it also has some downsides. One of them, which is the necessity of having a printer with enclosure, completely discouraged me from using it, as it would be a waste of money. This is quite sad, because I cannot make prints that will be able to withstand a large load of tension witho... | <p>There is no requirement for an enclosure when printing ABS. Like many things in FDM, there are improvements to be made, but there is a scale of what is possible.</p>
<p>A heated bed is much more necessary (for similar reasons, the thermal expansion is significant and without a heated bed you have very high risk of ... | <p>I print ABS in my basement in an unenclosed Prusa3D i3m3s, just as I print other filaments. Perhaps an enclosure would be helpful, but I don't have problems as it is. Your experience may vary.</p>
<p>Before that I printed ABS on a large home-brew delta machine. No problems related to lack of enclosure.</p>
<p>B... | 1,378 |
<p>I've found how to sort query results by a given field in a Lucene.Net index instead of by score; all it takes is a field that is indexed but not tokenized. However, what I haven't been able to figure out is how to sort that field while ignoring stop words such as "a" and "the", so that the following book titles, for... | <p>I wrap the results returned by Lucene into my own collection of custom objects. Then I can populate it with extra info/context information (and use things like the highlighter class to pull out a snippet of the matches), plus add paging. If you took a similar route you could create a "result" class/object, add somet... | <p>When you create your index, create a field that only contains the words you wish to sort on, then when retrieving, sort on that field but display the full title.</p>
| 9,173 |
<p>I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs).</p>
<p>The control is implemented in two different user controls. In one control, RaisePostBackEvent is fired on the server-side when <code>__doPostBack</code> is invoked. In the other c... | <p>There's a lot of ways this can fall apart. Are you adding the control to the page dynamically in code behind? If so alot of times your UniqueID can be off - even though the client id's are equal. Do you have a code sample that might demonstrate what you're doing?</p>
| <p>Double check that it is indeed a derivation of the UserControl class, not the WebControl one.<br>
This one has had me by surprise many times. If you need to use WebControl for the styling, you need to let your control implement INamingContainer. (Don't worry, its a marker interface)</p>
<p>So..</p>
<pre><code>publ... | 3,089 |
<p>In a project our team is using object lists to perform mass operations on sets of data that should all be processed in a similar way. In particular, different objects would ideally act the same, which would be very easily achieved with polymorphism. The problem I have with it is that inheritance implies the <em>is... | <p>I think you should be implementing interfaces to be able to enforce your <em>has a</em> relationships (am doing this in C#):</p>
<pre><code>public interface IDamageable
{
void AddDamage(int i);
int DamageCount {get;}
}
</code></pre>
<p>You could implement this in your objects:</p>
<pre><code>public class ... | <p>Sometimes it's worth giving up the ideal for the realistic. If it's going to cause a massive problem to "do it right" with no real benefit, then I would do it wrong. With that said, I often think it's worth taking the time to do it right, because unnecessary multiple inheritance increases complexity, and it <em>ca... | 3,296 |
<p>So I got the SKR mini E3 for my Ender 5 after hearing all the positive reviews.</p>
<p>When it arrives I plug everything in, make sure it's secure and test the axis... they all worked correctly.</p>
<p>I then tested auto home... everything worked.</p>
<p>I then tested the heating... everything worked again.</p>
<p>F... | <p>This issue is related to the way Creality has defined the origin of the printer. Usually, the origin of the printer is at the front left when facing the printer. Creality has chosen to set the origin in their default Creality configuration at the back right.</p>
<p>Vanilla Marlin (Ender 5 configuration) has the orig... | <p>So I found an answer on Reddit when I asked the same question: It actually had to do with the homing -- basically, it was starting at 220, 220 instead of 0,0, which resulted in when the print started for it to head straight into the corner. In order to counter this, I had to change some of the firmware. Everything w... | 1,787 |
<p>Which databases does Adobe Flash support, if any?</p>
| <p>None.</p>
<p>Instead, you would need to create some middleware (say, a webservice) that you talked to that did the database CRUD for you.</p>
| <p><a href="https://stackoverflow.com/questions/38674/does-adobe-flash-support-databases#38675">@SCdF</a> is correct. From <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14482&sliceId=2" rel="nofollow noreferrer">the horse's mouth</a>:</p>
<blockquote>
<p>A Macromedia Flash movie cannot
... | 5,962 |
<p>I have some design diagrams only on paper. Scanning them to bitmaps is easy, but I've had no luck getting useful vectors out of them. I've tried vectorizers in programs like gimp, and a few online services. Generally, I end up with enormous numbers of spurious vectors (from dust, dotted lines, text on the diagram, ... | <p>There is the capable but somewhat expensive <a href="http://www.scan2cad.com/" rel="nofollow" title="Scan2CAD">Scan2CAD</a>.</p>
<p>Otherwise, if you're happy with outlines and not centre lines, scan b&w, aggressively clean up macules, mask off text, and then vectorize in potrace, autotrace, etc. Alternatively,... | <p>I would recommend using something like <a href="http://www.getpaint.net/index.html" rel="nofollow noreferrer">Paint.NET</a> to "fix" the images before attempting to convert them to CAD.</p>
<p>To my knowledge, most of the Image-to-CAD applications are going to use the grayscale intensity of each pixel to get the Z-... | 221 |
<p>Is the Sql Server 2008 control available for download? Does it yet support the 2008 RDL schema?</p>
| <p>If you are talking about the ReportViewer control, it is <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&DisplayLang=en" rel="nofollow noreferrer">available</a>.</p>
<p>However you need Windows XP, Windows Vista or Windows Server 2003 to install it. It is a... | <p>The ReportViewer control should work just fine with SQL Server 2008.</p>
| 5,294 |
<p>I cannot get my extruder to work on my Creality Ender-4 printer. I have heated the nozzle but the extruder does not move.</p>
<p>I tested the motor and cable on another system and they work just fine.</p>
<p>Could it be the board or what could it be?</p>
| <p>Most filaments you can leave in the extruder indefinitely without any ill effects.</p>
<p>There are some filaments that need to be stored away from moisture, particularly Nylon, because they absorb moisture from the air and don't print well if they contain a lot of absorbed moisture. However, this isn't an inherent... | <p>If you "planing" to leave the filament there for months, then it would be a good idea to store it away, but for most filaments it is not a big deal to be stay loaded... provided that the humidity is not high (e.g. a shower or kitchen next to it would be not so good). </p>
<p>My experiences with "moistured" filament... | 929 |
<p>Some of the features I think it must include are:</p>
<ol>
<li>Print Entire Solution</li>
<li>Ability to print line numbers</li>
<li>Proper choice of coding font and size to improve readability</li>
<li>Nice Header Information</li>
<li>Ability to print regions collapsed</li>
</ol>
<p>Couple feature additions:</p>
... | <p>I use <a href="http://submain.com/?nav=products.pcp.net" rel="nofollow noreferrer">PrettyCode.Print for .NET</a>. It does everything on your list, and more. (I use it for printing code excerpts for copyright registration paperwork, which is similar to your escrow case.)</p>
<p>It is a little slow to open a really b... | <p>Couple feature additions:</p>
<ul>
<li>Automatically insert page breaks after methods/classes </li>
<li>Keep long lines readable (nearly all current implementations are broken)</li>
</ul>
| 7,509 |
<p>I'm using ant to generate javadocs, but get this exception over and over - why?</p>
<p>I'm using JDK version <strong>1.6.0_06</strong>.</p>
<pre><code>[javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc
[javadoc] at com.sun.tools.java... | <p>It looks like this has been reported as a <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442982" rel="noreferrer">Java bug</a>. It appears to be caused by using annotations from a 3rd party library (like JUnit) and not including the jar with that annotation in the javadoc invocation. </p>
<p>If that... | <p>I got this problem too. I can compile properly without any errors or warnings. But when I generating javadoc , I got below error.</p>
<blockquote>
<p><strong><em>[javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc</em></strong></p>
</block... | 6,663 |
<p>I find that getting Unicode support in my cross-platform apps a real pain in the butt.</p>
<p>I need strings that can go from C code, to a database, to a Java application and into a Perl module. Each of these use a different Unicode encodings (UTF8, UTF16) or some other code page. The biggest thing that I need is... | <p>Have a look at this: <a href="http://www.icu-project.org/" rel="nofollow noreferrer" title="International Components for Unicode">http://www.icu-project.org/</a></p>
| <p>How are you doing the cross-platform calls? Is it all called from Java? </p>
<p><a href="http://java.sun.com/docs/books/tutorial/i18n/text/string.html" rel="nofollow noreferrer">http://java.sun.com/docs/books/tutorial/i18n/text/string.html</a> might be useful.</p>
<p>I'm a bit confused about exactly what you are t... | 5,996 |
<p>I'm really interested in speech-to-text algorithms, but I'm not sure where to start studying up on them. A bunch of searching around led me to <a href="http://cslu.cse.ogi.edu/HLTsurvey/download.html" rel="noreferrer">this</a>, but it's from 1996 and I'm fairly certain that there have been improvements since then.</... | <p>This is a HUGE questions, I wouldn't know how to begin... So let me just try giving you the right "terms" so you can refine your quest:</p>
<p>First, understand that Speech Recognition is a diverse and complicated subject, and it has many different applications. People tend to map this domain to the first thing tha... | <p>What platform are you targeting ?. There is <a href="http://www.microsoft.com/speech/speech2007/default.mspx" rel="nofollow noreferrer">Microsoft Speech APIs</a> that you can use if its for windows. </p>
| 3,561 |
<p>I work for a software vendor whose market is developer tools and we have been looking for a QA person for our products. </p>
<p>Since we are a small shop the position will be a combination of Support and QA however since we make developer tools, our support consists in large part of actual development (in that the ... | <p>Money and responsibility.</p>
<p>The reason I shy away from these types of jobs is they dont tend to hold my interest long enough. Having real development tasks should keep you out of that category. The other problem is the salary is usually significantly lower with that in the title.</p>
| <p>I think you have a toughie here:</p>
<ul>
<li>The cost of a full time developer for doing the job you require would be too high.</li>
<li>Most dev's (including myself) would get incredibly fed up, very quickly. Most dev's passion is coding, they want to do it as much as possible. Where TBH, from what you have said,... | 8,192 |
<p>For our application, we keep large amounts of data indexed by three integer columns (source, type and time). Loading significant chunks of that data can take some time and we have implemented various measures to reduce the amount of data that has to be searched and loaded for larger queries, such as storing larger g... | <blockquote>
<p>This made me wonder if the performance impact of disk I/O is actually much heavier than I thought.</p>
</blockquote>
<p>Definitely. If you have to go to disk, the performance hit is many orders of magnitude greater than memory. This reminds me of the classic Jim Gray paper, <a href="http://research.m... | <p>I made a similar discovery when working within Python on a database: the cost of accessing a disk is very, very high. It turned out to be much faster (ie nearly two orders of magnitude) to request a whole chunk of data and iterate through it in python than it was to create seven queries that were narrower. (One pe... | 4,561 |
<p>We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask :/), and I was wondering if there's a good way of testing the validity of the system.</p>
<p>The only way I see so far is simply constructing a huge table w... | <p>The verification of "logical" systems in the IC design arena is known as "Design Verification", which is the process of ensuring that the system you design in hardware (RTL) implements the desired functionality. </p>
<p>Ladder logic can be transformed to one of the modern HDL's like Verilog..
transform each ladder... | <p>There is a program called LogixPro which has an IO simulator for ladder logic, you can try that.</p>
| 9,642 |
<p>Does anyone have examples of how to use <a href="http://www.oracle-base.com/articles/8i/DBMS_APPLICATION_INFO.php" rel="nofollow noreferrer">DBMS_APPLICATION_INFO</a> package with JBOSS? </p>
<p>We have a various applications which run within JBOSS and share db pools. I would like, at the start of each session thes... | <p>yes, you can write a wrapper class around your connection pool, and a wraper around the connection
so lets say you have:</p>
<pre>
OracleConnection conn=connectionPool.getConnection("java:scott@mydb");
</pre>
<p>Change it to:</p>
<pre>
public class LoggingConnectionPool extends ConnectionPool{
public OracleCo... | <p>In your <em>-ds.xml</em>, you can set a connection property called <strong>v$session.program</strong> and the value of that property will populate the <strong>PROGRAM</strong> column of each session in the <strong>V$SESSION</strong> view created for connections originating from your connection pool. I usually set it... | 7,680 |
<p>In my application I have a DataGridView control that displays data for the selected object. When I select a different object (in a combobox above), I need to update the grid. Unfortunately different objects have completely different data, even different columns, so I need to clear all the existing data and columns, ... | <p>Rather than adding the rows of the data grid one at a time, use the <code>DataGridView.Rows.AddRange</code> method to add all the rows at once. That should only update the display once. There's also a <code>DataGridView.Columns.AddRange</code> to do the same for the columns.</p>
| <p>You may also try this, its work.</p>
<pre><code>public static void DoubleBuffered(Control formControl, bool setting)
{
Type conType = formControl.GetType();
PropertyInfo pi = conType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
pi.SetValue(formControl, setting, null);
}... | 8,943 |
<p>I am building a <a href="https://andypi.co.uk/2017/09/17/dolly-build-notes-prusa-i3-mk2-clone-3d-printer/" rel="nofollow noreferrer">dolly</a> and I am confused as to which proximity sensor to use. </p>
<p>Should I go for M8 or M12 and 5 V or 6-36 V? </p>
<p>What should be the best detecting distance? Sh... | <p>Tomas Sanladerer has produced a nice video on this topic: <a href="https://www.youtube.com/watch?v=il9bNWn66BY" rel="nofollow noreferrer">https://www.youtube.com/watch?v=il9bNWn66BY</a></p>
<p>@ 7:31 you see an overview of the precision of various sensors, including the ones you mention. It appears that the M12-4 a... | <p>As always cost will be a factor. I found the M4 sensors to be be just not good enough, they have to be too close, and eventually it's going to catch on your print and damage sensor mounting and/or the hot-end assembly.</p>
<p>The 8mm range sensors seem like a good distance, but you'll need to decide between a wide... | 851 |
<p>I have been playing with this for a while, but the closest I have gotten is a button that opens the <code>Paste Special</code> dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted text. </p>
<p>So often I am doing a <code>copy-paste</code> from a web site into... | <p>Make the button call the macro:</p>
<pre><code>public sub PasteSpecialUnformatted()
selection.pastespecial datatype:=wdpastetext
end sub
</code></pre>
| <p>I use <a href="http://www.getfingertips.com/" rel="nofollow noreferrer">FingerTips</a> for this. By default it will make CTRL+W -> Paste Special. Furthermore it supports macro text and a lot of useful start-programs-quick things and some Microsoft Outlook tricks to support Getting Things Done.</p>
| 9,989 |
<p>When working on ASP.NET 1.1 projects I always used the Global.asax to catch all errors. I'm looking for a similar way to catch all exceptions in a Windows Forms user control, which ends up being a hosted IE control. What is the proper way to go about doing something like this?</p>
| <p>You need to handle the <code>System.Windows.Forms.Application.ThreadException</code> event for Windows Forms. This article really helped me: <a href="http://bytes.com/forum/thread236199.html" rel="noreferrer">http://bytes.com/forum/thread236199.html</a>.</p>
| <p>Code from MSDN: <a href="http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2</a></p>
<pre><code>Sub ... | 2,488 |
<p>I have designed this in Blender:</p>
<p><a href="https://i.stack.imgur.com/ucC7j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ucC7j.png" alt="Screenshot"></a></p>
<p>The bottom is a regular n-gon with 0.8mm in height. In Slic3r, I see that the bottom-most layer is not solid:</p>
<p><a href="... | <p>I printed the thing for some layers to see what the printer actually does:
<a href="https://i.stack.imgur.com/mwBgB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mwBgB.jpg" alt="Inner ring"></a></p>
<p>There are clearly too many retractions and unretractions.</p>
<p>This can be seen in advance... | <p>Blender is not a preferred program to model solids, it is great though for many other visualizations. Apparently, the green parts are not solid models in your original Blender design, they are most probably surfaces, when you create an STL, the model is not solid, it contains surfaces. All this causes problems for y... | 1,111 |
<p>I've been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the <kbd>TAB</kbd> in buffers with the major mode <code>text-mode</code>. I've added the following to my <code>.emacs</code>:</p>
<pre><code>(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
;;; And I hav... | <h2>Short answer:</h2>
<p>The key point is to tell emacs to insert whatever you want when indenting, this is done by changing the indent-line-function. It is easier to change it to insert a tab and then change tabs into 4 spaces than change it to insert 4 spaces. The following configuration will solve your problem:</p... | <p>Have you tried</p>
<pre><code>(setq tab-width 4)
</code></pre>
| 9,538 |
<p>I bought an Ender 3 V2 printer and printed successfully with PLA and PLA+. Ender 3 V2 is rated at <= 250 °C but when I set temperature above 200 °C to print to PLA+, I get an error message "Nozzle is too lowperature" and the printer freezes (the term lowperature is actual and not a typo error).</p>
<p>I... | <p>This sounds like a bad thermistor. Try replacing the head thermistor, see if this fixes it.</p>
<p>As for the strange error message, it looks like the word Temperature is being drawn on the wrong line, and then "is too low" writes over it.</p>
<p>See the way the word lines up below:</p>
<pre><code>nozzle t... | <p>The problem was solved after the supplier replaced the motherboard.
However after that I had to try various versions of firmware as different ones had different behavior to the printer.
If you face a similar situation be aware of the cabling and connections when changing the motherboard. You may have to do the plugi... | 2,035 |
<p>I have a number of users with multi-megabyte files that need to be processed before they can be uploaded. I am trying to find a way to do this without having to install any executable software on their machines. </p>
<p>If every machine shipped with, say, Python it would be easy. I could have a Python script do eve... | <p>Would Google Gears work here? Yes, users have to install something, but I think the experience is fairly frictionless. And once it's installed, no more worries.</p>
| <p>The application that I maintain and develop for work is an <a href="http://msdn.microsoft.com/en-us/library/ms536471.aspx" rel="nofollow noreferrer">HTML Application</a> or <a href="http://msdn.microsoft.com/en-us/library/ms536471.aspx" rel="nofollow noreferrer">HTA</a>, linked with a SQL Server 2005 backend. This a... | 6,245 |
<p>I am designing a new System and I have a lot of Interfaces that will grow over time with the system. What is the best practice to name this interfaces</p>
<pre><code>ISomethingV01
ISomethingV02
etc
</code></pre>
<p>and I do this</p>
<pre><code>public interface ISomething{
void method();
}
</code></pre>
<p>... | <p>Ideally, you shouldn't be changing your interfaces very often (if at all). If you do need to change an interface, you should reconsider its purpose and see if the original name still applies to it.</p>
<p>If you still feel that the interfaces will change, and the interfaces changes are small (adding items) and yo... | <p>The purpose of an interface is to define an abstract pattern that at type must implement.</p>
<p>It would be better implement as:</p>
<pre><code>public interface ISomething
public class Something1 : ISomething
public class Something2 : ISomething
</code></pre>
<p>You do not gain anything in the form of code reus... | 6,692 |
<p>What would you recommend for OS X development of a graphical application like those possible in WPF?</p>
<p>My specific background is in Smalltalk & Java, but I currently work mostly in DHTML/.NET (ASP.NET/C#).</p>
| <p>Cocoa. Considered by many to be the best application framework ever. The language is Objective-C, SmallTalk-like language that inspired the creators of Java.</p>
<p>Really, there is no reasonable alternative to Cocoa for OS X development, unless you have specific needs like wanting to be cross-platform.</p>
| <p>To put it a different way than previous posters: if you are not designing your interface in InterfaceBuilder and manipulating it with Objective-C, then you are going to end up with an application that does not look, feel, act, or work the way a Macintosh application should, and it will stick out like a sore thumb to... | 3,982 |
<p>I need to be able to retrieve a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I'm using C#). Obviously you can do this with Enterprise Manager but I would like to automate it. </p>
<p>I've been playing around with SQLDMO which offers a Backup command, but I'm no... | <p>Take a look at <a href="http://www.stackoverflow.com/questions/21547/in-mssql-how-do-i-generate-a-create-table-statement-for-a-given-table">my solution</a>. It's a sql script which uses the INFORMATION_SCHEMA tables to get the necessary information. It's basic, but might work for you.</p>
| <p>You can use SMO to generate the scripts. For more info see: <a href="http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated" rel="nofollow noreferrer">http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated</a></p>
| 7,144 |
<p>Most people, articles, videos, etc. refer to printing speed by linear speed (mm/s), but a lot of YouTubers prefer to talk about volumetric flow (mm<sup>3</sup>/s) (mm cubed per second). I suspect that at some point in the past year or three, some of the more engineer-y types switched to this new measurement standar... | <p>Linear print speed is widely written in marketing material and in filament manufacturers' official print setting recommendations, and is the value talked about by naive users, including a number of popular YouTube personalities. <strong>However, in most contexts it's at best the wrong number, and more often, meaingl... | <p>Flow rate adds a dimension to the regularly used printing speed. Note that maximum volumetric flow is determined by the hotend (unless your extruder is under dimensioned or highly geared) as it cannot supply more molten filament than it can melt in a certain time.</p>
<p>So, instead of specifying the print speed, yo... | 2,070 |
<p>I need to replace the lid of my water kettle and am searching for a filament, that is suitable for this purpose. The requirements are:</p>
<ol>
<li>Stable at 100°C (212°F)</li>
<li>Resistant to steam/moisture</li>
<li>Food-safe</li>
</ol>
<p>Has anyone experimented with this or similar purposes?</p>
| <p>Referring to the table provided in 0scar's answer, the key challenge with high temperature materials is the gap between the glass transition temperature (bed temperature) and the extruder temperature.</p>
<p>Polycarbonate for example is listed as usable up to 121°C, printing on a bed at 80-120°C, but requiring an e... | <p>There are few materials that go up to that temperature and beyond.</p>
<p>A very nice generic overview is given by <a href="https://www.simplify3d.com/support/materials-guide/properties-table/" rel="nofollow noreferrer">Simplify3d</a>:</p>
<p><em>This figure shows an overview of many of the used materials in 3D pr... | 976 |
<p>In the case of languages that support single decision and action without brackets, such as the following example:</p>
<pre><code>if (var == true)
doSomething();
</code></pre>
<p>What is the preferred way of writing this? Should brackets always be used, or should their usage be left as a preference of the indiv... | <p>There isn't really a right answer. This is what coding standards within the company are for. If you can keep it consistent across the whole company then it will be easy to read. I personally like</p>
<pre><code>if ( a == b) {
doSomething();
}
else {
doSomething();
}
</code></pre>
<p>but this is a hol... | <p>Our boss makes us put { } after a decision statement no matter what, even if it's a single statement. It's really annoying to add two extra lines. The only exception is ternary operators.</p>
<p>I guess it's a good thing I have my code monitor in portrait orientation at 1200x1600.</p>
| 3,228 |
<p>If possible one that supports at least spell checking:</p>
<ul>
<li>C# string literals</li>
<li>HTML content</li>
<li>Comments</li>
</ul>
| <p>The <a href="http://blogs.msdn.com/webdevtools/archive/2008/11/29/spell-checker-update-2-2-full-support-for-vs-2008-sp1-simpler-setup-and-a-few-bug-fixes.aspx" rel="nofollow noreferrer">plugin from Microsoft's Mikhail Arkhipov</a> does HTML and Comments, I don't believe it does C# strings, though. I use the <a href... | <p>I was running an obsolete version on Visual Studio 08, as of April last year this is the apparent update: <a href="http://visualstudiogallery.msdn.microsoft.com/2f3d691d-8838-4d84-ad64-44a02db37e30/" rel="nofollow">http://visualstudiogallery.msdn.microsoft.com/2f3d691d-8838-4d84-ad64-44a02db37e30/</a></p>
<p>Unfort... | 5,080 |
<p>I'm having issues getting PETG to print nicely. I have encountered pretty much every issue because when I fix one thing another issue pops up. I see people saying that you should "just copy your PLA settings", but that <em>definitely</em> did not work for me, with issues from bed adhesion, stringing, globb... | <p>Five top layers should normally be more than enough to create a seamless top layer.</p>
<p>Indeed, PETG prints a little differently than PLA. It requires a higher hot end temperature, less part cooling (to improve sticking to previous layers), a higher build plate temperature and usually care in choosing the right ... | <p>I have been having the same issue with PETG when printing but I have found that if I slow the printer down to 50% speed that left me with a perfect top layer. I have a 20% infill with 4 top layers and at 50% speed I am printing at roughly 32mm/m. I am sure that will help give you better top layers.</p>
| 1,120 |
<p>I broke one of the blades of the fan and that's making the x-box vibrate. Other than that it works fine and I can still print at a very low flow rate and a lot of noise. Will replacing the blades, not the whole fan work?</p>
<p>Found this and how to replace on thingyverse:</p>
<p><a href="https://www.thingiverse.c... | <p>It will work, but likely with reduced performances: designing blades is not an easy task and the ones you can print will not be as good as the ones designed for that specific fan.</p>
<p>Overall, do it for fun before you replace the fan anyway.</p>
<p>IF your fan has symmetrical blades (unlikely), another option i... | <p>If you want to <strong>play</strong> then print new blades; if you want to <strong>print</strong> then swap the fan - but pay attention to: Voltage, current draw, rpm, fan thickness, etc. </p>
<p>Note: most fans are built to be disposable/replaceable. They are never built to be repaired, and as yet, nobody has succ... | 1,682 |
<p>I'm curious about keeping source code around reliably and securely for several years. From my research/experience:</p>
<ol>
<li><p>Optical media, such as burned DVD-R's lose bits of data over time. After a couple years, I don't get all the files off that I put on them. Read errors, etc.</p></li>
<li><p>Hard drives ... | <p>The best answer is "in multiple places". If I were concerned about keeping my source code for as long as possible I would do: </p>
<p>1) Backup to some optical media on a regular basis, say burn it to DVD once a month and archive it offsite. </p>
<p>2) Back it up to multiple hard drives on my local machines </p>
... | <p>One way would be to periodically recycle your storage media, i.e. read data off the decaying medium and write it to a fresh one. There exist programs to assist you with this, e.g. <a href="http://www.dvdisaster.com/" rel="nofollow noreferrer">dvdisaster</a>. In the end, nothing lasts forever. Just pick the least ann... | 9,945 |
<p>Suppose the following:</p>
<pre><code>>>> s = set([1, 2, 3])
</code></pre>
<p>How do I get a value (any value) out of <code>s</code> without doing <code>s.pop()</code>? I want to leave the item in the set until I am sure I can remove it - something I can only be sure of after an asynchronous call to anoth... | <p>Two options that don't require copying the whole set:</p>
<pre><code>for e in s:
break
# e is now an element from s
</code></pre>
<p>Or...</p>
<pre><code>e = next(iter(s))
</code></pre>
<p>But in general, sets don't support indexing or slicing.</p>
| <p>Another option is to use a dictionary with values you don't care about. E.g.,</p>
<pre><code>
poor_man_set = {}
poor_man_set[1] = None
poor_man_set[2] = None
poor_man_set[3] = None
...
</code></pre>
<p>You can treat the keys as a set except that they're just an array:</p>
<pre><code>
keys = poor_man_set.keys()
p... | 8,455 |
<p>I am getting the following error:</p>
<blockquote>
<p>Access denied for user 'apache'@'localhost' (using password: NO)</p>
</blockquote>
<p>When using the following code:</p>
<pre><code><?php
include("../includes/connect.php");
$query = "SELECT * from story";
$result = mysql_query($query) or die(mysql_err... | <blockquote>
<p>And if it matters at all, apache@localhost is not the name of the user account that I use to get into the database. I don't have any user accounts with the name apache in them at all for that matter.</p>
</blockquote>
<p>If it is saying 'apache@localhost' the username is not getting passed correctly ... | <p>Just to check, if you use <strong>just</strong> this part you get an error?</p>
<pre><code><?php
include("../includes/connect.php");
$query = "SELECT * from story";
$result = mysql_query($query) or die(mysql_error());
</code></pre>
<p>If so, do you still get an error if you copy and paste one of those Inserts ... | 2,505 |
<p>Can any one help me out that how to start a cycle by just using a push button.</p>
<p>Note: Using Marlin firmware, Arduino Mega, Ramps 1.4</p>
<p>I haven't tried altering the Marlin code (as I am new to coding), I was just thinking of adopting this feature as it will be very easy for CNC DIY maker using Marlin cod... | <p>I ended up using Saman brand water-based wood stain, also from Rona hardware (a brand of Lowe's Canada). The selection of colours for Saman stains was greater than the Varathane stains. </p>
<p>I applied a single coat of colour #117 "Chamois" to the stem portion of the wand, and two coats of colour #120 "Dark Walnu... | <p>Wood stains (as opposed to dyes, paints, etc.) work by having large particles that become lodged in the grain of the wood, yielding a result that varies in intensity with the grain of the wood and thereby brings out its beauty. It's unlikely that they will do what you want, or anything reasonable, on PLA that has wo... | 1,310 |
<p>It's my first time printing in vase mode, and I noticed my printer underextruding badly. The settings have not been changed from default vase mode settings in slicer, and earlier I was printing non-vase mode and the prints came out fine. Layer height is 0.2 mm and perimeter width is 0.3 mm. </p>
<p><a hre... | <p>Finding the cause of under-extrusion is very hard as a lot of parameters of the print process can influence this. There are some nice websites that describe these problems in detail. From your question it is unclear what you have done to solve the problem, or if you have printed products after the vase mode and show... | <p>Finding the cause of under-extrusion is very hard as a lot of parameters of the print process can influence this. There are some nice websites that describe these problems in detail. From your question it is unclear what you have done to solve the problem, or if you have printed products after the vase mode and show... | 858 |
<p>In all the Git tutorials I've read they say that you can do:</p>
<pre><code>git init
git add .
git commit
</code></pre>
<p>When I do that I get a big text file opened up. None of the tutorials seem to address this, so I don't know what to do with the file or what to put in it if anything.</p>
| <p>You're meant to put the commit message in this text file, then save and quit.</p>
<p>You can change the default text editor that git uses with this command:</p>
<pre><code>git config --global core.editor "nano"
</code></pre>
<p>You have to change nano to whatever command would normally open your text editor.</p>
| <p>The following is probably the easiest way to commit all changes:</p>
<pre><code>git commit -a -m "Type your commit message here..."
</code></pre>
<p>Of course there are much more detailed ways of committing, but that should get you started.</p>
| 8,514 |
<p>I was reading <em><a href="https://rads.stackoverflow.com/amzn/click/com/1430209879" rel="noreferrer" rel="nofollow noreferrer">More Joel on Software</a></em> when I came across <a href="http://en.wikipedia.org/wiki/Joel_Spolsky" rel="noreferrer">Joel Spolsky</a> saying something about a particular type of programme... | <p><strong>In Java,</strong> the 'int' type is a primitive, whereas the 'Integer' type is an object.</p>
<p><strong>In C#,</strong> the 'int' type is the same as <code>System.Int32</code> and is <a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/value-types" rel="noreferrer">a value t... | <p>In java as per my knowledge if you learner then, when you write int a; then in java generic it will compile code like <code>Integer a = new Integer()</code>.
So,as per generics <code>Integer</code> is not used but <code>int</code> is used.
so there is so such difference there.</p>
| 2,298 |
<p>I'm using Eclipse 3.4 (Ganymede) with CDT 5 on Windows.</p>
<p>When the integrated spell checker doesn't know some word, it proposes (among others) the option to add the word to a user dictionary.</p>
<p>If the user dictionary doesn't exist yet, the spell checker offers then to help configuring it and shows the "G... | <p>The CDT version of Ganymede apparently shipped improperly configured. After playing around for a while, I have come up with the following steps that fix the problem.</p>
<ol>
<li>Export your Eclipse preferences (File > Export > General > Preferences).</li>
<li>Open the exported file in a text editor.</li>
<li><p>F... | <p>Just a word of warning: If you follow the advice to replace the preference as above, it will affect spell checking if you also use Java. I think all I needed to do was change the "Select spelling engine to use" to the C++ engine (near the top of the preference setting on the preference page General->Editors->Text Ed... | 7,081 |
<p>In Javascript:
How does one find the coordinates (x, y, height, width) of every link in a webpage?</p>
| <p>Using jQuery, it's as simple as:</p>
<pre><code>$("a").each(function() {
var link = $(this);
var top = link.offset().top;
var left = link.offset().left;
var width = link.offset.width();
var height = link.offset.height();
});
</code></pre>
| <p>With jQuery:</p>
<pre><code>$j('a').each( findOffset );
function findOffset()
{
alert
( 'x=' + $j(this).offset().left
+ ' y=' + $j(this).offset().top
+ ' width=' + $j(this).width()
+ ' height=' + $j(this).height()
);
}
</code></pre>
| 9,314 |
<p>When running a vim instance in gnu screen hitting shift enter in insert mode adds an 'M' and then a newline, rather than just a newline.</p>
<p>Does anybody know what the problem might be, or where to look?</p>
<p>Relevant system info:</p>
<blockquote>
<p>Ubuntu 8.04.1</p>
<p>Screen version 4.00.03 (FAU) 2... | <p>Missing info from your question:</p>
<ol>
<li>Where do you run screen and see this issue? Some terminal app (KTerminal, Gnome terminal, virtual console etc) or remote session (eg putty, ssh from another computer)</li>
<li>do a “echo $TERM” and tell us its output</li>
<li>do a “cat -v”, press Shift-Enter, then Enter... | <p>First, you could fix your $TERM for within konsole. Install "ncurses-term" and configure konsole to set $TERM=konsole-256color. Then configure screen with "term screen-256color". Or 'konsole' and 'screen', respectively, if that's your preference. Konsole and screen are <em>not</em> xterm and doesn't support ever... | 8,884 |
<p>Ok, so I've been refactoring my code in my little Rails app in an effort to remove duplication, and in general make my life easier (as I like an easy life). Part of this refactoring, has been to move code that's common to two of my models to a module that I can include where I need it.</p>
<p>So far, so good. Look... | <p>You can use this:</p>
<pre><code>super if defined?(super)
</code></pre>
<p>Here is an example:</p>
<pre><code>class A
end
class B < A
def t
super if defined?(super)
puts "Hi from B"
end
end
B.new.t
</code></pre>
| <p>Rather than checking if the super method exists, you can just define it</p>
<pre><code>class ActiveRecord::Base
def after_initialize
end
end
</code></pre>
<p>This works in my testing, and shouldn't break any of your existing code, because all your other classes which define it will just be silently overrid... | 3,196 |
<p>I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors ... | <p>The way the FogBugz screenshot setup tool does this is that it appends a 256 byte block at the end of the setup program at the moment it is downloaded. In other words, the download script spits out all the bytes from setup.exe and then an extra 256 with the url for the FogBugz server, plus any padding.</p>
<p>Wind... | <p>If it helps RegexBuddy does this also.</p>
| 5,634 |
<p>I am trying to print a fairly simple object yet I keep getting the same issue.</p>
<p>As you can see in the picture the print quality is bad with all the blobs on the vertical part of the print.</p>
<p>I have leveled the bed many times and I keep getting this issue. I have also calibrated the E-steps. I have replace... | <ol>
<li><p>Print the same file, with the same settings, on both machines.</p>
</li>
<li><p>If the problem persists, try swapping the filament between the two printers. If the problem now occurs on the other printer, that suggests that the filament is the issue. Label the bad one "For lumpy prints" and put it... | <p>Maybe it's only about the slicer settings, it's over extruding problem. I recommend lowering the extrusion multiplier.</p>
| 1,898 |
<p>We need to optimize the text rendering for a C# <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="noreferrer">Windows Forms</a> application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family ... | <p>A Microsoft developer has posted a <a href="http://blogs.msdn.com/cjacks/archive/2006/05/19/602021.aspx" rel="noreferrer">GDI vs. GDI+ Text Rendering Performance</a> article on his blog which answers the raw speed question: on his system, GDI DrawText was about 6 times faster than GDI+ DrawString.</p>
<p>If you nee... | <p>From recent experience, fastest text output is achieved via <code>ExtTextOut</code> with <code>ETO_GLYPH_INDEX</code> flag. This comes at a price, and it’s that you aren’t printing characters anymore, but font glyphs directly. This means that you need to translate your regular character strings to glyph indexes stri... | 9,686 |
<p>When using a <code>Zend_Form</code>, the only way to validate that an input is not left blank is to do</p>
<pre><code>$element->setRequired(true);
</code></pre>
<p>If this is not set and the element is blank, it appears to me that validation is not run on the element.</p>
<p>If I do use <code>setRequired()</co... | <p>I did it this way (ZF 1.5):</p>
<pre><code>$name = new Zend_Form_Element_Text('name');
$name->setLabel('Full Name: ')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator($MyNotEmpty);
</code></pre>
<p>so, the addValidator() is the interesting par... | <p>As far as I can see <a href="http://framework.zend.com/manual/en/zend.form.forms.html#zend.form.forms.validation.errors/" rel="nofollow noreferrer">Changing the error message</a> has no way of changing the message of a specific error. Plus the manual makes it look like like this is a function belonging to Zend_Form,... | 5,521 |
<p>My little site should be pooling list of items from a table using the active user's location as a filter. Think <a href="http://craigslist.org" rel="nofollow noreferrer">Craigslist</a>, where you search for "dvd' but the results are not from all the DB, they are filtered by a location you select. My question has 2 l... | <p>Getting a Zip Code database is no problem. You can try this free one:
<a href="http://zips.sourceforge.net/" rel="nofollow noreferrer">http://zips.sourceforge.net/</a></p>
<p>Although I don't know how current it is, or you can use one of many providers. We have an annual subscription to <a href="http://www.ZipCodeD... | <blockquote>
<p>how on earth do one [...] implement the function that given zip code 12345, gets all zipcodes in 1 mile distance?</p>
</blockquote>
<p>Here is a sample on how to do that:</p>
<p><a href="http://www.codeproject.com/KB/cs/zipcodeutil.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/zip... | 3,389 |
<p>I want to fabricate a sample holder and shadow masks to use in vacuum chambers. The type of printing material is not important to me PLA/ABS/PC-ABS/nylon).</p>
<p>I'm worried that 3d printed objects (FDM) would degas under high vacuum. Is that an actual concern?</p>
| <p>Almost all of the FDM materials outgas even at normal atmospheric pressure, and, in fact, most plastics outgas. Further, FDM and many other printing processes do not guarantee no internal voids - meaning that putting a 3D printed object into a vacuum may result in breakage, cracking, and possible explosion hazards.... | <p>At work, I put a 3d ABS part printed via 3d hubs (5*20*30), in the chamber at 1 mbar. No signs of breakage what so ever. No signs of sudden leaks.</p>
<p>Going anywhere below 1mbar, i.e., to 10^-infinity mbar, I think should theoretically still not cause any breakage or sudden leaks, as the expected mechanism of fa... | 108 |
<p>I recently burnt out one of the MOSFETS on my RAMPS 1.4 board on my Sintron Kossel clone so have upgraded it to a RAMPS 1.6.
Now my printer seems to only print 50 % of the intended size.</p>
<p>After the machine homes it only comes down about 50 % of the distance and so starts printing in mid air.</p>
<p>I thought i... | <p>Data from Firmware is not written into EEPROM on its own after updating your firmware. You need to send a <code>M502</code> to "seed" the firmware numbers as that is restoring the "default" settings in it. If you are unsure what is currently the EEPROM setting, use <code>M503</code> first.</p>
| <p>If you changed you stepper drivers here's a list to check:</p>
<ol>
<li>Microstepping Jumpers</li>
<li>In Marlin Configuration.h:</li>
</ol>
<ul>
<li><code>X_DRIVER_TYPE</code>, <code>Y_DRIVER_TYPE</code>, <code>Z_DRIVER_TYPE</code> and<br />
<code>E0_DRIVER_TYPE</code></li>
<li><code>DEFAULT_AXIS_STEPS_PER_UNIT</co... | 2,164 |
<p>I want to import an oracle dump into a different tablespace.</p>
<p>I have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command</p>
<blockquote>
<p>exp a/*** owner=a file=oracledump.DMP log=log.log compress=y</p>
</bl... | <p>You've got a couple of issues here.</p>
<p><strong>Firstly</strong>, the different versions of Oracle you're using is the reason for the table statistics error - I had the same issue when some of our Oracle 10g Databases got upgraded to Release 2, and some were still on Release 1 and I was swapping .DMP files betwe... | <p>---Create new tablespace:</p>
<p>CREATE TABLESPACE TABLESPACENAME DATAFILE
'D:\ORACL\ORADATA\XE\TABLESPACEFILENAME.DBF' SIZE 350M AUTOEXTEND ON NEXT 2500M MAXSIZE UNLIMITED
LOGGING
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON;</p>
<p>---and then import... | 8,730 |
<p>I am developing a web site and need to see how it will look at different resolutions. The catch is that it must work on our Intranet.</p>
<p>Is there a free solution?</p>
| <p>For Firefox, Web Developer Toolbar (<a href="https://addons.mozilla.org/en-US/firefox/addon/60" rel="noreferrer">https://addons.mozilla.org/en-US/firefox/addon/60</a>)</p>
| <p>Also on Internet Explorer 7 is <a href="http://www.ie7pro.com/" rel="nofollow noreferrer">IE7Pro</a>. It also provides some gadgets that aren't in the Developer Toolbar. I have both installed, and use both quite often.</p>
| 8,760 |
<p>I have a <a href="https://www.alunar.net/m508-self-assembly-3d-printer.html" rel="nofollow noreferrer">Alunar M508 machine</a> that I am trying to get new firmware on. The firmware that was loaded on the machine wasn't very good. The x axis was mirrored and the home point was way off. I was looking into Marlin to pu... | <p>The Alunar firmware you linked is a fork from the main Marlin firmware. If the bed Y direction is reversed, usually the stepper is incorrectly placed (mirrored) this is seen frequently for the Anet A8 printer which is very similar to your printer. In your case the X direction is wrong, this is usually related to the... | <p><em>disclaimer</em>: I am the maintainer of the firmware that <a href="https://github.com/camalot/alunar-prusa-i3-marlin-i3-firmware" rel="nofollow noreferrer">you linked</a>. </p>
<hr>
<p>The firmware will not improve your print quality. well, it may to some extent, but for the most part, it wont. </p>
<p>There ... | 690 |
<p>I know that <code>M73 P19</code> means "Set completion progress to 19%", and I suspect that <code>M73 R42</code> means "Set remaining time to 42 minutes", but what is <code>M73 Q17 S43</code>? I can't find description of such syntax.</p>
<p>The command is seen in <code>.gcode</code> files produced by PrusaSlicer.</... | <p>The <a href="https://reprap.org/wiki/G-code#M73:_Set.2FGet_build_percentage" rel="nofollow noreferrer"><code>M73</code> Set/Get build percentage G-code</a> is only defined for a selected few printer firmwares.</p>
<p>As you suspected, next to <code>M73 P19</code> (tell the firmware at what completage percentage the... | <p>The tooltip for "Supports remaining times" under <code>Printer Settings -> General -> Firmware</code>in PrusaSlicer quotes:</p>
<pre><code>Emit M73 P[percent printed] R[remaining time in minutes] at 1 minute intervals
into the G-code to let the firmware show accurate remaining time.
As of now only the Prusa i... | 1,509 |
<p>I just purchased this Ender 3 Pro about 1 week ago and since then I've been having nightmares with leveling/tramming the printer bed. From having to tram it again after every print to not being able to level it at all.
Since then I've been reading and watching a lot of problem-related content to try and find a solut... | <p>This is an old hotend type, it is called a <a href="https://www.google.com/search?q=j+head+nozzle" rel="noreferrer">J-Head</a> (see e.g. the <a href="https://reprap.org/wiki/J_Head_Nozzle#Mk_V" rel="noreferrer">J-Head Nozzle Mk V</a>, I'm unsure which exact version you have). The hotend is serviceable, you can buy s... | <p>Not exactly the type of answer you probably want, but this hotend does not look servicable. The nozzle is usually considered a consumable part unless it's made of something like tungsten carbide, or at least steel. The nozzle is almost surely long past its useful life unless the printer was barely used, and the enti... | 2,210 |
<p>I have a large database and would like to select table names that have a certain column name. I have done something like this in MySQL, but can't find any info on SQL Server.</p>
<p>I want to do something like:</p>
<pre><code>select [table]
from [db]
where table [has column 'classtypeid']
</code></pre>
<p>How c... | <p>Use the ANSI information_schema views, this will also work in MySQL</p>
<pre><code>select table_name
from information_schema.columns
where column_name = 'classtypeid'
</code></pre>
| <p>Here you go:</p>
<pre><code>SELECT C.TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS AS C
INNER JOIN INFORMATION_SCHEMA.TABLES AS T ON C.TABLE_NAME = T.TABLE_NAME
AND C.TABLE_SCHEMA = T.TABLE_SCHEMA
WHERE C.COLUMN_NAME = 'classtypeid'
AND T.TABLE_TYPE = 'BASE TABLE'
</code></pre>
<hr>
<p><strong>Edit</strong>:... | 4,768 |
<p>In a drop down list, I need to add spaces in front of the options in the list. I am trying</p>
<pre><code><select>
<option>&#32;&#32;Sample</option>
</select>
</code></pre>
<p>for adding two spaces but it displays no spaces. How can I add spaces before option texts?</p>
| <p>Isn't <code>&#160</code> the entity for space?</p>
<pre><code><select>
<option>&#160;option 1</option>
<option> option 2</option>
</select>
</code></pre>
<p>Works for me...</p>
<h3>EDIT:</h3>
<p>Just checked this out, there <em>may</em> be compatibility issues with this... | <p>I tried several of these examples, but the only thing that worked was using javascript, much like dabobert's, but not jQuery, just plain old vanilla javascript and spaces:</p>
<pre><code>for(var x = 0; x < dd.options.length; x++)
{
item = dd.options[x];
//if a line that needs indenting
item.text = ' ... | 4,534 |
<p>I printed a model and now I can't remove it.</p>
<p>I have been chiselling away with a putty knife and made little or no progress. I even heated the bed up to 70 °C. That really didn't seem to help.</p>
<p>Last time, I put it in vice, and tried to free it that way, but instead I broke the glass.</p>
<p... | <p>It's useful to know what material you used for the print. Also, you've referenced the glass that broke in the vise, which implies a glass bed, but did you use any adhesive spray or other application?</p>
<p>Allowing for all of this unknown information, there may be a solution for your release. Our library makerspac... | <p>I don't have a glass bed, but I've had a lot of luck with using dental floss to get stuck prints loose. </p>
<p>If you can get the floss under the edge of the print, then you just pull it through to the other side. </p>
<p>This technique takes some practice but works really well once you get the hang of it. </p>
| 1,539 |
<p>Details:</p>
<ul>
<li>Only disable after user clicks the submit button, but before the posting back to the server</li>
<li>ASP.NET Webforms (.NET 1.1)</li>
<li>Prefer jQuery (if any library at all)</li>
<li>Must be enabled if form reloads (i.e. credit card failed)</li>
</ul>
<p>This isn't a necessity that I do thi... | <p>For all submit buttons, via JQuery, it'd be:</p>
<pre><code>$('input[type=submit]').click(function() { this.disabled = true; });
</code></pre>
<p>Or it might be more useful to do so on form submission:</p>
<pre><code>$('form').submit(function() {
$('input[type=submit]', this).attr("disabled","disabled");
});
... | <p>There are three ways to submit a form that should be covered. Use both David McLaughlin's and Jimmy's suggestions. One will disable the submit button form element while the other disables the basic HTML form submit.</p>
<p>For the third, these won't disable Javascript from doing a form.submit(). The <code>OnSubm... | 6,810 |
<p>Can you please tell me how much is <code>(-2) % 5</code>?
According to my Python interpreter is 3, but do you have a wise explanation for this?</p>
<p>I've read that in some languages the result can be machine-dependent, but I'm not sure though.</p>
| <p>By the way: most programming languages would disagree with Python and give the result <code>-2</code>. Depending on the interpretation of modulus this is correct. However, the most agreed-upon mathematical definition states that the modulus of <em>a</em> and <em>b</em> is the (strictly positive) rest <em>r</em> of t... | <p>Well, -2 divided by 5 would be 0 with a remainder of 3. I don't believe that should be very platform dependent, but I've seen stranger things.</p>
| 6,535 |
<p>In Hibernate we have two classes with the following classes with JPA mapping:</p>
<pre><code>package com.example.hibernate
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax... | <p>I had a similar problem:</p>
<ul>
<li>I did Session.save(nastyItem) to save an object into the Session.
However, I did not fill in the property buyer which is mapped as update="false" insert="false" (this happens a lot when you have a composed primary key, then you map the many-to-one's as insert="false" update="fa... | <p>Not really seen this problem, although we do get intermittent Lazy Load errors - so perhaps we have the same problem, anyway, is it an option to use a different session for the loading of the Bar object - that should load it from scratch, I would expect...</p>
| 8,724 |
<p>I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system.</p>
<p>Some thoughts I've had were:</p>
<ul>
<li><p><strong>Roll my own serializer using DataOutputStream</strong>: This would give me the greatest control of what... | <p>I would go for the your final option JavaDB (Sun's distribution of <a href="http://db.apache.org/derby" rel="nofollow noreferrer">Derby</a>) and use an object relational layer like <a href="http://hibernate.org" rel="nofollow noreferrer">Hibernate</a> or <a href="http://ibatis.apache.org" rel="nofollow noreferrer">i... | <p>I think it depends on what you need. Let's see the options:</p>
<p>1) Descarded imediatelly! I'll not even justify. :)</p>
<p>2) If you need a simple, quick, one-method persistence, stick with it. It will persist the complete data graph as it is! Beware of how long you'll be maintaning the persisted objects. As yo... | 5,792 |
<p>Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following:</p>
<pre><code> OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection);
dbCmd.CommandTimeout = mTimeout;
results = dbCmd.ExecuteNonQuery();
</code></pre>
<p>But I get an OleDbException ... | <p>You need to add <code>ReadOnly=False;</code> to your connection string</p>
<pre><code>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=fifa_ng_db.xls;Mode=ReadWrite;ReadOnly=false;Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";
</code></pre>
| <ul>
<li>How do I check the permissions for writing to an excel file for my application (I'm using excel 2007)?</li>
<li>The file is not read only, or protected (to my knowledge).</li>
<li>My connection String is: </li>
</ul>
<blockquote>
<p>"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=fifa_ng_db.xls;Mode=... | 8,242 |
<p>I'm a PHP developer, and I use the MVC pattern and object-oriented code. I really want to write applications for the iPhone, but to do that I need to know Cocoa, but to do that I need to know Objective-C 2.0, but to do that I need to know C, and to do that I need to know about compiled languages (versus interpreted)... | <p>Yes, you're really best off learning C and then Objective-C. There are some resources that will get you over the C and Objective-C language learning curve:</p>
<ul>
<li>Uli Kusterer's online book <a href="http://www.zathras.de/angelweb/masters-of-the-void.htm" rel="noreferrer">Masters of the Void</a></li>
<li>Step... | <p>I think starting with C would be a smart thing to do. After all, Objective-C is C language with some extensions.</p>
<p>To develop in Cocoa you are required to know well how pointers and memory allocation work (there's no garbage collection on the iPhone), plus you will have to use some standard C libraries, <b>bec... | 5,375 |
<p>Using the <code>zip</code> function, Python allows for loops to traverse multiple sequences in parallel. </p>
<p><code>for (x,y) in zip(List1, List2):</code></p>
<p>Does MATLAB have an equivalent syntax? If not, what is the best way to iterate over two parallel arrays at the same time using MATLAB?</p>
| <p>If x and y are column vectors, you can do:</p>
<pre><code>for i=[x';y']
# do stuff with i(1) and i(2)
end
</code></pre>
<p>(with row vectors, just use <code>x</code> and <code>y</code>).</p>
<p>Here is an example run:</p>
<pre class="lang-matlab prettyprint-override"><code>>> x=[1 ; 2; 3;]
x =
1
... | <p><code>for</code> loops in MATLAB used to be slow, but this is not true anymore.</p>
<p>So vectorizing is not always the miracle solution. Just use the profiler, and <code>tic</code> and <code>toc</code> functions to help you identify possible bottlenecks.</p>
| 7,183 |
<p>I'm pretty sure the answer to this question is no, but in case there's some PHP guru</p>
<p>is it possible to write a function in a way where invalid arguments or non existent variables can be passed in and php will not error without the use of <code>'@'</code></p>
<p>Much like empty and isset do. You can pass in ... | <p>Summing up, the proper answer is <strong>no, you shouldn't</strong> (see caveat below). </p>
<p>There are workarounds already mentioned by many people in this thread, like using reference variables or isset() or empty() in conditions and suppressing notices in PHP configuration. That in addition to the obvious work... | <p>And going further up the abstraction tree, what are you using this for?</p>
<p>You could either initialize those values in each class as appropriate or create a specific class containing all the default values and attributes, like:</p>
<pre><code>class Configuration {
private var $configValues = array( 'cool'... | 7,877 |
<p>I've been trying to learn Blender as an additional tool for 3D printing (to prepare more organic or freeform models that don't lend themselves to a CAD style workflow I'm more used to), and one point of confusion I've hit is that Blender's default unit is <em>meters</em>, not millimeters. Apparently in older version... | <h2>Make sure to set the scale properly for your use case!</h2>
<p>In CAD, you define your measurement space in either Inch or in Millimeter units, and that is your grid. In blender, the native unit is the meter.</p>
<p>This can be easily converted in exporting (remember to set it to scale!), but it is best to just set... | <p>It doesn't matter, you scale it in the slicer or elsewhere. You're not going to slice the STL file in Blender. You'll probably need to do more work to get things print ready outside blender anyway.</p>
<p>So when I use blender I don't even bother checking what units it's using. I don't use it for parts design or tec... | 2,121 |
<p>A friend and I were discussing C++ templates. He asked me what this should do:</p>
<pre><code>#include <iostream>
template <bool>
struct A {
A(bool) { std::cout << "bool\n"; }
A(void*) { std::cout << "void*\n"; }
};
int main() {
A<true> *d = 0;
const int b = 2;
co... | <p>AFAIK it would be compiled as <code>new A<b>(c) > d</code>. This is the only reasonable way to parse it IMHO. If the parser can't assume under normal circumstances a > end a template argument, that would result it much more ambiguity. If you want it the other way, you should have written:</p>
<pre><code>new A<... | <p>The greediness of the lexer is probably the determining factor in the absence of parentheses to make it explicit. I'd guess that the lexer isn't greedy.</p>
| 7,575 |
<p>For years, I've been investigating how to create music streams from my computer. I've seen programs, but anything useful I've seen is Windows only (I use a Mac).</p>
<p>Eventually, I got interested in <em>how</em> streams work. Is there any way I could create my <em>own</em> stream, possibly using socket function... | <p>Take a look at <a href="http://ampache.org/" rel="nofollow noreferrer">Ampache</a>. It is a Web-based Open Source Audio file manager. It is implemented with MySQL, and PHP. It allows you to view, edit, and play your audio files via the web.</p>
| <p>In the end it all boils down to the protocol you'd want to use. Shoutcast IMHO is plain HTTP, so to <em>make</em> your own stream, you just output the streams content.</p>
<p>To make an ogg based webradio work with my Sonos system, I have created a little transcoding wrapper around sox which is is actually written ... | 6,697 |
<p>I'm considering dumping boost as a dependency... atm the only thing that I really need is <code>shared_ptr<></code>, and I can get that from <code>std::tr1</code>, available in gcc suite 4.*</p>
| <p>It's available on Fedora, installable via "yum" if you didn't pick "Development System" as your default install set. "yum search gcc" to get the package to install.</p>
| <p>No, on my debian systems I have to install it. But any half-decent system admin should be able to figure out how to install it.</p>
<p>Edit: to be specific it is not always installed by default, but it should be available for most every distro.</p>
| 8,811 |
<p>Given a small set of entities (say, 10 or fewer) to insert, delete, or update in an application, what is the best way to perform the necessary database operations? Should multiple queries be issued, one for each entity to be affected? Or should some sort of XML construct that can be parsed by the database engine be ... | <p>It depends on how many you need to do, and how fast the operations need to run. If it's only a few, then doing them one at a time with whatever mechanism you have for doing single operations will work fine.</p>
<p>If you need to do thousands or more, and it needs to run quickly, you should re-use the connection an... | <p>Most databases support BULK UPDATE or BULK DELETE operations. </p>
| 6,622 |
<p>I've got a web application that I'm trying to optimize. Some of the controls are hidden in dialog-style <code>DIVs</code>. So, I'd like to have them load in via AJAX only when the user wants to see them. This is fine for controls that are mostly literal-based (various menus and widgets), but when I have what I call... | <p>Check out the <a href="http://www.telerik.com/products/aspnet-ajax/controls/ajax/overview.aspx" rel="noreferrer">RadAjax</a> control from Telerik - it allows you to avoid using UpdatePanels, and limit the amount of info passed back and forth between server and client by declaring direct relationships between calling... | <p>Step one is to make your "dirty" pieces self contained user controls</p>
<p>Step two is to embed those controls on your consuming page</p>
<p>Step three is to wrap each user control tag in their own Asp:UpdatePanel</p>
<p>Step four is to ensure your control gets the data it needs by having it read from properties... | 2,437 |
<p>What are the main differences when using ABS over PLA and vice versa?</p>
| <p>Paraphrasing <a href="http://www.protoparadigm.com/news-updates/the-difference-between-abs-and-pla-for-3d-printing/">this</a> site. Feel free to add suggestions in the form of comments and I will try to incorporate them.</p>
<p>Summary</p>
<ul>
<li>ABS: Stronger, machinable, more flexible, and more temperature
res... | <p>PLA (polylactic acid) melts at a lower temp and does not warp AS BADLY when cooled. It is non-toxic (in USA it comes from cornstarch, beets in some countries, or tapioca root)
It is less flexible than ABS, could rip or crumble.</p>
<p>ABS (Acrylonitrile Butadiene Styrene) is a harder and more sturdy plastic. (What ... | 86 |
<p>Why would you do an automatic HTML post rather than a simple redirect?</p>
<p>Is this so developers can automatically generate a login form that posts directory to the remote server when the OpenID is known?</p>
<p>eg.</p>
<ol>
<li>User is not logged in and visits your login page.</li>
<li>You detect the user's o... | <p>The primary motivation was, as Mark Brackett says, the limits on payload size imposed by using redirects and GET. Some implementations are smart enough to only use POST when the message goes over a certain size, as there are certainly disadvantages to the POST technique. (Chief among them being the fact that your ... | <p>The same approach is used for the SAML Web Browser SSO profile. The primary motivations of using HTML Post redirection are :</p>
<ul>
<li><p>Virtually unlimited length of the payload : in SAML the payload is a XML document signed with XMLDSig and base64 encoded. It is larger than the usual 1024 characters limitatio... | 5,493 |
<p>Is there something special about Safari for Windows and AJAX?<br>
In other words: Are there some common pitfalls I should keep in mind?</p>
| <p>Safari is really standards compliant. Unless you're using some really esoteric browser features, in general if something works in Firefox, I've found it works without modification in Windows Safari.</p>
<p>Apple has <a href="http://developer.apple.com/internet/safari/" rel="nofollow noreferrer">a developer center ... | <p>One word of warning: Safari on Windows does not support XSLT.</p>
| 8,258 |
<p>I'm using the d programing language to write a program, and I'm trying to use ddbg to debug it. When there is an exception, I want to have the program break whenever there is an exception thrown so that I can inspect the stack.</p>
<p>Alternatively, is there another debugger that works with d? Is there another wa... | <p>You want to break when there's any exception thrown or just uncaught exceptions? Because I think the latter is already the default behavior.</p>
<p>You probably know this, but you get the stack trace by typing 'us' (unwind stack) at the prompt. Just trying to eliminate the obvious.</p>
<p>Anyway, I've never had ... | <p>Haven't used ddbg yet, but according to the documentation at <a href="http://ddbg.mainia.de/doc.html" rel="nofollow noreferrer">http://ddbg.mainia.de/doc.html</a> there is the</p>
<blockquote>
<p>onex <cmd; cmd; ...> on exception execute list of commands</p>
</blockquote>
<p>command.</p>
| 6,965 |
<p>I started to write an application that calculates the estimated total print time from the G-code file for an already sliced model.</p>
<p>The program works and it's pretty accurate.</p>
<p>It works as follows: </p>
<ol>
<li>It scans the entire G-code file to identify all of the movements</li>
<li>It calculates th... | <p>I have tried looking into the printer firmware to see how the <em>Acceleration</em> setting affects the machine movement. From what I could tell, <em>Acceleration</em> seemed to be implemented differently depending on what firmware I looked at and was also affected by what the settings used on the printer were. I d... | <p>I have tried looking into the printer firmware to see how the <em>Acceleration</em> setting affects the machine movement. From what I could tell, <em>Acceleration</em> seemed to be implemented differently depending on what firmware I looked at and was also affected by what the settings used on the printer were. I d... | 459 |
<p>I was wondering if there is an open source library or algorithm that can expand a non-numeric range. For example, if you have <code>1A</code> to <code>9A</code> you should get </p>
<pre><code>1A, 2A, 3A, 4A, 5A, 6A, 7A, 8A, 9A.
</code></pre>
<p>I've tried Googling for this and the best I could come up with were R... | <p>As noted by others, it would be useful to be more specific. I don't think you can expect there to be a library that will generate ranges according to any arbitrary order on string you can come up with.</p>
<p>If you can simply define what the successor of any given string is, then the solutions is quite easy. That ... | <p>I was trying to leave it somewhat open because the number of possibilities is staggering. I believe this one of those questions that could not be answered 100% here without going through a lot of technical detail about is considered a "good" or "bad" range. I'm just trying to find a jumping point for ideas on how ... | 6,762 |
<p>Just started doing some design. First project was a replacement handle for my angle grinder, so basically a hollow cylinder. I want to reduce the amount of material used in the print. I could sit here and punch holes through the handle with a smaller cylinder, or some other shape etc., but is there an easier way to ... | <p>Updated to match the improved question format.</p>
<p>There are a few ways to reduce material usage. First is what you have touched on. Which is to reduce the design by punching out holes, and removing all material that does not add anything to the structure. Even better is what you touched on, reducing it to the p... | <p>"<em>Just like the movies</em>"-type tech typically means <strong><em>$$$</em></strong>. </p>
<p>For those who do not own (legally or otherwise) expensive CAD software, it may be difficult to find an out-of-the-box solution. That's not to say that it can't be done.</p>
<p>A close, readily available, solution would... | 454 |
<p>I am displaying a list of items using a SAP ABAP column tree model, basically a tree of folder and files, with columns.</p>
<p>I want to load the sub-nodes of folders dynamically, so I'm using the EXPAND_NO_CHILDREN event which is firing correctly.</p>
<p>Unfortunately, after I add the new nodes and items to the tre... | <p>It's been a while since I've played with SAP, but I always found the SAP Library to be particularly helpful when I got stuck...</p>
<p>I managed to come up with this one for you:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/47/aa7a18c80a11d3a6f90000e83dd863/frameset.htm" rel="nofollow noreferrer">http://he... | <p>Your code looks fine,</p>
<p>I would use the method <code>ADD_NODES_AND_ITEMS</code> myself if I were to add nodes and items ;)</p>
<p>Beyond that, try to call <code>EXPAND_NODE</code> after you added the items/nodes and see if that helps.</p>
| 2,911 |
<p>I want to print a object that looks like a flat board with a set of matchbox-like lumps on top of it.</p>
<p>I have written a script that outputs an STL file. To keep the script simple, it creates an object that includes non-manifold edges. To be precise, the board and the boxes are a single model, but each has 6 f... | <p>Blender imports all STL files as if they are a single object. If you have multiple meshes in the object that you want to be separated, you can press tab to enter edit mode, select the parts that need to be separated, then hit P and separate by selected.</p>
<p>If you want to print those pieces as one part you have ... | <p>I think there's an easier way to do this - <em>if</em> you're not committed to using Blender, and it sounds as if you're not.</p>
<p>Take a look at <a href="http://www.openscad.org/" rel="nofollow noreferrer">http://www.openscad.org/</a> (which should run anywhere that Blender does). It's very easy to write code to... | 736 |
<p>I am attempting to copy a custom struct from kernel space to user space. inside user space errno returns 'bad address'. What is the usual cause of a bad address error?</p>
<pre><code>if(copy_to_user(info, &kernel_info, sizeof(struct prinfo)))
</code></pre>
| <p>Bad Address error means that the address location that you have given is invalid. With the case you have above I would guess it is because you are passing a copy of <code>info</code> instead of a pointer to <code>info</code>'s memory location.</p>
<p>Looking at the docs, <code>copy_to_user</code> is defined as</p>
... | <p>I had a same problem while writing a small char driver. All I was doing wrong was the function copy_to_user returns non-zero on failure, so you have to do this..</p>
<pre><code>if(copy_to_user(void *userbuf, void *kernelbuf, long len))
return -EFAULT;
// Continue with code..
</code></pre>
| 8,721 |
<p>I'm new to 3D printing, but I've solved all of my problems except for this rough surface shown in the image of a Benchy print:</p>
<p><a href="https://i.stack.imgur.com/rhJhL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rhJhL.jpg" alt="Benchy showing printing defects"></a></p>
<p>Any suggest... | <p>You print too hot and probably with not enough cooling. These typical defects are caused by too much heat input into your model. You see this best at the overhang of the bow of Benchy, it should be smooth like the bottom part of the side of your Benchy. It clearly shows heat induced defects. Lower the temperature at... | <p>Try to re-compile the gcode, sometimes the slicer "freaks out" whilst writing the file. Which slicer are you using? (Cura, Slic3r, Repetier, etc.)</p>
<p>I sometimes have that errors, and giving that they do seem quite consistent in shape in the pics I would say that's the issue.</p>
| 1,188 |
<p>If I have an XElement that has child elements, and if I remove a child element from the parent, removing all references between the two, will the child XElement have the same namespaces as the parent?</p>
<p>In other words, if I have the following XML:</p>
<pre><code><parent xmlns:foo="abc">
<foo:chil... | <p>Sure. Ultimately the image comes from a URL of some sort. Do a view-source on the web page and see what that URL looks like. With a certain amount of reverse-engineering, usage of System.Web.UI.HtmlTextWriter, perhaps an HttpHandler, etc. you should be able to get what you want.</p>
| <p>Use the ExportToImage method of the ChartControl object .. This is WinForm code, but the same concept should hold true for WebChartControl:</p>
<pre><code> Dim chart As ChartControl = ChartControl1.Clone()
chart.Size = New Size(800, 600)
chart.ExportToImage("file.png", System.Drawing.Imaging.ImageFormat.... | 6,868 |
<p>On an 8-bit micro controller I would like to do the following:</p>
<pre><code>16bit_integer = another_16bit_integer * 0.997;</code></pre>
<p>with the least possible number of instructions.</p>
| <p>How about integer arithmetic in 32 bits?</p>
<pre><code>16bit_integer = (int16_t) (another_16bit_integer * (int32_t) 997 / 1000);
</code></pre>
<p>32 bits will be enough to store (INT16_MAX × 997), do the sum on values 1000 times larger then divide back to your 16 bit scale.</p>
| <p>Precomputed lookup table:</p>
<pre><code>16bit_integer = products[another_16bit_integer];
</code></pre>
| 4,701 |
<p>I'm looking for a strong filament that can handle a large tension load and no bending deformation when a perpendicular force is applied to it. Any suggestions?</p>
| <p>Carbon or glass fiber reinforced PLA likely has the strongest without deformation. PLA will snap before deforming.</p>
<p>Fiber reinforced ABS is also an option. ABS is stronger but will bend before breaking. </p>
<p>Both are hard on nozzles and may require a stainless steel nozzle.</p>
| <p>As far as I know, Nylon filaments are among the strongest. I'd look at the technical specs of <a href="http://taulman3d.com/index.html" rel="nofollow">Taulman3D's Filament</a>. They're the only nylon I've ever tried, and I know they have in-depth specs of how their filament holds up. I'm sure you can find other prov... | 381 |
<p>What experience can you share about using multiple AJAX libraries?</p>
<p>There are useful features in Prototype, some in jQuery, the Yahoo library, etc. Is it possible to include all libraries and use what you want from each, do they generally all play nicely together with name spaces, etc. For the sake of speed i... | <p>You could use all those libraries, but I highly recommend against it. Downloading and executing that much JavaScript will most likely choke the browser and slow down your user's experience. It would be much better from a user's perspective and a developer's to pick one. Less context/architecture switching and less c... | <p>Ruby on Rails uses both prototype and Scriptaculous by default, as there is little overlap between the two. I've also used yui snippets in addition to that and have never had a problem. Load times are an issue, but the libraries are usually cached, so it's only on the first page loaded.</p>
| 8,522 |
<p>I'm generating ICalendar (.ics) files.</p>
<p>Using the UID and SEQUENCE fields I can update existing events in Google Calendar and in Windows Calendar <strong><em>BUT NOT</em></strong> in MS Outlook 2007 - it just creates a second event</p>
<p>How do I get them to work for Outlook ?</p>
<p>Thanks</p>
<p>Tom</p>... | <p>I've continued to do some testing and have now managed to get Outlook to update and cancel events based on the .cs file.</p>
<p>Outlook in fact seems to respond to the rules defined in <a href="https://www.rfc-editor.org/rfc/rfc2446#page-19" rel="nofollow noreferrer">RFC 2446</a></p>
<p>In summary you have to specif... | <p>I'm using Entourage, so this may not match up exactly with the behavior you're seeing, but I hope it helps.</p>
<p>Using the iCalendar from your reply, Entourage wouldn't even import the data. Using a known-good file, I got it to import, then successfully update. Comparing the two files, the only structural differe... | 6,733 |
<p>I've run into a strange syntax in <a href="http://boo.codehaus.org/Closures" rel="nofollow noreferrer">Boo Language Guide</a> :</p>
<pre><code>setter = { value | a = value }
</code></pre>
<p>What does the | operator mean?</p>
| <p>The documentation of Boo seems to be lacking in this area -- it seems that </p>
<pre><code>setter = { value | a = value }
</code></pre>
<p>is shorthand for</p>
<pre><code>setter = def(value):
a = value
</code></pre>
| <p>That syntax for specifying code blocks (anonymous functions) has been borrowed from <a href="http://blog.codahale.com/2005/11/24/a-ruby-howto-writing-a-method-that-uses-code-blocks/" rel="nofollow noreferrer">Ruby</a> and <a href="http://web.cecs.pdx.edu/~harry/musings/SmalltalkOverview.html#Blocks" rel="nofollow no... | 5,744 |
<p>Why does the following code not work as I was expecting?</p>
<pre><code><?php
$data = array(
array('Area1', null, null),
array(null, 'Section1', null),
array(null, null, 'Location1'),
array('Area2', null, null),
array(null, 'Section2', null),
array(null, null, 'Location2')
);
$root = arra... | <p>If you modify your code on two lines as follows:</p>
<pre><code>$area = array();
$section = array();
</code></pre>
<p>to this:</p>
<pre><code>unset($area);
$area = array();
unset($section);
$section = array();
</code></pre>
<p>it will work as expected.</p>
<p>In the first version, <code>$area</code> and <code... | <p>This will also works:</p>
<pre><code>$root[$row[0]] = array();
$area =& $root[$row[0]];
</code></pre>
| 6,448 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.